repo_name
stringlengths
5
100
path
stringlengths
4
299
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1.03M
license
stringclasses
15 values
hash
int64
-9,223,351,895,964,839,000
9,223,297,778B
line_mean
float64
3.17
100
line_max
int64
7
1k
alpha_frac
float64
0.25
0.98
autogenerated
bool
1 class
testmana2/test
ThirdParty/Pygments/pygments/lexers/erlang.py
72
18195
# -*- coding: utf-8 -*- """ pygments.lexers.erlang ~~~~~~~~~~~~~~~~~~~~~~ Lexers for Erlang. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, bygroups, words, do_insertions, \ ...
gpl-3.0
-6,485,025,965,252,877,000
34.606654
87
0.452872
false
Arcanemagus/SickRage
lib/six.py
172
30888
# Copyright (c) 2010-2017 Benjamin Peterson # # 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, publi...
gpl-3.0
3,833,100,061,493,608,400
33.666667
98
0.629468
false
LePastis/pyload
module/gui/MainWindow.py
41
30215
# -*- coding: utf-8 -*- """ 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 License, or (at your option) any later version. This program is distributed in ...
gpl-3.0
4,450,976,661,799,134,700
42.350072
152
0.60556
false
dfalt974/SickRage
lib/sqlalchemy/orm/unitofwork.py
78
23204
# orm/unitofwork.py # Copyright (C) 2005-2014 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 """The internals for the unit of work system. The session's flush() process passes ...
gpl-3.0
3,319,720,626,130,826,000
34.919505
84
0.564687
false
sandeepgupta2k4/tensorflow
tensorflow/python/ops/parsing_ops.py
21
49286
# 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...
apache-2.0
-5,405,936,189,678,612,000
41.634948
119
0.653674
false
abonil91/ncanda-data-integration
scripts/redcap/scoring/ctq/__init__.py
1
3092
#!/usr/bin/env python ## ## Copyright 2016 SRI International ## See COPYING file distributed along with the package for the copyright and license terms. ## import pandas import Rwrapper # # Variables from surveys needed for CTQ # # LimeSurvey field names lime_fields = [ "ctq_set1 [ctq1]", "ctq_set1 [ctq2]", "ct...
bsd-3-clause
6,952,695,894,297,899,000
39.684211
224
0.663648
false
Simran-B/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/win32/Demos/security/account_rights.py
34
1472
import win32security,win32file,win32api,ntsecuritycon,win32con from security_enums import TRUSTEE_TYPE,TRUSTEE_FORM,ACE_FLAGS,ACCESS_MODE new_privs = ((win32security.LookupPrivilegeValue('',ntsecuritycon.SE_SECURITY_NAME),win32con.SE_PRIVILEGE_ENABLED), (win32security.LookupPrivilegeValue('',ntsecuritycon...
apache-2.0
-8,382,494,482,341,797,000
46.483871
156
0.80231
false
deklungel/iRulez
src/dimmer/mqtt_sender.py
1
1164
import src.irulez.util as util import src.irulez.topic_factory as topic_factory import src.irulez.log as log import paho.mqtt.client as mqtt import uuid logger = log.get_logger('dimmer_mqtt_sender') class MqttSender: def __init__(self, client: mqtt.Client): self.__client = client def publish_dimming...
mit
-1,275,875,996,077,186,000
39.137931
100
0.67354
false
dandan94/OpenGLTest
finalOpenGL/HelloGLFW/lib/boost_1_59_0/tools/build/test/clean.py
44
3076
#!/usr/bin/python # Copyright (C) Vladimir Prus 2006. # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import BoostBuild t = BoostBuild.Tester(use_test_config=False) t.write("a.cpp", "int main() {}\n") t.writ...
gpl-3.0
2,652,525,735,450,800,600
28.576923
75
0.696034
false
master2be1/pychess
lib/pychess/widgets/preferencesDialog.py
20
23931
from __future__ import print_function import sys, os from os import listdir from os.path import isdir, isfile, splitext from xml.dom import minidom from gi.repository import Gtk, GdkPixbuf from gi.repository import Gdk from pychess.System.prefix import addDataPrefix, getDataPrefix from pychess.System.glock import glo...
gpl-3.0
-1,862,141,245,394,663,400
38.951586
133
0.551962
false
telefonicaid/fiware-IoTAgent-Cplusplus
third_party/mosquitto-1.4.4/test/lib/03-publish-c2b-qos2.py
7
3223
#!/usr/bin/env python # Test whether a client sends a correct PUBLISH to a topic with QoS 2. # The client should connect to port 1888 with keepalive=60, clean session set, # and client id publish-qos2-test # The test will send a CONNACK message to the client with rc=0. Upon receiving # the CONNACK the client should v...
agpl-3.0
8,244,254,197,598,557,000
35.213483
129
0.711449
false
alsrgv/tensorflow
tensorflow/python/data/kernel_tests/interleave_test.py
2
10138
# Copyright 2017 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...
apache-2.0
1,540,068,868,335,517,000
37.547529
80
0.574078
false
Neurita/boyle
scripts/compare_id_sets.py
1
16843
#!/usr/bin/env python #TODO #Transform this into a CLI import re import os import logging import collections import numpy as np from tabulate import tabulate from dcm_anonymize import get_all_patient_mri_ids #logging config logging.basicConfig(level=logging.DEBUG, filename='idset_comparator.log', ...
bsd-3-clause
274,210,726,395,340,400
32.286561
112
0.519801
false
foursquare/pants
contrib/node/src/python/pants/contrib/node/subsystems/package_managers.py
2
9205
# coding=utf-8 # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import logging from builtins import object from pants.contrib.node.subsystems.command im...
apache-2.0
3,468,031,671,416,038,000
36.72541
102
0.705703
false
dictoon/blenderseed
docs/conf.py
2
8063
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/stable/config # -- Path setup ------------------------------------------------------------...
mit
5,154,334,373,517,243,000
31.643725
118
0.644177
false
jimberlage/servo
components/script/dom/bindings/codegen/parser/tests/test_implements.py
264
5961
# Import the WebIDL module, so we can do isinstance checks and whatnot import WebIDL def WebIDLTest(parser, harness): # Basic functionality threw = False try: parser.parse(""" A implements B; interface B { attribute long x; }; interface ...
mpl-2.0
6,021,330,726,498,025,000
26.597222
81
0.522899
false
segwitcoin/SegwitCoin
contrib/linearize/linearize-hashes.py
27
4579
#!/usr/bin/env python3 # # linearize-hashes.py: List blocks in a linear, no-fork version of the chain. # # Copyright (c) 2013-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from __future__ impo...
mit
2,729,803,349,214,221,000
28.165605
90
0.672199
false
triveous/LearnFlask
flask/lib/python2.7/site-packages/pip/_vendor/requests/exceptions.py
341
1877
# -*- coding: utf-8 -*- """ requests.exceptions ~~~~~~~~~~~~~~~~~~~ This module contains the set of Requests' exceptions. """ from .packages.urllib3.exceptions import HTTPError as BaseHTTPError class RequestException(IOError): """There was an ambiguous exception that occurred while handling your request.""...
apache-2.0
2,154,816,855,264,491,500
24.026667
74
0.679808
false
perryjrandall/arsenalsuite
cpp/apps/bach/web/bach/models/keyword.py
10
1381
# # Copyright (c) 2009 Dr. D Studios. (Please refer to license for details) # SVN_META_HEADURL = "$HeadURL: $" # SVN_META_ID = "$Id: keyword.py 9408 2010-03-03 22:35:49Z brobison $" # from sqlalchemy import Column, Table, types, ForeignKey, Index from sqlalchemy.orm import relation, backref from ..config import mapper...
gpl-2.0
-8,533,436,228,025,473,000
33.525
107
0.566256
false
liu602348184/django
tests/migrations/test_writer.py
65
22965
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import math import os import re import tokenize import unittest import custom_migration_operations.more_operations import custom_migration_operations.operations from django.conf import settings from django.core.validators import EmailVal...
bsd-3-clause
-8,129,352,722,528,693,000
41.52037
126
0.622621
false
freyley/trello-traceability
rungui.py
1
12592
#!/usr/bin/env python import urwid from trello import TrelloClient import models import settings from models import Board, get_session, TrelloList from trellointerface import create_dbcard_and_ensure_checklist class RemoveOrgUser(object): def __init__(self, parent): self.items = [urwid.Text("foo"), urwi...
agpl-3.0
-8,318,284,779,255,094,000
31.456186
119
0.579018
false
tsgit/invenio
modules/bibfield/lib/functions/is_type_isbn.py
17
1815
## This file is part of Invenio. ## Copyright (C) 2013 CERN. ## ## Invenio 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. ## ## Inv...
gpl-2.0
-7,659,831,587,807,510,000
29.25
76
0.638567
false
CiuffysHub/MITMf
mitmflib-0.18.4/build/lib.linux-i686-2.7/mitmflib/impacket/testcases/SMB_RPC/test_rrp.py
2
25098
############################################################################### # Tested so far: # # OpenClassesRoot # OpenCurrentUser # OpenLocalMachine # OpenPerformanceData # OpenUsers # BaseRegCloseKey # BaseRegCreateKey # BaseRegDeleteKey # BaseRegFlushKey # BaseRegGetKeySecurity # BaseRegOpenKey # BaseRegQueryI...
gpl-3.0
1,233,617,822,753,360,000
33.054274
109
0.606622
false
numerigraphe/odoo
addons/mrp_repair/__init__.py
380
1087
# -*- 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...
agpl-3.0
1,353,090,048,141,671,400
42.48
79
0.612695
false
supergentle/migueltutorial
flask/lib/python2.7/site-packages/pbr/tests/test_core.py
86
5269
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # 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...
bsd-3-clause
7,623,451,611,574,101,000
34.843537
77
0.633707
false
wolverineav/neutron
neutron/pecan_wsgi/hooks/body_validation.py
4
2556
# Copyright (c) 2015 Mirantis, Inc. # 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 requir...
apache-2.0
6,770,917,538,147,770,000
38.323077
79
0.634585
false
Chilledheart/chromium
build/android/gyp/process_resources.py
1
15150
#!/usr/bin/env python # # 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. """Process Android resources to generate R.java, and prepare for packaging. This will crunch images and generate v14 compatible ...
bsd-3-clause
-3,804,866,868,311,570,400
35.244019
80
0.636964
false
eloquence/unisubs
apps/externalsites/migrations/0003_fix_thumb_options.py
4
27746
# 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): pass def backwards(self, orm): pass models = { 'accountlinker.thirdpartyacc...
agpl-3.0
6,987,934,475,690,635,000
93.696246
217
0.559576
false
rruebner/odoo
addons/point_of_sale/wizard/pos_confirm.py
343
2403
# -*- 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...
agpl-3.0
7,988,854,076,979,739,000
45.211538
116
0.589263
false
open-synergy/sale-workflow
sale_allotment/__openerp__.py
9
1444
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2015 Odoo.com. # Copyright (C) 2015 Openies.com. # # This program is free software: you can redistribute it and/or modify # it under the term...
agpl-3.0
-148,017,888,377,820,260
38
78
0.597367
false
rdipietro/tensorflow
tensorflow/python/ops/split_benchmark.py
7
4025
# 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...
apache-2.0
1,387,651,702,457,593,900
33.698276
80
0.624099
false
byu-aml-lab/bzrflag
bzagents/bzrc.py
18
14582
#!/usr/bin/python -tt # Control BZFlag tanks remotely with synchronous communication. #################################################################### # NOTE TO STUDENTS: # You CAN and probably SHOULD modify this code. Just because it is # in a separate file does not mean that you can ignore it or that # you hav...
gpl-3.0
26,795,852,626,714,104
29.698947
79
0.510012
false
chaluemwut/fbserver
venv/lib/python2.7/site-packages/scipy/linalg/tests/test_basic.py
18
23525
#!/usr/bin/env python # # Created by: Pearu Peterson, March 2002 # """ Test functions for linalg.basic module """ from __future__ import division, print_function, absolute_import """ Bugs: 1) solve.check_random_sym_complex fails if a is complex and transpose(a) = conjugate(a) (a is Hermitian). """ __usage__ = """ ...
apache-2.0
-2,806,558,991,388,101,600
30.15894
82
0.447141
false
leiferikb/bitpop
src/third_party/pyftpdlib/src/demo/tls_ftpd.py
4
2359
#!/usr/bin/env python # $Id: tls_ftpd.py 977 2012-01-22 23:05:09Z g.rodola $ # pyftpdlib is released under the MIT license, reproduced below: # ====================================================================== # Copyright (C) 2007-2012 Giampaolo Rodola' <g.rodola@gmail.com> # # All Righ...
gpl-3.0
6,446,451,407,849,144,000
38.316667
73
0.673167
false
mith1979/ansible_automation
applied_python/applied_python/lib/python2.7/site-packages/pylint/test/functional/bad_reversed_sequence.py
12
2132
""" Checks that reversed() receive proper argument """ # pylint: disable=missing-docstring # pylint: disable=too-few-public-methods,no-self-use,no-absolute-import from collections import deque __revision__ = 0 class GoodReversed(object): """ Implements __reversed__ """ def __reversed__(self): return [...
apache-2.0
6,344,979,343,260,533,000
29.028169
75
0.625235
false
intel-analytics/analytics-zoo
pyzoo/zoo/chronos/model/Seq2Seq_pytorch.py
1
5221
# # Copyright 2018 Analytics Zoo Authors. # # 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...
apache-2.0
2,251,469,979,598,284,800
40.110236
98
0.565984
false
yaoandw/joke
Pods/AVOSCloudCrashReporting/Breakpad/src/testing/test/gmock_output_test.py
986
5999
#!/usr/bin/env python # # Copyright 2008, 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...
mit
-4,474,121,058,681,443,000
32.327778
80
0.710118
false
slarosa/QGIS
python/plugins/sextante/tests/SextanteToolsTest.py
3
3013
# -*- coding: utf-8 -*- """ *************************************************************************** SextanteToolsTest.py --------------------- Date : April 2013 Copyright : (C) 2013 by Victor Olaya Email : volayaf at gmail dot com **********************...
gpl-2.0
6,003,430,409,727,838,000
34.447059
94
0.563226
false
largelymfs/IRModel
src/models/Tfidf.py
1
2000
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: largelymfs # @Date: 2014-12-23 20:06:10 # @Last Modified by: largelymfs # @Last Modified time: 2014-12-23 23:18:08 import numpy as np import numpy.linalg as LA class TFIDF: def __init__(self, filename): #get the self.vocab self.vocab = {} id = 0 do...
mit
-5,200,241,484,263,836,000
25.878378
88
0.606137
false
vprnet/traces
app/index.py
1
1098
#!/usr/local/bin/python2.7 from flask import Flask import sys from flask_frozen import Freezer from upload_s3 import set_metadata from config import AWS_DIRECTORY from query import get_slugs app = Flask(__name__) app.config.from_object('config') from views import * # Serving from s3 leads to some complications in h...
apache-2.0
-6,234,646,654,411,311,000
21.875
76
0.652095
false
jorik041/scikit-learn
sklearn/linear_model/randomized_l1.py
95
23365
""" Randomized Lasso/Logistic: feature selection based on Lasso and sparse Logistic Regression """ # Author: Gael Varoquaux, Alexandre Gramfort # # License: BSD 3 clause import itertools from abc import ABCMeta, abstractmethod import warnings import numpy as np from scipy.sparse import issparse from scipy import spar...
bsd-3-clause
3,757,223,006,510,591,000
36.028526
79
0.599486
false
psb-seclab/CTFStuff
hacknight/HN_Lab_1/python_101.py
2
6598
# -*- coding: utf-8 -*- #import my_math from my_math import factorial import os #import my_math def test_db(): return def test_network(): return def test_exception(): # opening file failed try: fi = open("testfile", 'r') fh = open("testfile", "w") fh.write("This is my test file for exception ha...
mit
384,615,790,614,466,200
16.869919
62
0.615408
false
canvasnetworks/canvas
common/boto/s3/acl.py
17
5397
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
bsd-3-clause
1,424,259,395,550,491,400
32.110429
105
0.569205
false
dana-i2cat/felix
vt_manager/src/python/vt_manager/communication/XmlRpcClient.py
3
1276
import xmlrpclib, logging from urlparse import urlparse """ author: msune, CarolinaFernandez Server monitoring thread """ class XmlRpcClient(): """ Calling a remote method with variable number of parameters """ @staticmethod def callRPCMethodBasicAuth(url,userName,password,methodName,*params): result = None ...
apache-2.0
4,492,516,822,640,603,000
27.355556
106
0.659091
false
westinedu/newertrends
django/template/__init__.py
561
3247
""" This is the Django template system. How it works: The Lexer.tokenize() function converts a template string (i.e., a string containing markup with custom template tags) to tokens, which can be either plain text (TOKEN_TEXT), variables (TOKEN_VAR) or block statements (TOKEN_BLOCK). The Parser() class takes a list ...
bsd-3-clause
7,799,414,344,892,095,000
39.5875
83
0.755159
false
dhermes/project-euler
python/complete/no190.py
1
1063
#!/usr/bin/env python # Let S_m = (x_1, x_2, ... , x_m) be the m-tuple of positive real # numbers with x_1 + x_2 + ... + x_m = m for which # P_m = x_1 * x_2^2 * ... * x_m^m is maximised. # For example, it can be verified that [P_10] = 4112 # ([] is the integer part function). # Find SUM[P_m] for 2 <= m <= 15. # ---...
apache-2.0
3,962,063,337,530,785,000
25.575
78
0.521167
false
gcblue/gcblue
bin/Lib/test/test_msilib.py
129
1468
""" Test suite for the code in msilib """ import unittest import os from test_support import run_unittest, import_module msilib = import_module('msilib') class Test_make_id(unittest.TestCase): #http://msdn.microsoft.com/en-us/library/aa369212(v=vs.85).aspx """The Identifier data type is a text string. Identifi...
bsd-3-clause
4,218,803,510,297,476,000
30.913043
77
0.583106
false
mhugo/QGIS
tests/src/python/test_provider_ogr_gpkg.py
4
59492
# -*- coding: utf-8 -*- """QGIS Unit tests for the OGR/GPKG provider. .. note:: 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) any later version....
gpl-2.0
-3,331,028,875,646,041,600
42.551977
186
0.623479
false
huanpc/lab_cloud_computing
docs/learning-by-doing/week09_10_connectDB_restApi/auto scaling system/constant.py
1
3300
__author__ = 'huanpc' CPU_THRESHOLD_UP = 0.1 CPU_THRESHOLD_DOWN = 0.001 MEM_THRESHOLD_UP = 15700000.0 MEM_THRESHOLD_DOWN = 2097152.0 HOST = '25.22.28.94' PORT = 8086 USER = 'root' PASS = 'root' DATABASE = 'cadvisor' SELECT_CPU = 'derivative(cpu_cumulative_usage)' SELECT_MEMORY = 'median(memory_usage)' SERIES = '"stats...
apache-2.0
8,404,436,930,996,980,000
33.736842
169
0.701818
false
martinohanlon/pelmetcam
GPSController.py
1
2913
from gps import * import time import datetime import threading import math class GpsUtils(): MPS_TO_MPH = 2.2369362920544 @staticmethod def latLongToXY(lat, lon): rMajor = 6378137 # Equatorial Radius, WGS84 shift = math.pi * rMajor x = lon * shift / 180 y = math.log(m...
mit
-870,046,744,598,906,500
26.742857
79
0.544113
false
Symmetry-Innovations-Pty-Ltd/Python-2.7-for-QNX6.5.0-x86
usr/pkg/lib/python2.7/idlelib/IOBinding.py
16
20975
# changes by dscherer@cmu.edu # - IOBinding.open() replaces the current window with the opened file, # if the current window is both unmodified and unnamed # - IOBinding.loadfile() interprets Windows, UNIX, and Macintosh # end-of-line conventions, instead of relying on the standard library, # which will...
mit
3,166,070,688,643,800,000
34.311448
80
0.548653
false
bmispelon/csvkit
csvkit/sql.py
21
3016
#!/usr/bin/env python import datetime import six from sqlalchemy import Column, MetaData, Table, create_engine from sqlalchemy import BigInteger, Boolean, Date, DateTime, Float, Integer, String, Time from sqlalchemy.schema import CreateTable NoneType = type(None) DIALECTS = { 'access': 'access.base', 'fire...
mit
191,187,529,732,256,830
28.568627
98
0.647546
false
CloudServer/cinder
cinder/openstack/common/scheduler/filters/capabilities_filter.py
26
2792
# Copyright (c) 2011 OpenStack Foundation. # 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...
apache-2.0
-1,256,998,803,532,345,900
38.323944
78
0.602077
false
Technocaveman/There-is-no-Third-Step
node_modules/pygmentize-bundled/vendor/pygments/pygments/styles/fruity.py
364
1298
# -*- coding: utf-8 -*- """ pygments.styles.fruity ~~~~~~~~~~~~~~~~~~~~~~ pygments version of my "fruity" vim theme. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Token, Co...
mit
3,813,035,958,184,197,000
29.904762
70
0.531587
false
arizvisa/syringe
template/lnkfile.py
1
40522
import ptypes, ndk, office.propertyset from ptypes import * from ndk.datatypes import * class uint0(pint.uint_t): length = 0 class GUID(ndk.GUID): pass @pbinary.littleendian class LinkFlags(pbinary.flags): _fields_ = [ (1, 'HasLinkTargetIDList'), # The shell link is saved with an item ID ...
bsd-2-clause
8,419,824,990,856,185,000
47.704327
279
0.605054
false
chrisndodge/edx-platform
openedx/core/djangoapps/user_api/migrations/0001_initial.py
20
2731
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone from django.conf import settings import model_utils.fields import django.core.validators from openedx.core.djangoapps.xmodule_django.models import CourseKeyField class Migration(migra...
agpl-3.0
5,830,344,502,259,138,000
43.048387
147
0.589894
false
jingxiang-li/kaggle-yelp
model/level3_model_rf.py
1
5669
from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import numpy as np from sklearn.ensemble import RandomForestClassifier from sklearn.calibration import CalibratedClassifierCV from sklearn.metrics import f1_score import...
mit
6,082,043,993,278,494,000
33.357576
76
0.594814
false
jreback/pandas
pandas/io/formats/html.py
2
23192
""" Module for formatting output data in HTML. """ from textwrap import dedent from typing import Any, Dict, Iterable, List, Mapping, Optional, Tuple, Union, cast from pandas._config import get_option from pandas._libs import lib from pandas import MultiIndex, option_context from pandas.io.common import is_url fro...
bsd-3-clause
8,511,209,384,092,984,000
37.018033
88
0.486525
false
cobrab11/black1-bot
extensions/collect.py
3
6973
# BS mark.1-55 # /* coding: utf-8 */ # BlackSmith plugin # This should be rewritten! BLACK_LIST = 'dynamic/blacklist.txt' CHAT_CACHE = {} AMSGBL = [] DirtyChats = [] def handler_chat_cache(stanza, ltype, source, body): try: subject = stanza.getTag('subject') except: subject = False if ltype != 'public' o...
apache-2.0
-2,683,236,169,448,569,300
28.237209
93
0.617404
false
systers/mailman
src/mailman/handlers/acknowledge.py
7
3436
# Copyright (C) 1998-2015 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # # GNU Mailman 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 you...
gpl-3.0
9,196,911,609,368,220,000
39.423529
78
0.655995
false
sciCloud/OLiMS
lims/browser/fields/datetimefield.py
2
2641
from time import strptime from dependencies.dependency import ClassSecurityInfo from dependencies.dependency import DateTime, safelocaltime from dependencies.dependency import DateTimeError from dependencies.dependency import registerField from dependencies.dependency import IDateTimeField from dependencies.dependenc...
agpl-3.0
4,101,780,731,871,722,000
36.197183
77
0.605074
false
gbiggs/rtcshell
rtcshell/rtmgr.py
1
6160
#!/usr/bin/env python # -*- Python -*- # -*- coding: utf-8 -*- '''rtcshell Copyright (C) 2009-2010 Geoffrey Biggs RT-Synthesis Research Group Intelligent Systems Research Institute, National Institute of Advanced Industrial Science and Technology (AIST), Japan All rights reserved. Licensed und...
epl-1.0
4,634,796,370,147,265,000
28.473684
78
0.631818
false
dhoffman34/django
tests/servers/tests.py
23
5966
# -*- encoding: utf-8 -*- """ Tests for django.core.servers. """ from __future__ import unicode_literals import os import socket from django.core.exceptions import ImproperlyConfigured from django.test import LiveServerTestCase from django.test import override_settings from django.utils.http import urlencode from dja...
bsd-3-clause
7,758,314,232,677,597,000
30.882353
79
0.631164
false
stone5495/NewsBlur
apps/profile/views.py
8
22968
import stripe import datetime from django.contrib.auth.decorators import login_required from django.views.decorators.http import require_POST from django.views.decorators.csrf import csrf_protect from django.contrib.auth import logout as logout_user from django.contrib.auth import login as login_user from django.db.mod...
mit
5,065,385,919,666,274,000
36.408795
126
0.636973
false
knewmanTE/FrameworkBenchmarks
toolset/benchmark/test_types/json_type.py
36
1216
from benchmark.test_types.framework_test_type import FrameworkTestType from benchmark.test_types.verifications import ( basic_body_verification, verify_headers, verify_helloworld_object ) import json class JsonTestType(FrameworkTestType): def __init__(self): kwargs = { 'name': 'j...
bsd-3-clause
-994,630,005,704,520,600
26.022222
70
0.586349
false
Aaron1992/v2ex
mapreduce/handlers.py
20
27693
#!/usr/bin/env python # # Copyright 2010 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...
bsd-3-clause
8,927,027,168,797,040,000
34.232824
80
0.654245
false
duqiao/django
tests/migrations/test_writer.py
76
23489
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import functools import math import os import re import tokenize import unittest import custom_migration_operations.more_operations import custom_migration_operations.operations from django.conf import settings from django.core.validator...
bsd-3-clause
-8,721,334,162,716,889,000
41.468354
126
0.624143
false
cnsoft/kbengine-cocos2dx
kbe/res/scripts/common/Lib/test/test_itertools.py
6
69610
import unittest from test import support from itertools import * from weakref import proxy from decimal import Decimal from fractions import Fraction import sys import operator import random import copy import pickle from functools import reduce maxsize = support.MAX_Py_ssize_t minsize = -maxsize-1 def lzip(*args): ...
lgpl-3.0
4,241,538,907,568,273,400
39.612602
124
0.533889
false
slozier/ironpython2
Tests/test_bytes.py
2
65335
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. import sys import unittest from iptest import IronPythonTestCase, ip_supported_encodings, is_cli, is_mono, is_...
apache-2.0
-8,719,912,513,521,506,000
44.089717
168
0.532088
false
offtools/linux-show-player
lisp/modules/gst_backend/elements/user_element.py
3
3423
# -*- coding: utf-8 -*- # # This file is part of Linux Show Player # # Copyright 2012-2016 Francesco Ceruti <ceppofrancy@gmail.com> # # Linux Show Player 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 ...
gpl-3.0
-7,158,419,560,938,443,000
36.626374
79
0.658779
false
pigeonflight/strider-plone
docker/appengine/lib/django-1.5/tests/regressiontests/serializers_regress/models.py
45
8072
""" A test spanning all the capabilities of all the serializers. This class sets up a model for each model field type (except for image types, because of the PIL dependency). """ from django.db import models from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType # ...
mit
-4,446,028,695,050,745,300
28.140794
84
0.739965
false
modelkayak/python_signal_examples
energy_fft.py
1
2685
import numpy as np import scipy from matplotlib import pyplot as plt from numpy import pi as pi # Plotting logic switches time_plot = True freq_plot = True # Oversample to make things look purty oversample = 100 # Frequencies to simulate f_min = 5 #[Hz] f_max = 10 #[Hz] f_list = np.arange(f_min,f_max) # Note: arange...
mit
-7,617,899,990,671,451,000
28.505495
75
0.67933
false
moxon6/chemlab
build/lib/chemlab/graphics/qttrajectory.py
5
12898
from PyQt4.QtGui import QMainWindow, QApplication, QDockWidget from PyQt4 import QtGui, QtCore from PyQt4.QtCore import Qt import os from .qtviewer import app from .qchemlabwidget import QChemlabWidget from .. import resources import numpy as np resources_dir = os.path.dirname(resources.__file__) class PlayStopBu...
gpl-3.0
5,636,350,738,547,121,000
30.615196
88
0.575361
false
gautam1858/tensorflow
tensorflow/python/kernel_tests/numerics_test.py
15
5145
# 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...
apache-2.0
-8,638,399,950,881,211,000
37.395522
80
0.641399
false
SnappleCap/oh-mainline
vendor/packages/Django/tests/regressiontests/utils/crypto.py
108
4625
from __future__ import unicode_literals import binascii import math import timeit import hashlib from django.utils import unittest from django.utils.crypto import constant_time_compare, pbkdf2 class TestUtilsCryptoMisc(unittest.TestCase): def test_constant_time_compare(self): # It's hard to test for co...
agpl-3.0
-801,880,466,785,421,400
30.678082
75
0.463568
false
jordanemedlock/psychtruths
temboo/core/Library/Basecamp/GetProject.py
5
3773
# -*- coding: utf-8 -*- ############################################################################### # # GetProject # Retrieves an individual project using a project id that you specify. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "Licens...
apache-2.0
4,416,435,095,684,486,000
37.896907
185
0.670289
false
zzsza/TIL
python/crawling/advanced_link_crawler.py
1
1657
import re from urllib import robotparser from urllib.parse import urljoin from downloader import Downloader def get_robots_parser(robots_url): rp = robotparser.RobotFileParser() rp.set_url(robots_url) rp.read() return rp def get_links(html): webpage_regex = re.compile("""<a[^>]+href=["'](.*?)["'...
mit
-5,075,583,295,079,017,000
33.520833
101
0.554617
false
openstack/manila
manila/scheduler/scheduler_options.py
2
3492
# Copyright (c) 2011 OpenStack, LLC. # 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 requi...
apache-2.0
1,188,902,303,416,747,500
33.235294
78
0.649771
false
rbalda/neural_ocr
env/lib/python2.7/site-packages/django/contrib/gis/geoip/base.py
334
11859
import os import re import warnings from ctypes import c_char_p from django.contrib.gis.geoip.libgeoip import GEOIP_SETTINGS from django.contrib.gis.geoip.prototypes import ( GeoIP_country_code_by_addr, GeoIP_country_code_by_name, GeoIP_country_name_by_addr, GeoIP_country_name_by_name, GeoIP_database_info,...
mit
2,515,451,417,160,843,300
39.613014
108
0.612362
false
zhanghenry/stocks
tests/utils_tests/test_http.py
220
8102
from __future__ import unicode_literals import sys import unittest from datetime import datetime from django.utils import http, six from django.utils.datastructures import MultiValueDict class TestUtilsHttp(unittest.TestCase): def test_same_origin_true(self): # Identical self.assertTrue(http.sa...
bsd-3-clause
-5,960,138,391,426,787,000
40.979275
109
0.540731
false
vismartltd/edx-platform
common/djangoapps/track/tests/test_tracker.py
88
3481
from django.conf import settings from django.test import TestCase from django.test.utils import override_settings import track.tracker as tracker from track.backends import BaseBackend SIMPLE_SETTINGS = { 'default': { 'ENGINE': 'track.tests.test_tracker.DummyBackend', 'OPTIONS': { 'fl...
agpl-3.0
6,338,887,002,531,866,000
28.5
79
0.65441
false
andela-bojengwa/talk
venv/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py
204
24273
# -*- coding: utf-8 -*- """ requests.session ~~~~~~~~~~~~~~~~ This module provides a Session object to manage and persist settings across requests (cookies, auth, proxies). """ import os from collections import Mapping from datetime import datetime from .auth import _basic_auth_str from .compat import cookielib, Or...
mit
4,329,638,928,754,115,600
34.589443
115
0.604194
false
bala4901/odoo
addons/l10n_cn/__openerp__.py
91
1827
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2009 Gábor Dukai # # 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 Foun...
agpl-3.0
198,857,496,429,203,550
35.765957
85
0.573495
false
buzzer/pr2_imagination
race_simulation_run/tools/race_fluent_modification.py
2
6269
#! /usr/bin/env python import yaml import random import roslib class Fluent(yaml.YAMLObject): yaml_tag='!Fluent' def __setstate__(self, state): """ PyYaml does not call __init__. this is an init replacement. """ self.properties = [] self.Class_Instance = state['Class_I...
bsd-2-clause
-449,458,975,980,125,250
36.094675
142
0.580156
false
nirmeshk/oh-mainline
vendor/packages/twisted/twisted/protocols/sip.py
20
41745
# -*- test-case-name: twisted.test.test_sip -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """Session Initialization Protocol. Documented in RFC 2543. [Superceded by 3261] This module contains a deprecated implementation of HTTP Digest authentication. See L{twisted.cred.credentials} a...
agpl-3.0
6,215,315,143,037,585,000
30.293103
119
0.569362
false
Grarak/grakernel-msm8930
scripts/gcc-wrapper.py
364
3936
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2011-2012, The Linux Foundation. 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 th...
gpl-2.0
-4,037,045,619,782,924,300
32.355932
97
0.663872
false
landryb/QGIS
python/plugins/processing/algs/exampleprovider/ProcessingExampleProviderPlugin.py
26
1655
# -*- coding: utf-8 -*- """ *************************************************************************** __init__.py --------------------- Date : July 2013 Copyright : (C) 2013 by Victor Olaya Email : volayaf at gmail dot com ********************************...
gpl-2.0
6,290,126,447,250,553,000
32.1
77
0.49426
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.6/Lib/curses/has_key.py
81
5633
# # Emulation of has_key() function for platforms that don't use ncurses # import _curses # Table mapping curses keys to the terminfo capability name _capability_names = { _curses.KEY_A1: 'ka1', _curses.KEY_A3: 'ka3', _curses.KEY_B2: 'kb2', _curses.KEY_BACKSPACE: 'kbs', _curses.KEY_BEG: 'kbeg', ...
mit
-3,731,281,184,704,951,300
28.338542
72
0.571987
false
mscuthbert/abjad
abjad/tools/timespantools/test/test_timespantools_Timespan_is_congruent_to_timespan.py
2
2925
# -*- encoding: utf-8 -*- from abjad import * def test_timespantools_Timespan_is_congruent_to_timespan_01(): timespan_1 = timespantools.Timespan(0, 15) timespan_2 = timespantools.Timespan(-10, -5) assert not timespan_1.is_congruent_to_timespan(timespan_2) def test_timespantools_Timespan_is_congruent_to_t...
gpl-3.0
-4,915,905,206,886,809,000
42.029412
62
0.742906
false
PySide/Shiboken
tests/samplebinding/multi_cpp_inheritance_test.py
6
3178
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of the Shiboken Python Bindings Generator project. # # Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). # # Contact: PySide team <contact@pyside.org> # # This program is free software; you can redistribute it and/or # modify it under the terms...
gpl-2.0
8,331,902,494,146,692,000
30.78
70
0.662052
false
bazitur/brackets-python-tools
pythonfiles/parso/python/token.py
2
1777
from __future__ import absolute_import from itertools import count from token import * from parso._compatibility import py_version _counter = count(N_TOKENS) # Never want to see this thing again. del N_TOKENS COMMENT = next(_counter) tok_name[COMMENT] = 'COMMENT' NL = next(_counter) tok_name[NL] = 'NL' # Sets the...
mit
-2,425,001,939,370,699,300
16.086538
79
0.665729
false
glaubitz/fs-uae-debian
arcade/launcher/settings/settings_header.py
2
1384
import fsui from fsbc.util import unused from launcher.ui.skin import Skin class SettingsHeader(fsui.Group): ICON_LEFT = 0 ICON_RIGHT = 1 def __init__( self, parent, icon, title, subtitle="", icon_position=ICON_RIGHT ): unused(subtitle) fsui.Group.__init__(self, parent) ...
gpl-2.0
-7,743,135,693,777,367,000
30.454545
72
0.567197
false
twoh/leevee
env/Lib/encodings/aliases.py
418
14848
""" Encoding Aliases Support This module is used by the encodings package search function to map encodings names to module names. Note that the search function normalizes the encoding names before doing the lookup, so the mapping will have to map normalized encoding names to module names. Con...
mit
1,315,960,443,830,221,000
27.174573
83
0.419652
false
djw8605/htcondor
src/condor_contrib/condor_pigeon/src/condor_pigeon_client/skype_linux_tools/find_chat.py
10
4722
#! /usr/bin/python # # Displays all multi-chats and allows to open them. # # (c) Copyright 2007, Vincent Oberle, vincent@oberle.org # # This software may be used and distributed according to the terms # of the GNU Public License, incorporated herein by reference. import sys import re from optparse import OptionParser...
apache-2.0
1,836,465,713,021,663,000
28.5125
121
0.623041
false
dangtrinhnt/django-saml2
djangosaml2/templatetags/idplist.py
8
1419
# Copyright (C) 2011-2012 Yaco Sistemas (http://www.yaco.es) # # 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 a...
apache-2.0
-4,295,575,218,021,276,700
31.25
74
0.696265
false
nevir/plexability
extern/depot_tools/third_party/boto/mashups/server.py
91
14043
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
gpl-2.0
551,411,079,860,995,260
34.551899
103
0.588407
false
kalahbrown/HueBigSQL
desktop/core/ext-py/django-extensions-1.5.0/docs/conf.py
33
6439
# -*- coding: utf-8 -*- # # django-extensions documentation build configuration file, created by # sphinx-quickstart on Wed Apr 1 20:39:40 2009. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated fil...
apache-2.0
4,065,926,971,494,356,000
32.190722
87
0.714397
false
kriswuollett/grpc
examples/python/multiplex/route_guide_resources.py
115
2221
# Copyright 2015, 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...
bsd-3-clause
145,743,123,724,359,040
40.90566
72
0.742909
false
howethomas/synapse
tests/rest/client/v1/test_presence.py
2
12591
# -*- coding: utf-8 -*- # Copyright 2014 OpenMarket Ltd # # 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 la...
apache-2.0
-3,441,427,267,454,832,000
31.534884
86
0.581526
false
leiferikb/bitpop
src/third_party/pyftpdlib/src/demo/basic_ftpd.py
4
2796
#!/usr/bin/env python # $Id: basic_ftpd.py 977 2012-01-22 23:05:09Z g.rodola $ # pyftpdlib is released under the MIT license, reproduced below: # ====================================================================== # Copyright (C) 2007-2012 Giampaolo Rodola' <g.rodola@gmail.com> # # All Ri...
gpl-3.0
-593,978,601,895,551,600
36.28
76
0.683834
false