repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
saurabh6790/omnit-app
refs/heads/master
setup/doctype/quotation_lost_reason/test_quotation_lost_reason.py
30
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt test_records = [[{"doctype":"Quotation Lost Reason", "order_lost_reason": "_Test Quotation Lost Reason"}]]
emesene/emesene
refs/heads/master
emesene/e3/papylib/papyon/papyon/service/AddressBook/scenario/base.py
6
# -*- coding: utf-8 -*- # # Copyright (C) 2007 Johann Prieur <johann.prieur@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) an...
altsen/diandiyun-platform
refs/heads/master
cms/djangoapps/course_creators/admin.py
232
""" django admin page for the course creators table """ from course_creators.models import CourseCreator, update_creator_state, send_user_notification, send_admin_notification from course_creators.views import update_course_creator_group from ratelimitbackend import admin from django.conf import settings from django....
ajgallegog/gem5_arm
refs/heads/master
src/mem/slicc/ast/AssignStatementAST.py
51
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source co...
jsirois/pants
refs/heads/master
src/python/pants/base/build_environment_test.py
4
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os from pants.base.build_environment import get_pants_cachedir from pants.util.contextutil import environment_as, temporary_file def test_get_pants_cachedir() -> None: with e...
iidx/volatility
refs/heads/master
volatility/plugins/registry/hivelist.py
44
# Volatility # Copyright (C) 2008-2013 Volatility Foundation # Copyright (c) 2008 Brendan Dolan-Gavitt <bdolangavitt@wesleyan.edu> # # This file is part of Volatility. # # Volatility is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free...
chinmaygarde/depot_tools
refs/heads/master
third_party/logilab/common/testlib.py
64
# -*- coding: utf-8 -*- # copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser Genera...
BigBrother1984/android_external_chromium_org
refs/heads/kitkat
tools/telemetry/telemetry/page/cloud_storage.py
23
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Wrappers for gsutil, for basic interaction with Google Cloud Storage.""" import cStringIO import hashlib import logging import os import subprocess i...
himanshu219/django-pagination
refs/heads/master
pagination/paginator.py
36
from django.core.paginator import Paginator, Page, PageNotAnInteger, EmptyPage class InfinitePaginator(Paginator): """ Paginator designed for cases when it's not important to know how many total pages. This is useful for any object_list that has no count() method or can be used to improve performance ...
j-carl/ansible
refs/heads/devel
lib/ansible/errors/__init__.py
9
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
rep/certificate-transparency
refs/heads/master
cpp/client/fix-chain.py
34
#!/usr/bin/env python # Given a certificate chain that the log won't accept, try to fix it up # into one that will be accepted. # Based on pyasn1 example code. from base64 import b64encode from ct.crypto.pem import PemError from ct.crypto.pem import from_pem from pyasn1 import debug # Why doesn't this work? #from py...
storm-computers/odoo
refs/heads/9.0
addons/website_customer/__init__.py
1023
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import controllers import models
WangRobo/rosbridge_suite
refs/heads/develop
rosbridge_server/src/tornado/__init__.py
15
#!/usr/bin/env python # # Copyright 2009 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
crsilveira/odoo-brazil-banking
refs/heads/8.0
l10n_br_account_payment_boleto/reports/report.py
3
# -*- encoding: utf-8 -*- ############################################################################## # # Account Payment Boleto module for Odoo # Copyright (C) 2012-2015 KMEE (http://www.kmee.com.br) # @author Luis Felipe Miléo <mileo@kmee.com.br> # # This program is free software: you can redistribute ...
manuelep/openshift_v3_test
refs/heads/master
wsgi/web2py/handlers/wsgihandler.py
25
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) This is a WSGI handler for Apache Requires apache+mod_wsgi. In httpd.conf put something like: LoadMo...
bholley/servo
refs/heads/master
tests/wpt/web-platform-tests/webdriver/navigation/refresh-page.py
200
import os import sys import unittest sys.path.insert(1, os.path.abspath(os.path.join(__file__, "../.."))) import base_test class RefreshPageTest(base_test.WebDriverBaseTest): # Get a static page that must be the same upon refresh def test_refreshPage(self): self.driver.get(self.webserver.where_is('na...
johnttaylor/Outcast
refs/heads/master
bin/ceres.py
1
#! /usr/bin/env python3 """ Ceres is a Outcast tool for managing Outcast Universes =============================================================================== usage: ceres [options] <command> [<args>...] ceres [--qry] ceres [--help] Options: --user USER Set the user id (overrides the e...
johnbachman/indra
refs/heads/master
indra/databases/taxonomy_client.py
4
"""Client to access the Entrez Taxonomy web service.""" import requests base_url = 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi' def _send_search_request(term): params = { 'db': 'taxonomy', 'term': term, 'retmode': 'json' } res = requests.get(base_url, params=pa...
binarydud/django-oscar
refs/heads/master
tests/integration/offer/status_tests.py
50
from decimal import Decimal as D from django.test import TestCase from oscar.core.loading import get_model from oscar.test.factories import ConditionalOfferFactory class TestAnOfferChangesStatusWhen(TestCase): def setUp(self): ConditionalOffer = get_model('offer', 'ConditionalOffer') self.offer...
tinchoss/Python_Android
refs/heads/master
python/src/Lib/plat-os2emx/SOCKET.py
134
# Generated by h2py from f:/emx/include/sys/socket.h # Included from sys/types.h FD_SETSIZE = 256 # Included from sys/uio.h FREAD = 1 FWRITE = 2 SOCK_STREAM = 1 SOCK_DGRAM = 2 SOCK_RAW = 3 SOCK_RDM = 4 SOCK_SEQPACKET = 5 SO_DEBUG = 0x0001 SO_ACCEPTCONN = 0x0002 SO_REUSEADDR = 0x0004 SO_KEEPALIVE = 0x0008 SO_DONTROUTE...
toenuff/treadmill
refs/heads/master
lib/python/treadmill/syscall/inotify.py
1
"""Linux inotify(7) API wrapper module """ import collections import logging import operator import os import struct import ctypes from ctypes import ( c_int, c_char_p, c_uint32, ) from ctypes.util import find_library import enum _LOGGER = logging.getLogger(__name__) #################################...
eblade/pyroman2
refs/heads/master
pyroman/pdf/object.py
1
class Object: def __init__(self, id=0): self.object_identifier = id self._content = [] def __str__(self): return ''.join([x.__str__() for x in self._content]) def put(self, obj): self._content.append(obj) @property def obj(self): if self.object_identifier =...
daichi-yoshikawa/dnn
refs/heads/master
dnnet/layers/affine.py
1
# Authors: Daichi Yoshikawa <daichi.yoshikawa@gmail.com> # License: BSD 3 clause from dnnet.layers.layer import Layer from dnnet.ext_mathlibs import cp, np from dnnet.training.weight_initialization import DefaultInitialization from dnnet.utils.nn_utils import is_multi_channels_image from dnnet.utils.nn_utils import pr...
tomtor/QGIS
refs/heads/master
python/plugins/processing/modeler/ModelerParametersDialog.py
23
# -*- coding: utf-8 -*- """ *************************************************************************** ModelerParametersDialog.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ***************...
endocode/linux
refs/heads/master
tools/perf/scripts/python/export-to-postgresql.py
293
# export-to-postgresql.py: export perf data to a postgresql database # Copyright (c) 2014, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # Thi...
cts2/rf2service
refs/heads/master
server/Concept.py
1
# -*- coding: utf-8 -*- # Copyright (c) 2013, Mayo Clinic # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this # ...
Spiderlover/Toontown
refs/heads/master
toontown/coghq/CogHQExterior.py
2
from direct.directnotify import DirectNotifyGlobal from toontown.battle import BattlePlace from direct.fsm import ClassicFSM, State from direct.fsm import State from toontown.toonbase import ToontownGlobals from pandac.PandaModules import * from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs f...
yanheven/ceilometer
refs/heads/master
ceilometer/ipmi/pollsters/node.py
1
# Copyright 2014 Intel # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
eemirtekin/edx-platform
refs/heads/master
lms/djangoapps/courseware/features/courseware.py
177
# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step from lettuce.django import django_url @step('I visit the courseware URL$') def i_visit_the_course_info_url(step): url = django_url('/courses/MITx/6.002x/2012_Fall/courseware') world.browser.visit(url)
2014cdag10/2014cdag10
refs/heads/master
wsgi/static/Brython2.1.0-20140419-113919/Lib/webbrowser.py
735
from browser import window __all__ = ["Error", "open", "open_new", "open_new_tab"] class Error(Exception): pass _target = { 0: '', 1: '_blank', 2: '_new' } # hack... def open(url, new=0, autoraise=True): """ new window or tab is not controllable on the client side. autoraise not available. ""...
matthaywardwebdesign/rethinkdb
refs/heads/next
external/v8_3.30.33.16/build/gyp/test/win/gyptest-link-debug-info.py
344
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Make sure debug info setting is extracted properly. """ import TestGyp import sys if sys.platform == 'win32': test = TestGyp.TestGy...
stormi/tsunami
refs/heads/master
src/primaires/scripting/actions/deplacer.py
1
# -*-coding:Utf-8 -* # Copyright (c) 2012 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # lis...
mgit-at/ansible
refs/heads/devel
lib/ansible/modules/packaging/os/pkg5_publisher.py
102
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2014 Peter Oliver <ansible@mavit.org.uk> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': ...
bixbydev/Bixby
refs/heads/master
google/dist/gdata-2.0.18/samples/oauth/oauth_on_appengine/appengine_utilities/cron.py
129
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
FATruden/boto
refs/heads/master
boto/dynamodb2/exceptions.py
20
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights ...
ds-hwang/chromium-crosswalk
refs/heads/master
chrome/browser/web_dev_style/css_checker.py
3
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Presubmit script for Chromium WebUI resources. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the pre...
twobob/buildroot-kindle
refs/heads/master
output/build/host-python-2.7.2/Lib/test/test_shutil.py
14
# Copyright (C) 2003 Python Software Foundation import unittest import shutil import tempfile import sys import stat import os import os.path from os.path import splitdrive from distutils.spawn import find_executable, spawn from shutil import (_make_tarball, _make_zipfile, make_archive, register_ar...
thomdixon/elasticsearch-py
refs/heads/master
elasticsearch/connection/esthrift/__init__.py
36
__all__ = ['ttypes', 'constants', 'Rest']
YinongLong/scikit-learn
refs/heads/master
sklearn/ensemble/weight_boosting.py
12
"""Weight Boosting This module contains weight boosting estimators for both classification and regression. The module structure is the following: - The ``BaseWeightBoosting`` base class implements a common ``fit`` method for all the estimators in the module. Regression and classification only differ from each ot...
aabbox/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/site-packages/pip/_vendor/html5lib/treewalkers/lxmletree.py
355
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from lxml import etree from ..treebuilders.etree import tag_regexp from gettext import gettext _ = gettext from . import _base from .. import ihatexml def ensure_str(s): if s is None: return None ...
ilarischeinin/chipster
refs/heads/master
ext/applications/apache-activemq-5.10.0/examples/stomp/python/stomppy/listener.py
7
#!/usr/bin/env python # ------------------------------------------------------------------------ # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF li...
SanketDG/networkx
refs/heads/master
networkx/algorithms/approximation/clique.py
11
# -*- coding: utf-8 -*- """ Cliques. """ # Copyright (C) 2011-2012 by # Nicholas Mancuso <nick.mancuso@gmail.com> # All rights reserved. # BSD license. import networkx as nx from networkx.algorithms.approximation import ramsey __author__ = """Nicholas Mancuso (nick.mancuso@gmail.com)""" __all__ = ["clique_remov...
kylejusticemagnuson/pyti
refs/heads/master
tests/test_moving_average_envelope.py
1
from __future__ import absolute_import import unittest import numpy as np from tests.sample_data import SampleData from pyti import moving_average_envelope class TestMovingAverageEnvelope(unittest.TestCase): def setUp(self): """Create data to use for testing.""" self.data = SampleData().get_sampl...
otherness-space/myProject002
refs/heads/master
my_project_002/lib/python2.7/site-packages/django/contrib/admin/templatetags/admin_list.py
103
from __future__ import unicode_literals import datetime from django.contrib.admin.util import (lookup_field, display_for_field, display_for_value, label_for_field) from django.contrib.admin.views.main import (ALL_VAR, EMPTY_CHANGELIST_VALUE, ORDER_VAR, PAGE_VAR, SEARCH_VAR) from django.contrib.admin.templatet...
tcwicklund/django
refs/heads/master
django/contrib/postgres/forms/ranges.py
393
from psycopg2.extras import DateRange, DateTimeTZRange, NumericRange from django import forms from django.core import exceptions from django.forms.widgets import MultiWidget from django.utils.translation import ugettext_lazy as _ __all__ = ['IntegerRangeField', 'FloatRangeField', 'DateTimeRangeField', 'DateRangeField...
skinkie/SleekXMPP--XEP-0080-
refs/heads/master
sleekxmpp/stanza/iq.py
1
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2010 Nathanael C. Fritz This file is part of SleekXMPP. See the file LICENSE for copying permission. """ from sleekxmpp.stanza import Error from sleekxmpp.stanza.rootstanza import RootStanza from sleekxmpp.xmlstream import RESPONSE_TIMEOUT, StanzaBa...
glmcdona/meddle
refs/heads/master
examples/base/Lib/distutils/extension.py
250
"""distutils.extension Provides the Extension class, used to describe C/C++ extension modules in setup scripts.""" __revision__ = "$Id$" import os, string, sys from types import * try: import warnings except ImportError: warnings = None # This class is really only used by the "build_ext" command, so it mig...
ImageEngine/gaffer
refs/heads/master
python/GafferUITest/WindowTest.py
5
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2011-2012, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
vanzhiganov/flask-blog
refs/heads/master
mdx_code_multiline.py
19
from markdown import Extension from markdown.util import etree from markdown.inlinepatterns import Pattern RE = r'\[code\](.*?)\[\/code\]' class MultilineCodeExtension(Extension): def extendMarkdown(self, md, md_globals): element = NestedElements(RE) md.inlinePatterns.add('pre', element, '<not_st...
dhondta/tinyscript
refs/heads/master
tinyscript/preimports/ncodecs/barbie.py
1
# -*- coding: UTF-8 -*- """Barbie typewriter Codec - barbie content encoding. While Barbie typewriter is more a cipher, its very limited key size of 2 bits makes it easy to turn into four variants of the same encoding. This codec: - en/decodes strings from str to str - en/decodes strings from bytes to bytes - decode...
furf/pledge_service
refs/heads/master
lib/requests/packages/chardet/euctwfreq.py
3132
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
mancoast/CPythonPyc_test
refs/heads/master
cpython/279_sample_doctest.py
229
"""This is a sample module that doesn't really test anything all that interesting. It simply has a few tests, some of which succeed and some of which fail. It's important that the numbers remain constant as another test is testing the running of these tests. >>> 2+2 4 """ def foo(): """ >>> 2+2 5 ...
scalable-networks/gnuradio-3.7.2.1
refs/heads/master
gr-digital/python/digital/qa_correlate_access_code.py
10
#!/usr/bin/env python # # Copyright 2006,2007,2010,2011,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, ...
loopCM/chromium
refs/heads/trunk
third_party/mesa/MesaLib/src/gallium/docs/source/exts/formatting.py
52
# formatting.py # Sphinx extension providing formatting for Gallium-specific data # (c) Corbin Simpson 2010 # Public domain to the extent permitted; contact author for special licensing import docutils.nodes import sphinx.addnodes def parse_envvar(env, sig, signode): envvar, t, default = sig.split(" ", 2) env...
paplorinc/intellij-community
refs/heads/master
python/testData/intentions/oneLineDocStub.py
83
def fo<caret>o(a, b): pass
bitifirefly/edx-platform
refs/heads/master
lms/djangoapps/open_ended_grading/staff_grading.py
192
""" LMS part of instructor grading: - views + ajax handling - calls the instructor grading service """ import logging log = logging.getLogger(__name__) class StaffGrading(object): """ Wrap up functionality for staff grading of submissions--interface exposes get_html, ajax views. """ def __init__(s...
sanghinitin/golismero
refs/heads/master
thirdparty_libs/shodan/export.py
7
import sys from datetime import datetime from xml.sax import make_parser, handler # Type conversion helper functions def parse_date(args): return datetime.strptime(args, '%d.%m.%Y') class ExportSaxParser(handler.ContentHandler): """Parses Shodan's export XML file and executes the callback for each ...
yavuzovski/playground
refs/heads/master
python/django/RESTTest/.venv/lib/python3.4/site-packages/django/contrib/sessions/management/commands/clearsessions.py
729
from importlib import import_module from django.conf import settings from django.core.management.base import BaseCommand class Command(BaseCommand): help = ( "Can be run as a cronjob or directly to clean out expired sessions " "(only with the database backend at the moment)." ) def handl...
jibe-b/searx
refs/heads/master
searx/engines/yahoo.py
2
""" Yahoo (Web) @website https://search.yahoo.com/web @provide-api yes (https://developer.yahoo.com/boss/search/), $0.80/1000 queries @using-api no (because pricing) @results HTML (using search portal) @stable no (HTML can change) @parse url, title, content, suggestion """ f...
skywin/p2pool
refs/heads/master
p2pool/bitcoin/getwork.py
267
''' Representation of a getwork request/reply ''' from __future__ import division from . import data as bitcoin_data from . import sha256 from p2pool.util import pack def _swap4(s): if len(s) % 4: raise ValueError() return ''.join(s[x:x+4][::-1] for x in xrange(0, len(s), 4)) class BlockAttempt(obje...
amenonsen/ansible
refs/heads/devel
lib/ansible/modules/network/fortios/fortios_log_syslogd_override_filter.py
14
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
GunoH/intellij-community
refs/heads/master
python/helpers/pockets/string.py
30
# -*- coding: utf-8 -*- # Copyright (c) 2016 the Pockets team, see AUTHORS. # Licensed under the BSD License, see LICENSE for details. """A pocket full of useful string manipulation functions!""" from __future__ import absolute_import import re import six import sys from pockets.collections import listify __all__ =...
tienfuc/gogoogle
refs/heads/master
go.py
1
from pyvirtualdisplay import Display from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from urllib import quote_plus import re, os, random from time import sleep from user import USER, PASSWORD, PROJECT, FOLDER, DEBUG, PHONE_NUMBER import sys def create_project(driver)...
laborautonomo/youtube-dl
refs/heads/master
youtube_dl/extractor/bliptv.py
7
from __future__ import unicode_literals import datetime import re from .common import InfoExtractor from .subtitles import SubtitlesInfoExtractor from ..utils import ( compat_str, compat_urllib_request, unescapeHTML, ) class BlipTVIE(SubtitlesInfoExtractor): """Information extractor for blip.tv""" ...
toontownfunserver/Panda3D-1.9.0
refs/heads/master
python/Lib/ntpath.py
127
# Module 'ntpath' -- common operations on WinNT/Win95 pathnames """Common pathname manipulations, WindowsNT/95 version. Instead of importing this module directly, import os and refer to this module as os.path. """ import os import sys import stat import genericpath import warnings from genericpath import * __all__ ...
AlexAsh/pycembed15
refs/heads/master
testftw.py
1
from pyftw import py_ftw, py_nftw, FTW_PHYS def walk_ftw(fpath, sb, typeflag): print fpath return 0 def walk_nftw(fpath, sb, typeflag, ftwbuf): print fpath return 0 print "------------------------------" py_ftw('.', walk_ftw, 1) print "------------------------------" py_nftw('.', walk_nftw, 1, FTW_PH...
yuanagain/seniorthesis
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/compat.py
2942
######################## BEGIN LICENSE BLOCK ######################## # Contributor(s): # Ian Cordasco - port to Python # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # versio...
redbo/swift
refs/heads/master
test/unit/container/test_reconciler.py
1
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
rootchina/python_koans
refs/heads/master
python2/koans/about_new_style_classes.py
81
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutNewStyleClasses(Koan): class OldStyleClass: "An old style class" # Original class style have been phased out in Python 3. class NewStyleClass(object): "A new style class" # Introduced in Python...
TileHalo/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pywebsocket/src/example/echo_wsh.py
494
# Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
agilman/flask-template
refs/heads/master
app/__init__.py
1
from flask import Flask from app import config app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = config.sqlalchemy_database_uri app.secret_key = config.app_secret_key from app import models from app import api from app import views from app import auth
heikoheiko/pydevp2p
refs/heads/master
devp2p/tests/test_crypto.py
2
# -*- coding: utf-8 -*- from devp2p import crypto import random def get_ecc(secret=''): return crypto.ECCx(raw_privkey=crypto.mk_privkey(secret)) def test_valid_ecc(): for i in range(100): e = get_ecc() assert len(e.raw_pubkey) == 64 assert e.is_valid_key(e.raw_pubkey) assert...
sunil07t/e-mission-server
refs/heads/master
emission/simulation/trip_gen.py
1
from __future__ import print_function from __future__ import division from __future__ import unicode_literals from __future__ import absolute_import # Standard imports from future import standard_library standard_library.install_aliases() from builtins import range from builtins import * from past.utils import old_div ...
ThinkOpen-Solutions/odoo
refs/heads/stable
addons/hr_timesheet_sheet/wizard/__init__.py
443
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
nesdis/djongo
refs/heads/master
tests/django_tests/tests/v22/tests/postgres_tests/array_default_migrations/0002_integerarraymodel_field_2.py
133
import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('postgres_tests', '0001_initial'), ] operations = [ migrations.AddField( model_name='integerarraydefaultmodel', name='field_2', ...
gigq/flasktodo
refs/heads/master
werkzeug/local.py
25
# -*- coding: utf-8 -*- """ werkzeug.local ~~~~~~~~~~~~~~ This module implements context-local objects. :copyright: (c) 2010 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ try: from greenlet import getcurrent as get_current_greenlet except ...
rbaumg/trac
refs/heads/trunk
trac/upgrades/db35.py
1
# -*- coding: utf-8 -*- # # Copyright (C) 2014-2019 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consi...
jereze/scikit-learn
refs/heads/master
examples/linear_model/plot_sgd_comparison.py
77
""" ================================== Comparing various online solvers ================================== An example showing how different online solvers perform on the hand-written digits dataset. """ # Author: Rob Zinkov <rob at zinkov dot com> # License: BSD 3 clause import numpy as np import matplotlib.pyplot a...
tpodowd/boto
refs/heads/master
boto/s3/key.py
72
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011, Nexenta Systems Inc. # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the...
doumadou/ssbc
refs/heads/master
search/migrations/0004_auto_20150511_0339.py
36
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('search', '0003_auto_20150511_0316'), ] operations = [ migrations.AlterField( model_name='hash', name...
MatthewWilkes/django
refs/heads/master
tests/migrations/test_migrations_squashed_complex/1_auto.py
1155
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): operations = [ migrations.RunPython(migrations.RunPython.noop) ]
windskyer/nova
refs/heads/master
nova/db/sqlalchemy/migrate_repo/versions/294_add_service_heartbeat.py
72
# Copyright (c) 2015 Wind River Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
gbn972/hug
refs/heads/develop
tests/test_decorators.py
6
"""tests/test_decorators.py. Tests the decorators that power hugs core functionality Copyright (C) 2015 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction...
EvanK/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/gcp_compute_health_check_facts.py
9
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
NMGRL/pychron
refs/heads/develop
pychron/experiment/automated_run/result.py
2
# =============================================================================== # Copyright 2016 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
webisteme/punkmoney
refs/heads/master
tracker/utils/config_template.py
1
#!/usr/bin/python """ PunkMoney 0.2 :: Configuration File """ # COMMUNITY ''' Currency hashtag, name of trustlist and seed_user to crawl from (no '@'). Must be lowercase! Please use a different hashtag for testing. ''' HASHTAG = '#punkmoney' ALT_HASHTAG = '#pnmy' # TWITTER API CREDENTIALS ''' Register an app w...
yaroslavvb/tensorflow
refs/heads/master
tensorflow/contrib/image/python/ops/image_ops.py
31
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
remb0/CouchPotatoServer
refs/heads/master
couchpotato/core/plugins/manage/main.py
2
from couchpotato.api import addApiView from couchpotato.core.event import fireEvent, addEvent, fireEventAsync from couchpotato.core.helpers.request import jsonified, getParams from couchpotato.core.logger import CPLog from couchpotato.core.plugins.base import Plugin from couchpotato.environment import Env import os imp...
40223231/Final-Exam-with-classmate
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/locale.py
624
def getdefaultlocale(): return __BRYTHON__.language,None def localeconv(): """ localeconv() -> dict. Returns numeric and monetary locale-specific parameters. """ # 'C' locale default values return {'grouping': [127], 'currency_symbol': '', ...
nmearl/pyqtgraph
refs/heads/develop
examples/VideoTemplate_pyside.py
24
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './examples/VideoTemplate.ui' # # Created: Mon Feb 17 20:39:30 2014 # by: pyside-uic 0.2.14 running on PySide 1.1.2 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui class Ui_MainWindow(object): ...
krisys/django
refs/heads/master
django/conf/locale/zh_Hans/formats.py
1008
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'Y年n月j日' # 2016年9月5...
zerodark/httpie
refs/heads/master
httpie/client.py
16
import json import sys from pprint import pformat import requests from requests.packages import urllib3 from httpie import sessions from httpie import __version__ from httpie.compat import str from httpie.plugins import plugin_manager # https://urllib3.readthedocs.org/en/latest/security.html urllib3.disable_warning...
myusuf/google_app
refs/heads/master
Lesson_5/00_Conference_Central/models.py
34
#!/usr/bin/env python """models.py Udacity conference server-side Python App Engine data & ProtoRPC models $Id: models.py,v 1.1 2014/05/24 22:01:10 wesc Exp $ created/forked from conferences.py by wesc on 2014 may 24 """ __author__ = 'wesc+api@google.com (Wesley Chun)' import httplib import endpoints from protor...
opennode/waldur-mastermind
refs/heads/develop
src/waldur_core/structure/migrations/0021_project_backend_id.py
1
# Generated by Django 2.2.13 on 2021-03-08 19:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('structure', '0020_drop_servicecertification_model'), ] operations = [ migrations.AddField( model_name='project', na...
akoerner/HCC-Swanson
refs/heads/master
Tools/HCCPlot.py
1
# copyright 2013 UNL Holland Computing Center # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
micropython/micropython-esp32
refs/heads/esp32
tests/cpydiff/types_bytes_subscrstep.py
24
""" categories: Types,bytes description: Bytes subscription with step != 1 not implemented cause: MicroPython is highly optimized for memory usage. workaround: Use explicit loop for this very rare operation. """ print(b'123'[0:3:2])
josthkko/ggrc-core
refs/heads/develop
test/unit/ggrc/models/hooks/__init__.py
256
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
shiora/The-Perfect-Pokemon-Team-Balancer
refs/heads/master
libs/env/Lib/site-packages/whoosh/util/text.py
96
# Copyright 2007 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
boundarydevices/android_external_chromium_org
refs/heads/cm-12.0
tools/telemetry/telemetry/unittest/decorators_unittest.py
14
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from telemetry import decorators class Foo(object): pass def CreateFooUncached(_): return Foo() @decorators.Cache def CreateFooCac...
takluyver/tabipy
refs/heads/master
tests/test_basic.py
1
import re from tabipy import Table, TableRow, TableCell, TableHeaderRow, TableHeader def test_simple(): # For now, this is little more than a smoke test to check that it's not # erroring out. t = Table(TableHeaderRow('a','b','c'), (1, 2, 3), (2, 4, 6), ) html = t._...