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
devaha/archagent
node_modules/grunt-plugin/node_modules/npm/node_modules/node-gyp/gyp/test/library/gyptest-static.py
430
2241
#!/usr/bin/env python # Copyright (c) 2009 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. """ Verifies simple build of a "Hello, world!" program with static libraries, including verifying that libraries are rebuilt correctly when ...
gpl-2.0
-2,259,408,545,123,911,000
25.678571
73
0.696118
false
badock/nova
nova/tests/api/ec2/test_apirequest.py
11
3502
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # 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 # # Unl...
apache-2.0
-4,107,074,307,500,062,000
37.065217
79
0.590805
false
kingsfordgroup/armatus
scripts/HiCvis.py
1
7843
#!/usr/env python import numpy as np import seaborn as sb import matplotlib.pyplot as plt import argparse import math from scipy.sparse import coo_matrix def plotall(datamat,domains1,domains2,bounds,legendname1,legendname2,outputname): """ Show heatmap of Hi-C data along with any domain sets given :param da...
bsd-2-clause
-4,195,213,507,118,774,300
49.275641
138
0.645416
false
xpansa/server-tools
users_ldap_populate/model/users_ldap.py
25
3768
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2012 Therp BV (<http://therp.nl>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
-8,469,481,884,355,459,000
35.941176
78
0.559183
false
alexzoo/python
selenium_tests/env/lib/python3.6/site-packages/pip/_vendor/requests/compat.py
327
1687
# -*- coding: utf-8 -*- """ requests.compat ~~~~~~~~~~~~~~~ This module handles import compatibility issues between Python 2 and Python 3. """ from .packages import chardet import sys # ------- # Pythons # ------- # Syntax sugar. _ver = sys.version_info #: Python 2.x? is_py2 = (_ver[0] == 2) #: Python 3.x? is_p...
apache-2.0
-1,672,239,719,373,464,600
23.808824
132
0.679905
false
xiangel/hue
apps/metastore/src/metastore/settings.py
29
1051
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
4,556,676,228,441,747,500
36.535714
74
0.753568
false
sunyi00/jenkins-job-builder
jenkins_jobs/sphinx/yaml.py
42
4925
# Copyright 2012 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 applicable law...
apache-2.0
-7,981,900,598,473,804,000
34.178571
79
0.630863
false
teltek/edx-platform
common/test/acceptance/tests/studio/test_studio_course_team.py
4
15689
""" Acceptance tests for course in studio """ from common.test.acceptance.pages.common.auto_auth import AutoAuthPage from common.test.acceptance.pages.studio.index import DashboardPage from common.test.acceptance.pages.studio.users import CourseTeamPage from common.test.acceptance.tests.studio.base_studio_test import S...
agpl-3.0
4,937,024,021,846,020,000
39.645078
116
0.63076
false
Dhivyap/ansible
lib/ansible/plugins/httpapi/restconf.py
17
2852
# Copyright (c) 2018 Cisco and/or its affiliates. # # 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 v...
gpl-3.0
5,667,171,572,620,325,000
31.781609
120
0.692146
false
salaria/odoo
addons/hr_payroll/res_config.py
441
1294
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
-7,811,402,583,922,193,000
43.62069
93
0.617465
false
uclouvain/osis
education_group/tests/ddd/factories/domain/co_graduation.py
1
1610
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
7,417,066,246,598,181,000
42.486486
87
0.658794
false
notmyname/swift
swift/proxy/controllers/account.py
4
8385
# Copyright (c) 2010-2012 OpenStack Foundation # # 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 agree...
apache-2.0
-8,908,562,722,954,848,000
46.106742
78
0.619439
false
noelevans/sandpit
interview_challenges/koans/answer_template.py
1
4601
''' Python questions to work on. To invoke with pytest use $ python3 answer_template.py or $ python3 -m pytest answer_template.py ''' import pytest def inclusive_range(n): # For n = 5, return [1, 2, 3, 4, 5] return [1, 2, 3, 4, 5] def test_inclusive_range(): assert list(inclusive_range(5)) ==...
mit
2,491,648,851,423,830,000
21.443902
79
0.517714
false
tmpgit/intellij-community
python/helpers/coverage/summary.py
215
2972
"""Summary reporting""" import sys from coverage.report import Reporter from coverage.results import Numbers from coverage.misc import NotPython class SummaryReporter(Reporter): """A reporter for writing the summary report.""" def __init__(self, coverage, config): super(SummaryReporter, self).__ini...
apache-2.0
1,886,670,519,419,227,100
33.55814
77
0.516151
false
mancoast/CPythonPyc_test
cpython/252_test_profile.py
19
3289
"""Test suite for the profile module.""" import profile, pstats, sys # In order to have reproducible time, we simulate a timer in the global # variable 'ticks', which represents simulated time in milliseconds. # (We can't use a helper function increment the timer since it would be # included in the profile and would ...
gpl-3.0
-5,946,416,485,957,101,000
25.739837
71
0.519611
false
mahak/ansible
test/units/parsing/test_dataloader.py
57
9955
# (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...
gpl-3.0
-1,236,156,399,988,751,000
40.65272
140
0.6666
false
caveman-dick/ansible
lib/ansible/modules/network/f5/bigip_irule.py
10
11191
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUM...
gpl-3.0
-5,943,201,217,150,240,000
26.295122
91
0.573854
false
georgemarshall/django
tests/gis_tests/geogapp/tests.py
42
6977
""" Tests for geography support in PostGIS """ import os from unittest import skipIf, skipUnless from django.contrib.gis.db import models from django.contrib.gis.db.models.functions import Area, Distance from django.contrib.gis.measure import D from django.db import NotSupportedError, connection from django.db.models....
bsd-3-clause
-5,634,515,684,919,385,000
43.724359
111
0.636663
false
LaMi-/pmatic
examples/lowlevel_api/print_available_api_methods.py
2
1086
#!/usr/bin/env python # encoding: utf-8 # # pmatic - Python API for Homematic. Easy to use. # Copyright (C) 2016 Lars Michelsen <lm@larsmichelsen.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 Found...
gpl-2.0
-1,515,462,868,552,048,600
40.769231
95
0.754144
false
dkarakats/edx-platform
common/lib/xmodule/xmodule/crowdsource_hinter.py
177
17456
""" Adds crowdsourced hinting functionality to lon-capa numerical response problems. Currently experimental - not for instructor use, yet. """ import logging import json import random import copy from pkg_resources import resource_string from lxml import etree from xmodule.x_module import XModule, STUDENT_VIEW fro...
agpl-3.0
7,598,628,935,024,019,000
42.207921
123
0.598992
false
gromez/Sick-Beard
sickbeard/clients/generic.py
30
7839
import re import time from hashlib import sha1 import sickbeard from sickbeard import logger from sickbeard.exceptions import ex from sickbeard.clients import http_error_code from lib.bencode import bencode, bdecode from lib import requests class GenericClient(object): def __init__(self, name, host=None, use...
gpl-3.0
-7,142,414,995,294,513,000
40.696809
253
0.552877
false
mlavin/django-lastfm-auth
setup.py
1
1157
import os from setuptools import setup, find_packages def read_file(filename): """Read a file into a string""" path = os.path.abspath(os.path.dirname(__file__)) filepath = os.path.join(path, filename) try: return open(filepath).read() except IOError: return '' setup( name='dj...
bsd-2-clause
7,934,448,591,082,276,000
31.138889
82
0.62057
false
sinhrks/scikit-learn
sklearn/utils/tests/test_shortest_path.py
303
2841
from collections import defaultdict import numpy as np from numpy.testing import assert_array_almost_equal from sklearn.utils.graph import (graph_shortest_path, single_source_shortest_path_length) def floyd_warshall_slow(graph, directed=False): N = graph.shape[0] #set nonzer...
bsd-3-clause
3,898,334,699,039,566,300
28.905263
76
0.596973
false
varunarya10/nova_test_latest
nova/api/openstack/compute/contrib/server_start_stop.py
51
3355
# Copyright 2012 Midokura Japan K.K. # # 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...
apache-2.0
4,477,741,812,864,021,000
38.940476
79
0.669449
false
rshipp/python-appassure
appassure/core/IExchangeManagement.py
1
2434
"""AppAssure 5 Core API""" from appassure.api import AppAssureAPI class IExchangeManagement(AppAssureAPI): """Full documentation online at http://docs.appassure.com/display/AA50D/IExchangeManagement """ def verifyCredentials(self, data, agentId): """Verifies credentials to Exchange instance. ...
bsd-3-clause
7,835,458,435,687,847,000
38.901639
81
0.654478
false
jonasjberg/autonameow
autonameow/vendor/unidecode/x0c1.py
253
4765
data = ( 'syae', # 0x00 'syaeg', # 0x01 'syaegg', # 0x02 'syaegs', # 0x03 'syaen', # 0x04 'syaenj', # 0x05 'syaenh', # 0x06 'syaed', # 0x07 'syael', # 0x08 'syaelg', # 0x09 'syaelm', # 0x0a 'syaelb', # 0x0b 'syaels', # 0x0c 'syaelt', # 0x0d 'syaelp', # 0x0e 'syaelh', # 0x...
gpl-2.0
-6,533,903,526,170,320,000
17.468992
19
0.46128
false
ryandub/skew
skew/resources/aws/elasticache.py
3
1868
# Copyright (c) 2014 Scopely, Inc. # Copyright (c) 2015 Mitch Garnaat # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanyin...
apache-2.0
1,712,966,244,954,447,600
29.129032
72
0.62955
false
waytai/odoo
addons/sale_analytic_plans/__openerp__.py
262
1634
# -*- 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,707,766,967,396,688,000
39.85
78
0.591799
false
Juniper/contrail-dev-neutron
neutron/tests/unit/mlnx/test_defaults.py
25
1508
# Copyright (c) 2013 OpenStack Foundation # # 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
-6,747,185,808,910,659,000
37.666667
70
0.657162
false
underyx/ansible-modules-core
cloud/amazon/ec2_facts.py
46
6431
#!/usr/bin/python # -*- coding: utf-8 -*- # 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 version. #...
gpl-3.0
-6,671,721,627,206,905,000
34.530387
99
0.579848
false
madratman/nuklei-code
contrib/scons/scons-local-2.0.1/SCons/compat/_scons_subprocess.py
183
44500
# subprocess - Subprocesses with accessible I/O streams # # For more information about this module, see PEP 324. # # This module should remain compatible with Python 2.2, see PEP 291. # # Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se> # # Licensed to PSF under a Contributor Agreement. # See http://ww...
gpl-3.0
-6,161,767,913,089,782,000
33.738486
128
0.56582
false
syphar/django
tests/template_tests/filter_tests/test_date.py
94
3011
from datetime import datetime, time from django.template.defaultfilters import date from django.test import SimpleTestCase, override_settings from django.utils import timezone, translation from ..utils import setup from .timezone_utils import TimezoneTestCase class DateTests(TimezoneTestCase): @setup({'date01'...
bsd-3-clause
8,958,082,059,772,108,000
34.845238
93
0.595151
false
laperry1/android_external_chromium_org
build/android/pylib/flag_changer.py
46
5712
# 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 logging import pylib.android_commands import pylib.device.device_utils class FlagChanger(object): """Changes the flags Chrome runs with. T...
bsd-3-clause
-1,469,350,995,903,597,800
34.042945
79
0.651261
false
traveloka/ansible
contrib/inventory/consul_io.py
7
17349
#!/usr/bin/env python # # (c) 2015, Steve Gargan <steve.gargan@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 # (a...
gpl-3.0
6,472,340,680,296,032,000
34.262195
85
0.655369
false
acsone/knowledge
document_reindex/models/__init__.py
12
1051
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2015 Therp BV <http://therp.nl>. # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
agpl-3.0
-6,756,679,663,846,134,000
46.772727
78
0.614653
false
slisson/intellij-community
python/helpers/pydev/_pydev_getopt.py
108
4458
#======================================================================================================================= # getopt code copied since gnu_getopt is not available on jython 2.1 #======================================================================================================================= class Ge...
apache-2.0
1,771,726,063,396,634,000
33.292308
120
0.506729
false
uiri/pxqz
venv/lib/python2.7/site-packages/django/utils/http.py
26
7878
import calendar import datetime import re import sys import urllib import urlparse from email.utils import formatdate from django.utils.datastructures import MultiValueDict from django.utils.encoding import smart_str, force_unicode from django.utils.functional import allow_lazy ETAG_MATCH = re.compile(r'(?:W/)?"((?:\...
gpl-3.0
-1,053,098,882,439,102,000
33.858407
85
0.633156
false
Jidgdoi/PacmanPy
src/Main.py
1
4832
# -*- coding:utf-8 -*- # Cyril Fournier # 20/01/2016 import os,sys import wx import threading import Queue import time import UtilsAndGlobal as UAG from Cell import Cell from Map import Map from UI import UI, UICatcher from GhostAI import GhostAI from Graphical import Graphical from Pacman import Pacman, PacmanGame ...
gpl-2.0
5,565,674,351,653,694,000
26.11236
152
0.607542
false
hivam/doctor_multiroom
models/doctor_room.py
1
2194
# -*- 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 Affero Gene...
agpl-3.0
5,641,268,182,700,959,000
36.118644
90
0.669406
false
xyuanmu/XX-Net
python3.8.2/Lib/symtable.py
10
7568
"""Interface to the compiler's internal symbol tables""" import _symtable from _symtable import (USE, DEF_GLOBAL, DEF_NONLOCAL, DEF_LOCAL, DEF_PARAM, DEF_IMPORT, DEF_BOUND, DEF_ANNOT, SCOPE_OFF, SCOPE_MASK, FREE, LOCAL, GLOBAL_IMPLICIT, GLOBAL_EXPLICIT, CELL) import weakref __all__ = ["symtable", "SymbolTa...
bsd-2-clause
2,262,638,853,627,275,500
29.639676
81
0.578488
false
Cyberbio-Lab/bcbio-nextgen
bcbio/variation/gatk.py
2
5183
"""GATK variant calling -- HaplotypeCaller and UnifiedGenotyper. """ from distutils.version import LooseVersion import toolz as tz from bcbio import bam, broad, utils from bcbio.distributed.transaction import file_transaction from bcbio.pipeline import config_utils from bcbio.pipeline.shared import subset_variant_reg...
mit
-8,480,747,988,619,238,000
47.896226
110
0.600039
false
lugia/Python-MyWalk
base/utils.py
1
1085
from django.http import HttpResponse import simplejson as json def idx(a, id, default = None): if a.has_key(id): return a[id] return default def printItems(dictObj, indent): ret = "" ret = ret + ' '*indent + '<ul>\n' for k,v in dictObj.iteritems(): if isinstance(v, dict): ...
apache-2.0
-7,965,693,762,019,886,000
27.552632
78
0.580645
false
fbradyirl/home-assistant
tests/components/history_graph/test_init.py
4
1171
"""The tests the Graph component.""" import unittest from homeassistant.setup import setup_component from tests.common import init_recorder_component, get_test_home_assistant class TestGraph(unittest.TestCase): """Test the Google component.""" def setUp(self): # pylint: disable=invalid-name """Set...
apache-2.0
-1,391,276,814,122,048,000
31.527778
88
0.611443
false
jordanemedlock/psychtruths
temboo/core/Library/Facebook/Actions/Fitness/Bikes/ReadBikes.py
5
5217
# -*- coding: utf-8 -*- ############################################################################### # # ReadBikes # Retrieves one or more bike actions. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file e...
apache-2.0
5,065,114,739,095,053,000
41.762295
185
0.665708
false
JConwayAWT/PGSS14CC
lib/python/multimetallics/ase/gui/ag.py
2
5192
#!/usr/bin/env python # Copyright 2008, 2009 # CAMd (see accompanying license files for details). import os from optparse import OptionParser, SUPPRESS_HELP import ase.gui.i18n from gettext import gettext as _ # Grrr, older versions (pre-python2.7) of optparse have a bug # which prevents non-ascii descriptions. Ho...
gpl-2.0
5,185,283,820,905,843,000
36.085714
77
0.513675
false
deployed/django
tests/dates/tests.py
32
2509
from __future__ import unicode_literals import datetime from django.test import TestCase from .models import Article, Comment, Category class DatesTests(TestCase): def test_related_model_traverse(self): a1 = Article.objects.create( title="First one", pub_date=datetime.date(2005,...
bsd-3-clause
3,588,534,063,917,899,300
29.228916
71
0.491829
false
sdague/home-assistant
tests/components/homekit_controller/test_sensor.py
14
6430
"""Basic checks for HomeKit sensor.""" from aiohomekit.model.characteristics import CharacteristicsTypes from aiohomekit.model.services import ServicesTypes from homeassistant.const import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_ILLUMINANCE, DEVICE_CLASS_TEMPERATURE, ) from tests.c...
apache-2.0
-2,530,798,688,146,535,400
33.756757
80
0.715552
false
Glottotopia/aagd
moin/local/moin/MoinMoin/support/pygments/styles/vs.py
3
1111
# -*- coding: utf-8 -*- """ pygments.styles.vs ~~~~~~~~~~~~~~~~~~ Simple style with MS Visual Studio colors. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keywo...
mit
2,123,344,827,651,859,700
27.236842
70
0.468047
false
huntxu/fuel-web
nailgun/nailgun/rpc/threaded.py
9
2323
# -*- coding: utf-8 -*- # Copyright 2013 Mirantis, 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 requi...
apache-2.0
-1,356,472,661,251,983,400
30.391892
78
0.64873
false
sociateru/fabtools
fabtools/tests/functional_tests/test_nodejs.py
4
3575
import functools try: import json except ImportError: import simplejson as json import pytest from fabric.api import cd, run from fabtools.files import is_file from fabtools.require import directory as require_directory from fabtools.require import file as require_file pytestmark = pytest.mark.network @p...
bsd-2-clause
306,139,404,604,199,300
27.6
88
0.692587
false
vFense/vFenseAgent-nix
agent/deps/rpm6/Python-2.7.5/lib/python2.7/ctypes/test/test_bitfields.py
44
9293
from ctypes import * import unittest import os import ctypes import _ctypes_test class BITS(Structure): _fields_ = [("A", c_int, 1), ("B", c_int, 2), ("C", c_int, 3), ("D", c_int, 4), ("E", c_int, 5), ("F", c_int, 6), ...
lgpl-3.0
5,331,755,002,989,177,000
34.200758
94
0.473797
false
RaumZeit/gdesklets-core
utils/dialog.py
2
6662
import gtk import gobject import sys import traceback from cStringIO import StringIO from HIGDialog import HIGDialog from LogView import LogView # define some Dialog icons _ERROR = gtk.STOCK_DIALOG_ERROR _INFO = gtk.STOCK_DIALOG_INFO _QUESTION = gtk.STOCK_DIALOG_QUESTION _WARNING = gtk.STOCK_DIALOG_WARNING # we onl...
gpl-2.0
6,235,932,441,202,612,000
24.821705
76
0.621135
false
dungtn/babi_dialog_system
data/data_utils.py
1
8344
DATA_SOURCE = 'data/dialog-bAbI-tasks/dialog-babi-candidates.txt' DATA_SOURCE_TASK6 = 'data/dialog-bAbI-tasks/dialog-babi-task6-dstc2-candidates.txt' DATA_DIR = 'dialog-bAbI-tasks/dialog-babi-candidates.txt' STOP_WORDS=set(["a","an","the"]) import re import os from itertools import chain from six.moves import range,...
gpl-3.0
4,089,257,890,613,705,000
36.41704
133
0.592282
false
PeRDy/django-audit-tools
docs/source/conf.py
1
9176
# -*- coding: utf-8 -*- # # EbAudit documentation build configuration file, created by # sphinx-quickstart on Thu Aug 7 13:00:34 2014. # # 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 file. # # A...
gpl-2.0
8,124,644,584,662,456,000
30.105085
101
0.700087
false
eBay/restcommander
play-1.2.4/python/Lib/socket.py
9
17974
# Wrapper module for _socket, providing some additional facilities # implemented in Python. """\ This module provides socket operations and some related functions. On Unix, it supports IP (Internet Protocol) and Unix domain sockets. On other systems, it only supports IP. Functions specific for a socket are available a...
apache-2.0
-6,402,117,595,829,539,000
34.105469
84
0.558974
false
sparkslabs/kamaelia_
Code/Python/Kamaelia/Kamaelia/Device/DVB/EIT.py
3
14456
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License,...
apache-2.0
-5,516,413,646,625,491,000
35.413098
133
0.468871
false
cysuncn/python
spark/crm/PROC_F_CI_CUST_SIGN.py
1
49022
#coding=UTF-8 from pyspark import SparkContext, SparkConf, SQLContext, Row, HiveContext from pyspark.sql.types import * from datetime import date, datetime, timedelta import sys, re, os st = datetime.now() conf = SparkConf().setAppName('PROC_F_CI_CUST_SIGN').setMaster(sys.argv[2]) sc = SparkContext(conf = conf) sc.set...
gpl-3.0
187,465,380,646,549,020
49.169014
194
0.488662
false
GeoscienceAustralia/geodesy-domain-model
aws/amazonia/test/sys_tests/test_sys_elb.py
2
2306
#!/usr/bin/python3 from amazonia.classes.elb import Elb from amazonia.classes.elb_config import ElbConfig, ElbListenersConfig from network_setup import get_network_config def main(): network_config, template = get_network_config() elb_listeners_config = [ ElbListenersConfig( instance_por...
bsd-3-clause
-6,622,220,818,149,949,000
26.452381
69
0.591934
false
mushtaqak/edx-platform
openedx/core/djangoapps/profile_images/tests/test_images.py
111
7026
""" Test cases for image processing functions in the profile image package. """ from contextlib import closing from itertools import product import os from tempfile import NamedTemporaryFile import unittest from django.conf import settings from django.core.files.uploadedfile import UploadedFile from django.test import...
agpl-3.0
-6,021,870,053,938,461,000
37.604396
120
0.611586
false
evilpie/servo
python/mach/mach/test/test_entry_point.py
121
1886
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import unicode_literals import imp import os import sys from mach.base import MachError from mach.test....
mpl-2.0
-2,124,032,798,245,543,400
30.433333
79
0.657476
false
alphapapa/youtube-dl
youtube_dl/extractor/yourupload.py
142
1537
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class YourUploadIE(InfoExtractor): _VALID_URL = r'''(?x)https?://(?:www\.)? (?:yourupload\.com/watch| embed\.yourupload\.com| embed\.yucache\.net )/(?P<id>[A-Za-z0-9]+) ''' ...
unlicense
3,893,155,748,154,930,000
28
75
0.483409
false
andreadelprete/pinocchio_inv_dyn
python/pinocchio_inv_dyn/multi_contact/bezier/bezier_0_step_capturability.py
1
21165
# -*- coding: utf-8 -*- """ Created on Thu Sep 1 16:54:39 2016 @author: stonneau """ from pinocchio_inv_dyn.optimization.solver_LP_abstract import LP_status, LP_status_string from pinocchio_inv_dyn.multi_contact.stability_criterion import Bunch from pinocchio_inv_dyn.optimization.solver_LP_abstract import ...
gpl-2.0
-3,210,672,148,974,752,000
43.614224
178
0.527427
false
Diti24/python-ivi
ivi/chroma/chroma62012p8060.py
1
1825
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2013-2016 Alex Forencich 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...
mit
2,275,328,028,092,094,200
36.244898
77
0.668493
false
iamthebest77/openx
enabler_connection.py
4
2500
import socket import threading import json class EnablerConnection(): def __init__(self): self.connections = [] self.stopped = False self.enabler_listening_port = 50001 self.local_ip = socket.gethostbyname(socket.gethostname()) t = threading.Thread(target=self.listen_loop,...
bsd-3-clause
1,879,796,643,170,002,200
33.722222
80
0.5704
false
dimagi/rapidsms-core
lib/rapidsms/parsers/keyworder.py
2
3099
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import re class Keyworder(object): TOKEN_MAP = [ ("slug", "([a-z0-9\-]+)"), ("letters", "([a-z]+)"), ("numbers", "(\d+)"), ("whatever", "(.+)")] def __init__(self): self.regexen = [] self.prefix = "" ...
lgpl-3.0
-682,850,301,165,361,700
31.28125
76
0.528558
false
OaklandPeters/recursor
recursor/devspace/predicate_idea.py
1
2552
""" Desired syntax: gaurdian = MaxDepth(10) & HasAttr('__dict__') if gaurdian(current, path): # .... walker(obj, gaurd=MaxDepth(10) & HasAttr('__dict__')) @note: I put example wrapper decorators at the bottom. @todo: Come up with simple-ish logical structure alternative to the wrapper decora...
mit
9,064,783,246,392,564,000
28
97
0.622257
false
kcompher/topik
topik/models.py
1
2641
from __future__ import absolute_import import logging import gensim import pandas as pd # imports used only for doctests from topik.readers import read_input from topik.tests import test_data_path from topik.preprocessing import preprocess class LDA(object): """A high interface for an LDA (Latent Dirichlet All...
bsd-3-clause
-4,206,023,496,211,516,000
35.178082
111
0.598637
false
B-MOOC/edx-platform
lms/djangoapps/bulk_email/migrations/0001_initial.py
182
6854
# -*- coding: utf-8 -*- from south.db import db from south.v2 import SchemaMigration class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'CourseEmail' db.create_table('bulk_email_courseemail', ( ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True...
agpl-3.0
4,411,555,980,366,142,500
66.861386
182
0.564926
false
eepalms/gem5-newcache
tests/configs/tgen-simple-mem.py
4
3305
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
bsd-3-clause
3,372,798,999,210,226,700
44.273973
76
0.765809
false
yqm/sl4a
python/src/Lib/idlelib/StackViewer.py
69
3841
import os import sys import linecache from TreeWidget import TreeNode, TreeItem, ScrolledCanvas from ObjectBrowser import ObjectTreeItem, make_objecttreeitem def StackBrowser(root, flist=None, tb=None, top=None): if top is None: from Tkinter import Toplevel top = Toplevel(root) sc = ScrolledCa...
apache-2.0
-3,208,466,856,942,764,500
27.036496
76
0.558448
false
candrews/portage
pym/portage/sync/old_tree_timestamp.py
9
2161
# Copyright 2010-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import division import locale import logging import time from portage import os, _unicode_decode from portage.exception import PortageException from portage.localization import _ from portage.ou...
gpl-2.0
-6,157,534,480,652,774,000
20.39604
66
0.668672
false
HLFH/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/canal13cl.py
154
1912
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class Canal13clIE(InfoExtractor): _VALID_URL = r'^http://(?:www\.)?13\.cl/(?:[^/?#]+/)*(?P<id>[^/?#]+)' _TEST = { 'url': 'http://www.13.cl/t13/nacional/el-circulo-de-hierro-de-michelle-bachelet-en-su-...
gpl-3.0
-7,647,724,320,036,746,000
38.6875
277
0.569554
false
Jeff-Tian/mybnb
Python27/Lib/ctypes/test/test_structures.py
1
16610
import unittest from ctypes import * from ctypes.test import need_symbol from struct import calcsize import _testcapi class SubclassesTest(unittest.TestCase): def test_subclass(self): class X(Structure): _fields_ = [("a", c_int)] class Y(X): _fields_ = [("b", c_...
apache-2.0
5,974,024,468,448,407,000
33.042194
96
0.496087
false
saurabh6790/OFF-RISAPP
stock/doctype/stock_reconciliation/test_stock_reconciliation.py
30
9757
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt # ERPNext - web based ERP (http://erpnext.com) # For license information, please see license.txt from __future__ import unicode_literals import webnotes, unittest from webnotes.utils impor...
agpl-3.0
-7,445,568,766,691,808,000
34.74359
92
0.613816
false
huashiyiqike/NETLAB
layernet/io/iamdb/convert_iamdb.py
2
2361
import os from sets import Set from get_lineStroke import getLineStroke from get_targetStrings import getTargetString from get_xmlFileName import getXmlNames import netcdf_helpers import numpy as np targetStrings = [] wordTargetStrings = [] charSet = Set() inputs = [] labels = [] seqDims = [] seqLengths = [] seqTag...
apache-2.0
4,163,323,441,205,518,000
30.065789
163
0.656501
false
neilLasrado/erpnext
erpnext/patches/v5_4/notify_system_managers_regarding_wrong_tax_calculation.py
29
1452
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import print_function, unicode_literals import frappe from frappe.email import sendmail_to_system_managers from frappe.utils import get_link_to_form def execute(): wrong_r...
gpl-3.0
-6,740,725,595,756,683,000
34.439024
280
0.703857
false
sangwook236/general-development-and-testing
sw_dev/python/rnd/test/image_processing/skimage/skimage_transform.py
2
1365
#!/usr/bin/env python # -*- coding: UTF-8 -*- import numpy as np import matplotlib.pyplot as plt from skimage.transform import PiecewiseAffineTransform, warp from skimage import data #--------------------------------------------------------------------- # REF [site] >> http://scikit-image.org/docs/stable/auto_exampl...
gpl-2.0
2,407,241,329,542,946,300
28.042553
102
0.6
false
fritsvanveen/QGIS
python/pyplugin_installer/qgsplugininstallerinstallingdialog.py
5
6317
# -*- coding:utf-8 -*- """ /*************************************************************************** qgsplugininstallerinstallingdialog.py Plugin Installer module ------------------- Date : June 2013 Copyright ...
gpl-2.0
-1,004,796,581,841,768,600
42.868056
258
0.547887
false
carvalhodj/qunews
raspberry/slideshow.py
1
1193
from itertools import cycle from PIL import Image from PIL import ImageTk try: # Python2 import Tkinter as tk except ImportError: # Python3 import tkinter as tk class App(tk.Tk): def __init__(self, image_files, x, y, delay): tk.Tk.__init__(self) self.geometry('+{}+{}'.format(x, y))...
apache-2.0
6,785,774,974,968,957,000
20.690909
69
0.600168
false
garhivelg/execom
migrations/versions/9474324542c6_cases.py
2
1689
"""cases Revision ID: 9474324542c6 Revises: Create Date: 2017-06-08 09:02:37.384472 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '9474324542c6' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by...
gpl-3.0
8,322,656,177,752,311,000
30.867925
65
0.658378
false
brunogamacatao/portalsaladeaula
simplejson/ordered_dict.py
1039
3370
"""Drop-in replacement for collections.OrderedDict by Raymond Hettinger http://code.activestate.com/recipes/576693/ """ from UserDict import DictMixin # Modified from original to support Python 2.4, see # http://code.google.com/p/simplejson/issues/detail?id=53 try: all except NameError: def all(seq): ...
bsd-3-clause
-9,153,658,631,026,533,000
27.319328
79
0.528783
false
asimshankar/tensorflow
tensorflow/python/eager/execution_callbacks.py
3
12617
# 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
-3,490,643,128,565,068,300
32.466844
80
0.645795
false
BeenzSyed/tempest
tempest/services/compute/v3/xml/tenant_usages_client.py
1
1926
# Copyright 2013 NEC Corporation # 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 ...
apache-2.0
5,925,409,048,147,993,000
36.038462
79
0.641745
false
TheTimmy/spack
var/spack/repos/builtin/packages/font-bitstream-type1/package.py
3
2117
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
-943,443,877,667,385,200
39.711538
92
0.663675
false
mcgachey/edx-platform
lms/djangoapps/course_blocks/transformers/tests/test_split_test.py
8
8262
""" Tests for SplitTestTransformer. """ import ddt import openedx.core.djangoapps.user_api.course_tag.api as course_tag_api from openedx.core.djangoapps.user_api.partition_schemes import RandomUserPartitionScheme from student.tests.factories import CourseEnrollmentFactory from xmodule.partitions.partitions import Grou...
agpl-3.0
8,022,893,795,544,357,000
35.557522
105
0.456064
false
ardi69/pyload-0.4.10
lib/Python/Lib/PIL/ImageQt.py
20
2888
# # The Python Imaging Library. # $Id$ # # a simple Qt image interface. # # history: # 2006-06-03 fl: created # 2006-06-04 fl: inherit from QImage instead of wrapping it # 2006-06-05 fl: removed toimage helper; move string support to ImageQt # 2013-11-13 fl: add support for Qt5 (aurelien.ballier@cyclonit.com) # # Copyr...
gpl-3.0
4,195,296,320,496,039,400
28.469388
74
0.581025
false
ImaginaryLandscape/django-filer
filer/admin/clipboardadmin.py
8
4529
#-*- coding: utf-8 -*- from django.forms.models import modelform_factory from django.contrib import admin from django.http import HttpResponse from django.utils import simplejson from django.views.decorators.csrf import csrf_exempt from filer import settings as filer_settings from filer.models import Clipboard, Clipboa...
bsd-3-clause
3,123,569,944,104,084,500
39.4375
99
0.553765
false
Mj258/weiboapi
srapyDemo/envs/Lib/site-packages/win32/Demos/RegRestoreKey.py
34
1832
import win32api, win32security import win32con, ntsecuritycon, winnt import os temp_dir=win32api.GetTempPath() fname=win32api.GetTempFileName(temp_dir,'rsk')[0] print fname ## file can't exist os.remove(fname) ## enable backup and restore privs required_privs = ((win32security.LookupPrivilegeValue('',ntsecuritycon.SE...
mit
-647,703,834,694,168,000
47.236842
126
0.766921
false
gx1997/chrome-loongson
tools/json_schema_compiler/h_generator.py
5
10705
# 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. from code import Code from model import PropertyType import cpp_util import model import os class HGenerator(object): """A .h generator for a namespac...
bsd-3-clause
2,723,244,127,943,579,000
33.532258
80
0.604671
false
ohsu-computational-biology/server
tests/unit/test_imports.py
1
21810
""" Tests that the project's module import graph conforms to certain policies """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals import copy import fnmatch import itertools import logging import operator import os import pprint import unittest import sys ...
apache-2.0
-2,366,123,485,454,993,400
35.532663
78
0.57547
false
binhqnguyen/ln
nsc/scons-local-1.2.0.d20090223/SCons/Tool/RCS.py
19
2190
"""SCons.Tool.RCS.py Tool-specific initialization for RCS. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Perm...
gpl-2.0
1,132,873,667,954,345,000
33.21875
89
0.717352
false
fast01/zerorpc-python
tests/test_client_async.py
73
2652
# -*- coding: utf-8 -*- # Open Source Initiative OSI - The MIT License (MIT):Licensing # # The MIT License (MIT) # Copyright (c) 2013 DotCloud Inc (opensource@dotcloud.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Softwa...
mit
-5,944,195,124,215,903,000
28.797753
81
0.689291
false
amenonsen/ansible
test/units/modules/network/fortios/test_fortios_system_auto_install.py
21
6598
# 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 License, or # (at your option) any later version. # # This program is distributed in the...
gpl-3.0
3,376,521,081,450,108,000
36.702857
133
0.661109
false
avedaee/DIRAC
Core/scripts/dirac-fix-ld-library-path.py
10
4148
#!/usr/bin/env python ######################################################################## # $HeadURL$ # File : dirac-fix-ld-lib # Author : Joel Closier ######################################################################## __RCSID__ = "$Id$" """ This is a script to fix oversized LD_LIBRARY_PATH variables. """...
gpl-3.0
-4,506,693,890,435,950,000
30.18797
84
0.45974
false
achang97/YouTunes
lib/python2.7/site-packages/youtube_dl/extractor/canalc2.py
25
2143
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import parse_duration class Canalc2IE(InfoExtractor): IE_NAME = 'canalc2.tv' _VALID_URL = r'https?://(?:(?:www\.)?canalc2\.tv/video/|archives-canalc2\.u-strasbg\.fr/video\.asp\?.*\bidVideo=)(?P<i...
mit
1,951,224,056,224,528,600
31.953846
129
0.462185
false
phil-lopreiato/the-blue-alliance-android
scripts/do_release.py
1
9702
#! /usr/bin/env python import argparse import time import subprocess import sys import re from subprocess import CalledProcessError """ A script to push releases to Google Play See samples: https://github.com/googlesamples/android-play-publisher-api Requires Google API python client Insall with: pip install google-...
mit
2,961,471,868,308,095,500
35.889734
159
0.631725
false
G1DR4/buendia
tools/generate_site_sql.py
13
10584
#!/usr/bin/python # Copyright 2015 The Project Buendia 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 l...
apache-2.0
-1,556,683,442,062,052,000
45.421053
152
0.655423
false
firebitsbr/raspberry_pwn
src/pentest/metagoofil/hachoir_parser/network/tcpdump.py
9
14972
""" Tcpdump parser Source: * libpcap source code (file savefile.c) * RFC 791 (IPv4) * RFC 792 (ICMP) * RFC 793 (TCP) * RFC 1122 (Requirements for Internet Hosts) Author: Victor Stinner Creation: 23 march 2006 """ from hachoir_parser import Parser from hachoir_core.field import (FieldSet, ParserError, Enum, ...
gpl-3.0
386,411,508,745,919,900
31.059957
95
0.558042
false
rogerhu/django
django/db/models/options.py
2
25038
from __future__ import unicode_literals from collections import OrderedDict import re from bisect import bisect import warnings from django.conf import settings from django.db.models.fields.related import ManyToManyRel from django.db.models.fields import AutoField, FieldDoesNotExist from django.db.models.fields.proxy...
bsd-3-clause
9,077,453,871,775,576,000
40.180921
122
0.581955
false
kstaniek/csm
csmserver/server_helper.py
1
15049
# ============================================================================= # Copyright (c) 2016, Cisco Systems, 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 ...
apache-2.0
4,666,856,909,224,170,000
37.292428
138
0.543425
false