repo_name
stringlengths
6
61
path
stringlengths
4
230
copies
stringlengths
1
3
size
stringlengths
4
6
text
stringlengths
1.01k
850k
license
stringclasses
15 values
hash
int64
-9,220,477,234,079,998,000
9,219,060,020B
line_mean
float64
11.6
96.6
line_max
int64
32
939
alpha_frac
float64
0.26
0.9
autogenerated
bool
1 class
ratio
float64
1.62
6.1
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
edudev/web-reply
main.py
1
3741
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
gpl-3.0
-6,929,323,172,212,185,000
30.436975
73
0.62764
false
4.070729
false
false
false
ondrokrc/gramps
gramps/gui/filters/sidebar/_placesidebarfilter.py
1
6941
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # Copyright (C) 2008 Gary Burton # Copyright (C) 2010,2015 Nick Hall # # 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 #...
gpl-2.0
3,899,255,514,207,689,700
36.928962
79
0.550209
false
4.08775
false
false
false
tomschr/dbassembly
tests/conftest.py
1
5064
# # Copyright (c) 2016 SUSE Linux GmbH. All rights reserved. # # This file is part of dbassembly. # # This program is free software; you can redistribute it and/or # modify it under the terms of version 3 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed ...
gpl-3.0
-6,572,018,554,139,390,000
29.142857
79
0.615916
false
3.968652
true
false
false
joeyac/JudgeServer
server/oj_hdu.py
1
6321
# -*- coding: utf-8 -*- from utils import logger from update_status import update_submission_status from exception import VLoginFailed, VSubmitFailed from bs4 import BeautifulSoup import html5lib import urllib, urllib2, cookielib import time class HDU: # base information: URL_HOME = 'http://acm.hdu.edu.cn/' ...
mit
749,099,588,081,799,400
29.414634
113
0.517562
false
3.625
false
false
false
egnyte/python-egnyte
egnyte/tests/test_events.py
1
1095
from egnyte.tests.config import EgnyteTestCase FOLDER_NAME = 'EVENT' class TestEvents(EgnyteTestCase): def setUp(self): super(TestEvents, self).setUp() self.root_folder.create() def test_filter_poll(self): events = self.egnyte.events events = events.filter(events.oldest_event...
mit
-4,517,023,570,790,461,400
36.758621
91
0.655708
false
3.625828
true
false
false
fedspendingtransparency/data-act-broker-backend
tests/unit/dataactbroker/test_obligations.py
1
1240
from dataactbroker.handlers.submission_handler import get_submission_stats from tests.unit.dataactcore.factories.job import SubmissionFactory from tests.unit.dataactcore.factories.staging import TotalObligationsFactory def test_obligation_stats_for_submission_nonzero(database): submission = SubmissionFactory() ...
cc0-1.0
4,771,918,235,712,121,000
36.575758
113
0.718548
false
3.780488
false
false
false
ericblau/ipf-xsede
ipf/run_workflow.py
1
4459
############################################################################### # Copyright 2014 The University of Texas at Austin # # # # Licensed under the Apache License, Version 2.0 (the "License"); #...
apache-2.0
7,934,452,383,603,104,000
42.291262
119
0.462884
false
4.852013
false
false
false
Statoil/libecl
python/ecl/grid/ecl_grid.py
1
58619
# Copyright (C) 2011 Equinor ASA, Norway. # # The file 'ecl_grid.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT 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 Licens...
gpl-3.0
-7,425,087,570,827,664,000
39.764256
184
0.584401
false
3.580005
false
false
false
dankolbman/NumericalAnalysis
Homeworks/HW2/Problem5ii.py
1
3007
import math import scipy.interpolate as intrp import numpy as np import matplotlib.pyplot as plt from matplotlib import rc rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) ## for Palatino and other serif fonts use: #rc('font',**{'family':'serif','serif':['Palatino']}) rc('text', usetex=True) font = {'fa...
mit
68,324,508,218,959,170
22.492188
63
0.55005
false
2.194891
false
false
false
Exa-Networks/scavengerexa
lib/scavenger/policy/factory.py
1
7596
#!/usr/bin/env python # encoding: utf-8 """ factory.py Created by Thomas Mangin on 2009-01-10. Copyright (c) 2008 Exa Networks. All rights reserved. See LICENSE for details. """ import time from zope.interface import Interface, implements from plugin import response class IMailPolicyFactory (Interface): def policeM...
agpl-3.0
507,496,064,263,646,660
30.38843
185
0.674039
false
3.312691
false
false
false
mvs-org/metaverse
test/test-rpc-v3/utils/bitcoin_script.py
3
1920
from pybitcoin.transactions.scripts import script_to_hex from pybitcoin.hash import bin_double_sha256, bin_hash160 from pybitcoin.address import bin_hash160_to_address template = ''' OP_IF OP_2 %(Alice)s %(Bob)s OP_2 OP_CHECKMULTISIG OP_ELSE %(Sequence)s OP_CHECKSEQUENCEVERIFY OP_DROP %(Alice)s OP_CHECKSIG OP_END...
agpl-3.0
-3,748,611,327,729,627,000
39.87234
232
0.822396
false
2.209436
false
false
false
i3visio/osrframework
osrframework/wrappers/pending/bebee.py
1
4625
# !/usr/bin/python # -*- coding: cp1252 -*- # ################################################################################## # # Copyright 2016-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) # # This program is part of OSRFramework. You can redistribute it and/or modify # it under the ter...
agpl-3.0
7,676,508,236,301,960,000
38.862069
172
0.535035
false
4.066843
false
false
false
josiah-wolf-oberholtzer/supriya
supriya/enums.py
1
12624
from collections.abc import Sequence from uqbar.enums import IntEnumeration, StrictEnumeration class AddAction(IntEnumeration): """ An enumeration of scsynth node add actions. """ ### CLASS VARIABLES ### ADD_TO_HEAD = 0 ADD_TO_TAIL = 1 ADD_BEFORE = 2 ADD_AFTER = 3 REPLACE = 4 ...
mit
8,999,538,610,394,238,000
20.803109
87
0.570501
false
3.079024
false
false
false
eldie1984/Scripts
MPF/pentaho/daemon_barrio.py
1
2521
#coding: utf-8 import logging import time from sys import argv,exit,path import threading from os import environ path.insert(0, environ['SCRIPTS_HOME']) path.insert(1, environ['SCRIPTS_HOME'][:-8]) from commons import * logging.basicConfig(format=FORMAT,level=logging.INFO) from daemon import runner class App(): ...
gpl-2.0
-7,568,935,834,134,904,000
28.670588
89
0.550179
false
3.601429
false
false
false
jualjiman/knowledge-base
src/knowledge_base/utils/signals.py
1
1415
# -*- coding: utf-8 -*- from knowledge_base.utils.decorators import skip_signal from knowledge_base.utils.string_representations import make_slug from knowledge_base.utils.thumbnails import make_thumbnail @skip_signal() def generate_slug(sender, instance, created, **kwargs): """ Generates a slug for every giv...
apache-2.0
8,079,996,806,884,068,000
26.745098
79
0.650177
false
4.340491
false
false
false
insiderr/insiderr-app
app/screens/welcome.py
1
5622
from kivy.logger import Logger from screens import InteractiveScreen from config import tutorial_path from kivy.properties import ObjectProperty, OptionProperty, BooleanProperty, StringProperty, NumericProperty from kivy.uix.image import Image from kivy.uix.floatlayout import FloatLayout from kivy.uix.behaviors import ...
gpl-3.0
-7,147,254,144,436,556,000
34.1375
108
0.59534
false
4.149077
false
false
false
flightcom/freqtrade
freqtrade/fiat_convert.py
1
6182
import logging import time from pymarketcap import Pymarketcap logger = logging.getLogger(__name__) class CryptoFiat(): # Constants CACHE_DURATION = 6 * 60 * 60 # 6 hours def __init__(self, crypto_symbol: str, fiat_symbol: str, price: float) -> None: """ Create an object that will cont...
gpl-3.0
-8,155,509,983,424,285,000
35.364706
98
0.574571
false
3.935073
false
false
false
CodigoSur/cyclope
cyclope/apps/articles/migrations/0016_remove_picture_article.py
2
17075
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): # depends_on = ( # ("cyclope", "0015_fk_2_M2M_pictures_data"), # ) def forwards(self, orm): # Deleting field 'Article.picture' ...
gpl-3.0
-768,111,009,741,101,000
84.80402
204
0.553382
false
3.666524
false
false
false
ytsvetkov/TuringMachine
parsing/input_parser.py
1
1622
import sys import re class SyntacticError(Exception): def __init__(self, message): self.message = message user_tape_regex = r'^\s*\(.*,.,.*\)\s*$' user_states_regex = r'^([0-9]*,)*[0-9]+$' user_initial_regex = r'^[0-9]+$' user_rule_regex = r'^\([0-9]{1,},.,.,.,[0-9]{1,},(Left|None|Right)\)$' def pars...
gpl-3.0
3,111,628,886,738,354,700
29.603774
76
0.606658
false
3.290061
false
false
false
macosforge/ccs-calendarserver
twistedcaldav/test/test_stdconfig.py
1
6138
# -*- coding: utf-8 -*- ## # Copyright (c) 2005-2017 Apple 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 ...
apache-2.0
1,329,087,385,722,438,100
31.802139
115
0.614607
false
3.957419
true
false
false
longmazhanfeng/interface_web
interface_platform/rfit/HttpLibrary.py
1
18018
# -*- coding: UTF-8 -*- import urllib2 import cookielib import urllib import httplib2 import poster import json import sys import base64 import requests reload(sys) sys.setdefaultencoding('utf-8') class HttpLibrary(object): """Http Client""" global host # host = 'https://my.qiye.yixin.im' host = 'ht...
mit
-2,289,345,511,508,745,700
40.896471
208
0.556779
false
3.696492
false
false
false
chimeno/wagtail
wagtail/tests/migrations/0005_auto_20141008_0122.py
3
1084
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0002_initial_data'), ('tests', '0004_auto_20141008_0420'), ] operations = [ migrations.CreateModel( ...
bsd-3-clause
-4,484,322,285,801,456,600
29.971429
114
0.531365
false
4.388664
false
false
false
hankcs/HanLP
hanlp/components/parsers/parse_alg.py
1
10872
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2020-04-02 23:20 from collections import defaultdict from hanlp.components.parsers.chu_liu_edmonds import decode_mst import numpy as np class Tarjan: """Computes Tarjan's algorithm for finding strongly connected components (cycles) of a graph""" def __init__(se...
apache-2.0
-5,322,751,009,263,247,000
34.070968
119
0.560706
false
3.537911
false
false
false
grochmal/capybara
src/util/graph-school.py
1
2297
#!/usr/bin/env python import os,sys import numpy as np import pandas as pd import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt __doc__ = ''' Usage: graph-school.py <dataset> <index column> <feature out> <sorted out> ''' def avgs(dat, idx, fout, sout): schools = [ 'renaissance' ...
gpl-3.0
6,906,900,306,652,100,000
30.040541
78
0.542011
false
3.108254
false
false
false
veger/ansible
lib/ansible/modules/network/f5/bigip_hostname.py
3
9323
#!/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
1,529,788,985,031,791,000
28.410095
101
0.598091
false
4.107048
false
false
false
newmediamedicine/indivo_server_1_0
indivo/models/fact_objects/vitals.py
1
1155
""" Indivo Model for Vitals """ from fact import Fact from django.db import models from django.conf import settings class Vitals(Fact): name = models.CharField(max_length=100) name_type = models.CharField(max_length=80, null=True) name_value = models.CharField(max_length=40, null=True) name_abbrev = models.Ch...
gpl-3.0
4,515,700,823,577,375,000
38.827586
64
0.758442
false
3.147139
false
false
false
jonparrott/gcloud-python
bigtable/google/cloud/bigtable/table.py
2
34708
# Copyright 2015 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 or agreed to in writing, s...
apache-2.0
-2,126,930,044,904,904,200
39.171296
79
0.620116
false
4.232167
false
false
false
openchordcharts/openchordcharts-api
openchordcharts_api/controllers/charts.py
2
9218
# -*- coding: utf-8 -*- # Open Chord Charts -- Database of free chord charts # By: Christophe Benz <contact@openchordcharts.org> # # Copyright (C) 2012 Christophe Benz # https://github.com/openchordcharts/ # # This file is part of Open Chord Charts. # # Open Chord Charts is free software; you can redistribute it and/...
agpl-3.0
2,694,175,666,760,201,700
38.393162
112
0.466913
false
4.58607
true
false
false
spring-week-topos/cinder-week
cinder/volume/drivers/zadara.py
3
26060
# Copyright (c) 2012 Zadara Storage, 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.apac...
apache-2.0
-2,693,120,071,967,204,000
38.129129
79
0.526669
false
4.231206
true
false
false
chitrangpatel/presto
lib/python/psr_utils.py
2
69236
import numpy as Num import numpy.fft as FFT import Pgplot, ppgplot, bisect, sinc_interp, parfile from scipy.stats import histogram from scipy.special import ndtr, ndtri, chdtrc, chdtri, fdtr, i0, kolmogorov from scipy.optimize import leastsq import scipy.optimize.zeros as zeros from psr_constants import * isintorlong ...
gpl-2.0
-6,768,480,292,747,545,000
38.249433
95
0.571162
false
3.028564
false
false
false
goldeneye-source/ges-python
ges/GamePlay/GunTrade.py
1
10612
################ Copyright 2005-2016 Team GoldenEye: Source ################# # # This file is part of GoldenEye: Source's Python Library. # # GoldenEye: Source's Python Library 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 So...
gpl-3.0
-6,168,713,502,720,763,000
42.314286
217
0.651715
false
3.582714
false
false
false
markgw/pimlico
src/python/pimlico/core/dependencies/licenses.py
1
5685
# This file is part of Pimlico # Copyright (C) 2020 Mark Granroth-Wilding # Licensed under the GNU LGPL v3.0 - https://www.gnu.org/licenses/lgpl-3.0.en.html """ Software licenses, for referring to in software dependency documentation. Literals here are used to refer to the licenses that software uses. See https://ch...
gpl-3.0
9,130,525,526,853,532,000
39.319149
118
0.753386
false
4.026204
false
false
false
MobleyLab/Lomap
lomap/graphgen.py
2
39722
#****************** # MODULE DOCSTRING #****************** """ LOMAP: Graph generation ===== Alchemical free energy calculations hold increasing promise as an aid to drug discovery efforts. However, applications of these techniques in discovery projects have been relatively few, partly because of the difficulty of...
mit
5,039,775,959,600,353
35.677747
209
0.562509
false
4.271642
false
false
false
zyga/plainbox
setup.py
2
1216
#!/usr/bin/env python3 # This file is part of Checkbox. # # Copyright 2012 Canonical Ltd. # Written by: # Zygmunt Krynicki <zygmunt.krynicki@canonical.com> # # Checkbox 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 Fo...
gpl-3.0
210,228,250,651,786,050
31
70
0.713816
false
3.684848
false
false
false
Cog-Creators/Red-DiscordBot
redbot/core/bank.py
3
28666
from __future__ import annotations import asyncio import logging from datetime import datetime, timezone from typing import Union, List, Optional, TYPE_CHECKING, Literal from functools import wraps import discord from redbot.core.utils import AsyncIter from redbot.core.utils.chat_formatting import humanize_number fr...
gpl-3.0
-1,633,177,258,842,648,800
26.405354
98
0.599246
false
4.042589
true
false
false
rspavel/spack
var/spack/repos/builtin/packages/r-ncdf4/package.py
5
1824
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RNcdf4(RPackage): """Provides a high-level R interface to data files written using Unidata...
lgpl-2.1
-6,404,480,735,709,509,000
54.272727
96
0.758772
false
3.428571
false
false
false
woutdenolf/spectrocrunch
scraps/ffnoisesimul.py
1
9053
# -*- coding: utf-8 -*- import os, sys sys.path.insert(1, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from spectrocrunch.materials.compoundfromformula import compoundfromformula from spectrocrunch.materials.compoundfromname import compoundfromname from spectrocrunch.materials.mixture import mixture ...
mit
5,490,147,310,723,721,000
28.106109
96
0.589593
false
3.395349
false
false
false
martinwicke/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/distribution_util_test.py
5
13735
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-8,454,266,680,957,920,000
35.823056
80
0.627375
false
3.384672
true
false
false
s-silva/roadhouse
Server/tools/database-init.py
1
3975
#!/usr/bin/python import sys import pymongo def main(args): # If your database server is running in auth mode, you will need user and # database info. Ex: # mongodb_uri = 'mongodb://username:password@localhost:27017/dbname' # mongodb_uri = 'mongodb://localhost:27017' db_name = 'roadhouse'...
lgpl-2.1
-5,710,898,928,369,122,000
41.297872
85
0.490566
false
4.574223
false
false
false
cemarchi/biosphere
Src/BioAnalyzer/Managers/GenePrioritization/DataIntegratorManager.py
1
2195
from typing import Dict from yaak import inject import paginate from Src.BioAnalyzer.CrossCutting.DTOs.GenePrioritization.DataIntegrationDto import DataIntegrationDto from Src.BioAnalyzer.CrossCutting.Filters.GenePrioritization.FeSingleDataIntegration import FeSingleDataIntegration from Src.BioAnalyzer.DataAccess.Enti...
bsd-3-clause
2,711,308,980,709,018,000
38.214286
125
0.613212
false
4.295499
false
false
false
mattliston/examples
example009.py
1
5626
# wget http://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt # THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python example009.py from __future__ import division import numpy as np import theano import theano.tensor as T import lasagne as L import argparse import time from six.moves import cPickle np.set_print...
mit
1,036,101,989,835,955,000
42.953125
273
0.690899
false
2.91805
true
false
false
decause/hflossk
hflossk/blueprints.py
1
1542
import os from flask import Blueprint from flask.ext.mako import render_template homework = Blueprint('homework', __name__, template_folder='templates') lectures = Blueprint('lectures', __name__, template_folder='templates') quizzes = Blueprint('quizzes', __name__, template_folder='templates') @homework.route('/', ...
apache-2.0
3,167,597,891,608,636,400
34.860465
75
0.568093
false
3.528604
false
false
false
zamudio-fabian/ri
repositories/CorpusRepository.py
1
1045
#!/usr/bin/env python # -*- coding: utf-8 -*- import codecs from os import listdir from models.Documento import * from os.path import relpath,join class CorpusRepository: path = '' documentos = [] def __init__(self,path): self.path = path def getListDocuments(self): self.documentos =...
mit
1,656,043,298,754,695,000
30.666667
105
0.640805
false
3.824176
false
false
false
jonobrien/School_Backups
cs1-python/Homework/week 10/myListIter.py
1
9811
#!/usr/local/bin/python3 """ Author: Jon O'Brien Due Date: 11/9/13 Assignment: linked list homework File: myListRec.py Author: Sean Strout <sps@cs.rit.edu> Language: Python 3 Description: An iterative implementation of a node based single linked list data structure. Purpose: LECTURE VERSION """ from myNode impor...
gpl-3.0
6,148,938,740,121,813,000
25.879452
79
0.564163
false
4.30874
false
false
false
muraliselva10/cloudkitty-dashboard
cloudkittydashboard/dashboards/admin/pyscripts/views.py
1
3397
# Copyright 2015 Objectif Libre # # 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 agr...
apache-2.0
-1,410,229,382,648,221,400
36.32967
78
0.688549
false
3.89118
false
false
false
http2d/core
lib/libchula/gen-config.py
2
2132
#!/usr/bin/env python import os, re, sys CONFIG_H = """\ #ifndef CONFIG_H_ #define CONFIG_H_ /* Detected headers */ ${{includes}} /* Functions */ ${{functions}} /* Sizes */ ${{sizes}} /* Definitions */ ${{definitions}} #endif /* CONFIG_H_ */ """ PATH_SRC = sys.argv[1] PATH_BIN = sys.argv[2] FILENAME_CMK = os.path...
bsd-2-clause
8,433,817,983,938,177,000
29.028169
84
0.588649
false
2.559424
true
false
false
AnnieJumpCannon/RAVE
article/figures/plot_hrd_test_color.py
1
2417
import locale import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib.colors import LogNorm from matplotlib.ticker import MaxNLocator locale.setlocale(locale.LC_ALL, 'en_US') try: rave_cannon_dr1 except NameError: from rave_io import rave_cannon_dr1 else: print("Usi...
mit
-7,570,299,001,141,537,000
25
104
0.60571
false
2.50207
false
false
false
kirmani/hlpr_cadence
third_party/vector_v1/vector_common/vector_ros/src/vector/vector_teleop_full_system.py
1
20366
"""-------------------------------------------------------------------- COPYRIGHT 2016 Stanley Innovation Inc. Software License Agreement: The software supplied herewith by Stanley Innovation Inc. (the "Company") for its licensed SI Vector Platform is intended and supplied to you, the Company's customer, for use so...
mit
5,692,273,246,121,122,000
46.2529
170
0.5191
false
3.918045
true
false
false
imsally/redash
tests/models/test_alerts.py
13
1361
from tests import BaseTestCase from redash.models import Alert, db class TestAlertAll(BaseTestCase): def test_returns_all_alerts_for_given_groups(self): ds1 = self.factory.data_source group = self.factory.create_group() ds2 = self.factory.create_data_source(group=group) query1 = s...
bsd-2-clause
-1,555,532,253,955,384,600
34.815789
79
0.664952
false
3.516796
true
false
false
icyflame/batman
tests/ui_tests.py
1
28350
# -*- coding: utf-8 -*- """Tests for the user interface.""" # # (C) Pywikibot team, 2008-2015 # # Distributed under the terms of the MIT license. # # NOTE FOR RUNNING WINDOWS UI TESTS # # Windows UI tests have to be run using the tests\ui_tests.bat helper script. # This will set PYTHONPATH and PYWIKIBOT2_DIR, and then...
mit
2,106,241,176,758,903,000
31.732247
98
0.627841
false
3.822322
true
false
false
bruecksen/isimip
isi_mip/climatemodels/forms.py
1
27809
from django import forms from django.core.exceptions import ValidationError from django.forms import inlineformset_factory, ClearableFileInput from django.utils.safestring import mark_safe from dateutil.parser import parse from isi_mip.climatemodels.fields import MyModelSingleChoiceField, MyModelMultipleChoiceField fr...
mit
-8,307,859,549,264,177,000
49.378623
536
0.647272
false
4.066832
false
false
false
rosswhitfield/mantid
Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectTransmissionMonitorTest.py
3
1609
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + impo...
gpl-3.0
-3,429,622,365,907,997,700
38.243902
138
0.708515
false
3.849282
true
false
false
talavis/kimenu
parser.py
1
11741
#!/usr/bin/env python3 # Copyright (c) 2014-2020, Linus Östberg # 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 code must retain the above copyright notice, this #...
bsd-3-clause
4,986,862,459,494,774,000
26.942721
94
0.566963
false
3.614696
false
false
false
0--key/lib
portfolio/2013_OrSys/stuff/scratches.py
1
7606
# MySQL unneccesary functions: def insertNewSupplier(form_data, userID): # @@ """All necessary convertations, validations and insertions there""" raw_data = {} # a single dictionary # lets prepare data to processing iDkeys = [ 'supplier', 'line1', 'city', 'province', 'zip', 'firstnam...
apache-2.0
1,865,513,079,236,741,600
32.804444
82
0.570208
false
3.334502
false
false
false
FabienGreard/DetectCocaPy
robotCoke/component.py
1
1417
# Class to for the global value of a component class RobotComponent(object): pin1 = None pin2 = None position = None def __init__(self, board, pin1, pin2=None, position=None): self.pin1 = board.get_pin(pin1) if pin2 != None: self.pin2 = board.get_pin(pin2) if positio...
gpl-3.0
-4,035,162,867,894,250,500
22.616667
62
0.553987
false
3.490148
false
false
false
hetica/bentools
modules/vennFromKad/vennFromKad.py
1
2236
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys, os __appname__ = "vennFromKad" __licence__ = "none" __version__ = "0.1" __author__ = "Benoit Guibert <benoit.guibert@free.fr>" __shortdesc__ = "Build a file for a venn diagram from kad output" __opts__ = [] def main(parent): args = argsChk(parent) f...
gpl-3.0
-2,063,184,588,625,783,600
26.268293
76
0.457066
false
3.47205
false
false
false
moul/alfred-workflow-pingport
src/workflow.py
1
3528
# -*- coding: utf-8 -*- import os import ConfigParser import time import socket import subprocess import alfred def tcp_port_status(host, port): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.settimeout(1) try: s.connect((host, int(port))) s.shutdown(2) return True e...
mit
3,071,026,989,103,077,400
33.930693
80
0.470238
false
4.460177
false
false
false
siggame/Creer
creer/utilities.py
1
2052
import re import os import collections import operator def extend(d, u): for k, v in u.items(): if isinstance(v, collections.Mapping): r = extend(d.get(k, {}), v) d[k] = r else: d[k] = u[k] return d def list_dirs(path): folders = [] while path != ""...
mit
165,453,380,058,000,770
24.974684
100
0.570175
false
3
false
false
false
bluef0x/Dataproject
Code/loadin.py
1
3116
''' Jeroen Meijaard 10611002 ''' import json import os import errno import calendar import sys import time from dateutil import parser def loadTwitterData(filepath='00.json'): ''' Load in twitterdata''' twitterData = [] print 'Loading', filepath # get data from file to array with open(filepath) as data_file: ...
mit
4,275,324,881,465,816,600
22.081481
84
0.640244
false
2.895911
false
false
false
all-of-us/raw-data-repository
rdr_service/lib_fhir/fhirclient_1_0_6/models/healthcareservice.py
1
11306
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 1.0.2.7202 (http://hl7.org/fhir/StructureDefinition/HealthcareService) on 2016-06-23. # 2016, SMART Health IT. from . import domainresource class HealthcareService(domainresource.DomainResource): """ The details of a healthcare service avail...
bsd-3-clause
2,485,395,729,182,734,300
41.02974
113
0.627101
false
4.546039
false
false
false
SCECcode/BBP
bbp/utils/misc/gen_station_grid.py
1
1763
#!/usr/bin/env python """ Copyright 2010-2019 University Of Southern California 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 appli...
apache-2.0
-2,315,007,829,536,662,000
31.054545
76
0.619399
false
3.759062
false
false
false
wienerschnitzel/schnitzelserver
schnitzelserver/modules_builtin/access_control/user.py
1
1577
from sqlalchemy import Column, Integer, String, Boolean, Numeric, ForeignKey from sqlalchemy.orm import relationship from sqlalchemy.ext.declarative import declared_attr from schnitzelserver.models.modelbase import SchnitzelBase, inherits class GroupMembership(SchnitzelBase): __tablename__ = 'schnitzel_group_mem...
lgpl-3.0
9,040,040,697,108,493,000
28.754717
86
0.667724
false
3.763723
false
false
false
RAPD/RAPD
src/cloud/handlers/cloud_handler_reindex.py
1
10141
""" This file is part of RAPD Copyright (C) 2016-2018 Cornell University All rights reserved. RAPD 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 Free Software Foundation, version 3. RAPD is distributed in the hope that it will ...
agpl-3.0
8,719,385,646,900,597,000
38.306202
100
0.556848
false
4.282517
false
false
false
engdan77/edoAutoHomeMobile
twisted/cred/test/test_cred.py
3
14714
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.cred}, now with 30% more starch. """ from zope.interface import implements, Interface from twisted.trial import unittest from twisted.cred import portal, checkers, credentials, error from twisted.python import components ...
mit
-8,630,387,330,935,826,000
32.517084
114
0.605478
false
3.913298
true
false
false
digistam/recon-ng
modules/recon/domains-hosts/google_site_api.py
1
1558
import module # unique to module from urlparse import urlparse class Module(module.Module): def __init__(self, params): module.Module.__init__(self, params, query='SELECT DISTINCT domain FROM domains WHERE domain IS NOT NULL ORDER BY domain') self.info = { 'Name': 'Google CSE ...
gpl-3.0
4,255,562,045,877,445,600
40
182
0.507702
false
4.823529
false
false
false
bharel/PinnacleFileFinder
PinnacleFileFinder.py
1
5095
""" Name : PinnacleFileFinder.py Usage : PinnacleFileFinder.py -h Author : Bar Harel Description: - Takes a .AXP file and creates a list of all the used files in that pinnacle project with their order and time of appearance. - The list can be output as a text file or .csv for use with programs like Excel ...
mit
-6,050,888,270,007,522,000
25.541667
151
0.672031
false
3.08414
false
false
false
Karaage-Cluster/karaage-debian
karaage/common/passwords.py
1
1901
# Copyright 2014-2015 VPAC # Copyright 2014 The University of Melbourne # # This file is part of Karaage. # # Karaage 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 y...
gpl-3.0
-5,339,375,146,943,122,000
34.203704
71
0.738559
false
4.061966
false
false
false
mathiasertl/django-xmpp-server-list
xmpp/plugins/rosterver.py
1
1637
# This file is part of django-xmpp-server-list # (https://github.com/mathiasertl/django-xmpp-server-list) # # django-xmpp-server-list 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 Lic...
gpl-3.0
125,941,615,756,715,860
33.829787
82
0.718387
false
3.737443
false
false
false
robinlombaert/ComboCode
cc/modeling/codes/ModelingSession.py
3
9935
# -*- coding: utf-8 -*- """ Interface for creating modeling environments. Author: R. Lombaert """ import os from time import gmtime import types import cc.path from cc.tools.io import DataIO class ModelingSession(object): """ The basic modeling environment. Inherited by MCMax() and Gastronoom(). ...
gpl-3.0
-1,328,444,157,775,239,400
37.065134
82
0.473981
false
4.822816
false
false
false
kwilliams-mo/iris
lib/iris/fileformats/pp.py
1
66319
# (C) British Crown Copyright 2010 - 2013, Met Office # # This file is part of Iris. # # Iris 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 3 of the License, or # (at your option) any l...
gpl-3.0
-8,502,837,758,948,939,000
35.101796
124
0.571103
false
3.811656
false
false
false
xgvargas/fsaipe
setup.py
1
1090
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup import pkg_resources import codecs import fsaipe with codecs.open('README.rst', encoding='utf-8') as f: long_description = f.read() with open("requirements.txt", "r") as f: install_requires = [str(req) for req in pkg_resources.parse_...
apache-2.0
4,929,373,236,578,159,000
28.459459
80
0.644954
false
3.745704
false
false
false
electionleaflets/electionleaflets
electionleaflets/apps/leaflets/management/commands/leaflets_import_legacy.py
1
3863
# -*- coding: utf-8 -*- import os from django.core.management.base import BaseCommand from django.conf import settings from django.core.files import File from legacy.models import legacyLeaflet, legacyParty from leaflets.models import Leaflet, LeafletImage from constituencies.models import Constituency from uk_polit...
mit
-6,455,352,814,939,578,000
35.433962
83
0.511134
false
4.184182
false
false
false
leiferikb/bitpop
build/scripts/slave/recipe_modules/v8/chromium_config.py
1
2205
# Copyright 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. from slave.recipe_config import BadConf from slave.recipe_config_types import Path from slave import recipe_config from RECIPE_MODULES.chromium import CONFIG...
gpl-3.0
-5,664,300,842,167,193,000
26.222222
74
0.678005
false
2.794677
true
false
false
DrDos0016/z2
museum_site/migrations/0009_auto_20160816_2215.py
1
1270
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-08-16 22:15 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('museum_site', '0008_article_page'), ] operations = [ migrations.AddField( ...
mit
-7,044,724,493,369,413,000
27.222222
74
0.534646
false
4.45614
false
false
false
IshitaTakeshi/pyleargist
src/leargist/__init__.py
1
4832
import os from ctypes import POINTER from ctypes import pointer from ctypes import Structure from ctypes import c_float from ctypes import c_int from ctypes import c_void_p import numpy as np leargist_folder = os.path.abspath(__file__).rsplit(os.path.sep, 1)[0] leargist_name = "_gist" libleargist = np.ctypeslib.load_l...
gpl-3.0
-730,454,892,452,331,400
32.324138
77
0.639487
false
3.249496
false
false
false
Magicked/crits
crits/targets/forms.py
6
3689
from django import forms from django.forms.utils import ErrorList from crits.campaigns.campaign import Campaign from crits.core import form_consts from crits.core.forms import add_bucketlist_to_form, add_ticket_to_form from crits.core.handlers import get_item_names from crits.vocabulary.relationships import Rel...
mit
-4,767,154,713,998,922,000
48.547945
117
0.578477
false
4.329812
false
false
false
log2timeline/dfvfs
dfvfs/file_io/ewf_file_io.py
2
2685
# -*- coding: utf-8 -*- """The EWF image file-like object.""" import pyewf from dfvfs.file_io import file_object_io from dfvfs.lib import errors from dfvfs.lib import ewf from dfvfs.resolver import resolver class EWFFile(file_object_io.FileObjectIO): """File input/output (IO) object using pyewf.""" def __init_...
apache-2.0
3,331,993,765,310,807,000
28.833333
76
0.674115
false
3.734353
false
false
false
HomeRad/TorCleaner
wc/webgui/PageTemplates/PathIterator.py
1
1632
# -*- coding: iso-8859-1 -*- ############################################################################## # # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.0 (ZPL). A copy of the ZPL should accompany t...
gpl-2.0
-6,210,051,324,867,083,000
33.723404
78
0.585172
false
4.387097
false
false
false
slesta/PyTcRRD
tc_graph.py
1
4529
#!/usr/bin/env python # -*- coding: utf-8 -*- import time import os from tcvars import * import datetime from pyrrd.rrd import RRD, RRA, DS from pyrrd.graph import DEF, CDEF, VDEF from pyrrd.graph import LINE, AREA, GPRINT, PRINT, COMMENT from pyrrd.graph import ColorAttributes, Graph def Tcgraph(): exampleNum...
mit
4,879,050,164,547,318,000
31.804348
116
0.553469
false
2.857323
false
false
false
AaroC357/emr-sample-apps
similarity/convert_netflix.py
3
3957
# Copyright 2011-2013 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
apache-2.0
8,507,274,734,254,621,000
28.75188
78
0.622189
false
3.243443
false
false
false
pywinauto/pywinauto
pywinauto/unittests/test_application_linux.py
1
6365
# TODO crossplatform join these tests with test_application.py import sys import os import unittest import subprocess import time sys.path.append(".") from pywinauto.application import WindowSpecification # noqa: E402 if sys.platform.startswith('linux'): from pywinauto.controls import atspiwrapper # register ats...
bsd-3-clause
5,091,827,292,493,186,000
38.78125
108
0.612726
false
4.209656
true
false
false
robcarver17/pysystemtrade
sysexecution/orders/base_orders.py
1
14482
import numpy as np from copy import copy import datetime from syscore.genutils import none_to_object, object_to_none, list_of_ints_with_highest_common_factor_positive_first from syscore.objects import no_order_id, no_children, no_parent from sysexecution.trade_qty import tradeQuantity from sysobjects.production.trad...
gpl-3.0
-2,154,468,956,604,465,000
29.684322
125
0.609101
false
3.759605
false
false
false
lzkill/tor-info
tor-desc.py
1
1497
#!/usr/bin/python #------------------------------------------ # # A script to periodically download a # Tor relay's descriptor and write it to # the disk # # Author : Luiz Kill # Date : 21/11/2014 # # http://lzkill.com # #------------------------------------------ import os import sys import time from stem....
mit
3,801,384,245,225,023,000
25.732143
76
0.629927
false
3.198718
false
false
false
ucb-sejits/opentuner
tests/test_api.py
1
4002
from __future__ import print_function import unittest import argparse import opentuner from opentuner.api import TuningRunManager from opentuner.measurement.interface import DefaultMeasurementInterface from opentuner.resultsdb.models import Result from opentuner.search.manipulator import ConfigurationManipulator, Inte...
mit
-3,940,359,246,342,667,000
41.585106
83
0.565967
false
4.631944
true
false
false
hersche/MultiSms
contents/code/widget.py
1
6282
from PyQt4.QtCore import Qt, SIGNAL from PyQt4.QtGui import QGraphicsLinearLayout from PyKDE4.plasma import Plasma from PyKDE4 import plasmascript from PyKDE4.kdeui import KMessageBox from PyKDE4.kdecore import i18n, KStandardDirs from pluginmanager import PluginManager import providerplugins.Provider import adressplug...
gpl-2.0
-307,377,277,973,551,400
46.590909
151
0.632442
false
3.868227
true
false
false
archlinux/archweb
devel/management/commands/generate_keyring.py
1
2864
# -*- coding: utf-8 -*- """ generate_keyring command Assemble a GPG keyring with all known developer keys. Usage: ./manage.py generate_keyring <keyserver> <keyring_path> """ from django.core.management.base import BaseCommand, CommandError import logging import subprocess import sys from devel.models import Master...
gpl-2.0
6,337,956,910,007,053,000
29.795699
79
0.632332
false
3.479951
false
false
false
lpryszcz/bin
sam2aligned.py
1
1557
#!/usr/bin/env python """ Parse SAM file and output only pairs with at least one read aligned. Compatible with bowtie/bwa output - one entry per read. SAM file has to be sorted by read name. USAGE: samtools view -St yeast_chromosomes.fa.fai 409.sam -f3 | sam2aligned.py > 409.aligned.sam """ from datetime import ...
gpl-3.0
4,649,627,124,544,415,000
24.52459
151
0.589595
false
3.052941
false
false
false
aaxelb/SHARE
share/regulate/steps/deduplicate.py
2
2376
from share.regulate.steps import GraphStep class Deduplicate(GraphStep): """Look for duplicate nodes and merge/discard them Example config (YAML): ```yaml - namespace: share.regulate.steps.graph name: deduplicate ``` """ MAX_MERGES = 100 # map from concrete type...
apache-2.0
6,816,239,275,741,650,000
32.942857
76
0.551768
false
4.110727
false
false
false
PaloAltoNetworks/minemeld-core
minemeld/ft/table.py
1
17277
# Copyright 2015 Palo Alto 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 required by applicable law or agre...
apache-2.0
-6,170,540,603,090,287,000
30.876384
90
0.545465
false
3.843604
false
false
false
tyrchen/vint
vint/vint.py
1
5823
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging import os from cerf_api import Cerf from file_util import Template, FileUtil from misc import calc_time_spent __author__ = 'tchen' logger = logging.getLogger(__name__) class InterviewManager(object): def __init__(self, id=None): ...
mit
-4,617,329,500,744,596,000
33.455621
110
0.58372
false
3.838497
false
false
false
scott-maddox/simplepl
src/simplepl/main_window.py
1
29283
# # Copyright (c) 2013-2014, Scott J Maddox # # This file is part of SimplePL. # # SimplePL 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 Free Software Foundation, either version 3 of the # License, or (at your opt...
agpl-3.0
-198,206,169,742,506,020
39.558172
79
0.620428
false
4.308224
true
false
false
RPGOne/Skynet
pytorch-master/torch/nn/_functions/thnn/activation.py
1
3547
import torch from torch.autograd.function import Function, InplaceFunction from torch._thnn import type2backend from . import _all_functions class PReLU(Function): def forward(self, input, weight): self._backend = type2backend[type(input)] output = input.new() self.num_parameters = weigh...
bsd-3-clause
6,557,805,048,038,104,000
26.076336
63
0.54525
false
4.168038
false
false
false
abar193/LearningApp
Backend/rest/notes.py
1
1576
from flask import Flask, request, send_from_directory, jsonify import rest.database as database import os app = Flask(__name__) if os.path.isdir('./src'): ROOT_DIR = './src/' else: ROOT_DIR = '../../src/' @app.route("/") def hello(): return send_from_directory(ROOT_DIR, 'index.html') @app.route('/js/<pa...
mit
-5,742,563,153,957,349,000
22.878788
62
0.657995
false
3.102362
false
false
false
dnxbjyj/python-basic
gui/wxpython/wxPython-demo-4.0.1/samples/floatcanvas/ClickableBoxes.py
1
3070
#!/usr/bin/env python """ This is a little demo of how to make clickable (and changeable) objects with FloatCanvas Also an example of constant size, rather than the usual zooming and panning Developed as an answer to a question on the wxPYhton mailing lilst: "get panel id while dragging across several panels' ...
mit
1,658,421,705,508,089,900
24.798319
101
0.513355
false
4.023591
false
false
false
petrblahos/modellerkit
step06/production.py
1
5481
from collections import namedtuple import datetime import random import hotmodel ProcessOperation = namedtuple("ProcessOperation", [ "operation", "act", ]) ProductOperation = namedtuple("ProductOperation", [ "operation", "tm", "workplace", ]) class Server(object): """ ...
mit
3,351,073,700,658,054,700
33.134615
100
0.555191
false
4.018328
false
false
false
demisto/content
Packs/FeedIntel471/Integrations/Intel471MalwareIndicator/Intel471MalwareIndicator.py
1
6628
import jmespath import demistomock as demisto from CommonServerPython import * from JSONFeedApiModule import * # noqa: E402 from typing import Dict DEFAULT_COUNT = 100 SEARCH_PARAMS = { 'indicator': 'indicator', 'from': 'from', 'until': 'until', 'threat_type': 'threatType', 'malware_family': 'malw...
mit
7,709,804,647,605,894,000
38.218935
116
0.61557
false
3.713165
false
false
false
m4h7/juriscraper
juriscraper/oral_args/united_states/federal_appellate/cadc.py
2
2046
"""Scraper for D.C. Circuit of Appeals CourtID: cadc Court Short Name: cadc Author: Andrei Chelaru Reviewer: mlr Date created: 18 July 2014 """ from datetime import datetime, date from juriscraper.OralArgumentSite import OralArgumentSite class Site(OralArgumentSite): def __init__(self, *args, **kwargs): ...
bsd-2-clause
3,309,089,422,167,154,000
34.275862
128
0.583089
false
3.177019
false
false
false
ldoktor/autotest
client/virt/scripts/virtio_console_guest.py
4
27772
#!/usr/bin/python # -*- coding: utf-8 -*- """ Auxiliary script used to send data between ports on guests. @copyright: 2010 Red Hat, Inc. @author: Jiri Zupka (jzupka@redhat.com) @author: Lukas Doktor (ldoktor@redhat.com) """ import threading from threading import Thread import os, select, re, random, sys, array, stat i...
gpl-2.0
3,521,360,449,427,522,600
28.89451
81
0.478359
false
4.0296
false
false
false
garretstuber/lightning-python
lightning/main.py
1
6976
import requests from .session import Session from .visualization import Visualization, VisualizationLocal class Lightning(object): def __init__(self, host="http://localhost:3000", local=False, ipython=False, auth=None, size='medium'): if ipython: self.startup_message_ipython() else: ...
mit
-3,404,102,391,427,864,600
33.369458
107
0.578698
false
4.23301
false
false
false
trong-nguyen/udacity-fullstack
aws_lambda/trongn/proxy.py
1
4789
import os import json import urllib from base64 import b64encode # external libs import requests class Proxy(object): URL = None ACCESS_TOKEN = None def __init__(self): super(Proxy, self).__init__() def build_query(self, params): return urllib.urlencode(params) def buil...
gpl-3.0
-5,885,370,068,204,638,000
27.005848
81
0.554604
false
4.19352
false
false
false