repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
efikalti/Lambda
refs/heads/master
backend/backend/settings.py
1
""" Django settings for backend project. Generated by 'django-admin startproject' using Django 1.8.6. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build path...
TrentBartlem/allianceauth
refs/heads/master
services/managers/discord_manager.py
1
import requests import json from django.conf import settings import re import os DISCORD_URL = "https://discordapp.com/api" class DiscordAPIManager: def __init__(self, server_id, email, password): data = { "email" : email, "password": password, } custom_headers = {...
zdary/intellij-community
refs/heads/master
python/testData/joinLines/BackslashBetweenTargetsInImport-after.py
79
import foo, bar
vFense/vFenseAgent-nix
refs/heads/development
agent/deps/rpm-32/Python-2.7.5/lib/python2.7/test/test_binascii.py
115
"""Test the binascii C module.""" from test import test_support import unittest import binascii import array # Note: "*_hex" functions are aliases for "(un)hexlify" b2a_functions = ['b2a_base64', 'b2a_hex', 'b2a_hqx', 'b2a_qp', 'b2a_uu', 'hexlify', 'rlecode_hqx'] a2b_functions = ['a2b_base64', 'a2b_h...
oberstet/autobahn-python
refs/heads/master
examples/twisted/wamp/work/newapi/test_newapi_multiple_connections.py
3
import txaio from twisted.internet import reactor from twisted.internet.defer import inlineCallbacks from autobahn.twisted.component import Component, run from autobahn.twisted.util import sleep @inlineCallbacks def setup_alice(session, details): print('alice created', session) def on_join(session, details...
McGillX/edx_data_research
refs/heads/master
edx_data_research/cli/cli.py
1
import Queue import argparse import collections import os import sys from datetime import datetime from edx_data_research.cli import commands def valid_date(date): try: return datetime.strptime(date, "%Y-%m-%d") except ValueError: msg = "Not a valid date: '{0}'.".format(date) raise arg...
ruibarreira/linuxtrail
refs/heads/master
usr/lib/python2.7/dist-packages/dns/rdataset.py
91
# Copyright (C) 2001-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
clones/python-blinker
refs/heads/master
tests/test_signals.py
1
import gc import sys import time import blinker from nose.tools import assert_raises jython = sys.platform.startswith('java') pypy = hasattr(sys, 'pypy_version_info') def collect_acyclic_refs(): # cpython releases these immediately without a collection if jython or pypy: gc.collect() if jython...
fnzv/Boafi
refs/heads/master
webGUI/boafiHome.py
1
#!/usr/bin/python import os,time,argparse parser = argparse.ArgumentParser() parser.add_argument('-wifi', action='store_true', dest='wifi', default=False, help='Get near-by wifi list') parser.add_argument('-killCap', action='store_true', dest='killme', default=False, hel...
mdworks2016/work_development
refs/heads/master
Python/20_Third_Certification/venv/lib/python3.7/site-packages/django/contrib/staticfiles/storage.py
1
import hashlib import json import os import posixpath import re import warnings from urllib.parse import unquote, urldefrag, urlsplit, urlunsplit from django.conf import settings from django.contrib.staticfiles.utils import check_settings, matches_patterns from django.core.cache import ( InvalidCacheBackendError, ...
zBMNForks/mraa
refs/heads/master
examples/python/rgblcd.py
43
#!/usr/bin/env python # Author: Brendan Le Foll <brendan.le.foll@intel.com> # Copyright (c) 2014 Intel Corporation. # # 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, inc...
calfonso/ansible
refs/heads/devel
lib/ansible/modules/cloud/vmware/vmware_datacenter.py
24
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Joseph Callen <jcallen () csc.com> # Copyright: (c) 2018, Ansible Project # 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 ...
guorendong/iridium-browser-ubuntu
refs/heads/ubuntu/precise
third_party/WebKit/Source/build/scripts/make_element_lookup_trie.py
34
#!/usr/bin/env python # Copyright (C) 2013 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 ...
mano3m/CouchPotatoServer
refs/heads/develop_mano3m
couchpotato/core/_base/scheduler/__init__.py
23
from .main import Scheduler def start(): return Scheduler() config = []
LiXizhi/NPLRuntime
refs/heads/dev
Client/trunk/externals/assimp-4.0.0/contrib/gtest/scripts/upload.py
2511
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
GhostThrone/django
refs/heads/master
tests/staticfiles_tests/test_finders.py
270
from __future__ import unicode_literals import os from django.conf import settings from django.contrib.staticfiles import finders, storage from django.core.exceptions import ImproperlyConfigured from django.test import SimpleTestCase, override_settings from .cases import StaticFilesTestCase from .settings import TES...
nielsvanoch/django
refs/heads/master
django/contrib/admin/migrations/0001_initial.py
82
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('contenttypes', '__first__'), ] o...
benchisell/curate_flask_appengine
refs/heads/master
app/__init__.py
1
from flask import Flask from flask.ext.login import LoginManager from flask.ext.openid import OpenID import os from config import basedir app = Flask(__name__) app.config.from_object('config') lm = LoginManager() lm.init_app(app) lm.login_view = 'login' oid = OpenID(app, os.path.join(basedir, 'tmp')) from app import ...
mhdella/ThinkStats2
refs/heads/master
code/brfss.py
69
"""This file contains code for use with "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2010 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function import math import sys import pandas import numpy as np import thinkstats2 impo...
qwefi/nova
refs/heads/master
nova/api/openstack/compute/contrib/coverage_ext.py
3
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 IBM Corp. # # 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 # # ...
fcchou/CS229-project
refs/heads/master
learning/test_shellshell.py
1
import sys sys.path.append('../') from jos_learn.features import FeatureExtract import numpy as np import matplotlib.pyplot as plt import sklearn.cross_validation as cv from sklearn.naive_bayes import MultinomialNB from sklearn.linear_model import LogisticRegression from sklearn.svm import LinearSVC, SVC from sklearn....
xiaxia47/Python-learning
refs/heads/master
Algorithms/Daleitai sort.py
1
#-*- coding:utf-8 ''' 打擂台排序 ''' def insertion_sort(items): if len(items) == 1: return items length = len(items) for index in range(length): for sub_index in range(index,length): if items[index]>items[sub_index]: items[index],items[sub_index] = items[sub_index],items[index] retu...
aaleotti-unimore/ComicsScraper
refs/heads/master
lib/lxml/html/html5parser.py
22
""" An interface to html5lib that mimics the lxml.html interface. """ import sys import string from html5lib import HTMLParser as _HTMLParser from html5lib.treebuilders.etree_lxml import TreeBuilder from lxml import etree from lxml.html import Element, XHTML_NAMESPACE, _contains_block_level_tag # python3 compatibilit...
asposeslides/Aspose_Slides_Java
refs/heads/master
Plugins/Aspose-Slides-Java-for-Python/tests/WorkingWithPresentation/ConvertingToNotes/ConvertingToNotes.py
2
__author__ = 'fahadadeel' import jpype import os.path from WorkingWithPresentation import ConvertingToNotes asposeapispath = os.path.join(os.path.abspath("../../../"), "lib") print "You need to put your Aspose.Slides for Java APIs .jars in this folder:\n"+asposeapispath jpype.startJVM(jpype.getDefaultJVMPath(), "-Dj...
nharraud/b2share
refs/heads/master
invenio/modules/bulletin/format_elements/bfe_webjournal_articles.py
13
# -*- coding: utf-8 -*- # $Id: bfe_webjournal_MainArticleOverview.py,v 1.28 2009/02/12 10:00:57 jerome Exp $ # # This file is part of Invenio. # Copyright (C) 2009, 2010, 2011 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published ...
orgito/ansible
refs/heads/devel
lib/ansible/modules/network/cnos/cnos_command.py
52
#!/usr/bin/python # -*- coding: utf-8 -*- # # (C) 2017 Red Hat Inc. # Copyright (C) 2017 Lenovo. # # GNU General Public License v3.0+ # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE...
camelliazhang/WhereHows
refs/heads/master
wherehows-etl/src/main/resources/jython/AppworxLoad.py
6
# # Copyright 2015 LinkedIn Corp. 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 applicable law or ...
cuboxi/android_external_chromium_org
refs/heads/kitkat
chrome/test/functional/ap_lab/ap_configurator_test.py
76
# Copyright (c) 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. import unittest import ap_configurator_factory import dlink_ap_configurator import linksys_ap_configurator import pyauto_ap_configurator # must precee...
mattrobenolt/django
refs/heads/master
django/db/models/query_utils.py
5
""" Various data structures used in query construction. Factored out from django.db.models.query to avoid making the main module very large and/or so that they can be used by other modules without getting into circular import difficulties. """ from __future__ import unicode_literals from collections import namedtuple...
Graghav/surabi
refs/heads/master
ADMIN/venv/lib/python2.7/site-packages/eve/tests/renders.py
1
# -*- coding: utf-8 -*- from eve.tests import TestBase from eve.utils import api_prefix from eve.tests.test_settings import MONGO_DBNAME import simplejson as json class TestRenders(TestBase): def test_default_render(self): r = self.test_client.get('/') self.assertEqual(r.content_type, 'applicati...
2014c2g5/2014c2
refs/heads/master
exts/w2/static/Brython2.0.0-20140209-164925/Lib/xml/sax/handler.py
925
""" This module contains the core classes of version 2.0 of SAX for Python. This file provides only default classes with absolutely minimum functionality, from which drivers and applications can be subclassed. Many of these classes are empty and are included only as documentation of the interfaces. $Id$ """ version ...
jshiv/turntable
refs/heads/master
test/lib/python2.7/site-packages/numpy/distutils/command/egg_info.py
144
from __future__ import division, absolute_import, print_function from setuptools.command.egg_info import egg_info as _egg_info class egg_info(_egg_info): def run(self): # We need to ensure that build_src has been executed in order to give # setuptools' egg_info command real filenames instead of fu...
llonchj/sentry
refs/heads/master
src/sentry/migrations/0014_auto__add_project__add_projectmember__add_unique_projectmember_project.py
36
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Project' db.create_table('sentry_project', ( ('id', self.gf('sentry.db.models.fields.b...
JVenberg/PokemonGo-Bot-Desktop
refs/heads/development
pywin/Lib/UserList.py
327
"""A more or less complete user-defined wrapper around list objects.""" import collections class UserList(collections.MutableSequence): def __init__(self, initlist=None): self.data = [] if initlist is not None: # XXX should this accept an arbitrary sequence? if type(initlis...
dannyboi104/SickRage
refs/heads/master
lib/github/IssueComment.py
72
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
savoirfairelinux/django
refs/heads/master
tests/file_uploads/uploadhandler.py
111
""" Upload handlers to test the upload API. """ from django.core.files.uploadhandler import FileUploadHandler, StopUpload class QuotaUploadHandler(FileUploadHandler): """ This test upload handler terminates the connection if more than a quota (5MB) is uploaded. """ QUOTA = 5 * 2 ** 20 # 5 MB ...
fredericlepied/ansible
refs/heads/devel
lib/ansible/utils/shlex.py
267
# (c) 2015, Marius Gedminas <marius@gedmin.as> # # 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) any later vers...
ccellis/WHACK2016
refs/heads/master
flask/lib/python2.7/site-packages/sqlalchemy/util/__init__.py
34
# util/__init__.py # Copyright (C) 2005-2016 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from .compat import callable, cmp, reduce, \ threading, py3k, py33, py36, py2k...
chauhanhardik/populo_2
refs/heads/master
lms/djangoapps/licenses/views.py
147
import logging import json import re from urlparse import urlparse from collections import namedtuple, defaultdict from edxmako.shortcuts import render_to_string from opaque_keys.edx.locations import SlashSeparatedCourseKey from django.contrib.auth.decorators import login_required from django.contrib.auth.models imp...
micadeyeye/Blongo
refs/heads/master
django/conf/locale/ro/formats.py
434
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = 'j F Y, H:i:s' YEAR_MONTH_...
skoczen/django-seo-js
refs/heads/master
django_seo_js/middleware/hashbang.py
1
from .escaped_fragment import HashBangMiddleware import logging logger = logging.getLogger(__name__)
zding5/Microblog-Flask
refs/heads/master
flask/lib/python2.7/site-packages/coverage/execfile.py
209
"""Execute files of Python code.""" import imp, marshal, os, sys from coverage.backward import exec_code_object, open_source from coverage.misc import ExceptionDuringRun, NoCode, NoSource try: # In Py 2.x, the builtins were in __builtin__ BUILTINS = sys.modules['__builtin__'] except KeyError: # In Py 3....
endorphinl/horizon
refs/heads/master
horizon/conf/dash_template/models.py
979
""" Stub file to work around django bug: https://code.djangoproject.com/ticket/7198 """
blrm/openshift-tools
refs/heads/stg
openshift/installer/vendored/openshift-ansible-3.10.0-0.29.0/roles/lib_openshift/library/oc_serviceaccount.py
8
#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ ...
rabipanda/tensorflow
refs/heads/master
tensorflow/python/framework/tensor_shape_div_test.py
178
# Copyright 2015 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...
chintal/tendril-fs-server
refs/heads/master
docs/conf.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # tendril-fs-server documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in ...
llhe/tensorflow
refs/heads/master
tensorflow/contrib/tensor_forest/hybrid/python/kernel_tests/routing_function_op_test.py
102
# 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...
goodwinnk/intellij-community
refs/heads/master
python/testData/refactoring/move/usageFromFunctionResolvesToDunderAllWithAlias/after/src/a.py
3800
embeddedarm/android_external_chromium_org
refs/heads/imx_KK4.4.3_2.0.0-ga
tools/telemetry/telemetry/value/value_unittest_.py
26
# Copyright 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. import os import unittest from telemetry import value from telemetry.page import page_set class TestBase(unittest.TestCase): def setUp(self): self.pag...
THEindian/glacier_kernel
refs/heads/master
arch/ia64/scripts/unwcheck.py
13143
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
Neamar/django
refs/heads/master
tests/template_tests/syntax_tests/test_verbatim.py
521
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from ..utils import setup class VerbatimTagTests(SimpleTestCase): @setup({'verbatim-tag01': '{% verbatim %}{{bare }}{% endverbatim %}'}) def test_verbatim_tag01(self): output = self.engine.render_to_string('verb...
amwelch/a10sdk-python
refs/heads/master
a10sdk/core/key/key.py
2
from a10sdk.common.A10BaseClass import A10BaseClass class Key(A10BaseClass): """Class Description:: Authentication key management. Class key supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for this module.` :param key_chain_flag: {"defaul...
qiuzhong/crosswalk-test-suite
refs/heads/master
webapi/tct-csp-w3c-tests/csp-py/csp_media-src_corss-origin_audio_allowed_ext.py
30
def main(request, response): import simplejson as json f = file('config.json') source = f.read() s = json.JSONDecoder().decode(source) url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1]) url2 = "http://" + s['host'] + ":" + str(s['ports']['http'][0]) _CSP = "media-src " + url1 + ...
stas/flask-classy
refs/heads/master
test_classy/test_view_wrappers.py
5
from flask import Flask from .view_classes import (BeforeRequestView, BeforeViewView, AfterRequestView, AfterViewView, DecoratedView, BeforeRequestReturnsView, BeforeViewReturnsView) from nose.tools import * app = Flask("wrappers") BeforeRequestView.register(app) BeforeRequestReturnsView.reg...
dekom/threepress-bookworm-read-only
refs/heads/master
bookworm/gdata/tests/gdata_tests/service_test.py
2
#!/usr/bin/python # # Copyright (C) 2006 Google 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 ...
dursk/django
refs/heads/master
tests/migrations/test_graph.py
99
import warnings from django.db.migrations.exceptions import ( CircularDependencyError, NodeNotFoundError, ) from django.db.migrations.graph import RECURSION_DEPTH_WARNING, MigrationGraph from django.test import SimpleTestCase from django.utils.encoding import force_text class GraphTests(SimpleTestCase): """ ...
ysh329/django-test
refs/heads/master
auth19/blog/models.py
10644
from django.db import models # Create your models here.
aswadrangnekar/khandelwal
refs/heads/master
app/lib/docutils/writers/html4css1/__init__.py
6
# $Id: __init__.py 6153 2009-10-05 13:37:10Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Simple HyperText Markup Language document tree Writer. The output conforms to the XHTML version 1.0 Transitional DTD (*almost* strict). The output conta...
crs4/omero.biobank
refs/heads/develop
bl/vl/kb/drivers/omero/action.py
1
# BEGIN_COPYRIGHT # END_COPYRIGHT import omero.model as om import omero.rtypes as ort from utils import assign_vid_and_timestamp, assign_vid, make_unique_key import wrapper as wp from snp_markers_set import SNPMarkersSet from bl.vl.utils.graph import graph_driver class OriginalFile(wp.OmeroWrapper): # Mapping on...
jmighion/ansible
refs/heads/devel
test/sanity/validate-modules/utils.py
84
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Matt Martz <matt@sivel.net> # Copyright (C) 2015 Rackspace US, 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 ...
peterdocter/writemdict
refs/heads/master
examples.py
1
# -*- coding: utf8 -*- from __future__ import unicode_literals, print_function, absolute_import, division # This file contains examples of how to use the different features of the writemdict library. # Run it with "python examples.py". It will create various .mdx files in the example_output/ # directory. from writem...
mlperf/training_results_v0.6
refs/heads/master
NVIDIA/benchmarks/ssd/implementations/pytorch/utils.py
1
# MIT License # # Copyright (c) 2018 kuangliu # # 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 # to use, copy, modify, merge, pub...
teampopong/popong-models
refs/heads/master
popong_models/alembic/env.py
1
from __future__ import with_statement from alembic import context import os from sqlalchemy import engine_from_config, pool from logging.config import fileConfig from popong_models import Base # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.conf...
yannickcr/Sick-Beard
refs/heads/development
sickbeard/databases/mainDB.py
28
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 Lice...
darmaa/odoo
refs/heads/master
addons/lunch/report/report_lunch_order.py
39
# -*- 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...
andrewyoung1991/supriya
refs/heads/master
supriya/synthdefs/multiband_compressor.py
1
# -*- encoding: utf-8 -*- from supriya import * def _make_synthdef(): with SynthDefBuilder( frequency_1=100, frequency_2=1000, frequency_3=3000, band_1_gain=1, band_2_gain=1, band_3_gain=1, band_4_gain=1, band_1_clamp_time=0.01, band_2_clamp_...
jkonecny12/anaconda
refs/heads/master
translation-canary/translation_canary/translatable/test_markup.py
4
# Check that a string does not contain unnecessary Pango markup # # Copyright (C) 2015 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU Lesser General Public License v.2, or (at your option) any l...
mongodb/mongo-python-driver
refs/heads/master
pymongo/auth_aws.py
2
# Copyright 2020-present MongoDB, 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 in wri...
drnextgis/mapproxy
refs/heads/master
mapproxy/util/py.py
8
# This file is part of the MapProxy project. # Copyright (C) 2010 Omniscale <http://omniscale.de> # # 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...
martinsbalodis/warc-tools
refs/heads/master
hanzo/warcdump.py
3
#!/usr/bin/env python """warcdump - dump warcs in a slightly more humane format""" import os import sys import sys import os.path from optparse import OptionParser from .warctools import WarcRecord, expand_files parser = OptionParser(usage="%prog [options] warc warc warc") parser.add_option("-l", "--limit", dest=...
jagguli/intellij-community
refs/heads/master
python/testData/completion/dictKeyPrefix2.py
166
s = { 'a': 'b', 'kkkappa': 'd', 'lambda': 'foo' } s['k]kap''<caret>']
Sing-Li/go-buildpack
refs/heads/master
builds/runtimes/python-2.7.6/lib/python2.7/test/test_pep277.py
120
# Test the Unicode versions of normal file functions # open, os.open, os.stat. os.listdir, os.rename, os.remove, os.mkdir, os.chdir, os.rmdir import sys, os, unittest from unicodedata import normalize from test import test_support filenames = [ '1_abc', u'2_ascii', u'3_Gr\xfc\xdf-Gott', u'4_\u0393\u03b...
chipsecintel/chipsec
refs/heads/master
source/tool/chipsec/utilcmd/ec_cmd.py
4
#!/usr/local/bin/python #CHIPSEC: Platform Security Assessment Framework #Copyright (c) 2010-2016, Intel Corporation # #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; Version 2. # #This program is...
graetzer/arangodb
refs/heads/devel
3rdParty/V8/v5.7.0.0/tools/gyp/test/win/gyptest-link-large-address-aware.py
269
#!/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 largeaddressaware setting is extracted properly. """ import TestGyp import sys if sys.platform == 'win32': test = TestGyp...
MartialD/hyperspy
refs/heads/RELEASE_next_minor
hyperspy/_components/lorentzian.py
2
# -*- coding: utf-8 -*- # Copyright 2007-2016 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
foobarbazblarg/stayclean
refs/heads/master
stayclean-2015-january/display-during-signup.py
5
#!/usr/bin/python import participantCollection participantCollection = participantCollection.ParticipantCollection() print "Here are the **" + str(participantCollection.size()) + " participants** who have already signed up:\n" for participant in participantCollection.participants: print "/u/" + participant.name ...
Sylrob434/CouchPotatoServer
refs/heads/develop
couchpotato/core/media/movie/providers/info/_modifier.py
79
import copy import traceback from CodernityDB.database import RecordNotFound from couchpotato import get_db from couchpotato.core.event import addEvent, fireEvent from couchpotato.core.helpers.variable import mergeDicts, randomString from couchpotato.core.logger import CPLog from couchpotato.core.plugins.base import P...
stachenov/PyLeetCode
refs/heads/master
problems/classes.py
1
class ListNode(object): def __init__(self, x): if type(x) is list: self.val = x[0] node = self for n in x[1:]: node.next = ListNode(n) node = node.next node.next = None else: self.val = x self.nex...
fengbeihong/tempest_automate_ironic
refs/heads/master
tools/find_stack_traces.py
42
#!/usr/bin/env python # Copyright 2013 IBM Corp. # 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 # # ...
mpalomer/micropython
refs/heads/master
tests/wipy/uart.py
35
''' UART test for the CC3200 based boards. UART0 and UART1 must be connected together for this test to pass. ''' from machine import UART from machine import Pin import os import time mch = os.uname().machine if 'LaunchPad' in mch: uart_id_range = range(0, 2) uart_pins = [[('GP12', 'GP13'), ('GP12', 'GP13', ...
aisthesis/opttrack
refs/heads/master
opttrack/lib/ui/menu.py
1
""" Copyright (c) 2015 Marshall Farrier license http://opensource.org/licenses/MIT lib/ui/menu.py Abstract base class for interactive menus. """ from abc import ABCMeta, abstractproperty class Menu(object): __metaclass__ = ABCMeta def __init__(self, logger, **kwargs): self.logger = logger ...
akhmadMizkat/odoo
refs/heads/master
addons/stock_calendar/procurement.py
10
from datetime import datetime from dateutil.relativedelta import relativedelta from openerp import api from openerp.osv import fields, osv from openerp.tools.translate import _ from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT, DEFAULT_SERVER_DATE_FORMAT from openerp import SUPERUSER_ID from psycopg2 import Oper...
Dronolab/antenna-tracking
refs/heads/master
yaw_servo.py
1
from abstract_servo import AbstractServo from PID import PID class YawServo(AbstractServo): def __init__(self): self.pid = PID() self.pid.setSetPoint(0) def refresh(self, WantedAngle, CurrentAngle): AngleCorrection = (WantedAngle - CurrentAngle) feed_back_value = AngleCorre...
aamod0611/Playground
refs/heads/master
Django/cci(team and teammembers done, 70%)/main/migrations/0007_auto_20170522_1443.py
3
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-22 09:13 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('main', '0006_teammembers_asd'), ] operations = [ ...
Jimdo/unattended-upgrades
refs/heads/master
test/test_mail.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- import apt_pkg import os import unittest from email.parser import Parser from StringIO import StringIO import unattended_upgrade from unattended_upgrade import send_summary_mail, setup_apt_listchanges # note this is not a unittest.TestCase as it needs to be parameterized cl...
Dezmonius/Deslium
refs/heads/master
Deslium Software/Deslium Hestia/master/libs/programdata.py
3
# -*- coding: utf-8 -*- # # programdata.py # import os import sys import traceback from kivy.config import ConfigParser from kivy.logger import PY2 from kivy.utils import get_color_from_hex if PY2: select_locale = {u'Русский': 'russian', 'English': 'english'} else: select_locale = {'Русский': 'russian', 'Eng...
GitHublong/hue
refs/heads/master
desktop/core/ext-py/django-nose-1.3/testapp/test_only_this.py
43
"""Django's test runner won't find this, but nose will.""" def test_multiplication(): assert 2 * 2 == 4
LiquidSmooth-Devices/kernel_oneplus_msm8974
refs/heads/lollipop
tools/perf/scripts/python/netdev-times.py
11271
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
flindenberg/volunteer_planner
refs/heads/develop
api/models.py
10644
from django.db import models # Create your models here.
wroersma/volatility
refs/heads/master
volatility/cache.py
58
# 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 Software Foundation; either version 2 of the License, or # (at your option) any later version. # # Volatility is distributed in the ...
abdellatifkarroum/odoo
refs/heads/8.0
addons/gamification/__openerp__.py
299
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
EmadMokhtar/Django
refs/heads/master
tests/context_processors/models.py
547
from django.db import models class DebugObject(models.Model): pass
whitkirkchurch/baltimore
refs/heads/master
venv/lib/python2.7/site-packages/pygame/cursors.py
19
## pygame - Python Game Library ## Copyright (C) 2000-2003 Pete Shinners ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (...
willzhang05/postgrestesting1
refs/heads/master
postgrestesting1/lib/python3.5/site-packages/django/db/backends/mysql/validation.py
98
from django.core import checks from django.db.backends.base.validation import BaseDatabaseValidation class DatabaseValidation(BaseDatabaseValidation): def check_field(self, field, **kwargs): """ MySQL has the following field length restriction: No character (varchar) fields can have a leng...
james-pack/ml
refs/heads/master
pack/ml/mnist/preview.py
1
import random import argparse from pack.ml.mnist.mnist_data import MnistData if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--id", default=None, type=int, help="ID (position) of the letter to show") parser.add_argument("--test", action="store_tr...
fengjiang96/tushare
refs/heads/master
tushare/stock/fundamental.py
21
# -*- coding:utf-8 -*- """ 基本面数据接口 Created on 2015/01/18 @author: Jimmy Liu @group : waditu @contact: jimmysoa@sina.cn """ import pandas as pd from tushare.stock import cons as ct import lxml.html from lxml import etree import re from pandas.compat import StringIO try: from urllib.request import ur...
0k/OpenUpgrade
refs/heads/8.0
addons/resource/faces/utils.py
433
############################################################################ # Copyright (C) 2005 by Reithinger GmbH # mreithinger@web.de # # This file is part of faces. # # faces is free software; you can redistribute it and/or modify # ...
Outernet-Project/librarian-dbmanage
refs/heads/master
librarian_dbmanage/backup.py
3
""" backup.py: SQLite3 backup using online backup API Code is based on `script by Joongi Kim`_. .. script by Joongi Kim: https://gist.github.com/achimnol/3021995 Copyright 2014-2015, Outernet Inc. Some rights reserved. This software is free software licensed under the terms of GPLv3. See COPYING file that comes wit...
adngdb/socorro
refs/heads/master
socorro/unittest/cron/jobs/test_clean_raw_adi_logs.py
3
import datetime from nose.tools import eq_ from crontabber.app import CronTabber from socorro.lib.datetimeutil import utc_now from socorro.unittest.cron.jobs.base import IntegrationTestBase from socorro.unittest.cron.setup_configman import ( get_config_manager_for_crontabber, ) class TestCleanRawADILogsCronApp(...
walty8/trac
refs/heads/trunk
trac/tests/resource.py
1
# -*- coding: utf-8 -*- # # Copyright (C) 2007-2013 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...