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
luceatnobis/youtube-dl
youtube_dl/extractor/hotstar.py
33
3711
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( ExtractorError, determine_ext, int_or_none, ) class HotStarIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?hotstar\.com/(?:.+?[/-])?(?P<id>\d{10})' _TESTS = [{ 'url': 'http...
unlicense
6,372,708,783,486,775,000
35.742574
113
0.489356
false
hryamzik/ansible
lib/ansible/modules/cloud/amazon/rds_snapshot_facts.py
32
12499
#!/usr/bin/python # Copyright (c) 2014-2017 Ansible Project # Copyright (c) 2017, 2018 Will Thames # Copyright (c) 2017, 2018 Michael De La Rue # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'co...
gpl-3.0
497,075,691,523,704,770
31.805774
157
0.668533
false
dparaujo/projeto
app_academico/semestre/migrations/0001_initial.py
1
1044
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-10-30 23:47 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='TblAca...
gpl-3.0
-6,254,257,975,671,408,000
33.8
113
0.56705
false
mnull/taccoin
contrib/bitrpc/bitrpc.py
1
7836
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:9332") else: access = Ser...
mit
3,041,786,034,633,486,300
23.185185
79
0.66169
false
dgzurita/odoo
addons/base_import_module/tests/test_module/__openerp__.py
377
1290
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
6,663,191,059,552,638,000
33.864865
78
0.565891
false
cstipkovic/spidermonkey-research
testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/conf.py
2
7900
# -*- coding: utf-8 -*- # # BrowserMob Proxy documentation build configuration file, created by # sphinx-quickstart on Fri May 24 12:37:12 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file...
mpl-2.0
-3,906,200,997,007,315,000
31.510288
81
0.706456
false
nicholedwight/nichole-theme
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/pygments/styles/bw.py
364
1355
# -*- coding: utf-8 -*- """ pygments.styles.bw ~~~~~~~~~~~~~~~~~~ Simple black/white only style. :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 Keyword, Name, Comment, Strin...
mit
2,146,287,778,005,858,800
26.653061
70
0.454613
false
n-west/gnuradio-volk
gr-analog/python/analog/qa_pll_refout.py
17
7816
#!/usr/bin/env python # # Copyright 2004,2010,2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at ...
gpl-3.0
-2,602,156,135,745,435,600
48.783439
79
0.488741
false
saleemjaveds/https-github.com-openstack-nova
nova/tests/virt/hyperv/test_pathutils.py
12
2298
# Copyright 2014 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
apache-2.0
-9,181,039,940,068,839,000
38.62069
78
0.667537
false
ted-gould/nova
nova/virt/hyperv/migrationops.py
15
13161
# Copyright 2013 Cloudbase Solutions Srl # 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 r...
apache-2.0
-1,321,830,333,474,343,200
43.313131
79
0.571157
false
pratikmallya/hue
desktop/core/src/desktop/lib/metrics/file_reporter.py
19
2262
# 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 may not use this file ex...
apache-2.0
-1,733,971,814,190,744,300
28.376623
74
0.702034
false
naparuba/opsbro
data/global-configuration/packs/mongodb/collectors/pymongo/mongo_replica_set_client.py
53
1955
# Copyright 2011-2015 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License. You # may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
mit
-5,526,254,158,968,015,000
39.729167
76
0.701279
false
Taapat/enigma2-openpli-fulan
lib/python/Tools/ASCIItranslit.py
85
4020
# -*- coding:utf-8 -*- ASCIItranslit = { 0x0022: "''", 0x002A: "_", 0x002F: "_", 0x003A: "_", 0x003C: "_", 0x003D: "_", 0x003E: "_", 0x003F: "_", 0x005C: "_", 0x007C: "_", 0x007F: "", 0x00A0: "_", 0x00A1: "!", 0x00A2: "c", 0x00A3: "lb", 0x00A4: "", 0x00A5: "yen", 0x00A6: "I", 0x00A7: "SS", 0x00A8: ...
gpl-2.0
2,814,552,986,348,173,000
13.833948
50
0.495522
false
y12uc231/edx-platform
lms/djangoapps/instructor/features/common.py
47
4576
""" Define common steps for instructor dashboard acceptance tests. """ # pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from __future__ import absolute_import from lettuce import world, step from mock import patch from nose.tools import assert_in # pylint: disable=no-name-in-module from c...
agpl-3.0
-8,432,078,084,603,166,000
33.406015
152
0.654283
false
jmartinezchaine/OpenERP
openerp/workflow/wkf_logs.py
15
1523
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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
-4,776,751,369,692,606,000
37.075
177
0.596848
false
lertech/extra-addons
website_disable_odoo/__init__.py
1
1185
# -*- encoding: utf-8 -*- # Python source code encoding : https://www.python.org/dev/peps/pep-0263/ ############################################################################## # # OpenERP, Odoo Source Management Solution # Copyright (c) 2015 Antiun Ingeniería S.L. (http://www.antiun.com) # Anto...
gpl-3.0
-4,967,695,546,326,101,000
50.434783
78
0.608622
false
wolverineav/neutron
neutron/db/portsecurity_db.py
3
2785
# Copyright 2013 VMware, 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 required by a...
apache-2.0
-8,432,324,774,877,598,000
43.206349
78
0.682944
false
route-nazionale/event_subscribe
event_subscribe/default_settings.py
1
2179
""" Django settings for event_subscribe project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR,...
agpl-3.0
5,728,406,010,177,067,000
24.045977
71
0.730151
false
sadanandb/pmt
src/tactic/ui/widget/__init__.py
5
1116
########################################################### # # Copyright (c) 2005-2008, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written ...
epl-1.0
-4,710,474,057,186,819,000
27.615385
66
0.713262
false
40223112/w16test
ref/gear.py
68
21704
import cherrypy import os import sys # 這個程式要計算正齒輪的齒面寬, 資料庫連結希望使用 pybean 與 SQLite # 導入 pybean 模組與所要使用的 Store 及 SQLiteWriter 方法 from pybean import Store, SQLiteWriter import math # 確定程式檔案所在目錄, 在 Windows 有最後的反斜線 _curdir = os.path.join(os.getcwd(), os.path.dirname(__file__)) # 將所在目錄設為系統搜尋目錄 sys.path.append(_curdir) if 'O...
agpl-3.0
2,927,056,776,212,377,000
38.717213
307
0.58348
false
sinkuri256/python-for-android
python3-alpha/python3-src/Lib/shlex.py
51
11100
"""A lexical analyzer class for simple shell-like syntaxes.""" # Module and documentation by Eric S. Raymond, 21 Dec 1998 # Input stacking and error message cleanup added by ESR, March 2000 # push_source() and pop_source() made explicit by ESR, January 2001. # Posix compliance, split(), string arguments, and # iterato...
apache-2.0
-8,029,511,807,110,584,000
37.326389
76
0.4894
false
adrientetar/robofab
Lib/robofab/tools/glifExport.py
1
2477
"""Tool for exporting GLIFs from FontLab""" import FL import os from robofab.interface.all.dialogs import ProgressBar from robofab.glifLib import GlyphSet from robofab.tools.glifImport import GlyphPlaceholder from robofab.pens.flPen import drawFLGlyphOntoPointPen def exportGlyph(glyphName, flGlyph, glyphSet): """Ex...
bsd-3-clause
-3,893,137,988,498,525,000
25.073684
74
0.692774
false
hnjamba/onaclone
onadata/libs/utils/csv_reader.py
6
1612
# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 import csv class CsvReader(object): """ Typical usage:: csv_reader = CsvReader(path) for d in csv_reader.iter_dicts(): Variable.objects.create(**d) """ def __init__(self, path): self.open(path) def open(self, path): ...
bsd-2-clause
-3,126,621,194,137,224,700
26.793103
79
0.539702
false
georgejhunt/olpc-kernel
tools/perf/scripts/python/failed-syscalls-by-pid.py
1996
2233
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
6,483,761,255,902,136,000
27.628205
112
0.618898
false
ctrevino/DIGITS
digits/model/tasks/caffe_train.py
1
38589
# Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. import os import re import time import math import subprocess import numpy as np from google.protobuf import text_format import caffe try: import caffe_pb2 except ImportError: # See issue #32 from caffe.proto import caffe_pb2 from train...
bsd-3-clause
-6,825,362,181,322,277,000
38.0182
199
0.52616
false
lupyuen/RaspberryPiImage
home/pi/GrovePi/Software/Python/others/temboo/Library/Google/Spreadsheets/RetrieveCellFeed.py
4
5884
# -*- coding: utf-8 -*- ############################################################################### # # RetrieveCellFeed # Retrieves a list of cell names and values in a specified Google worksheet. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 ...
apache-2.0
35,968,798,605,831,190
45.330709
254
0.686268
false
CeON/CoAnSys
document-similarity/document-similarity-logic/src/main/python/analyse_unibi.py
4
3007
#! /usr/bin/python import sys,re,string sys.path.append("/home/pdendek/docsim-check/out/document-similarity-logic-1.6-SNAPSHOT-jar-with-dependencies.jar") from pl.edu.icm.coansys.commons.java import DiacriticsRemover def fillDict(inL,langs): innerD = {} for x in inL: t,l = x langs.add(l) innerD[l] = t return...
agpl-3.0
-5,420,090,212,876,902,000
35.670732
142
0.691054
false
openchange/openchange
mapiproxy/services/ocsmanager/ocsmanager/controllers/authenticate.py
8
3494
import logging import hashlib import os from base64 import urlsafe_b64encode as encode from base64 import urlsafe_b64decode as decode from pylons import request, response, session, tmpl_context as c, url from pylons.controllers.util import abort, redirect from pylons.decorators.rest import restrict from ocsmanager.mo...
gpl-3.0
1,379,567,357,265,311,700
36.569892
114
0.636234
false
JGulbronson/rmc
data/aggregator.py
2
14325
import argparse import mongoengine import redis import sys import rmc.models as m import rmc.shared.constants as c import rmc.shared.facebook as facebook import rmc.shared.util as rmc_util import rmc.data.crawler as rmc_crawler import rmc.data.processor as rmc_processor # TODO(mack): remove duplication of fields thro...
mit
15,536,293,646,599,332
33.107143
97
0.603839
false
openhdf/enigma2-wetek
lib/python/Components/Renderer/valioOledInfo.py
13
2222
# -*- coding: utf-8 -*- # # OLED-Info Renderer for Dreambox/Enigma-2 # Version: 1.0 # Coded by Vali (c)2011 # ####################################################################### from enigma import eLabel from Renderer import Renderer from os import popen from time import localtime, strftime from Component...
gpl-2.0
3,997,286,995,062,252,500
25.771084
71
0.611161
false
csutherl/sos
sos/plugins/acpid.py
12
1211
# 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 program is distributed in the hope that it will be useful, # but...
gpl-2.0
-222,572,055,967,362,720
32.638889
72
0.706854
false
codypiersall/platformer
lib/menu.py
1
7244
""" A simple menu system for pygame. Probably a little too simple, unfortunately.""" from __future__ import division import pygame # This silly Exception is used to return from a menu. class ReturnError(Exception): pass class Exit(Exception): pass class Menu(object): """ Class for bui...
bsd-3-clause
573,334,550,866,849,700
31.850467
132
0.539343
false
ryanjmccall/nupic
examples/opf/experiments/classification/scalar_encoder_0/description.py
17
2421
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
gpl-3.0
4,853,052,496,851,065,000
48.408163
95
0.493598
false
willprice/arduino-sphere-project
scripts/example_direction_finder/temboo/Library/Zendesk/MonitoredTwitterHandles/GetMonitoredTwitterHandle.py
5
3934
# -*- coding: utf-8 -*- ############################################################################### # # GetMonitoredTwitterHandle # Retrieves detailed information on a specified monitored Twitter account. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Ver...
gpl-2.0
-8,861,465,096,887,379,000
39.556701
145
0.68912
false
batxes/4Cin
SHH_WT_models_highres/SHH_WT_models_highres_final_output_0.1_-0.1_5000/SHH_WT_models_highres13173.py
4
88213
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
gpl-3.0
-7,633,951,192,118,199,000
47.790376
75
0.702776
false
crosswalk-project/chromium-crosswalk-efl
third_party/closure_linter/closure_linter/error_fixer_test.py
121
1719
#!/usr/bin/env python # # Copyright 2012 The Closure Linter 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 # #...
bsd-3-clause
8,056,026,600,216,630,000
29.157895
74
0.737638
false
SHMEDIALIMITED/nodec
node_modules/grunt-css/node_modules/gzip-js/test/unzipTest.py
182
1840
import os from colorama import Fore from helpers import run_cmd outDirDefault = 'test-outs' testDirDefault = 'test-files' """ Run a single test @param tFile- required; the file to check against (uncompressed data) @param level- optional (default: all); the compression level [1-9] @return True if all tests passed; Fa...
mit
-5,968,886,495,668,307,000
29.666667
116
0.669022
false
hobarrera/django
tests/test_client_regress/tests.py
15
63582
# -*- coding: utf-8 -*- """ Regression tests for the Test Client, especially the customized assertions. """ from __future__ import unicode_literals import itertools import os from django.contrib.auth.models import User from django.contrib.auth.signals import user_logged_in, user_logged_out from django.http import Htt...
bsd-3-clause
-2,718,380,387,212,263,000
43.535389
119
0.63463
false
kiall/designate-py3
designate/storage/impl_sqlalchemy/migrate_repo/versions/058_placeholder.py
140
1035
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <kiall@hp.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.org/licenses/L...
apache-2.0
-7,657,652,798,236,455,000
33.5
76
0.758454
false
chirilo/mozillians
vendor-local/lib/python/djcelery/tests/test_backends/test_cache.py
30
4992
from __future__ import absolute_import import sys from datetime import timedelta from django.core.cache.backends.base import InvalidCacheBackendError from celery import result from celery import states from celery.utils import gen_unique_id from celery.datastructures import ExceptionInfo from djcelery.backends.cac...
bsd-3-clause
-700,960,799,755,242,400
33.666667
74
0.626002
false
duolinwang/MusiteDeep
MusiteDeep/train_general.py
1
4521
import sys import os import pandas as pd import numpy as np import argparse def main(): parser=argparse.ArgumentParser(description='MusiteDeep custom training tool for general PTM prediction.') parser.add_argument('-input', dest='inputfile', type=str, help='training data in fasta format. Sites f...
gpl-2.0
6,868,989,048,079,880,000
65.477612
289
0.682814
false
keyurpatel076/MissionPlannerGit
packages/IronPython.StdLib.2.7.4/content/Lib/io.py
191
3624
"""The io module provides the Python interfaces to stream handling. The builtin open function is defined in this module. At the top of the I/O hierarchy is the abstract base class IOBase. It defines the basic interface to a stream. Note, however, that there is no separation between reading and writing to streams; impl...
gpl-3.0
5,981,894,630,289,200,000
35.979592
80
0.732616
false
Unrepentant-Atheist/mame
3rdparty/benchmark/.ycm_extra_conf.py
84
3641
import os import ycm_core # These are the compilation flags that will be used in case there's no # compilation database set (by default, one is not set). # CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR. flags = [ '-Wall', '-Werror', '-pendantic-errors', '-std=c++0x', '-fno-strict-aliasing...
gpl-2.0
-5,718,661,672,368,788,000
30.66087
79
0.68635
false
tencentyun/cos-python-sdk
qcloud_cos/cos_config.py
1
1384
#!/usr/bin/env python # coding=utf-8 ################################################################################ # CosConfig 有关cos的配置 ################################################################################ class CosConfig(object): def __init__(self): self._end_point = 'http://web.file.myqc...
mit
2,621,996,498,364,763,000
26.217391
80
0.522364
false
riveridea/gnuradio
gr-trellis/examples/python/test_cpm.py
11
5508
#!/usr/bin/env python ################################################## # Gnuradio Python Flow Graph # Title: CPM test # Author: Achilleas Anastasopoulos # Description: gnuradio flow graph # Generated: Thu Feb 19 23:16:23 2009 ################################################## from gnuradio import gr from gnuradio im...
gpl-3.0
8,884,651,964,150,266,000
33.641509
188
0.553922
false
onshape-public/onshape-clients
python/onshape_client/oas/models/bt_graphics_appearance1152.py
1
5506
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
mit
-5,571,862,601,072,330,000
33.198758
91
0.562114
false
lyft/incubator-airflow
tests/providers/google/cloud/sensors/test_pubsub.py
4
4436
# # 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...
apache-2.0
3,097,246,323,247,045,000
40.457944
77
0.631876
false
allenai/allennlp
allennlp/modules/seq2seq_encoders/pytorch_transformer_wrapper.py
1
4656
from typing import Optional from overrides import overrides import torch from torch import nn from allennlp.modules.seq2seq_encoders.seq2seq_encoder import Seq2SeqEncoder from allennlp.nn.util import add_positional_features @Seq2SeqEncoder.register("pytorch_transformer") class PytorchTransformer(Seq2SeqEncoder): ...
apache-2.0
4,032,469,471,103,327,000
39.486957
127
0.659364
false
davidcusatis/horizon
openstack_dashboard/test/api_tests/cinder_rest_tests.py
8
10320
# Copyright 2015 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, sof...
apache-2.0
-8,789,508,030,976,958,000
38.84556
78
0.567636
false
jbremer/androguard
androguard/misc.py
12
6313
from androguard.core import * from androguard.core.androgen import * from androguard.core.bytecode import * from androguard.core.bytecodes.dvm import * from androguard.core.bytecodes.apk import * from androguard.core.analysis.analysis import * from androguard.core.analysis.ganalysis import * from androguard.decompiler....
apache-2.0
-5,320,044,743,731,781,000
31.045685
109
0.589102
false
mogoweb/chromium-crosswalk
native_client_sdk/src/tools/genhttpfs.py
79
2524
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # This scripts generates a manifest file for the MountHttp file system. # Files and directory paths are specified on the command-li...
bsd-3-clause
-1,025,329,589,992,626,700
31.779221
77
0.636688
false
jammerful/buildbot
master/buildbot/steps/slave.py
11
1812
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
-521,931,601,021,272,450
36.75
79
0.788079
false
brianr/uuss
scripts/process_userstates_buckets.py
1
10860
from __future__ import with_statement import base64 import optparse import os import pymongo import simplejson import sys import time import zlib from paste.deploy import converters from lolapps.util import processor from lolapps.util import db from lolapps.util.adapters import mongo, chunking from lolapps.common i...
mit
-2,571,789,772,694,419,000
43.691358
106
0.494107
false
mohammed-alfatih/servo
tests/wpt/css-tests/tools/html5lib/doc/conf.py
436
9028
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # html5lib documentation build configuration file, created by # sphinx-quickstart on Wed May 8 00:04:49 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # aut...
mpl-2.0
3,787,293,849,168,783,000
31.242857
102
0.697054
false
elimence/edx-platform
cms/djangoapps/contentstore/management/commands/check_course.py
5
2830
from django.core.management.base import BaseCommand, CommandError from xmodule.modulestore.django import modulestore from xmodule.modulestore.xml_importer import check_module_metadata_editability from xmodule.course_module import CourseDescriptor from request_cache.middleware import RequestCache class Command(BaseCo...
agpl-3.0
4,448,689,419,986,173,400
40.617647
118
0.636749
false
suninsky/ReceiptOCR
Python/server/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/jisfreq.py
3131
47315
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
mit
-2,939,653,643,004,805,000
82.154657
98
0.745134
false
jeasoft/odoo
marcos_addons/marcos_ncf/account_voucher/number_to_letter.py
3
4850
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013-2015 Marcos Organizador de Negocios SRL http://marcos.do # Write by Eneldo Serrata (eneldo@marcos.do) # # This program is free software: you can redistribute it and/or modify # it un...
agpl-3.0
-4,518,428,102,402,945,500
29.21875
128
0.54427
false
jnhdny/parts-unlimited-to-bigcommerce
python_scripts/catalog_content_export_unzipper.py
3
1551
#!/usr/bin/python # this script unzips the brand catalog content export zip files # one at a time, and numbers each exported xml file import zipfile import shutil import os import glob def bool_str(s): s = s.lower() T = ('1', 'true', 'y', 'ye', 'yes', 'yea', 'ya', 'yah', 'yup') F = ('0', 'false', 'n', 'no', 'not',...
gpl-2.0
-8,436,640,711,712,632,000
34.25
206
0.662153
false
bastimeyer/streamlink
src/streamlink/plugins/livestream.py
5
4599
import re from streamlink.compat import urljoin from streamlink.plugin import Plugin from streamlink.plugin.api import validate from streamlink.plugin.api.utils import parse_json from streamlink.stream import AkamaiHDStream, HLSStream _url_re = re.compile(r"http(s)?://(www\.)?livestream.com/") _stream_config_schema =...
bsd-2-clause
-936,878,992,519,265,400
34.929688
135
0.52294
false
teichopsia-/take_brake
lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py
252
106466
""" Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path operations to manipul...
mpl-2.0
7,820,439,430,982,581,000
33.266495
82
0.594518
false
weiyirong/crosswalk-1
app/tools/android/parse_xpk.py
39
3550
#!/usr/bin/env python # Copyright (c) 2013 Intel Corporation. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=C0301 """The script is used to parse an XPK file. It will do: 1. Check the magic file header; 2. Verify the signatu...
bsd-3-clause
-4,209,571,939,648,742,400
27.174603
88
0.69831
false
stonegithubs/odoo
addons/membership/wizard/membership_invoice.py
380
3229
# -*- 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
-6,050,591,409,046,504,000
40.935065
130
0.584391
false
DMRookie/RoomAI
models/crm/crm_kuhn/play.py
1
2054
#!/bin/python import roomai.kuhn import roomai.common import random class HumanInputPlayer(roomai.common.AbstractPlayer): """ """ def receive_info(self, info): """ Args: info: """ available_actions = info def take_action(self): """ Returns: ...
mit
-4,503,502,269,456,290,000
26.386667
112
0.592989
false
tavendo/AutobahnPython
examples/asyncio/wamp/pubsub/unsubscribe/frontend.py
3
2752
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # 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 ...
mit
-6,250,392,274,712,829,000
36.69863
82
0.628634
false
sachinkum/Bal-Aveksha
WebServer/BalAvekshaEnv/lib/python3.5/site-packages/django/utils/safestring.py
41
4575
""" Functions for working with "safe strings": strings that can be displayed safely without further escaping in HTML. Marking something as a "safe string" means that the producer of the string has already turned characters that should not be interpreted by the HTML engine (e.g. '<') into the appropriate entities. """ i...
gpl-3.0
2,207,144,827,092,949,000
29.298013
81
0.64612
false
gangadharkadam/shfr
frappe/widgets/query_builder.py
35
6998
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe out = frappe.response from frappe.utils import cint import frappe.defaults def get_sql_tables(q): if q.find('WHERE') != -1: tl = q.split('FROM')[1].split('...
mit
-5,694,405,449,246,642,000
25.01487
116
0.637325
false
aleida/django
tests/regressiontests/file_uploads/views.py
6
4373
from __future__ import absolute_import, unicode_literals import hashlib import json import os from django.core.files.uploadedfile import UploadedFile from django.http import HttpResponse, HttpResponseServerError from .models import FileModel, UPLOAD_TO from .tests import UNICODE_FILENAME from .uploadhandler import Q...
bsd-3-clause
1,517,972,951,403,133,400
31.154412
104
0.673908
false
BT-ojossen/odoo
addons/l10n_do/__openerp__.py
309
2992
# -*- coding: utf-8 -*- # ############################################################################# # # First author: Jose Ernesto Mendez <tecnologia@obsdr.com> (Open Business Solutions SRL.) # Copyright (c) 2012 -TODAY Open Business Solutions, SRL. (http://obsdr.com). All rights reserved. # # This is a fork to upg...
agpl-3.0
1,847,647,346,990,503,400
40.555556
98
0.646056
false
algorhythms/LintCode
Maximal Square.py
4
2163
""" Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area. Example For example, given the following matrix: 1 0 1 0 0 1 0 1 1 1 1 1 1 1 1 1 0 0 1 0 Return 4. """ __author__ = 'Daniel' class Solution: def maxSquare(self, matrix): """ Algo...
apache-2.0
4,844,183,719,194,545,000
26.74359
117
0.437818
false
leomorsy/medical8.0
oemedical_emr/models/oemedical_prescription_order.py
3
3191
# -*- coding: utf-8 -*- #/############################################################################# # # Tech-Receptives Solutions Pvt. Ltd. # Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>) # Special Credit and Thanks to Thymbra Latinoamericana S.A. # # This program is free sof...
agpl-3.0
-2,119,046,690,247,324,200
44.585714
123
0.62927
false
kosz85/django
django/db/migrations/executor.py
18
17479
from django.apps.registry import apps as global_apps from django.db import migrations, router from .exceptions import InvalidMigrationPlan from .loader import MigrationLoader from .recorder import MigrationRecorder from .state import ProjectState class MigrationExecutor: """ End-to-end migration execution - ...
bsd-3-clause
1,059,180,555,687,638,800
46.497283
108
0.596602
false
vnsofthe/odoo
openerp/addons/base/ir/ir_qweb.py
38
64677
# -*- coding: utf-8 -*- import collections import cStringIO import datetime import hashlib import json import itertools import logging import math import os import re import sys import textwrap import uuid from subprocess import Popen, PIPE from urlparse import urlparse import babel import babel.dates import werkzeug ...
agpl-3.0
6,998,854,237,731,619,000
39.297196
138
0.565873
false
espadrine/opera
chromium/src/third_party/python_26/Lib/site-packages/win32/Demos/eventLogDemo.py
17
3273
import win32evtlog, traceback import win32api, win32con import win32security # To translate NT Sids to account names. from win32evtlogutil import * def ReadLog(computer, logType="Application", dumpEachRecord = 0): # read the entire log back. h=win32evtlog.OpenEventLog(computer, logType) numRecords = win32...
bsd-3-clause
-169,061,908,038,165,400
33.819149
122
0.586618
false
hjfreyer/marry-fuck-kill
backend/core.py
1
11449
#!/usr/bin/env python # # Copyright 2011 Hunter Freyer and Michael Kelly # # 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 b...
apache-2.0
4,690,555,505,954,704,000
32.379009
79
0.607389
false
rmhyman/DataScience
Lesson1/IntroToPandas.py
1
1976
import pandas as pd ''' The following code is to help you play with the concept of Series in Pandas. You can think of Series as an one-dimensional object that is similar to an array, list, or column in a database. By default, it will assign an index label to each item in the Series ranging from 0 to N, where N...
mit
5,303,408,304,625,054,000
34.592593
84
0.635121
false
tedelhourani/ansible
lib/ansible/module_utils/known_hosts.py
7
6918
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
5,912,683,934,801,089,000
34.476923
94
0.596849
false
google/dnae
services/service-example/service_example_run.py
1
9308
# Copyright 2018 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 agreed to in writing,...
apache-2.0
-1,889,882,232,288,534,300
31.432056
80
0.691233
false
pypa/setuptools
setuptools/_distutils/command/bdist_msi.py
26
35579
# Copyright (C) 2005, 2006 Martin von Löwis # Licensed to PSF under a Contributor Agreement. # The bdist_wininst command proper # based on bdist_wininst """ Implements the bdist_msi command. """ import os import sys import warnings from distutils.core import Command from distutils.dir_util import remove_tree from dist...
mit
-1,320,610,647,503,928,800
46.500668
200
0.538001
false
mikemccllstr/seadir
seadir/commands/responses.py
1
1359
'''Command line handlers that address the responses in the Google Sheet''' import logging import os from cliff.lister import Lister import seadir.config as config import seadir.model.responses as responses class Dump(Lister): '''Dump the records from the Google Sheet to the screen''' log = logging.getLogg...
mit
675,204,467,066,143,500
26.734694
78
0.590876
false
windyuuy/opera
chromium/src/third_party/python_26/Lib/ctypes/test/test_pickling.py
48
2062
import unittest import pickle from ctypes import * import _ctypes_test dll = CDLL(_ctypes_test.__file__) class X(Structure): _fields_ = [("a", c_int), ("b", c_double)] init_called = 0 def __init__(self, *args, **kw): X.init_called += 1 self.x = 42 class Y(X): _fields_ = [("str", c_char...
bsd-3-clause
685,400,053,234,706,400
25.435897
67
0.536372
false
jacraven/lsiapp
main/auth/dropbox.py
2
1701
# coding: utf-8 # pylint: disable=missing-docstring, invalid-name import flask import auth import config import model from main import app dropbox_config = dict( access_token_method='POST', access_token_url='https://api.dropbox.com/1/oauth2/token', authorize_url='https://www.dropbox.com/...
mit
-5,999,421,789,438,646,000
26.35
65
0.654909
false
davidzchen/tensorflow
tensorflow/python/keras/distribute/model_collection_base.py
11
1687
# Copyright 2019 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
-6,113,257,812,003,060,000
36.488889
80
0.694724
false
cyrixhero/Django-facebook
docs/docs_env/Lib/encodings/zlib_codec.py
533
3015
""" Python 'zlib_codec' Codec - zlib compression encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Written by Marc-Andre Lemburg (mal@lemburg.com). """ import codecs import zlib # this codec needs the optional zlib modu...
bsd-3-clause
4,798,231,745,378,867,000
28.558824
68
0.664345
false
neale/CS-program
434-MachineLearning/final_project/linearClassifier/sklearn/__init__.py
27
3086
""" Machine learning module for Python ================================== sklearn is a Python module integrating classical machine learning algorithms in the tightly-knit world of scientific Python packages (numpy, scipy, matplotlib). It aims to provide simple and efficient solutions to learning problems that are acc...
unlicense
4,141,599,433,581,902,000
34.883721
79
0.652301
false
WarrenWeckesser/scipy
scipy/interpolate/fitpack.py
16
26807
__all__ = ['splrep', 'splprep', 'splev', 'splint', 'sproot', 'spalde', 'bisplrep', 'bisplev', 'insert', 'splder', 'splantider'] import warnings import numpy as np # These are in the API for fitpack even if not used in fitpack.py itself. from ._fitpack_impl import bisplrep, bisplev, dblint from . import _f...
bsd-3-clause
-8,576,654,773,767,334,000
34.133683
80
0.614877
false
blackbliss/callme
flask/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.py
163
11979
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from io import BytesIO import logging import os import re import struct import sys from .compat import sysconfig, fsencode, detect_encoding, ...
mit
4,861,348,553,560,394,000
36.788644
79
0.547792
false
mfussenegger/jedi
test/static_analysis/arguments.py
20
1150
# ----------------- # normal arguments (no keywords) # ----------------- def simple(a): return a simple(1) #! 6 type-error-too-few-arguments simple() #! 10 type-error-too-many-arguments simple(1, 2) #! 10 type-error-too-many-arguments simple(1, 2, 3) # ----------------- # keyword arguments # -----------------...
mit
5,969,800,030,835,117,000
14.753425
35
0.578261
false
junhuac/MQUIC
src/tools/gyp/pylib/gyp/xcode_emulation.py
7
67036
# 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. """ This module contains classes that help to emulate xcodebuild behavior on top of other build systems, such as make and ninja. """ import copy import gyp.common...
mit
6,018,361,578,783,747,000
38.973763
191
0.662346
false
xavieraijon/init
node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py
2736
1804
# 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. """Visual Studio project reader/writer.""" import gyp.common import gyp.easy_xml as easy_xml class Writer(object): """Visual Studio XML tool file writer.""" ...
mit
-5,613,351,463,418,433,000
30.103448
72
0.582594
false
chfw/Flask-Excel
examples/database_example_formatted.py
2
3569
""" database_example_formatted.py :copyright: (c) 2015 by C. W. :license: New BSD """ from flask import Flask, request, jsonify, redirect, url_for import flask_excel as excel from flask_sqlalchemy import SQLAlchemy from datetime import datetime # please uncomment the following line if you use pyexcel < 0.2.2 # import ...
bsd-3-clause
4,753,169,454,554,032,000
26.666667
79
0.610815
false
dmitriy0611/django
tests/m2m_through_regress/tests.py
182
9847
from __future__ import unicode_literals from django.contrib.auth.models import User from django.core import management from django.test import TestCase from django.utils.six import StringIO from .models import ( Car, CarDriver, Driver, Group, Membership, Person, UserMembership, ) class M2MThroughTestCase(TestCa...
bsd-3-clause
-3,335,269,392,340,007,000
39.522634
360
0.618158
false
raj454raj/eden
tests/dbmigration/example_migration.py
33
2001
import os import sys import copy import subprocess WEB2PY_PATH = sys.argv[1] APP = sys.argv[2] changed_table = "org_organisation" new_field = "type_id" new_table = "org_organisation_type" old_field = "type" new_table_field = "name" os.chdir(WEB2PY_PATH) sys.path.append(WEB2PY_PATH) from gluon.custom_import import cu...
mit
-608,431,684,315,557,200
27.183099
97
0.621689
false
ahmadRagheb/goldenHR
erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.py
62
3071
# Copyright (c) 2015, Frappe 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 execute(filters=None): columns = get_columns() proj_details = get_project_details() pr_item_map = get_purchas...
gpl-3.0
-8,644,819,031,627,431,000
37.873418
98
0.689678
false
clubcapra/Ibex
src/capra_ai/scripts/igvc_basic_north.py
1
1052
#! /usr/bin/env python from state_ai import StateAi import rospy from math import pi from std_msgs.msg import Bool class IGVCBasicNorth(StateAi): def __init__(self): super(IGVCBasicNorth, self).__init__("igvc_basic_north") def on_start(self): #self.generate_circle(2.0, pi/4, 2 * pi - pi/4, ...
gpl-3.0
4,078,991,938,382,549,000
24.682927
83
0.590304
false
batxes/4c2vhic
SHH_WT_models_highres/SHH_WT_models_highres_final_output_0.1_-0.1_5000/SHH_WT_models_highres22408.py
4
88247
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
gpl-3.0
3,440,770,142,866,438,000
47.809181
76
0.702641
false
green-span/green-mail
old/imapproxyserver.py
1
2623
#|############################################################################## #|Copyright (c) 2009, The Green-Span Project. All rights reserved. This code is #|Open Source Free Software - redistribution and use in source and binary forms, #|with or without modification, are permitted under the Two Clause BSD Li...
bsd-2-clause
-8,055,283,197,536,979,000
32.090909
93
0.617995
false
altsen/diandiyun-platform
lms/djangoapps/linkedin/management/commands/linkedin_mailusers.py
9
10824
""" Send emails to users inviting them to add their course certificates to their LinkedIn profiles. """ from smtplib import SMTPServerDisconnected, SMTPDataError, SMTPConnectError, SMTPException import json import logging import urllib from boto.exception import AWSConnectionError from boto.ses.exceptions import ( ...
agpl-3.0
6,356,314,451,060,511,000
40.791506
103
0.631837
false
jupyter/nbgrader
nbgrader/tests/nbextensions/test_validate_assignment.py
3
7158
import pytest from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException, NoSuchElementException, NoAlertPresentException from .conftest import _make_nbserv...
bsd-3-clause
-4,502,118,144,260,063,700
28.949791
104
0.658005
false
nkvelkov/Pyganizer
source/tests/test_task_scheduler.py
1
2614
import unittest from task_scheduler import TaskScheduler from task import Task import arrow class TaskSchedulerTestCase(unittest.TestCase): def setUp(self): self.task_scheduler = TaskScheduler() self.tz = 'local' self.datetime = arrow.Arrow(2015, 5, 9, 11, 11, 11, tzinfo=self.tz) s...
gpl-2.0
7,058,214,314,973,799,000
35.319444
87
0.670237
false
Glasgow2015/team-10
env/lib/python2.7/site-packages/PIL/ImageFilter.py
87
6618
# # The Python Imaging Library. # $Id$ # # standard filters # # History: # 1995-11-27 fl Created # 2002-06-08 fl Added rank and mode filters # 2003-09-15 fl Fixed rank calculation in rank filter; added expand call # # Copyright (c) 1997-2003 by Secret Labs AB. # Copyright (c) 1995-2002 by Fredrik Lundh. # # See t...
apache-2.0
-1,584,388,950,149,352,200
23.065455
102
0.56165
false