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
saurabh6790/omni-apps
utilities/doctype/sms_control/sms_control.py
9
3941
# 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 webnotes from webnotes.utils import load_json, nowdate, cstr from webnotes.model.code import get_obj from webnotes.model.doc import Document ...
agpl-3.0
-6,519,140,999,349,434,000
31.841667
101
0.640954
false
shawnadelic/shuup
shuup/xtheme/plugins/category_links.py
2
2994
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from django import forms from django.utils.translation import ugettext_lazy ...
agpl-3.0
-7,679,898,462,294,426,000
35.962963
104
0.637609
false
dchad/malware-detection
vs/feature_extraction_java.py
1
5427
# feature_extraction_java.py # # Read a list of Java Bytecode files and extract # feature sets from them. # # Input: # # Output: # # Author: Derek Chadwick # Date : 05/09/2016 # # TODO: all of the things from multiprocessing import Pool import os from csv import writer import numpy as np import pandas as pd import ma...
gpl-3.0
3,928,310,142,784,207,400
39.507463
106
0.559978
false
JohnnyKing94/pootle
pootle/apps/pootle_store/store/serialize.py
5
2351
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. from django.utils.functional import cached_p...
gpl-3.0
-1,505,137,486,076,295,200
33.072464
77
0.647384
false
hgl888/chromium-crosswalk
tools/perf/page_sets/startup_pages_record.py
32
1248
# Copyright 2014 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 telemetry.page import page as page_module from telemetry import story class StartupPagesRecordPage(page_module.Page): def __init__(self, url, page_s...
bsd-3-clause
-1,371,564,430,892,264,200
33.666667
76
0.69391
false
hitdong/pyvision
src/pyvision/other/optics.py
4
2308
''' Created on Mar 22, 2013 @author: David S. Bolme Oak Ridge National Laboratory ''' def diffractionLimit(distance,wavelength,aperture): ''' This function computes the Diffraction limit of an optical system. It returns the smallest resolvable pattern at a given wavelength and aperture. @p...
bsd-3-clause
-2,947,494,543,172,497,000
31.055556
78
0.696707
false
alessandrocamilli/l10n-italy
l10n_it_fiscalcode/__openerp__.py
2
1880
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Associazione Odoo Italia # (<http://www.odoo-italia.org>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General P...
agpl-3.0
1,540,303,066,270,929,400
31.982456
78
0.593085
false
ewongbb/stem
test/unit/doctest.py
2
3714
""" Tests examples from our documentation. """ from __future__ import absolute_import import doctest import os import unittest import stem.descriptor.router_status_entry import stem.util.connection import stem.util.str_tools import stem.util.system import stem.version import test from stem.response import ControlMe...
lgpl-3.0
881,542,893,550,349,000
35.058252
219
0.671782
false
balloob/home-assistant
tests/components/nest/test_config_flow_sdm.py
4
2347
"""Test the Google Nest Device Access config flow.""" from homeassistant import config_entries, setup from homeassistant.components.nest.const import DOMAIN, OAUTH2_AUTHORIZE, OAUTH2_TOKEN from homeassistant.const import CONF_CLIENT_ID, CONF_CLIENT_SECRET from homeassistant.helpers import config_entry_oauth2_flow from...
apache-2.0
2,635,588,060,780,906,000
34.560606
86
0.635705
false
OSSESAC/odoopubarquiluz
addons/procurement/schedulers.py
25
13521
# -*- 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,730,736,791,106,820,000
46.276224
201
0.533762
false
ojii/django-shop
shop/cart/modifiers/tax_modifiers.py
2
1703
# -*- coding: utf-8 -*- from decimal import Decimal from shop.cart.cart_modifiers_base import BaseCartModifier class TenPercentGlobalTaxModifier(BaseCartModifier): """ A basic Tax calculator: it simply adds a taxes field to the *order*, and makes it a fixed percentage of the subtotal (10%) Obviou...
bsd-3-clause
-288,910,436,574,436,740
36.844444
80
0.661186
false
hthompson6/a10-neutron-lbaas
a10_neutron_lbaas/tests/test_case.py
2
1281
# Copyright (C) 2015, A10 Networks 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 requ...
apache-2.0
-2,322,329,403,750,829,600
31.846154
79
0.673692
false
endlessm/chromium-browser
build/config/ios/compile_xcassets.py
5
9042
# Copyright 2016 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 argparse import os import re import subprocess import sys import tempfile """Wrapper around actool to compile assets catalog. The script compile_xca...
bsd-3-clause
2,769,308,951,750,360,000
35.023904
80
0.699513
false
jumpstarter-io/nova
nova/tests/virt/libvirt/test_utils.py
2
12038
# Copyright 2012 NTT Data. All Rights Reserved. # Copyright 2012 Yahoo! 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/li...
apache-2.0
-7,144,820,326,888,661,000
37.460064
79
0.603007
false
luiscberrocal/homeworkpal
homeworkpal_project/project_admin/forms.py
1
2808
from datetimewidget.widgets import DateTimeWidget, DateWidget from django.forms import forms, inlineformset_factory, BaseFormSet, ModelForm, BaseInlineFormSet from .models import Project, Risk, ProjectMember, Deliverable import logging logger = logging.getLogger(__name__) __author__ = 'luiscberrocal' class RequiredF...
mit
-4,671,874,913,405,049,000
40.294118
116
0.624288
false
forging2012/taiga-back
taiga/projects/notifications/services.py
7
16875
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the F...
agpl-3.0
8,612,434,298,936,628,000
35.053419
132
0.656552
false
rserban/chrono
src/demos/python/irrlicht/demo_IRR_collisionNSC.py
3
9432
#------------------------------------------------------------------------------ # Name: pychrono example # Purpose: # # Author: Lijing Yang # # Created: 6/10/2020 # Copyright: (c) ProjectChrono 2019 #------------------------------------------------------------------------------ import pychrono.core ...
bsd-3-clause
2,346,722,833,753,652,000
39.831169
126
0.62341
false
tyndare/osmose-backend
plugins/TagFix_MultipleTag_fr.py
1
5571
#-*- coding: utf-8 -*- ########################################################################### ## ## ## Copyrights Frédéric Rodrigo 2011 ## ## ...
gpl-3.0
-2,981,317,910,978,626,000
50.962617
195
0.498921
false
Grirrane/odoo
addons/account/report/report_vat.py
7
11102
# -*- 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
1,573,555,595,836,627,000
41.7
133
0.50036
false
rachmadaniHaryono/RedditImageGrab
setup.py
1
3634
#!/usr/bin/env python # coding: utf8 """setup.py. package `SQLAlchemy` have to be restricted to certain version because following bug: https://github.com/flask-admin/flask-admin/issues/1583 """ import os from setuptools import setup from setuptools.command.test import test # taken example from # https://coderwall....
gpl-3.0
8,568,630,644,292,358,000
26.323308
84
0.583104
false
xfouloux/Flexget
flexget/plugins/input/myepisodes_list.py
5
3236
from __future__ import unicode_literals, division, absolute_import import logging import re from itertools import chain from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexget.utils.cached_input import cached from flexget.utils.soup import get_soup log = logging.getLogg...
mit
8,033,414,661,985,200,000
31.039604
96
0.564277
false
hjoo5/gap_eul
font.py
1
1210
def choose_font(): global m, text # I hate to use global, but for simplicity t = tkinter.Toplevel(root) font_name = tkinter.Label(t, text='Font Name: ') font_name.grid(row=0, column=0, sticky='nsew') enter_font = tkinter.Entry(t) enter_font.grid(row=0, column=1, sticky='nsew') font_size = t...
gpl-3.0
5,209,644,874,406,466,000
36.84375
75
0.641322
false
zhimin711/nova
nova/tests/unit/pci/test_utils.py
3
9362
# Copyright (c) 2013 Intel, Inc. # Copyright (c) 2012 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/li...
apache-2.0
417,865,615,174,227,140
37.368852
79
0.6348
false
damien-dg/horizon
openstack_dashboard/dashboards/project/vpn/tables.py
15
12491
# 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 required by applicable law or agre...
apache-2.0
-4,770,567,308,548,457,000
35.101156
79
0.598751
false
daniel-leschkowski/generateDSv2
tests/ipo1_sup.py
2
59442
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated by generateDS.py. # import sys import getopt import re as re_ import base64 from datetime import datetime, tzinfo, timedelta etree_ = None Verbose_import_ = False ( XMLParser_import_none, XMLParser_import_lxml, XMLParser_import_elementtree ) = ra...
mit
-2,623,688,434,600,015,000
41.887446
201
0.581912
false
Tesora-Release/tesora-trove-dashboard
trove_dashboard/test/helpers.py
2
1738
# # 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 # ...
apache-2.0
-4,966,032,793,658,775,000
29.491228
78
0.714614
false
vjmac15/Lyilis
lib/pymongo/read_preferences.py
2
16515
# Copyright 2012-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 writing...
gpl-3.0
-1,705,393,581,778,410,000
33.915433
79
0.628641
false
g-fleischer/wtfy
trackingserver/thirdparty/tornado/tornado/__init__.py
8
1098
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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 a...
gpl-3.0
4,952,082,865,183,179,000
36.862069
75
0.755009
false
jmorse/numbness
util.py
1
1040
import config def print_integer(val, width): return "(_ bv{0} {1})".format(val, width) def sparticus(r, match, slot): return "(sparticus {0} {1} {2})".format(print_integer(r, config.ROUNDBITS), print_integer(match, config.MATCHBITS), print_integer(slot, ...
bsd-2-clause
-2,551,587,749,110,294,500
30.515152
83
0.641346
false
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/Lib/mcl_platform/data/env/__init__.py
1
1153
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: __init__.py def CheckValue(name, globalValue=False): import dsz if globalValue: return dsz.env.Check(name) else: return...
unlicense
-1,954,939,991,147,152,400
27.146341
80
0.645273
false
sdoran35/hate-to-hugs
venv/lib/python3.6/site-packages/nltk/classify/tadm.py
5
3515
# Natural Language Toolkit: Interface to TADM Classifier # # Copyright (C) 2001-2017 NLTK Project # Author: Joseph Frazee <jfrazee@mail.utexas.edu> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT from __future__ import print_function, unicode_literals import sys import subprocess from nltk import...
mit
-6,331,268,552,049,120,000
30.383929
72
0.62532
false
google/deepvariant
third_party/nucleus/io/python/fastq_writer_wrap_test.py
1
5906
# Copyright 2018 Google LLC. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # #...
bsd-3-clause
-3,413,702,303,076,360,700
39.452055
81
0.718591
false
pronto/dotfiles
.vim/pylibs/logilab/common/urllib2ext.py
24
3374
import logging import urllib2 import kerberos as krb class GssapiAuthError(Exception): """raised on error during authentication process""" import re RGX = re.compile('(?:.*,)*\s*Negotiate\s*([^,]*),?', re.I) def get_negociate_value(headers): for authreq in headers.getheaders('www-authenticate'): mat...
bsd-2-clause
2,195,780,718,057,201,000
37.781609
99
0.609662
false
BrandonY/gsutil
gslib/addlhelp/dev.py
10
6525
# -*- coding: utf-8 -*- # Copyright 2012 Google 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 require...
apache-2.0
-6,072,491,776,404,896,000
43.387755
80
0.724751
false
SpectreJan/gnuradio
grc/gui/MainWindow.py
5
16918
""" Copyright 2008, 2009, 2011 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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...
gpl-3.0
-7,599,733,800,357,388,000
34.542017
109
0.574181
false
ronnienv/antTrails
main.py
1
12930
"""`main` is the top level module for your Bottle application. Loads the Bottle framework and adds a custom error handler. """ # import the Bottle framework from bottle import Bottle,route, run, template, static_file, get, post, request, redirect, response from antTrailsDatabase import Occupant, Spot from google.appe...
apache-2.0
724,284,863,946,687,100
36.807018
354
0.626991
false
flag0010/pop_gen_cnn
data_prep_tricks/test.effects.of.data.prep.tricks.on.tajD.py
1
7751
import numpy as np import keras #from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten, Merge from keras.layers import Conv1D, MaxPooling1D, AveragePooling1D from generic_tajD import calc_S_and_k_from_seqs, count_all, tajD from random import choice from ma...
gpl-3.0
-4,948,531,630,374,158,000
34.231818
123
0.612566
false
jdanbrown/pydatalab
google/datalab/ml/__init__.py
2
1045
# Copyright 2016 Google 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 applicable law or agreed ...
apache-2.0
-8,488,155,526,236,006,000
37.703704
99
0.781818
false
cjaymes/pyscap
src/scap/model/oval_5/sc/linux/SeLinuxBooleanItemElement.py
1
1241
# Copyright 2016 Casey Jaymes # This file is part of PySCAP. # # PySCAP 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. # # PySCAP is ...
gpl-3.0
480,960,904,359,227,650
39.032258
111
0.689766
false
hendradarwin/VTK
IO/Geometry/Testing/Python/TestChacoReader.py
17
1189
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # read in a Chaco file chReader = vtk.vtkChacoReader() chReader.SetBaseName(VTK_DATA_ROOT + "/Data/vwgt") chReader.SetGenerateGlobalElementIdArray(1) chReader.SetGenerateGlobalNodeIdA...
bsd-3-clause
6,055,860,417,004,810,000
23.770833
60
0.805719
false
CarlosRDomin/crazyflie-firmware
tools/usdlog/CF_functions.py
3
4153
# -*- coding: utf-8 -*- """ decode: decodes binary logged sensor data from crazyflie2 with uSD-Card-Deck createConfig: create config file which has to placed on µSD-Card @author: jsschell """ from zlib import crc32 import struct import numpy as np import os # lookup dictionary to determine size of data type...
gpl-3.0
579,685,083,883,614,600
31.232
107
0.520231
false
whitepages/nova
nova/tests/unit/api/openstack/compute/microversions.py
39
5031
# 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 t...
apache-2.0
7,368,281,486,471,552,000
31.458065
78
0.642417
false
gfarmerfr/nicotine-plus
plugins/spamfilter/__init__.py
2
2071
# -*- coding: utf-8 -*- from pynicotine.pluginsystem import BasePlugin, returncode def enable(frame): global PLUGIN PLUGIN = Plugin(frame) def disable(frame): global PLUGIN PLUGIN = None class Plugin(BasePlugin): __name__ = "Spamfilter" settings = {'minlength':200, ...
gpl-3.0
3,998,236,504,790,852,000
52.102564
199
0.608885
false
Spiderlover/Toontown
toontown/uberdog/ScavengerHuntDataStore.py
6
1751
from direct.directnotify import DirectNotifyGlobal from toontown.uberdog.DataStore import * class ScavengerHuntDataStore(DataStore): QueryTypes = DataStore.addQueryTypes(['GetGoals', 'AddGoal']) notify = DirectNotifyGlobal.directNotify.newCategory('ScavengerHuntDataStore') def __init__(self, filepath): ...
mit
4,570,379,914,637,634,000
32.673077
82
0.556825
false
anntzer/scikit-learn
sklearn/multioutput.py
7
30307
""" This module implements multioutput regression and classification. The estimators provided in this module are meta-estimators: they require a base estimator to be provided in their constructor. The meta-estimator extends single output estimators to multioutput estimators. """ # Author: Tim Head <betatim@gmail.com>...
bsd-3-clause
5,233,138,792,602,842,000
34.823877
79
0.586201
false
UMD-DRASTIC/drastic
tests/test_metadata_validation.py
1
2399
import unittest import StringIO from drastic.metadata import (MetadataValidator, get_resource_validator, get_collection_validator) from nose.tools import raises TEST_RULES = [ { "name": "required-field", "required": True, }, { ...
agpl-3.0
-4,341,217,662,852,642,000
28.256098
92
0.571071
false
stefanv/scipy3
scipy/misc/helpmod.py
2
7208
import inspect import types import sys import pydoc __all__ = ['info','source'] # NOTE: pydoc defines a help function which works simliarly to this # except it uses a pager to take over the screen. # combine name and arguments and split to multiple lines of # width characters. End lines on a comma and begin argu...
bsd-3-clause
4,891,364,221,481,810,000
32.840376
97
0.525666
false
rhcarvalho/kombu
kombu/transport/mongodb.py
3
9762
""" kombu.transport.mongodb ======================= MongoDB transport. :copyright: (c) 2010 - 2013 by Flavio Percoco Premoli. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import pymongo from pymongo import errors from pymongo import MongoClient, uri_parser from kombu.fiv...
bsd-3-clause
-7,842,946,632,299,698,000
29.22291
79
0.57017
false
nikitakurylev/TuxemonX
tuxemon/core/components/event/__init__.py
4
5934
#!/usr/bin/python # -*- coding: utf-8 -*- # # Tuxemon # Copyright (C) 2014, William Edwards <shadowapex@gmail.com>, # Benjamin Bean <superman2k5@gmail.com> # # This file is part of Tuxemon. # # Tuxemon is free software: you can redistribute it and/or modify # it under the terms of the GNU General Pu...
gpl-3.0
3,626,261,277,444,036,000
33.103448
109
0.610212
false
StackStorm/st2
st2common/st2common/models/db/runner.py
3
2967
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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 ...
apache-2.0
-7,336,859,662,917,291,000
32.337079
89
0.699023
false
digineo/gluon-autoflasher
lib/gluon/models.py
1
1389
# coding: utf-8 import os import re import requests from . import * models = loadYAML("lib/gluon/models.yml") imageDir = os.path.join(baseDir, "images") # Returns the local path to the image def get(model): fwConfig = config["firmware"] filename = "%s-%s.bin" % (fwConfig["prefix"], model) url = "%s%s" %...
agpl-3.0
-9,028,988,125,066,911,000
25.673077
98
0.63951
false
G33kDude/ev3dev-web-remote
keyboard.py
1
3641
import evdev e = evdev.ecodes js_map = { 0x08: e.KEY_BACKSPACE, # BACKSPACE 0x09: e.KEY_TAB, # TAB 0x0D: e.KEY_ENTER, # ENTER 0x10: e.KEY_LEFTSHIFT, # SHIFT 0x11: e.KEY_LEFTCTRL, # CTRL 0x12: e.KEY_LEFTALT, # ALT 0x13: e.KEY_PAUSE, # PAUSE 0x14: e.KEY_CAPSLOCK, # CAPS_LOCK 0x1B: e.KE...
mit
1,377,887,666,387,933,700
32.1
79
0.514968
false
iohannez/gnuradio
gr-qtgui/python/qtgui/qa_qtgui.py
7
2791
#!/usr/bin/env python # # Copyright 2011 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 your option) # ...
gpl-3.0
-654,642,042,566,068,500
31.835294
72
0.551774
false
tickbox-smc-ltd/xfero
src/xfero/db/create_XFERO_DB.py
1
10418
#!/usr/bin/env python ''' 'XFERO Database creation ''' import sqlite3 as lite import sys from /xfero/ import get_conf as get_conf def create_db(): ''' **Purpose:** This script has been developed for System Administrators to create the Database and associated tables for /Xfero/. **Usage Notes:**...
agpl-3.0
-6,934,363,958,459,111,000
43.712446
83
0.508927
false
claudyus/pylibftdi
tests/test_bus.py
1
1510
""" pylibftdi - python wrapper for libftdi Copyright (c) 2010-2014 Ben Bass <benbass@codedstructure.net> See LICENSE file for details and (absence of) warranty pylibftdi: http://bitbucket.org/codedstructure/pylibftdi This module contains some basic tests for the higher-level functionality without requiring an actual...
mit
3,878,225,642,109,555,700
25.034483
61
0.611258
false
ekampf/webapp2_requestparser
docs/conf.py
2
8507
#!/usr/bin/env python # -*- coding: utf-8 -*- # # webapp2_restful documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in th...
bsd-3-clause
-5,062,733,025,095,551,000
29.934545
76
0.706712
false
dennybritz/deepdive
examples/ocr/data/raw/gen_feature_table.py
3
1046
#!/usr/bin/python # -*- coding: utf-8 -*- import os,sys # needed by most import random # random import yaml # yaml parsing import pprint # pretty print dirbase = 'boolean-f52-c3-m620/' ids = [f.rstrip('.features.txt') for f in os.listdir(dirbase) if f.endswith('.features.txt')] print 'Process files:', ids ...
apache-2.0
5,247,162,795,309,445,000
23.904762
93
0.58413
false
dvor85/kmotion
core/actions/rtsp2mp4.py
1
4430
''' @author: demon ''' import os import subprocess import shlex import time import datetime import signal import sample log = None class rtsp2mp4(sample.sample): def __init__(self, kmotion_dir, feed): sample.sample.__init__(self, kmotion_dir, feed) from core import logger global log ...
gpl-3.0
8,434,391,264,230,338,000
34.15873
128
0.559368
false
jcjohnson/densecap
preprocess.py
4
16197
# coding=utf8 import argparse, os, json, string from collections import Counter from Queue import Queue from threading import Thread, Lock from math import floor import h5py import numpy as np from scipy.misc import imread, imresize """ This file expects a JSON file containing ground-truth regions and captions in t...
mit
-3,519,569,516,292,796,000
33.360934
133
0.653609
false
biocore/qiime
scripts/parallel_blast.py
15
4965
#!/usr/bin/env python # File created on 09 Feb 2010 from __future__ import division __author__ = "Greg Caporaso" __copyright__ = "Copyright 2011, The QIIME Project" __credits__ = ["Greg Caporaso", "Jai Ram Rideout", "Jose Antonio Navas Molina"] __license__ = "GPL" __version__ = "1.9.1-dev" __maintainer__ = "Greg Capor...
gpl-2.0
-5,827,415,480,407,671,000
40.722689
92
0.628197
false
JohnGriffiths/dipy
doc/examples/probabilistic_fiber_tracking.py
9
4979
""" ===================================================== An introduction to the Probabilistic Direction Getter ===================================================== Probabilistic fiber tracking is a way of reconstructing white matter connections using diffusion MR imaging. Like deterministic fiber tracking, the proba...
bsd-3-clause
-2,648,044,132,355,064,300
44.678899
79
0.730468
false
bgris/ODL_bgris
lib/python3.5/site-packages/numpy/polynomial/polynomial.py
22
52694
""" Objects for dealing with polynomials. This module provides a number of objects (mostly functions) useful for dealing with polynomials, including a `Polynomial` class that encapsulates the usual arithmetic operations. (General information on how this module represents and works with polynomial objects is in the do...
gpl-3.0
8,955,684,427,356,807,000
31.032827
79
0.592819
false
qpython-android/QPypi-numpy
numpy/f2py/cfuncs.py
3
40766
#!/usr/bin/env python """ C declarations, CPP macros, and C functions for f2py2e. Only required declarations/macros/functions will be used. Copyright 1999,2000 Pearu Peterson all rights reserved, Pearu Peterson <pearu@ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the NumP...
bsd-3-clause
-3,851,656,783,475,992,600
34.082616
185
0.611294
false
dtiarks/ThesisPlot
Chap5/pi_phase_shift_estimate.py
1
5855
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Nov 13 11:25:42 2017 @author: daniel """ import numpy as np import matplotlib.pyplot as plt import pandas as pd import os import json import io from scipy.optimize import newton from scipy import integrate from scipy.optimize import curve_fit import re...
mit
-2,634,745,903,521,214,500
35.141975
200
0.64953
false
wsriley/itsimple
myAnalyzers/GENERATE-VARS/translate/instantiate.py
6
3118
#! /usr/bin/env python # -*- coding: latin-1 -*- from __future__ import with_statement import build_model import pddl_to_prolog import pddl import timers def get_fluent_facts(task, model): fluent_predicates = set() for action in task.actions: for effect in action.effects: fluent_predicate...
gpl-3.0
948,949,612,858,538,400
34.033708
86
0.613855
false
mobarski/smash
smash2/xorpad.py
2
2461
""" xor pad encoding / decoding >>> decode(encode("secret")) 'secret' """ import os import sys import struct import random import base64 import array # TODO turn into object # TODO optimize # TODO ochrona przed uzyciem podkladki znanego hasla __encode = base64.b32encode __decode = base64.b32decode def _get_pad_pat...
mit
2,095,734,481,560,099,000
21.577982
93
0.612759
false
unseenlaser/machinekit
src/machinetalk/tutorial/json-ws/zmq-protobuf-micromot-client.py
18
1071
import zmq import time import pb2json import json # for pretty printer import sys,os sys.path.append("../protobuf") from demo_pb2 import * # create a message object: d = DemoContainer() # fill in what's required d.type = DT_POLYLINE d.velocity = 50 d.acceleration = 500 s = d.segment.add() s.type = ST_LINE s.end...
lgpl-2.1
359,807,089,869,560,900
16
51
0.663866
false
andrewcmyers/tensorflow
tensorflow/contrib/training/python/training/sequence_queueing_state_saver.py
20
78773
# 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
3,781,946,012,043,635,700
41.012267
80
0.648826
false
thinkopensolutions/odoo-brazil-banking
l10n_br_account_banking_payment_bradesco_tributos/wizard/payment_order_create.py
1
5580
# -*- coding: utf-8 -*- # ########################################################################### # # Author: Luis Felipe Mileo # Luiz Felipe do Divino # Copyright 2015 KMEE - www.kmee.com.br # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
agpl-3.0
-3,927,212,068,343,900,700
38.546099
80
0.526901
false
girving/tensorflow
tensorflow/python/kernel_tests/scalar_test.py
27
4822
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-3,881,259,461,830,751,700
37.269841
80
0.619453
false
eharney/cinder
cinder/tests/unit/brick/test_brick_lvm.py
1
19008
# Copyright 2012 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
6,732,046,989,841,363,000
41.053097
79
0.557607
false
pombredanne/cubes
cubes/workspace.py
5
24385
# -*- coding: utf-8 -*- from __future__ import absolute_import import sys from .metadata import read_model_metadata from .auth import NotAuthorized from .common import read_json_file from .errors import ConfigurationError, ArgumentError, CubesError from .logging import get_logger from .calendar import Calendar from ....
mit
7,782,696,129,232,110,000
35.093333
84
0.572138
false
donspaulding/adspygoogle
examples/adspygoogle/adwords/v201306/optimization/get_keyword_bid_simulations.py
3
3274
#!/usr/bin/python # # Copyright 2012 Google 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 b...
apache-2.0
4,154,781,893,915,000,300
34.978022
80
0.613317
false
eproche/mrSleuthy
sleuth_crunch.py
1
3424
import sys import logging import numpy as np from numpy import * from sklearn.metrics.pairwise import cosine_similarity def vocab_build(corpus): """Builds set of unique words """ lexicon = set() for doc in corpus: doc = doc.split() lexicon.update([word for word in doc]) return lexicon def attach_tfidf_weights...
mit
-3,500,204,896,196,443,600
30.136364
86
0.680783
false
adityacs/ansible
lib/ansible/modules/web_infrastructure/ansible_tower/tower_job_template.py
12
10067
#!/usr/bin/python #coding: utf-8 -*- # (c) 2017, Wayne Witzel III <wayne@riotousliving.com> # # This module 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 optio...
gpl-3.0
-1,241,861,879,647,672,800
29.785933
102
0.608026
false
jluissandovalm/lammps_smd
tools/moltemplate/src/remove_duplicate_atoms.py
30
1277
#!/usr/bin/env python """ Get rid of lines containing duplicate copies of the same atom in the "Atoms" section of a LAMMPS data file. Duplicate lines which occur later are preserved and the earlier lines are erased. The file is read from sys.stdin. This program does not parse the entire data file. T...
gpl-2.0
-1,005,610,992,487,647,600
23.09434
79
0.620987
false
wangjeaf/CSSCheckStyle
ckstyle/entity/EntityUtil.py
1
2039
from ckstyle.browsers.BinaryRule import ALL import re replacer1 = re.compile('\s*{\s*') replacer2 = re.compile('\s*:\s*') replacer3 = re.compile('\s*;\s*}\s*') replacer4 = re.compile('\s*;\s*') replacer5 = re.compile('\s\s+') replacer6 = re.compile('\(\s+') replacer7 = re.compile('\s+\)') replacer8 = re.compile('\s+,'...
bsd-3-clause
3,422,913,676,587,707,400
31.365079
154
0.538009
false
joachimmetz/l2tdevtools
tests/build_helpers/dpkg.py
2
3373
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for the helper for building projects from source.""" import os import unittest from l2tdevtools import projects from l2tdevtools.build_helpers import dpkg from tests import test_lib class DPKGBuildHelperTest(test_lib.BaseTestCase): """Tests for the helper to...
apache-2.0
-7,068,163,193,492,786,000
30.231481
76
0.725763
false
aristanetworks/arista-ovs-quantum
quantum/agent/common/config.py
4
1122
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/l...
apache-2.0
5,218,720,528,014,542,000
31.057143
78
0.699643
false
SigPloiter/SigPloit
gtp/gtp_v2_core/utilities/configuration_parser.py
1
15713
# configuration_parser.py # # Copyright 2018 Rosalia d'Alessandro # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the ...
mit
-3,185,248,154,489,224,000
44.810496
152
0.46242
false
coreyabshire/color-names
colornames/diagnostics.py
1
5521
import numpy as np import pandas as pd from colormath.color_conversions import convert_color from colormath.color_objects import LabColor, sRGBColor from scipy.spatial import ConvexHull from scipy.spatial import Delaunay def point_lab(p): return LabColor(p[0],p[1],p[2]) def point_rgb(p): return convert_colo...
mit
-2,020,991,193,454,116,400
36.304054
109
0.520014
false
Reflexe/doc_to_pdf
Windows/program/python-core-3.5.0/lib/traceback.py
3
22175
"""Extract, format and print information about Python stack traces.""" import collections import itertools import linecache import sys __all__ = ['extract_stack', 'extract_tb', 'format_exception', 'format_exception_only', 'format_list', 'format_stack', 'format_tb', 'print_exc', 'format_exc', 'pr...
mpl-2.0
276,555,414,976,538,800
37.365052
87
0.622728
false
jijoy/cuteparty-registrar
cuteparty-registrar.py
1
1611
import os import json from threading import Thread import time from time import sleep from flask import Flask, json, render_template, request import redis from collections import OrderedDict from Queue import Queue app = Flask(__name__) port = int(os.getenv("PORT")) vcap = json.loads(os.environ['VCAP_SERVICES']) svc ...
mit
-6,469,690,560,357,807,000
27.263158
93
0.689634
false
treycausey/scikit-learn
sklearn/cluster/dbscan_.py
1
9439
# -*- coding: utf-8 -*- """ DBSCAN: Density-Based Spatial Clustering of Applications with Noise """ # Author: Robert Layton <robertlayton@gmail.com> # # License: BSD 3 clause import numpy as np from ..base import BaseEstimator, ClusterMixin from ..metrics import pairwise_distances from ..utils import check_random_st...
bsd-3-clause
4,781,715,433,747,642,000
36.456349
79
0.62263
false
alshedivat/tensorflow
tensorflow/python/kernel_tests/bitcast_op_test.py
3
2799
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-3,329,594,955,507,657,700
29.096774
80
0.66095
false
michaelkirk/QGIS
python/plugins/processing/algs/lidar/fusion/Csv2Grid.py
2
2476
# -*- coding: utf-8 -*- """ *************************************************************************** Csv2Grid.py --------------------- Date : June 2014 Copyright : (C) 2014 by Agresta S. Coop Email : iescamochero at agresta dot org **********************...
gpl-2.0
2,524,326,199,955,766,000
41.689655
86
0.554927
false
trishnaguha/ansible
contrib/inventory/packet_net.py
15
18382
#!/usr/bin/env python ''' Packet.net external inventory script ================================= Generates inventory that Ansible can understand by making API request to Packet.net using the Packet library. NOTE: This script assumes Ansible is being executed where the environment variable needed for Packet API Token...
gpl-3.0
4,347,594,445,811,612,700
35.690619
126
0.587205
false
ml-lab/pylearn2
pylearn2/scripts/icml_2013_wrepl/black_box/black_box_dataset.py
5
5055
""" A Pylearn2 Dataset class for accessing the data for the facial expression recognition Kaggle contest for the ICML 2013 workshop on representation learning. """ __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2013, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __main...
bsd-3-clause
1,077,197,747,946,040,600
31.612903
86
0.54362
false
maryklayne/Funcao
sympy/functions/elementary/tests/test_trigonometric.py
5
42117
from sympy import (symbols, Symbol, nan, oo, zoo, I, sinh, sin, pi, atan, acos, Rational, sqrt, asin, acot, coth, E, S, tan, tanh, cos, cosh, atan2, exp, log, asinh, acoth, atanh, O, cancel, Matrix, re, im, Float, Pow, gcd, sec, csc, cot, diff, simplify, Heaviside, arg, conjugate, series...
bsd-3-clause
-7,621,424,771,226,412,000
32.559363
105
0.529572
false
JT5D/scikit-learn
examples/tree/plot_tree_regression_multioutput.py
7
1768
""" =================================================================== Multi-output Decision Tree Regression =================================================================== An example to illustrate multi-output regression with decision tree. The :ref:`decision trees <tree>` is used to predict simultaneously the ...
bsd-3-clause
6,395,079,049,915,944,000
30.017544
76
0.630656
false
Neozaru/depot_tools
third_party/logilab/common/logging_ext.py
20
6473
# -*- coding: utf-8 -*- # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser Genera...
bsd-3-clause
-2,717,760,004,482,268,000
35.365169
83
0.621968
false
sasukeh/cinder
cinder/db/sqlalchemy/migrate_repo/versions/025_add_consistencygroup.py
20
5047
# Copyright (C) 2012 - 2014 EMC 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 # # Unle...
apache-2.0
-3,883,090,861,318,809,600
37.526718
78
0.64573
false
JasonFruit/hymnal-tools
HtmlEmitter.py
1
1657
class HtmlEmitter(object): def emit(self, s): self.file.write(s) def emit_line(self, s=""): self.emit(s) self.emit("\n") def initialize(self, filename, title, author, date): self.file = open(filename, "w") self.emit_line("""<html> <head> <link re...
mit
3,116,201,792,270,743,000
33.520833
126
0.503923
false
genesi/u-boot-upstream
tools/patman/test.py
7
7788
# # Copyright (c) 2011 The Chromium OS Authors. # # See file CREDITS for list of people who contributed to this # project. # # 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 #...
gpl-2.0
3,512,452,392,712,941,000
30.152
79
0.660375
false
pawelad/verse
tests/projects/test_views.py
1
8264
""" Test `projects.views` file """ from unittest.mock import MagicMock from django.http import Http404 from django.utils.crypto import get_random_string from rest_framework import viewsets, status from rest_framework.reverse import reverse from rest_framework.test import APIClient import pytest from github3.repos imp...
apache-2.0
-2,319,080,477,112,680,400
32.188755
77
0.611447
false
glaubitz/fs-uae-debian
arcade/fsgs/platforms/arcade/arcadeplatform.py
2
1070
from fsgs.platform import PlatformHandler from fsgs.platforms.arcade.mamearcadedriver import MameArcadeDriver from fsgs.platforms.loader import SimpleLoader class ArcadePlatformHandler(PlatformHandler): PLATFORM_NAME = "Arcade" def __init__(self): PlatformHandler.__init__(self) def get_loader(s...
gpl-2.0
-7,945,367,685,215,314,000
31.424242
67
0.640187
false
philipwangdk/HPC
HPC_bitbucket/uwhpsc/lectures/lecture4/mysqrt.py
2
1078
""" Module for approximating sqrt. More ... """ def sqrt2(x, debug=False): """ more details. """ from numpy import nan if x==0.: return 0. elif x<0: print "*** Error, x must be nonnegative" return nan assert x>0. and type(x) is float, "Unrecognized input" ...
mit
-55,332,910,589,394,170
22.977778
60
0.455473
false
redhat-cip/tempest
tempest/scenario/manager.py
2
58062
# Copyright 2012 OpenStack Foundation # Copyright 2013 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LIC...
apache-2.0
9,041,714,999,479,491,000
40.681263
79
0.569701
false
theperfectionist89/fotc
huntingAdvantages.py
1
2409
class Advantage: mods = { "Small":1, "Medium":2, "Large":3, "Inedible":4, "NPC":0 } def modifyMeatDamage(self, hunt, attack): pass def modifyPeltDamage(self, hunt, attack): pass def modifySkills(self, hunt): pass class CarefulHunter(Advantage): def modifyMeatDamage(self, hunt, attack): if att...
mit
-4,470,928,599,606,183,000
23.343434
54
0.690328
false
piotrek-golda/CivilHubIndependantCopy
topics/views.py
3
9562
# -*- coding: utf-8 -*- import json, datetime from dateutil.relativedelta import relativedelta from django.db import transaction from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect from django.contrib.contenttypes.models import ContentType from django.utils.translation import uge...
gpl-3.0
2,802,770,483,311,767,000
35.219697
89
0.617235
false