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
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/django/conf/locale/hr/formats.py
504
2106
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. E Y.' TIME_FORMAT = 'H:i' DATE...
gpl-3.0
-2,354,136,665,415,488,000
41.12
77
0.467236
false
rwhitt2049/tiko
setup.py
1
1753
from codecs import open from os import path from setuptools import find_packages, setup from tiko import __version__ base = path.abspath(path.dirname(__file__)) def install_requires(): with open(path.join(base, 'requirements.txt'), encoding='utf-8') as file: return file.read().splitlines() def dev_re...
mit
2,237,388,475,478,136,600
29.224138
81
0.640046
false
pcreech/pulp_ostree
plugins/test/unit/plugins/distributors/test_configuration.py
2
2325
import os import shutil import tempfile import unittest import mock from pulp.plugins.config import PluginCallConfiguration from pulp_ostree.common import constants from pulp_ostree.plugins.distributors import configuration class TestConfigurationGetters(unittest.TestCase): def setUp(self): self.workin...
gpl-2.0
6,864,056,951,934,625,000
37.75
98
0.688172
false
MihaiMoldovanu/ansible
test/units/modules/network/nxos/test_nxos_vrf_af.py
25
2615
# (c) 2016 Red Hat Inc. # # 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. # # Ansible is dis...
gpl-3.0
-2,459,470,214,099,865,000
40.507937
102
0.653537
false
Zulan/PBStats
PBs/Python/v7/PbWizard.py
2
85196
# Sid Meier's Civilization 4 # Copyright Firaxis Games 2005 # # Sample PitBoss window/app framework # Mustafa Thamer 2-15-05 # from CvPythonExtensions import * import sys import wx import wx.wizard import wx.lib.scrolledpanel import time import string import os.path import Webserver bPublic = True bSaved = False bSce...
gpl-2.0
2,025,102,500,742,595,800
40.803729
195
0.553676
false
saideepchandg/oracle-r12-accounting
lib/django/db/models/fields/subclassing.py
265
2017
""" Convenience routines for creating non-trivial Field subclasses, as well as backwards compatibility utilities. Add SubfieldBase as the metaclass for your Field subclass, implement to_python() and the other necessary methods and everything will work seamlessly. """ import warnings from django.utils.deprecation imp...
bsd-3-clause
6,627,733,051,647,147,000
31.015873
91
0.663361
false
abircse06/youtube-dl
youtube_dl/extractor/mofosex.py
41
1678
from __future__ import unicode_literals import os import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse_urlparse, compat_urllib_request, compat_urllib_parse, ) class MofosexIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?(?P<url>mofosex\.com/videos/(?P<id>[0-9]+...
unlicense
6,471,348,728,553,080,000
30.660377
131
0.549464
false
eckucukoglu/arm-linux-gnueabihf
lib/python2.7/test/test_file_eintr.py
95
10480
# Written to test interrupted system calls interfering with our many buffered # IO implementations. http://bugs.python.org/issue12268 # # This tests the '_io' module. Similar tests for Python 2.x's older # default file I/O implementation exist within test_file2k.py. # # It was suggested that this code could be merged...
gpl-2.0
-3,486,978,486,357,023,000
42.849372
80
0.582538
false
mathpresso/adminpp
adminpp/builder.py
2
2877
from django.contrib import admin class AdminBuilder: def __init__(self, admin_model_class): self.admin_model = admin_model_class() self.model = admin_model_class.Meta.model def construct_list_display(self, admin_class): admin_class.list_display = [] for field in self...
mit
-7,177,366,496,219,983,000
40.308824
112
0.571429
false
aronparsons/spacewalk
backend/server/test/TestRhnpush.py
4
1463
# # Copyright (c) 2008--2015 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
gpl-2.0
-5,823,058,292,662,743,000
33.833333
76
0.703349
false
jcpowermac/ansible
test/runner/lib/changes.py
66
5904
"""Detect changes in Ansible code.""" from __future__ import absolute_import, print_function import re import os from lib.util import ( ApplicationError, SubprocessError, MissingEnvironmentVariable, CommonConfig, display, ) from lib.http import ( HttpClient, urlencode, ) from lib.git im...
gpl-3.0
-31,087,100,305,630,536
31.618785
108
0.582825
false
hakonsbm/nest-simulator
doc/topology/examples/connex_ew.py
17
2229
# -*- coding: utf-8 -*- # # connex_ew.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 #...
gpl-2.0
8,624,559,010,693,963,000
28.328947
70
0.667115
false
Amitgb14/sos
sos/plugins/snmp.py
12
1351
# Copyright (C) 2007 Sadique Puthen <sputhenp@redhat.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This progr...
gpl-2.0
5,318,165,945,181,780,000
27.744681
72
0.706884
false
catapult-project/catapult
third_party/pyasn1/pyasn1/type/char.py
11
10771
# # This file is part of pyasn1 software. # # Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com> # License: http://snmplabs.com/pyasn1/license.html # import sys from pyasn1 import error from pyasn1.type import tag from pyasn1.type import univ __all__ = ['NumericString', 'PrintableString', 'TeletexString', 'T61...
bsd-3-clause
-5,092,105,133,692,504,000
32.554517
99
0.64228
false
anshumanchatterji/selenium
py/selenium/webdriver/firefox/remote_connection.py
10
1145
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
1,425,098,308,805,233,000
44.8
72
0.750218
false
matmutant/sl4a
python-build/python-libs/gdata/tests/atom_tests/http_interface_test.py
87
1493
#!/usr/bin/python # # Copyright (C) 2008 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 ...
apache-2.0
5,987,744,923,002,356,000
30.765957
75
0.712659
false
sagiss/sardana
src/sardana/taurus/qt/qtcore/tango/sardana/__init__.py
1
1204
#!/usr/bin/env python ############################################################################## ## ## This file is part of Sardana ## ## http://www.sardana-controls.org/ ## ## Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## ## Sardana is free software: you can redistribute it and/or modify ## it und...
lgpl-3.0
-645,296,007,892,302,000
30.684211
78
0.63289
false
gcode-mirror/git-core
contrib/svn-fe/svnrdump_sim.py
328
2044
#!/usr/bin/python """ Simulates svnrdump by replaying an existing dump from a file, taking care of the specified revision range. To simulate incremental imports the environment variable SVNRMAX can be set to the highest revision that should be available. """ import sys import os if sys.hexversion < 0x02040000: # T...
gpl-2.0
-7,200,459,151,047,079,000
29.058824
75
0.563112
false
suchow/psiTurk
psiturk/psiturk_org_services.py
1
12450
# -*- coding: utf-8 -*- """ This module """ import os import urllib2 import json import requests from psiturk.version import version_number import git import subprocess import signal import struct from sys import platform as _platform from psiturk.psiturk_config import PsiturkConfig import psutil class PsiturkOrgSer...
mit
-2,577,510,878,418,719,000
38.398734
121
0.533976
false
CasataliaLabs/biscuit_drishtiman
Pmw-2.0.0/build/lib.linux-x86_64-2.7/Pmw/Pmw_1_3_3/tests/ScrolledCanvas_test.py
2
3011
import Test import Pmw Test.initialise() c = Pmw.ScrolledCanvas def _createOvals(): w = Test.currentWidget() w.create_oval(50, 50, 150, 100, fill = 'red') w.create_oval(100, 50, 150, 150, fill = 'blue') w.create_oval(50, 100, 200, 350, fill = 'yellow') def _createWindow(): w = Test...
gpl-3.0
7,568,591,664,570,442,000
26.67619
75
0.535038
false
edx/edx-platform
lms/djangoapps/course_home_api/outline/v1/serializers.py
2
4584
""" Outline Tab Serializers. """ from django.utils.translation import ngettext from rest_framework import serializers from lms.djangoapps.course_home_api.dates.v1.serializers import DateSummarySerializer from lms.djangoapps.course_home_api.progress.v1.serializers import CertificateDataSerializer from lms.djangoapps.c...
agpl-3.0
-8,922,359,775,734,593,000
34.8125
115
0.655323
false
arannasousa/pagseguro_xml
build/lib/pagseguro_xml/tests/test_classes_notificacao/test_transacao_v3.py
2
6493
# coding=utf-8 # --------------------------------------------------------------- # Desenvolvedor: Arannã Sousa Santos # Mês: 12 # Ano: 2015 # Projeto: pagseguro_xml # e-mail: asousas@live.com # --------------------------------------------------------------- import unitte...
gpl-2.0
-4,139,184,684,917,223,000
37.862275
100
0.587456
false
sh4t/Sick-Beard
cherrypy/lib/profiler.py
45
6449
"""Profiler tools for CherryPy. CherryPy users ============== You can profile any of your pages as follows: from cherrypy.lib import profiler class Root: p = profile.Profiler("/path/to/profile/dir") def index(self): self.p.run(self._index) index.exposed = Tru...
gpl-3.0
417,867,502,900,507,140
30.458537
86
0.577609
false
pnavarro/neutron
neutron/extensions/extra_dhcp_opt.py
13
3168
# 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
-5,007,877,037,607,727,000
31.659794
78
0.612689
false
pombreda/iris-panel
iris/core/migrations/0004_remove_redundant_packs.py
7
15985
# -*- coding: utf-8 -*- # This file is part of IRIS: Infrastructure and Release Information System # # Copyright (C) 2013-2015 Intel Corporation # # IRIS is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2.0 as published by the Free Software Foundat...
gpl-2.0
-8,878,759,284,707,510,000
67.900862
195
0.542821
false
adriansuhov/lis-test
WS2012R2/lisa/Infrastructure/lisa-parser/tests/test_test_run.py
10
2745
from unittest import TestCase from os import remove, path import create_files from nose.tools import assert_equal from lisa_parser.test_run import TestRun class TestTestRun(TestCase): def setUp(self): self.test_run = TestRun(skip_vm_check=True, checkpoint_name=False) self.xml_file = path.join(path...
apache-2.0
-4,229,118,621,233,533,400
48.909091
90
0.660838
false
yiqingj/work
scons/scons-local-2.3.0/SCons/Tool/packaging/__init__.py
11
10772
"""SCons.Tool.Packaging SCons Packaging Tool. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"...
lgpl-2.1
8,170,271,097,545,782,000
33.525641
113
0.619941
false
yfried/ansible
lib/ansible/modules/network/nxos/nxos_igmp_snooping.py
41
8914
#!/usr/bin/python # # 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. # # Ansible is distribut...
gpl-3.0
-3,771,997,560,213,431,300
30.059233
88
0.615212
false
labsquare/CuteVariant
cutevariant/gui/formatters/cutestyle.py
1
5115
# Standard imports import re # Qt imports from PySide2.QtGui import QColor, QFont, QBrush, QPainter, QPen, QFontMetrics, QPalette from PySide2.QtCore import Qt, QModelIndex, QRect, QUrl from PySide2.QtWidgets import QStyleOptionViewItem, QStyle # Custom imports from cutevariant.gui.formatter import Formatter from cut...
gpl-3.0
-4,878,900,389,913,633,000
32.214286
90
0.551711
false
dimid/ansible-modules-extras
cloud/vmware/vmware_dvs_portgroup.py
31
6867
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Joseph Callen <jcallen () csc.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 Li...
gpl-3.0
8,205,681,518,311,952,000
33.681818
126
0.633173
false
hydraplatform/hydra-base
hydra_base/db/alembic/versions/08f0ebe40290_resource_attr_id.py
1
5617
"""resource_attr_id Revision ID: 08f0ebe40290 Revises: a7896842f484 Create Date: 2018-04-16 14:49:24.202974 """ from alembic import op import sqlalchemy as sa import logging log = logging.getLogger(__name__) # revision identifiers, used by Alembic. revision = '08f0ebe40290' down_revision = 'a7896842f484' branch_lab...
lgpl-3.0
-5,678,352,948,600,560,000
47.422414
287
0.591597
false
Tong-Chen/scikit-learn
examples/svm/plot_separating_hyperplane.py
12
1252
""" ========================================= SVM: Maximum margin separating hyperplane ========================================= Plot the maximum margin separating hyperplane within a two-class separable dataset using a Support Vector Machines classifier with linear kernel. """ print(__doc__) import numpy as np impo...
bsd-3-clause
6,164,432,826,868,986,000
25.083333
75
0.59984
false
gangadharkadam/tailorerp
erpnext/setup/page/setup_wizard/install_fixtures.py
35
11749
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ def install(country=None): records = [ # address template {'doctype':"Address Template", "country": count...
agpl-3.0
-1,273,930,678,490,625,000
56.876847
164
0.613925
false
benrudolph/commcare-hq
custom/ilsgateway/tanzania/handlers/delivered.py
1
2453
from datetime import datetime from corehq.apps.sms.api import send_sms_to_verified_number from custom.ilsgateway.tanzania.handlers import get_location from custom.ilsgateway.tanzania.handlers.keyword import KeywordHandler from custom.ilsgateway.models import SupplyPointStatus, SupplyPointStatusTypes, SupplyPointStatusV...
bsd-3-clause
6,516,857,409,058,619,000
56.046512
127
0.639625
false
abhilashnta/edx-platform
lms/djangoapps/shoppingcart/processors/tests/test_CyberSource.py
159
13163
""" Tests for the CyberSource processor handler """ from collections import OrderedDict from django.test import TestCase from django.test.utils import override_settings from django.conf import settings from student.tests.factories import UserFactory from shoppingcart.models import Order, OrderItem from shoppingcart.pro...
agpl-3.0
4,341,051,156,502,786,000
36.288952
117
0.604953
false
anilanar/Debuggr
debuggr/helper/helper_27.py
5
1222
""" Helper module for Python version 2.7 - Ordered dictionaries - Encoding/decoding urls - Unicode - Exception handling (except Exception as e) """ import base64 from urllib import unquote, quote from collections import OrderedDict def modulename(): return "Helper module for Python version 2.7" def url_decode(uri):...
mit
-8,284,967,227,310,578,000
20.086207
61
0.754501
false
wwitzel3/awx
awx/settings/production.py
1
4010
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. # Production settings for AWX project. # Python import os import copy import errno import sys import traceback # Django Split Settings from split_settings.tools import optional, include # Load default settings. from defaults import * # NOQA DEBUG = False T...
apache-2.0
2,557,599,202,862,141,000
35.788991
117
0.703741
false
ForToffee/DinoTweet
tweet.py
1
1646
import tweepy import time import picamera from datetime import datetime # Consumer keys and access tokens, used for OAuth consumer_key = '<your value>' consumer_secret = '<your value>' access_token = '<your value>' access_token_secret = '<your value>' # OAuth process, using the keys and tokens auth = tweepy.OAuthHand...
gpl-2.0
-1,293,237,453,172,143,900
25.983607
157
0.674362
false
xinjiguaike/edx-platform
common/lib/xmodule/xmodule/tests/test_validation.py
110
8467
""" Test xblock/validation.py """ import unittest from xblock.test.tools import assert_raises from xmodule.validation import StudioValidationMessage, StudioValidation from xblock.validation import Validation, ValidationMessage class StudioValidationMessageTest(unittest.TestCase): """ Tests for `ValidationMe...
agpl-3.0
-3,611,679,010,177,727,500
37.83945
149
0.625842
false
commtrack/temp-aquatest
apps/receiver/uploadhandler.py
1
7217
try: from cStringIO import StringIO except ImportError: from StringIO import StringIO import os import sys import email import logging from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.files.uploadedfile import TemporaryUploadedFile, InMemoryUp...
bsd-3-clause
8,358,857,681,971,550,000
45.807947
128
0.513925
false
drawks/ansible
lib/ansible/modules/network/ironware/ironware_facts.py
38
19930
#!/usr/bin/python # # Copyright: 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'],...
gpl-3.0
8,291,324,986,601,113,000
29.614439
155
0.573608
false
HeatherHillers/RoamMac
src/roam/roam_style.py
1
3020
appstyle = """ * { font: 16px "Segoe UI" ; } QToolButton { padding: 4px; color: #4f4f4f; } QToolButton:hover { padding: 4px; background-color: rgb(211, 228, 255); } QStatusBar { background: white; border: none; } QStatusBar::item { border: none; } QCheckBox { color: #4...
gpl-2.0
3,049,586,074,501,220,000
14.024876
45
0.636424
false
gtaylor/ansible
lib/ansible/runner/lookup_plugins/dig.py
113
8205
# (c) 2015, Jan-Piet Mens <jpmens(at)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) any later ver...
gpl-3.0
1,318,975,627,697,863,200
37.70283
118
0.475076
false
zlebnik/pyexpertsender
pyexpertsender/utils.py
1
1213
import xml.etree.ElementTree as ET import six xsi = 'http://www.w3.org/2001/XMLSchema-instance' xs = 'http://www.w3.org/2001/XMLSchema' def camel_case(word): return ''.join(x.capitalize() or '_' for x in word.split('_')) def generate_entity(data, parent): if isinstance(data, dict): for key, data in...
mit
6,280,914,500,982,211,000
29.325
66
0.580379
false
sumedh123/debatify
venv/lib/python2.7/site-packages/sqlalchemy/testing/pickleable.py
55
2641
# testing/pickleable.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 """Classes used in pickling tests, need to be at the module level for unpickli...
mit
-2,068,308,483,514,183,400
17.468531
69
0.580841
false
leiferikb/bitpop
depot_tools/tests/trychange_unittest.py
43
6250
#!/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. """Unit tests for trychange.py.""" import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.pat...
gpl-3.0
-17,750,094,494,581,368
37.580247
79
0.66
false
pschmied/lilypond
scripts/auxiliar/musicxml_generate_intervals.py
10
1859
#!/usr/bin/env python notes = "CDEFGAB" alterations = [-1, 0, 1] def print_note (octave, note, alteration): print " <note>\n <pitch>\n <step>%s</step>" % notes[note] if alteration <> 0: print " <alter>%s</alter>" % alteration print " <octave>%s</octave>\n ...
gpl-3.0
-2,559,516,878,419,751,000
31.051724
171
0.512103
false
ajaali/django
django/utils/dateformat.py
365
10712
""" PHP date() style date formatting See http://www.php.net/date for format strings Usage: >>> import datetime >>> d = datetime.datetime.now() >>> df = DateFormat(d) >>> print(df.format('jS F Y H:i')) 7th October 2003 11:39 >>> """ from __future__ import unicode_literals import calendar import datetime import re impo...
bsd-3-clause
-5,047,524,524,714,879,000
29.518519
102
0.555172
false
rest-of/the-deck
lambda/lib/python2.7/site-packages/pip/commands/wheel.py
170
7528
# -*- coding: utf-8 -*- from __future__ import absolute_import import logging import os import warnings from pip.basecommand import RequirementCommand from pip.exceptions import CommandError, PreviousBuildDirError from pip.req import RequirementSet from pip.utils import import_or_raise from pip.utils.build import Bui...
mit
-7,945,484,688,779,448,000
35.901961
79
0.559113
false
daineseh/kodi-plugin.video.ted-talks-chinese
youtube_dl/extractor/testurl.py
76
2163
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ExtractorError class TestURLIE(InfoExtractor): """ Allows addressing of the test cases as test:yout.*be_1 """ IE_DESC = False # Do not list _VALID_URL = r'test(?:url)?:(?P<id>(?P<extractor>.+?)(?:_(...
gpl-2.0
-3,576,925,644,080,990,700
30.808824
81
0.524272
false
hubertta/Wget
testenv/Test-Head.py
23
1069
#!/usr/bin/env python3 from sys import exit from test.http_test import HTTPTest from misc.wget_file import WgetFile """ This test ensures that Wget correctly handles responses to HEAD requests and does not actually download any data """ TEST_NAME = "HEAD Requests" ############# File Definitions ###############...
gpl-3.0
1,693,711,383,155,314,000
23.295455
78
0.564079
false
RomainBrault/scikit-learn
sklearn/grid_search.py
5
40816
""" The :mod:`sklearn.grid_search` includes utilities to fine-tune the parameters of an estimator. """ from __future__ import print_function # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>, # Gael Varoquaux <gael.varoquaux@normalesup.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # ...
bsd-3-clause
-1,962,573,067,596,568,000
37.761633
87
0.609589
false
ptrendx/mxnet
tools/coreml/test/test_mxnet_converter.py
1
32762
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
4,308,937,873,908,551,000
30.994141
98
0.529028
false
CiscoSystems/openstack-dashboard
django-openstack/django_openstack/dash/views/floating_ips.py
3
7320
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2011 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
apache-2.0
3,085,303,354,738,448,400
40.590909
79
0.624044
false
fkorotkov/pants
src/python/pants/core_tasks/deferred_sources_mapper.py
6
2910
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging impor...
apache-2.0
8,411,395,635,286,640,000
37.289474
99
0.730928
false
campbe13/openhatch
vendor/packages/gdata/tests/atom_tests/auth_test.py
128
1342
#!/usr/bin/env python # # Copyright (C) 2009 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...
agpl-3.0
328,402,165,554,265,540
28.822222
76
0.717586
false
leezu/mxnet
tools/bandwidth/measure.py
40
6103
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
7,888,133,293,210,899,000
40.517007
96
0.605276
false
stclair/wes-cms
djangoappengine/management/commands/runserver.py
14
3475
#!/usr/bin/python2.4 # # Copyright 2008 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 or...
bsd-3-clause
-6,236,563,624,397,140,000
36.365591
81
0.651511
false
alexschiller/osf.io
addons/dataverse/migrations/0001_initial.py
4
2816
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-10-31 20:25 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import osf.models.base import osf.utils.datetime_aware_jsonfield class Migration(migrations.Migratio...
apache-2.0
-6,277,343,849,271,776,000
47.551724
197
0.617898
false
HonzaKral/django
django/contrib/postgres/forms/array.py
258
6743
import copy from django import forms from django.contrib.postgres.validators import ( ArrayMaxLengthValidator, ArrayMinLengthValidator, ) from django.core.exceptions import ValidationError from django.utils import six from django.utils.safestring import mark_safe from django.utils.translation import string_concat,...
bsd-3-clause
-6,742,899,481,275,903,000
35.058824
102
0.561026
false
mikeireland/chronostar
chronostar/readparam.py
1
5116
""" This module defines the parameter reading function. Used to parse a text file into a dictionary to be passed to datatool.prepare_data() It also defines the default parameters for prepare_data() Credit: Mark Krumholz Notes ----- Probably should transition to YAML format, and utilise pre-existing libraries for par...
mit
-4,050,397,846,653,986,000
30.195122
88
0.560985
false
ikaee/bfr-attendant
facerecognitionlibrary/jni-build/jni/include/tensorflow/contrib/session_bundle/example/export_half_plus_two.py
44
6027
# 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...
apache-2.0
-8,341,555,606,444,938,000
36.203704
80
0.655218
false
cpyou/odoo
addons/decimal_precision/tests/test_qweb_float.py
335
1986
# -*- coding: utf-8 -*- from openerp.tests import common class TestFloatExport(common.TransactionCase): def setUp(self): super(TestFloatExport, self).setUp() self.Model = self.registry('decimal.precision.test') def get_converter(self, name): converter = self.registry('ir.qweb.field.flo...
agpl-3.0
-3,391,059,711,471,246,300
29.090909
75
0.528197
false
scipy/scipy
scipy/linalg/decomp_lu.py
18
6748
"""LU decomposition functions.""" from warnings import warn from numpy import asarray, asarray_chkfinite # Local imports from .misc import _datacopied, LinAlgWarning from .lapack import get_lapack_funcs from .flinalg import get_flinalg_funcs __all__ = ['lu', 'lu_solve', 'lu_factor'] def lu_factor(a, overwrite_a=F...
bsd-3-clause
-2,727,098,369,275,279,000
29.396396
79
0.57543
false
JJRcop/tgstation
tools/midi2piano/easygui/__init__.py
101
87642
""" @version: 0.96(2010-08-29) @note: ABOUT EASYGUI EasyGui provides an easy-to-use interface for simple GUI interaction with a user. It does not require the programmer to know anything about tkinter, frames, widgets, callbacks or lambda. All GUI interactions are invoked by simple function calls that return results...
agpl-3.0
-4,188,782,636,433,209,300
34.169342
209
0.57048
false
deeplook/bokeh
sphinx/source/docs/user_guide/source_examples/interaction_callbacks_for_selections.py
27
1057
from random import random from bokeh.models import CustomJS, ColumnDataSource from bokeh.plotting import hplot, figure, output_file, show output_file("callback.html") x = [random() for x in range(500)] y = [random() for y in range(500)] s1 = ColumnDataSource(data=dict(x=x, y=y)) p1 = figure(plot_width=400, plot_heig...
bsd-3-clause
-63,501,320,246,566,010
30.088235
87
0.576159
false
bdh1011/wau
venv/lib/python2.7/site-packages/twisted/internet/_threadedselect.py
9
12319
# -*- test-case-name: twisted.test.test_internet -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Threaded select reactor The threadedselectreactor is a specialized reactor for integrating with arbitrary foreign event loop, such as those you find in GUI toolkits. There are three things...
mit
-7,191,176,466,166,156,000
33.507003
87
0.604107
false
amiguez/youtube-dl
youtube_dl/extractor/srf.py
102
4254
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( determine_ext, parse_iso8601, xpath_text, ) class SrfIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.srf\.ch/play(?:er)?/tv/[^/]+/video/(?P<display_id>[^?]+)\?id=|tp\.srgssr\.c...
unlicense
4,215,072,835,706,742,000
39.903846
168
0.541373
false
abhitopia/tensorflow
tensorflow/contrib/learn/python/learn/estimators/__init__.py
17
12228
# 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...
apache-2.0
-1,543,966,594,945,329,000
36.054545
110
0.762022
false
hachreak/invenio-demosite
invenio_demosite/testsuite/regression/test_websearchadmin.py
7
3109
# -*- coding: utf-8 -*- # # This file is part of Invenio Demosite. # Copyright (C) 2006, 2007, 2008, 2010, 2011, 2013 CERN. # # Invenio Demosite 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...
gpl-2.0
-7,224,358,916,508,353,000
41.589041
85
0.604053
false
theanalyst/cinder
cinder/api/v1/snapshot_metadata.py
8
6230
# Copyright 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 requ...
apache-2.0
2,201,851,093,283,823,600
37.45679
78
0.581059
false
gunchleoc/django
django/db/backends/sqlite3/features.py
194
2656
from __future__ import unicode_literals from django.db import utils from django.db.backends.base.features import BaseDatabaseFeatures from django.utils import six from django.utils.functional import cached_property from .base import Database try: import pytz except ImportError: pytz = None class DatabaseFe...
bsd-3-clause
7,808,317,114,686,774,000
32.620253
79
0.677711
false
neopoly/rubyfox-server
lib/rubyfox/server/data/lib/Lib/weakref.py
8
7161
"""Weak reference support for Python. This module is an implementation of PEP 205: http://python.sourceforge.net/peps/pep-0205.html """ # Naming convention: Variables named "wr" are weak reference objects; # they are called this instead of "ref" to avoid name collisions with # the module-global ref() function import...
mit
3,702,681,008,881,089,500
24.575
70
0.548946
false
liuliu/fast-rcnn
lib/roi_data_layer/roidb.py
43
5176
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Transform a roidb into a trainable roidb by adding a bunch of metada...
mit
2,443,250,619,973,359,600
40.408
80
0.595827
false
zhimin711/nova
nova/api/openstack/compute/legacy_v2/consoles.py
79
3328
# Copyright 2010 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 requ...
apache-2.0
3,356,006,080,152,119,300
35.173913
78
0.579928
false
rpp0/peapwn
mods/hostap/tests/hwsim/test_ap_acs.py
2
2170
#!/usr/bin/python # # Test cases for automatic channel selection with hostapd # Copyright (c) 2013, Jouni Malinen <j@w1.fi> # # This software may be distributed under the terms of the BSD license. # See README for more details. import logging logger = logging.getLogger() import hostapd def wait_acs(hapd): ev = h...
gpl-2.0
3,215,766,172,007,726,000
30.911765
72
0.635945
false
waynesun09/tp-libvirt
libvirt/tests/src/libvirt_bench/libvirt_bench_vcpu_hotplug.py
4
6936
import logging import re from autotest.client.shared import error from virttest import libvirt_xml from virttest import libvirt_vm from virttest import utils_test from virttest.utils_test import libvirt def run(test, params, env): """ Test: vcpu hotplug. The command can change the number of virtual CPU...
gpl-2.0
-7,055,265,631,015,513,000
45.24
79
0.513985
false
podio/podio-py
pypodio2/encode.py
1
15016
"""multipart/form-data encoding module This module provides functions that faciliate encoding name/value pairs as multipart/form-data suitable for a HTTP POST or PUT request. multipart/form-data is the standard way to upload files over HTTP""" import mimetypes import os import re import urllib from email.header impo...
mit
1,170,108,284,432,593,700
33.678984
85
0.592368
false
yencarnacion/jaikuengine
.google_appengine/lib/django-1.3/django/core/files/uploadedfile.py
402
4225
""" Classes representing uploaded files. """ import os try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.conf import settings from django.core.files.base import File from django.core.files import temp as tempfile from django.utils.encoding import smart_str __al...
apache-2.0
-2,753,382,062,636,531,700
32.007813
92
0.605207
false
osrf/opensplice
src/api/dcps/python/test/test_listeners.py
2
22244
# # Vortex OpenSplice # # This software and documentation are Copyright 2006 to TO_YEAR ADLINK # Technology Limited, its affiliated companies and licensors. All rights # reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in ...
apache-2.0
-6,057,280,414,919,953,000
36.136895
115
0.576335
false
DarkmatterVale/HaikuPorts-Cleaner
Options.py
1
1124
# -*- coding: utf-8 -*- # # Copyright 2016 Vale Tolpegin # Distributed under the terms of the MIT License. # -- Modules ------------------------------------------------------------------ from optparse import OptionParser # -- global options ----------------------------------------------------------- global __Optio...
mit
3,035,735,534,331,568,600
23.977778
94
0.497331
false
jelugbo/hebs_master
pavelib/utils/envs.py
6
5485
""" Helper functions for loading environment settings. """ from __future__ import print_function import os import sys import json from lazy import lazy from path import path import memcache class Env(object): """ Load information about the execution environment. """ # Root of the git repository (edx-p...
agpl-3.0
-2,398,584,349,954,223
30.522989
104
0.564448
false
JaviMerino/workload-automation
wlauto/core/entry_point.py
2
2969
# Copyright 2013-2015 ARM Limited # # 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 w...
apache-2.0
323,452,114,848,262,500
35.207317
103
0.662176
false
mcgachey/edx-platform
lms/djangoapps/certificates/management/commands/fix_ungraded_certs.py
29
1708
""" Management command which fixes ungraded certificates for students """ from certificates.models import GeneratedCertificate from courseware import grades, courses from django.test.client import RequestFactory from django.core.management.base import BaseCommand from optparse import make_option class Command(BaseC...
agpl-3.0
4,554,451,040,748,259,300
28.964912
77
0.586066
false
ankazhao/python-sparselda
training/topic_words_stat_test.py
1
1541
#!/usr/bin/env python #coding=utf-8 # Copyright(c) 2013 python-sparselda project. # Author: Lifeng Wang (ofandywang@gmail.com) # # 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-2.0
-3,255,443,631,638,455,300
31.104167
80
0.719663
false
xedin/swift
utils/swift_build_sdk_interfaces.py
6
17227
#!/usr/bin/env python from __future__ import print_function import argparse import errno import itertools import json import multiprocessing import os import shutil import subprocess import sys import traceback BARE_INTERFACE_SEARCH_PATHS = [ "usr/lib/swift", "System/iOSSupport/usr/lib/swift" ] DEFAULT_FRAME...
apache-2.0
-3,607,401,163,807,310,300
38.877315
79
0.579497
false
ct-23/home-assistant
tests/components/sensor/test_statistics.py
6
4036
"""The test for the statistics sensor platform.""" import unittest import statistics from homeassistant.setup import setup_component from homeassistant.const import (ATTR_UNIT_OF_MEASUREMENT, TEMP_CELSIUS) from tests.common import get_test_home_assistant class TestStatisticsSensor(unittest.TestCase): """Test the...
apache-2.0
-8,891,334,324,478,073,000
38.558824
75
0.587113
false
DMRookie/RoomAI
roomai/kuhn/KuhnPokerEnv.py
1
7063
#!/bin/python import random import math import copy import roomai.kuhn.KuhnPokerUtils import roomai.common logger = roomai.get_logger() class KuhnPokerEnv(roomai.common.AbstractEnv): ''' The KuhnPoker game environment ''' #@override def init(self, params=dict()): ''' Initialize th...
mit
5,629,964,947,989,741,000
34.139303
138
0.549625
false
eglxiang/Med
test_transformationOutput.py
1
8775
# -*- coding: utf-8 -*- """ Created on Thu Apr 13 12:10:33 2017 @author: apezeshk """ from matplotlib import pyplot as plt import numpy as np #Use this to display a single slice of the original/transformed patch in one figure, #and every slice of the original and the transformed copies in another figure. This can be u...
bsd-2-clause
-8,484,480,938,777,345,000
58.70068
98
0.648091
false
danielricks/autoplay
agents/agentWord2Vec.py
1
13779
import random as rand import scholar.scholar as sch import os, random, copy, re import cPickle as pickle import nltk class AgentWord2Vec: # Sets all initial learning variables of behavior parameters def __init__(self, initial_epsilon, training_cycles): # GLOBAL VARIABLES # Used for making Word2Vec queries se...
gpl-3.0
2,840,511,492,745,383,400
39.172012
155
0.689528
false
theho/pyho
travis_pypi_setup.py
2
3750
#!/usr/bin/env python # -*- coding: utf-8 -*- """Update encrypted deploy password in Travis config file """ from __future__ import print_function import base64 import json import os from getpass import getpass import yaml from cryptography.hazmat.primitives.serialization import load_pem_public_key from cryptography.h...
mit
16,340,677,529,275,898
29.737705
79
0.678933
false
kb1lqc/Faraday-Software
faraday/proxyio/cc430radioconfig.py
2
3365
def freq0_carrier_calculation(freq_desired, fxosc=26.0, debug=False): """ Calculates the FREQ0, FREQ1, and FREQ2 24 bit word for main carrier frequency of the CC430. :param freq_desired: Frequency in MHz that is desired to tune to (Integer or float) :param fxosc: CC430 High Frequency crystal frequency ...
gpl-3.0
-1,070,895,408,007,615,500
43.866667
121
0.693611
false
glogiotatidis/mozillians-new
vendor-local/lib/python/kombu/utils/compat.py
13
10475
""" kombu.utils.compat ================== Helps compatibility with older Python versions. :copyright: (c) 2009 - 2012 by Ask Solem. :license: BSD, see LICENSE for more details. """ import sys ############## collections.OrderedDict ####################################### import weakref try: from collections imp...
bsd-3-clause
5,658,690,889,685,595,000
31.836991
78
0.545776
false
ChameleonCloud/horizon
openstack_dashboard/utils/config.py
3
2247
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
8,375,130,446,633,421,000
32.044118
78
0.690254
false
studio666/cjdns
node_build/dependencies/libuv/build/gyp/pylib/gyp/generator/msvs.py
13
124736
# 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. import collections import copy import ntpath import os import posixpath import re import subprocess import sys import gyp.common import gyp.easy_xml as easy_xml i...
gpl-3.0
2,724,741,477,540,711,400
36.390887
134
0.642717
false
Athrun29/horizon
openstack_dashboard/dashboards/project/networks/subnets/views.py
12
5601
# Copyright 2012 NEC Corporation # # 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 ag...
apache-2.0
-3,659,288,307,888,411,000
37.102041
78
0.622567
false
darrenabbey/ymap
scripts_seqModules/scripts_WGseq/putative_SNPs_from_parent.py
4
8911
### ### Simplify parental putative_SNP list to contain only those loci with an allelic ratio on range [0.25 .. 0.75]. ### ### Uses genome definition files to only output data lines for chromosomes of interest. ### def process_ParentLine(entry_line): global chrNums global chrName global chrCount # Process 'putativ...
mit
5,979,577,287,332,996,000
42.257282
118
0.537426
false
ychaim/peatio-client-python
lib/client.py
3
2169
import urllib2 import json from lib.auth import Auth BASE_URL = 'https://peatio.com' API_BASE_PATH = '/api/v2' API_PATH_DICT = { # GET 'members': '%s/members/me.json', 'markets': '%s/markets.json', #market code required in url as {market}.json 'tickers' : '%s/tickers/%%s.json', #market requi...
cc0-1.0
6,266,608,174,988,486,000
27.92
73
0.592439
false
pwnieexpress/raspberry_pwn
src/pentest/sqlmap/thirdparty/pagerank/__init__.py
27
1141
#!/usr/bin/env python # # The MIT License # # Copyright 2010 Corey Goldberg # # 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...
gpl-3.0
1,097,457,773,898,738,400
42.884615
79
0.774759
false
ekalosak/server
tests/unit/test_util_decorators.py
7
1249
""" Unit tests for utility decorators """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals import unittest import sys import time import tests.utils as utils class TestRepeat(unittest.TestCase): """ Test the Repeat decorator """ # lowest p...
apache-2.0
-432,537,235,412,835,800
21.709091
55
0.665332
false