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
jjmleiro/hue
desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/reader/worksheet.py
13
13133
from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl """Reader for a single worksheet.""" from io import BytesIO from warnings import warn # compatibility imports from openpyxl.xml.functions import iterparse # package imports from openpyxl.cell import Cell from openpyxl.cell.read_only import _ca...
apache-2.0
-5,987,100,388,995,258,000
39.285276
95
0.570928
false
cysuncn/python
spark/crm/PROC_A_SUBJECT_D002017.py
1
3651
#coding=UTF-8 from pyspark import SparkContext, SparkConf, SQLContext, Row, HiveContext from pyspark.sql.types import * from datetime import date, datetime, timedelta import sys, re, os st = datetime.now() conf = SparkConf().setAppName('PROC_A_SUBJECT_D002017').setMaster(sys.argv[2]) sc = SparkContext(conf = conf) sc....
gpl-3.0
-5,784,959,972,438,862,000
38.388889
173
0.591255
false
infobloxopen/infoblox-netmri
infoblox_netmri/api/broker/v2_8_0/system_backup_broker.py
15
13541
from ..broker import Broker class SystemBackupBroker(Broker): controller = "system_backup" def create_archive(self, **kwargs): """Creates backup of current system database. **Inputs** | ``api version min:`` None | ``api version max:`` None | ``requ...
apache-2.0
-8,656,417,111,616,167,000
32.600496
210
0.52426
false
ammarkhann/FinalSeniorCode
lib/python2.7/site-packages/singledispatch.py
45
8292
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals __all__ = ['singledispatch'] from functools import update_wrapper from weakref import WeakKeyDictionary from singledispatc...
mit
-3,261,028,177,306,718,000
36.863014
80
0.6048
false
arnavd96/Cinemiezer
myvenv/lib/python3.4/site-packages/music21/figuredBass/resolution.py
1
31355
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------- # Name: resolution.py # Purpose: Defines standard resolutions for possibility instances # Authors: Jose Cabal-Ugaz # # Copyright: Copyright © 2011 Michael Scott Cuthbert and the music21 Project ...
mit
-3,378,788,628,264,093,000
39.404639
116
0.636059
false
openmips/stbgui
lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py
3
4380
# -*- coding: iso-8859-1 -*- # (c) 2006 Stephan Reichholf # This Software is Free, use it where you want, when you want for whatever you want and modify it if you want but don't remove my copyright! from Screens.Screen import Screen from Screens.Standby import TryQuitMainloop from Screens.MessageBox import MessageBox f...
gpl-2.0
-8,129,415,933,970,107,000
30.73913
195
0.707306
false
Nosferatul/coala
tests/bearlib/aspects/ClassTest.py
12
2722
from coalib.bearlib.aspects import Root, AspectTypeError as aspectTypeError from coalib.bearlib.aspects.meta import isaspect, assert_aspect, issubaspect import pytest class AspectClassTest: def test_subaspect_without_definition(self, RootAspect): with pytest.raises(TypeError): @RootAspect.su...
agpl-3.0
-3,647,443,995,309,548,500
28.268817
76
0.60507
false
hesseltuinhof/mxnet
tests/nightly/test_tutorial.py
2
3198
#pylint: disable=no-member, too-many-locals, too-many-branches, no-self-use, broad-except, lost-exception, too-many-nested-blocks, too-few-public-methods, invalid-name """ This script converts all python tutorials into python script and tests whether there is any warning or error. After running python scrip...
apache-2.0
1,592,265,985,950,845,000
34.142857
167
0.604128
false
drawquest/drawquest-web
website/canvas/templatetags/canvas_tags.py
2
4205
# -*- coding: utf-8 -*- import bleach import datetime import os.path import re import time import urllib import urlparse import uuid from django import template from django.conf import settings from django.template.defaultfilters import pluralize, yesno from django.utils.functional import memoize from django.utils.ht...
bsd-3-clause
-1,855,555,445,799,859,500
29.251799
190
0.66849
false
MERegistro/meregistro
meregistro/apps/registro/forms/ExtensionAulicaFormFilters.py
1
3469
# -*- coding: UTF-8 -*- from django import forms from apps.seguridad.models import TipoDocumento, Usuario from apps.registro.models import Establecimiento, ExtensionAulica, Localidad, Departamento, Jurisdiccion, TipoGestion from apps.registro.models.EstadoExtensionAulica import EstadoExtensionAulica class Extension...
bsd-3-clause
720,294,403,880,718,700
57.762712
139
0.672916
false
uclouvain/osis
education_group/ddd/validators/validators_by_business_action.py
1
6776
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
5,581,070,803,011,847,000
37.494318
120
0.698155
false
tlevine/alot
alot/widgets/thread.py
4
14038
# Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file """ Widgets specific to thread mode """ import urwid import logging from alot.settings import settings from alot.db.utils import decod...
gpl-3.0
6,526,684,069,569,996,000
36.335106
79
0.575794
false
HaebinShin/tensorflow
tensorflow/python/kernel_tests/sparse_to_dense_op_py_test.py
8
6792
# 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,062,619,296,948,984,300
37.372881
80
0.602326
false
anault/arpdetect
tests.py
4
1995
#!/usr/bin/python import sys import os import arpdetect def test(result): print ("Success" if result else "Fail") # Not suspicious ARP table def test1(): pHosts = [ arpdetect.Host(["192.168.1.1", "00-00-00-00-00-00", "dynamique"]), arpdetect.Host(["192.168.1.101", "11-11-11-11-11-11", "dynamique"]), arpdet...
mit
-1,291,289,397,608,141,000
33.413793
93
0.639098
false
Vignesh2208/Awlsim
awlsim/core/systemblocks/system_sfb_2.py
2
3286
# -*- coding: utf-8 -*- # # AWL simulator - SFBs # # Copyright 2014-2015 Michael Buesch <m@bues.ch> # # 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 yo...
gpl-2.0
1,617,853,630,234,739,700
33.957447
82
0.702982
false
pdellaert/ansible
test/units/modules/network/ftd/test_ftd_install.py
27
10168
# Copyright (c) 2019 Cisco and/or its affiliates. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
gpl-3.0
-5,666,699,047,314,154,000
40
118
0.642506
false
ehashman/oh-mainline
vendor/packages/docutils/test/test_parsers/test_rst/test_block_quotes.py
19
6665
#! /usr/bin/env python # $Id: test_block_quotes.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Tests for states.py. """ from __init__ import DocutilsTestSupport def suite(): s = DocutilsTestSupport.ParserTest...
agpl-3.0
-7,985,094,825,578,062,000
16.356771
73
0.517329
false
google/TaglessCRM
src/plugins/pipeline_plugins/hooks/gcs_hook.py
1
10109
# python3 # coding=utf-8 # Copyright 2020 Google LLC. # # 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
4,901,230,522,230,867,000
33.738832
79
0.664556
false
Yellowen/Owrang
setup/doctype/authorization_rule/authorization_rule.py
2
4160
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import cint, cstr, flt, has_common from webnotes.model import db_exists from webnotes.model.bean import copy_doclist from webnote...
agpl-3.0
5,653,616,322,733,408,000
43.741935
87
0.695433
false
harshilasu/GraphicMelon
y/google-cloud-sdk/platform/gsutil/third_party/boto/tests/test.py
22
2484
#!/usr/bin/env python # Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rig...
gpl-3.0
-6,531,218,534,587,653,000
41.101695
77
0.677536
false
outlierbio/ob-pipelines
ob_pipelines/entities/sample.py
1
1438
from datetime import datetime from luigi import Parameter from ob_pipelines.config import cfg, settings class Sample(object): sample_id = Parameter() def __init__(self, *args, **kwargs): if 'id' in kwargs: self.key = kwargs['id'] if 'fields' in kwargs: self._sample...
apache-2.0
1,228,496,761,335,606,000
27.196078
79
0.60153
false
Sorsly/subtle
google-cloud-sdk/platform/gsutil/third_party/oauth2client/oauth2client/contrib/appengine.py
21
34440
# Copyright 2014 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 ...
mit
8,795,563,558,984,678,000
36.112069
79
0.601539
false
facaiy/spark
python/pyspark/sql/dataframe.py
4
90501
# # 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 us...
apache-2.0
7,354,053,555,749,424,000
37.908426
100
0.565298
false
lahosken/pants
contrib/android/src/python/pants/contrib/android/tasks/zipalign.py
12
3407
# coding=utf-8 # Copyright 2015 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
7,741,950,886,075,162,000
38.616279
102
0.687702
false
someboredkiddo/garcon
tests/fixtures/flows/example.py
3
1046
from __future__ import print_function from garcon import activity from garcon import runner domain = 'dev' name = 'workflow_name' create = activity.create(domain, name) activity_1 = create( name='activity_1', tasks=runner.Sync( lambda activity, context: print('activity_1'))) activity_2 ...
mit
861,737,106,363,308,300
21.255319
54
0.622371
false
neilLasrado/erpnext
erpnext/templates/pages/integrations/gocardless_checkout.py
5
2805
# Copyright (c) 2018, 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 _ from frappe.utils import flt import json from erpnext.erpnext_integrations.doctype.gocardless_settings.gocardless_sett...
gpl-3.0
4,937,311,264,333,105,000
35.441558
147
0.729768
false
popazerty/obh-sh4
lib/python/Tools/NumericalTextInput.py
17
3773
# -*- coding: UTF-8 -*- from enigma import eTimer from Components.Language import language # Dict languageCode -> array of strings MAP_SEARCH = ( u"%_0", u" 1", u"abc2", u"def3", u"ghi4", u"jkl5", u"mno6", u"pqrs7", u"tuv8", u"wxyz9", ) MAP_SEARCH_UPCASE = ( U"0%_", U"1 ", U"ABC2", U"DEF3", U"GHI4", U...
gpl-2.0
4,386,939,903,795,665,000
16.183575
89
0.593478
false
orderup/open-data-science
postgres2redshift/p2r_add_sortkeys.py
4
3814
#!/usr/bin/python __author__ = 'Vlad Dubovskiy, DonorsChoose.org' # Takes raw or cleaned up schema, infers sortkeys from all constraints, assigns manual sortkeys and inferred sortkeys to tables, exports as a new schema file. # Usage: python p2r_add_sortkeys.py -i db_schema_clean.sql -o db_schema_final.sql import re i...
gpl-2.0
-6,626,431,401,281,253,000
39.147368
160
0.659675
false
rhyolight/nupic.son
app/soc/mapreduce/cache_list_items.py
1
1641
# Copyright 2013 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
apache-2.0
4,808,358,405,876,599,000
28.303571
79
0.729433
false
Abrackadabra/CloudBot
plugins/dramatica.py
33
1332
import re from urllib import parse from lxml import html import requests from cloudbot import hook from cloudbot.util import formatting api_url = "http://encyclopediadramatica.se/api.php" ed_url = "http://encyclopediadramatica.se/" @hook.command() def drama(text): """<phrase> - gets the first paragraph of the ...
gpl-3.0
4,564,413,650,858,513,400
28.6
95
0.644895
false
sysbot/CouchPotatoServer
couchpotato/core/providers/torrent/ilovetorrents/__init__.py
5
1983
from .main import ILoveTorrents def start(): return ILoveTorrents() config = [{ 'name': 'ilovetorrents', 'groups': [ { 'tab': 'searcher', 'list': 'torrent_providers', 'name': 'ILoveTorrents', 'description': 'Where the Love of Torrents is Born', ...
gpl-3.0
605,895,064,743,644,000
31.508197
99
0.347958
false
Fusion-Rom/android_external_chromium_org
tools/memory_inspector/memory_inspector/frontends/www_server.py
35
28613
# 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. """This module implements a simple WSGI server for the memory_inspector Web UI. The WSGI server essentially handles two kinds of requests: - /ajax/foo/bar:...
bsd-3-clause
2,631,374,592,987,371,500
36.600526
80
0.632649
false
lastship/plugin.video.lastship
resources/lib/modules/recaptcha/captcha9kw.py
2
2975
# -*- coding: UTF-8 -*- """ Lastship Add-on (C) 2019 Credits to Placenta and Covenant; our thanks go to their creators 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, eit...
gpl-3.0
-1,577,141,404,081,919,500
32.195402
157
0.547563
false
mahabs/nitro
nssrc/com/citrix/netscaler/nitro/resource/config/authentication/authenticationcertpolicy_vpnvserver_binding.py
1
5341
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
apache-2.0
-4,838,830,044,407,734,000
28.346154
145
0.709792
false
cheezium/seniordesign
arduo_joy/build/catkin_generated/installspace/_setup_util.py
4
10309
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2012, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source cod...
mit
8,130,460,454,100,689,000
40.236
158
0.675914
false
alexandrucoman/labs
python/solutii/alexandru_tudose/paint/cursor.py
5
1505
#!/usr/bin/env python # *-* coding: UTF-8 *-* """Tuxy dorește să împlementeze un nou paint pentru consolă. În timpul dezvoltării proiectului s-a izbit de o problemă pe care nu o poate rezolva singur și a apelat la ajutorul tău. Aplicația ține un istoric al tuturor mișcărilor pe care le-a făcut utlizatorul în fișieru...
mit
-8,207,332,963,981,705,000
27.490196
65
0.618032
false
brentp/methylcode
methylcoder/sanity_check.py
1
2397
from pyfasta import Fasta import sys import os import numpy as np def check_txt(txt, fa): f = Fasta(fa, flatten_inplace=True) for line in open(txt): seqid, mtype, bp, cs, ts = line.rstrip().split() bp = int(bp) mtype = int(mtype) assert mtype > 0 if mtype < 4: ...
bsd-3-clause
-9,056,002,846,849,222,000
28.9625
74
0.562787
false
pdellaert/ansible
lib/ansible/modules/cloud/google/gcp_storage_object.py
16
9980
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
gpl-3.0
-5,811,129,193,039,105,000
29.993789
123
0.609018
false
cisco-openstack/neutron
neutron/tests/unit/ipam/test_subnet_alloc.py
27
9443
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICEN...
apache-2.0
-1,965,950,730,658,608,600
50.043243
78
0.523457
false
axbaretto/beam
sdks/python/apache_beam/internal/windmill_service_pb2.py
2
9690
# # 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 us...
apache-2.0
2,961,241,021,045,849,600
58.085366
652
0.79257
false
rgommers/scipy
scipy/odr/odrpack.py
12
41982
""" Python wrappers for Orthogonal Distance Regression (ODRPACK). Notes ===== * Array formats -- FORTRAN stores its arrays in memory column first, i.e., an array element A(i, j, k) will be next to A(i+1, j, k). In C and, consequently, NumPy, arrays are stored row first: A[i, j, k] is next to A[i, j, k+1]. For e...
bsd-3-clause
-632,033,799,590,013,700
35.761821
97
0.583131
false
MIPS/external-deqp
framework/delibs/scripts/git-check.py
7
1690
# Script for checking which projects have unsubmitted modifications in them. # # Usage: # - recommended to add a alias/bat/sh for a shorter command # - running without parameters will check any existing known dE projects. # - can give projects names on command line, if only wish to check a sub-set # e.g., git-check.p...
apache-2.0
-7,436,733,265,433,103,000
23.142857
79
0.660947
false
rbuffat/pyidf
tests/test_curvechillerpartloadwithlift.py
1
6208
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.performance_curves import CurveChillerPartLoadWithLift log = logging.getLogger(__name__) class TestCurveChillerPartLoadWithLift(unittest.TestCase): def setUp(self): ...
apache-2.0
6,758,843,055,376,080,000
45.335821
116
0.685245
false
dmick/teuthology
teuthology/test/test_contextutil.py
3
1989
from pytest import raises from teuthology import contextutil from logging import ERROR class TestSafeWhile(object): def setup(self): contextutil.log.setLevel(ERROR) self.fake_sleep = lambda s: True self.s_while = contextutil.safe_while def test_6_5_10_deal(self): with raises(...
mit
6,726,763,939,141,251,000
28.25
77
0.536953
false
FrodeSolheim/fs-uae-launcher
launcher/extra/glowicon.py
1
10243
#!/usr/bin/env python3 import os import sys sys.path.insert(0, "../git/fs-uae-master/fs-uae-launcher") from PIL import Image, ImageFilter # from fsui.qt.qt import QApplication from fsui.qt.qt import QImage, QPainter, QSvgRenderer """ Module for creating glow-icon-alike effects on icons. Quick and dirty code. No eff...
gpl-2.0
-3,327,958,431,067,278,300
29.485119
82
0.559895
false
wawachoo/BDL
bdl/progress.py
1
4630
import threading import copy import time from collections import namedtuple ProgressState = namedtuple("ProgressState", ["count", "finished", "failed", "percentage"]) class Progress: def __init__(self, count=0, name=None): """Initializes object. Arg...
gpl-3.0
-2,175,473,359,973,949,700
28.119497
76
0.484233
false
clinton-hall/nzbToMedia
libs/common/mutagen/_senf/__init__.py
4
2775
# -*- coding: utf-8 -*- # Copyright 2016 Christoph Reiter # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify...
gpl-3.0
3,557,201,742,648,609,000
29.494505
77
0.713874
false
wtriplett/lonestar5_launch
launch_slurm_ls5.py
1
5224
#!/usr/bin/env python # launch script for stampede # deals with both command files for parametric launcher and with single commands import argparse import sys,os from tempfile import * import subprocess import math MAXCORES=4104 MAXNODES=171 # set up argument args def launch_slurm_ls5 (serialcmd='', script_name=''...
mit
4,205,118,558,536,959,500
33.368421
103
0.586332
false
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/toolz/tests/test_signatures.py
8
2927
import functools import toolz._signatures as _sigs from toolz._signatures import builtins, _is_valid_args, _is_partial_args from toolz.compatibility import PY3 def test_is_valid(check_valid=_is_valid_args, incomplete=False): orig_check_valid = check_valid check_valid = lambda func, *args, **kwargs: orig_check...
gpl-3.0
-5,542,759,133,621,346,000
32.643678
84
0.650495
false
olebole/astrometry.net
sdss/yanny.py
2
36973
# # yanny.py # # Python library for reading & writing yanny files. # # B. A. Weaver, NYU, 2008-10-20 # # $Id: yanny.py 141452 2012-12-18 00:12:50Z weaver $ # """Python library for reading & writing yanny files. yanny is an object-oriented interface to FTCL/yanny data files following these specifications_. The format ...
bsd-3-clause
-4,673,871,006,453,126,000
33.393488
116
0.531117
false
ebagdasa/tempest
tempest/api/object_storage/test_healthcheck.py
5
1669
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Author: Joe H. Rahme <joe.hakim.rahme@enovance.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.o...
apache-2.0
-6,382,049,158,230,826,000
35.282609
77
0.703415
false
repotvsupertuga/repo
plugin.video.projectxwizard/parameters.py
4
3239
import xbmc, xbmcaddon, xbmcgui, xbmcplugin,os,base64,sys,xbmcvfs import urllib2,urllib ############################ ###GET PARAMS############### ############################ def get_params(): url=None name=None buildname=None updated=None author=None version=None mode=None iconimage=None description=None v...
gpl-2.0
-3,997,719,982,741,725,000
19
68
0.615005
false
centaurialpha/ninja-ide
ninja_ide/__init__.py
1
2597
# -*- coding: utf-8 -*- # # This file is part of NINJA-IDE (http://ninja-ide.org). # # NINJA-IDE 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 # any later version. # # NIN...
gpl-3.0
-133,706,708,978,192,640
35.069444
79
0.530997
false
stephen144/odoo
addons/gamification/wizard/grant_badge.py
47
1391
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp.osv import fields, osv from openerp.tools.translate import _ from openerp.exceptions import UserError class grant_badge_wizard(osv.TransientModel): """ Wizard allowing to grant a badge to a user""" ...
agpl-3.0
8,782,658,006,548,667,000
35.605263
89
0.603882
false
initOS/odoo-addons
account_product_gross_net/models/product.py
1
4387
# -*- coding: utf-8 -*- from openerp import SUPERUSER_ID from openerp import models, fields, api from openerp.tools.float_utils import float_round import addons.decimal_precision as dp import logging _logger = logging.getLogger(__name__) class product_category(models.Model): _inherit = "product.category" b...
agpl-3.0
6,176,068,589,276,220,000
37.147826
153
0.615911
false
JonathanSwaim/Tjagonaj_Translator
en/_en-test.py
9
13466
# Put the en library in the same folder as your script so NodeBox can find # the library. It takes some time to load all the data the first time. try: # This is the statement you normally use. en = ximport("en") except: # But since these examples are "inside" the library # we may need to try something d...
gpl-2.0
8,471,973,854,487,513,000
39.981707
142
0.675867
false
nacc/autotest
client/tests/disktest/disktest.py
2
3171
import os, sys, subprocess, logging from autotest.client import test, utils from autotest.client.shared import error class disktest(test.test): """ Autotest module for disktest. Pattern test of the disk, using unique signatures for each block and each iteration of the test. Designed to check for data...
gpl-2.0
5,716,390,651,195,058,000
32.03125
79
0.557868
false
gentlecolts/booru-browse
DynamicMedia.py
1
7467
#!/usr/bin/python3 import gi gi.require_version("Gtk", "3.0") from gi.repository import Gtk, GObject, GdkPixbuf, Gdk import tempfile import cgi,posixpath import time import urllib.request,urllib.parse import os from shutil import copyfile from threading import Thread try: import math inf=math.inf except: inf=float...
mit
-8,868,115,301,672,362,000
24.748276
107
0.697603
false
guillermobox/mvc
pyrest.py
1
5115
import urlparse import json import traceback import os PROTOCOL_READ = 'GET' PROTOCOL_CREATE = 'POST' PROTOCOL_UPDATE = 'PUT' PROTOCOL_DELETE = 'DELETE' CRUD_MAPPING = { PROTOCOL_READ: 'read', PROTOCOL_CREATE: 'create', PROTOCOL_UPDATE: 'update', PROTOCOL_DELETE: 'delete' } class Reso...
apache-2.0
-4,963,824,253,229,612,000
31.373418
96
0.550342
false
LeMeteore/boomer2
note/models.py
1
5970
from django.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import AbstractBaseUser, Permission, Group from django.core.mail import send_mail from django.utils import timezone # Create your models here. class Note(models.Model): ...
bsd-2-clause
2,916,940,540,287,646,000
39.612245
79
0.652094
false
xinjiguaike/edx-platform
common/test/acceptance/tests/lms/test_teams.py
3
80434
""" Acceptance tests for the teams feature. """ import json import random import time from dateutil.parser import parse import ddt from nose.plugins.attrib import attr from uuid import uuid4 from ..helpers import EventsTestMixin, UniqueCourseTest from ...fixtures import LMS_BASE_URL from ...fixtures.course import Cou...
agpl-3.0
3,746,891,124,973,736,000
41.355977
119
0.616754
false
ebmdatalab/openprescribing
openprescribing/dmd/migrations/0003_auto_20191008_1141.py
1
42978
# -*- coding: utf-8 -*- # Generated by Django 1.11.24 on 2019-10-08 10:41 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('dmd', '0002_auto_20181007_1443'), ] operations = ...
mit
5,245,389,261,111,108,000
40.605034
223
0.571199
false
jbudynk/sherpa
versioneer.py
1
40390
# Version: 0.14 """ The Versioneer ============== * like a rocketeer, but for versions! * https://github.com/warner/python-versioneer * Brian Warner * License: Public Domain * Updated by Omar Laurino for the Chandra X-Ray Center * Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, and pypy * [![Latest Version] (https...
gpl-3.0
-4,857,791,568,113,578,000
37.503337
79
0.640332
false
CQTools/Wavemeter_switch
switch_server.py
1
3226
""" Created on Mon Sep 29 14:52:13 2014 @author: nick """ from flask import Flask, render_template, jsonify import requests import switchcontrol import time import ctypes import re wlm = ctypes.windll.wlmData # load the DLL uInt32 = ctypes.c_ulong uInt64 = ctypes.c_ulonglong double = ctypes.c_double long = ctypes....
mit
9,215,792,569,284,897,000
19.948052
133
0.67483
false
marc-sensenich/ansible
lib/ansible/modules/network/f5/bigiq_utility_license_assignment.py
22
20990
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
-2,593,861,278,805,888,000
31.643857
127
0.589233
false
mikelikespie/bazel
third_party/py/six/test_six.py
48
24674
import operator import sys import types import unittest import py import six def test_add_doc(): def f(): """Icky doc""" pass six._add_doc(f, """New doc""") assert f.__doc__ == "New doc" def test_import_module(): from logging import handlers m = six._import_module("logging.hand...
apache-2.0
-6,456,332,918,742,145,000
27.295872
97
0.588717
false
nmayorov/scipy
scipy/optimize/_lsq/common.py
21
20616
"""Functions used by least-squares algorithms.""" from math import copysign import numpy as np from numpy.linalg import norm from scipy.linalg import cho_factor, cho_solve, LinAlgError from scipy.sparse import issparse from scipy.sparse.linalg import LinearOperator, aslinearoperator EPS = np.finfo(float).eps # Fu...
bsd-3-clause
2,907,033,500,794,492,400
27.087193
79
0.57014
false
shaftoe/home-assistant
homeassistant/components/cover/lutron_caseta.py
5
1902
""" Support for Lutron Caseta SerenaRollerShade. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/cover.lutron_caseta/ """ import logging from homeassistant.components.cover import ( CoverDevice, SUPPORT_OPEN, SUPPORT_CLOSE) from homeassistant.compon...
apache-2.0
-5,067,780,650,745,974,000
29.677419
74
0.679811
false
bobhale/climate
havana-moonsong.py
2
3345
############################################################################ # A sample program read a data file, generate a midi file # and write to disk. ############################################################################ #Import the library from midiutil.MidiFile3 import MIDIFile from random import randint...
gpl-3.0
-137,747,492,866,787,630
23.962687
77
0.618236
false
falau/pogom
pogom/pgoapi/protos/POGOProtos/Networking/Requests/Messages/GetBuddyWalked_pb2.py
6
1920
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Networking/Requests/Messages/GetBuddyWalked.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message f...
mit
-4,002,278,688,682,819,600
29.967742
174
0.778646
false
zetaops/ulakbus
ulakbus/services/personel/hitap/hizmet_tazminat_ekle.py
1
1180
# -*- coding: utf-8 -*- # Copyright (C) 2015 ZetaOps Inc. # # This file is licensed under the GNU General Public License v3 # (GPLv3). See LICENSE.txt for details. """HITAP Tazminat Ekle Hitap'a personelin Tazminat bilgilerinin eklenmesini yapar. """ from ulakbus.services.personel.hitap.hitap_service import Zato...
gpl-3.0
3,348,967,054,435,488,300
29.153846
89
0.611395
false
lshain-android-source/external-chromium_org-tools-grit
grit/grd_reader.py
8
7246
#!/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. '''Class for reading GRD files into memory, without processing them. ''' import os.path import types import xml.sax import xml.sax...
bsd-2-clause
895,549,244,715,326,000
32.391705
84
0.678443
false
eduNEXT/edx-platform
common/lib/xmodule/xmodule/tests/test_video.py
4
49670
# pylint: disable=protected-access """Test for Video Xmodule functional logic. These test data read from xml, not from mongo. We have a ModuleStoreTestCase class defined in common/lib/xmodule/xmodule/modulestore/tests/django_utils.py. You can search for usages of this in the cms and lms tests for examples. You use thi...
agpl-3.0
-4,999,782,988,000,027,000
40.828138
206
0.583464
false
kyukyukyu/dash
dash/public/forms.py
1
1062
from flask_wtf import Form from wtforms import TextField, PasswordField from wtforms.validators import DataRequired from dash.user.models import User class LoginForm(Form): username = TextField('Username', validators=[DataRequired()]) password = PasswordField('Password', validators=[DataRequired()]) def...
bsd-3-clause
-6,477,607,392,999,295,000
31.181818
77
0.648776
false
badbytes/pymeg
meg/sensorsindexed.py
1
1574
"""Return sensors and headshape positions""" from pdf2py import pdf from numpy import zeros, array, size, append, reshape from pylab import * import matplotlib.axes3d as p3 import pylab as p class locations: def __init__(self, datapdf, channelinstance): pdfinstance=pdf.read(datapdf) chlpos=array([...
gpl-3.0
-5,065,316,598,131,933,000
32.489362
100
0.605464
false
markjin1990/solr
dev-tools/scripts/addVersion.py
2
8177
# 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 use ...
apache-2.0
-3,070,284,062,893,433,300
36.856481
111
0.678978
false
Azure/azure-sdk-for-python
sdk/databox/azure-mgmt-databox/azure/mgmt/databox/v2019_09_01/models/_models_py3.py
1
140334
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
-3,939,076,954,756,208,600
38.867614
504
0.656142
false
ssarangi/numba
numba/typing/listdecl.py
3
6524
from __future__ import absolute_import, print_function import random import numpy as np from .. import types from .templates import (ConcreteTemplate, AbstractTemplate, AttributeTemplate, CallableTemplate, Registry, signature, bound_function, make_callable_template) #...
bsd-2-clause
-5,609,010,772,477,457,000
27.489083
80
0.587523
false
ladybug-analysis-tools/ladybug-core
tests/psychrometrics_test.py
1
11148
# coding=utf-8 from ladybug.psychrometrics import humid_ratio_from_db_rh, enthalpy_from_db_hr, \ wet_bulb_from_db_rh, dew_point_from_db_rh, rel_humid_from_db_hr, \ rel_humid_from_db_enth, rel_humid_from_db_dpt, rel_humid_from_db_wb, \ dew_point_from_db_hr, dew_point_from_db_enth, dew_point_from_db_wb, \ ...
gpl-3.0
5,913,900,713,481,346,000
55.877551
110
0.658055
false
DCSaunders/tensorflow
tensorflow/contrib/layers/python/layers/regularizers.py
21
6968
# 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,572,463,907,771,781,600
34.55102
80
0.671929
false
linlife/Python
lin_jumper/author_agent/paramiko-1.10.1/paramiko/util.py
8
9621
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (a...
apache-2.0
-2,917,215,853,014,974,000
29.935691
125
0.583515
false
ibrahimgunduz34/SpiffWorkflow
tests/SpiffWorkflow/storage/DictionarySerializerTest.py
3
3771
# -*- coding: utf-8 -*- from __future__ import print_function, absolute_import, division from __future__ import division import sys, unittest, re, os dirname = os.path.dirname(__file__) sys.path.insert(0, os.path.join(dirname, '..', '..', '..')) from SpiffWorkflow.storage import DictionarySerializer from .SerializerT...
lgpl-3.0
1,582,650,164,624,637,000
40.9
140
0.592946
false
nexiles/odoo
addons/website_blog/controllers/main.py
16
16374
# -*- coding: utf-8 -*- import datetime import werkzeug from openerp import tools from openerp.addons.web import http from openerp.addons.web.http import request from openerp.addons.website.models.website import slug from openerp.osv.orm import browse_record from openerp.tools.translate import _ from openerp import S...
agpl-3.0
-4,335,421,845,214,459,000
44.73743
141
0.583669
false
haojunyu/numpy
numpy/polynomial/laguerre.py
75
55335
""" Objects for dealing with Laguerre series. This module provides a number of objects (mostly functions) useful for dealing with Laguerre series, including a `Laguerre` class that encapsulates the usual arithmetic operations. (General information on how this module represents and works with such polynomials is in th...
bsd-3-clause
-970,609,223,875,002,500
30.087079
79
0.592193
false
OpenAcademy-OpenStack/nova-scheduler
nova/virt/hyperv/vmutils.py
1
24595
# Copyright (c) 2010 Cloud.com, Inc # Copyright 2012 Cloudbase Solutions Srl / Pedro Navarro Perez # 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 # # ...
apache-2.0
4,676,667,965,965,371,000
41.25945
79
0.568937
false
winhamwr/selenium
py/selenium/webdriver/common/desired_capabilities.py
6
2073
# Copyright 2008-2009 WebDriver committers # Copyright 2008-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 requ...
apache-2.0
-3,696,197,680,889,022,000
23.388235
74
0.557164
false
zibraproject/zika-pipeline
scripts/vcftagprimersites.py
1
1475
#!/usr/bin/env python import vcf import sys import subprocess import csv from collections import defaultdict def read_bed_file(fn): bedfile = [] with open(fn) as csvfile: reader = csv.reader(csvfile, dialect='excel-tab') for row in reader: bedrow = {} bedrow['Primer_ID'] = row[3] if len(row) >= 6: ...
mit
-4,945,425,300,933,682,000
22.046875
57
0.621017
false
marionleborgne/nupic.research
tests/extended_temporal_memory/etm_apical_tiebreak_sequences_cpp_test.py
1
3265
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2017, 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...
agpl-3.0
8,968,199,195,047,110,000
35.685393
82
0.685145
false
Neuroglycerin/hail-seizure
testing/test_testing.py
1
31374
#!/usr/bin/env python3 import random import copy import numpy as np import sklearn.pipeline import json import unittest import glob import warnings import subprocess import os import python.utils as utils import csv import h5py class testHDF5parsing(unittest.TestCase): ''' Unittests for the function that par...
apache-2.0
-6,922,376,345,681,972,000
40.065445
90
0.460349
false
shootstar/novatest
nova/tests/api/openstack/compute/contrib/test_cloudpipe.py
4
7117
# 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
-4,627,176,863,973,704,000
39.4375
78
0.586202
false
sony/nnabla
python/src/nnabla/utils/cli/train.py
1
30077
# Copyright 2017,2018,2019,2020,2021 Sony 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...
apache-2.0
5,872,953,492,563,490,000
39.102667
141
0.562789
false
dirtycoder/pets
pets/users/tests/test_view_confirm_information.py
1
1181
from django.shortcuts import resolve_url from django.test import TestCase from users.models import OwnerProfile class ConfirmInformationTest(TestCase): def test_redirect_to_confirmation(self): """User not confirmed should be redirected to the edit page""" self.create_user(False) self.clie...
mit
2,501,567,590,391,385,000
31.805556
72
0.651143
false
YanTangZhai/tf
tensorflow/python/training/input_test.py
1
20244
# Copyright 2015 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 a...
apache-2.0
-8,867,017,069,121,812,000
36.144954
80
0.621715
false
thalamus/Flexget
flexget/utils/requests.py
4
6668
from __future__ import unicode_literals, division, absolute_import import urllib2 import time import logging from datetime import timedelta, datetime from urlparse import urlparse import requests # Allow some request objects to be imported from here instead of requests from requests import RequestException, HTTPError ...
mit
7,999,690,331,971,007,000
35.043243
119
0.664667
false
fbradyirl/home-assistant
homeassistant/components/zha/core/channels/closures.py
1
2113
""" Closures channels module for Zigbee Home Automation. For more details about this component, please refer to the documentation at https://home-assistant.io/components/zha/ """ import logging import zigpy.zcl.clusters.closures as closures from homeassistant.core import callback from homeassistant.helpers.dispatche...
apache-2.0
-6,521,440,783,508,737,000
29.623188
84
0.667298
false
passalis/sef
examples/supervised_reduction.py
1
2019
# License: MIT License https://github.com/passalis/sef/blob/master/LICENSE.txt from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np import sklearn from sklearn.discriminant_analysis import LinearDiscriminantAnalysis from sef_dr.classification import evaluate_svm from se...
mit
6,662,112,117,549,750,000
38.588235
117
0.655275
false
wujuguang/sqlalchemy
test/ext/test_horizontal_shard.py
1
23390
import datetime import os from sqlalchemy import Column from sqlalchemy import DateTime from sqlalchemy import event from sqlalchemy import Float from sqlalchemy import ForeignKey from sqlalchemy import inspect from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import sql from sqlalchemy im...
mit
8,308,047,299,078,057,000
30.103723
79
0.561479
false
HybridF5/tempest_debug
tempest/common/validation_resources.py
5
5292
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
apache-2.0
-4,435,317,734,439,661,600
43.847458
79
0.606954
false
FabriceSalvaire/python-project-template
RootModule/Logging/ExceptionHook.py
1
5874
#################################################################################################### # # @Project@ - @ProjectDescription@. # Copyright (C) Fabrice Salvaire 2013 # #################################################################################################### ####################################...
gpl-3.0
-750,957,015,245,716,500
31.815642
109
0.418965
false
mancoast/CPythonPyc_test
cpython/260_test_linuxaudiodev.py
56
3142
from test import test_support test_support.requires('audio') from test.test_support import findfile, TestSkipped, run_unittest import errno linuxaudiodev = test_support.import_module('linuxaudiodev', deprecated=True) import sys import sunaudio import audioop import unittest SND_FORMAT_MULAW_8 = 1 class LinuxAudioDe...
gpl-3.0
4,618,113,464,172,099,000
31.061224
87
0.594526
false