repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
openvstorage/arakoon
pylabs/test/server/quick/test_client_lib.py
1
1890
""" Copyright (2010-2014) INCUBAID BVBA 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, so...
apache-2.0
-1,131,830,869,059,534,800
34
75
0.562963
false
4.029851
false
false
false
Thurion/EDSM-RSE-for-EDMC
Backgroundworker.py
1
2388
""" EDSM-RSE a plugin for EDMC Copyright (C) 2019 Sebastian Bauer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Thi...
gpl-2.0
678,412,927,906,021,000
32.608696
118
0.632328
false
4.110155
false
false
false
ovcrash/geoip-attack-map
DataServer/syslog-gen.py
1
1948
#!/usr/bin/python3 import random, syslog from sys import exit from time import sleep #syslog_path = '/var/log/syslog/' port_list = [ 0, 1, 20, 21, 22, 23, 25, 40, 43, 53, 80, ...
gpl-3.0
371,194,105,848,068,600
26.43662
85
0.268994
false
5.797619
false
false
false
draios/python-sdc-client
examples/dashboard_backup_v1_restore_v2.py
1
1709
#!/usr/bin/env python # # Save the first user dashboard to file and then use create_dashboard_from_file() # to apply the stored dasboard again with a different filter. # import sys from sdcclient import SdMonitorClient from sdcclient import SdMonitorClientV1 # # Parse arguments # if len(sys.argv) != 5: print(( ...
mit
-6,236,592,850,024,548,000
25.703125
91
0.643066
false
3.030142
false
false
false
mapr/sahara
sahara/plugins/mapr/services/swift/swift.py
1
1854
# Copyright (c) 2015, MapR Technologies # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
apache-2.0
4,631,164,114,704,599,000
35.352941
78
0.683927
false
3.678571
false
false
false
DavidAndreev/indico
indico_zodbimport/modules/networks.py
1
2990
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
gpl-3.0
-2,274,356,279,102,685,200
40.527778
115
0.626087
false
4.002677
false
false
false
joaormatos/anaconda
Anaconda/release/make_dist.py
1
3494
# Copyright (c) Mathias Kaerlev 2012. # This file is part of Anaconda. # Anaconda 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. # ...
gpl-3.0
-3,242,928,090,785,773,600
30.205357
71
0.688895
false
3.217311
false
false
false
samuelcolvin/JuliaByExample
deps/build.py
1
8258
#!/usr/bin/python """ This script generates a simple website showing examples and an about page. The about page is generated from README.md and the examples are a concatenation of a description markdown file and the examples. The "julia sources examples" are taken verbatim from the julia source code: https://github....
mit
-5,121,403,770,089,996,000
39.480392
115
0.603657
false
3.324477
false
false
false
the-it/WS_THEbotIT
tools/test_template_handler.py
1
12193
from unittest import TestCase from tools.template_handler import TemplateHandler test_title = "vorlage" test_title_sperr = "Sperrsatz" test_title_test = "testtitle" test_string_argument_1 = "1=test1" test_string_argument_1_no_key = "test1" test_string_argument_2 = "2=test2" test_string_argument_3 = "test3" test_stri...
mit
-4,280,143,740,737,833,500
57.855072
119
0.564557
false
3.292703
true
false
false
nicfit/eyed3
eyed3/plugins/xep_118.py
1
1600
from pathlib import Path from xml.sax.saxutils import escape from eyed3.plugins import LoaderPlugin from eyed3.utils.console import printMsg class Xep118Plugin(LoaderPlugin): NAMES = ["xep-118"] SUMMARY = "Outputs all tags in XEP-118 XML format. "\ "(see: http://xmpp.org/extensions/xep-0118.htm...
gpl-2.0
5,556,477,815,858,504,000
34.555556
99
0.58125
false
3.501094
false
false
false
CospanDesign/verilog-visualizer
verilogviz/view/matplot_lib_widget.py
1
1522
from PyQt4.Qt import * from PyQt4.QtCore import * from PyQt4.QtGui import * from matplotlib.backends import qt4_compat from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg from matplotlib.figure import Figure #from matp...
gpl-2.0
-3,476,196,191,035,770,000
23.15873
80
0.634691
false
3.912596
false
false
false
cghr/cghr-chef-repository
cookbooks/trac/files/default/plugins-stock/revision_links.py
1
2160
"""Sample Wiki syntax extension plugin.""" from genshi.builder import tag from trac.core import * from trac.util.text import shorten_line from trac.versioncontrol.api import NoSuchChangeset, RepositoryManager from trac.versioncontrol.web_ui import ChangesetModule from trac.wiki.api import IWikiSyntaxProvider revisio...
apache-2.0
37,705,845,417,431,660
37.571429
100
0.586574
false
3.905967
false
false
false
Kivvix/stage-LPC
compareSrc/data/sqlcl.py
1
3255
#!/usr/bin/python2 """>> sqlcl << command line query tool by Tamas Budavari <budavari@jhu.edu> Usage: sqlcl [options] sqlfile(s) Options: -s url : URL with the ASP interface (default: pha) -f fmt : set output format (html,xml,csv - default: csv) -q query : specify query on the command line -l :...
mit
2,702,793,862,215,250,400
23.232558
110
0.612903
false
2.818182
false
false
false
meck93/hs17-datavis-ex
ex4/ex4_task4.py
1
1679
# -*- coding: utf-8 -*- """ Data Visualization HS 17 - Exercise 4 Moritz Eck - 14-715-296 """ import ex4_reader as data_reader import matplotlib.pyplot as plt import numpy as np # z-value constants MIN_HEIGHT = 0.035 MAX_HEIGHT = 19.835 STEP_SIZE = 0.2 # desired height HEIGHT = 1.0 # x-values: list containing the h...
mit
3,054,575,912,814,792,000
22.661972
67
0.714116
false
2.966431
false
false
false
arrabito/DIRAC
Interfaces/API/Dirac.py
1
98785
""" DIRAC API Class All DIRAC functionality is exposed through the DIRAC API and this serves as a source of documentation for the project via EpyDoc. The DIRAC API provides the following functionality: - A transparent and secure way for users to submit jobs to the Grid, monitor them and re...
gpl-3.0
-2,685,843,893,400,082,400
36.646723
165
0.619861
false
3.927677
false
false
false
dbentley/pants
src/python/pants/help/help_printer.py
1
4035
# 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 sys from pan...
apache-2.0
6,728,683,942,428,738,000
35.681818
102
0.640149
false
4.06754
false
false
false
etherealpost/etherealpost.com
etherealpost/db/db.py
1
17493
import json import math from etherealpost.db import helpers from etherealpost.db.cache import Cache from etherealpost.db.helpers import gold_string, time_left_string from etherealpost.db.item import Item import time from etherealpost.db.realm import Realm from etherealpost.db.realm_name import RealmName class Db(ob...
mit
3,258,545,019,466,609,700
33.502959
79
0.475219
false
3.797872
false
false
false
nicowollenzin/Raspi_GPIO_examles
LEDs/ampel.py
1
1750
######################################################################## # ampel.py - Trafficlight simulation # # Copyright (C) 2013 Nico Wollenzin # # This file is part of Raspi_GPIO_Examples. # # ampel.py is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
gpl-2.0
3,021,520,744,642,059,000
24.362319
72
0.600571
false
3.301887
false
false
false
cmunk/protwis
construct/migrations/0002_auto_20180117_1457.py
3
1640
# Generated by Django 2.0.1 on 2018-01-17 13:57 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('ligand', '0001_initial'), ('construct', '0001_initial'), ] operations = [ migra...
apache-2.0
-4,431,017,242,828,026,400
33.893617
131
0.615854
false
4.141414
false
false
false
gditzler/Miscellaneous-IPython-Notebooks
src/bmu.py
1
2924
#!/usr/bin/env python import json import numpy import scipy.sparse as sp from optparse import OptionParser __author__ = "Gregory Ditzler" __copyright__ = "Copyright 2014, EESI Laboratory (Drexel University)" __credits__ = ["Gregory Ditzler"] __license__ = "GPL" __version__ = "0.1.0" __maintainer__ = "Gregory Ditzler...
gpl-3.0
4,695,000,150,303,280,000
29.778947
79
0.645007
false
3.476813
false
false
false
ekarlso/python-odlclient
odlclient/v2/ovsdb.py
1
1844
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # Author: Endre Karlson <endre.karlson@hp.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/lice...
apache-2.0
7,632,807,913,050,004,000
39.977778
75
0.631236
false
3.505703
false
false
false
yannikbehr/spectroscopy
src/spectroscopy/class_factory.py
1
32926
""" Generate classes defined in the datamodel. """ import collections from copy import deepcopy import datetime import hashlib import inspect from uuid import uuid4 import warnings import weakref import numpy as np import tables import spectroscopy.util class ResourceIdentifier(object): """ Unique identifie...
gpl-3.0
-3,116,162,365,405,412,400
34.442411
79
0.53031
false
4.33465
false
false
false
ALPSCore/CT-HYB
tutorials/tutorial0/plot.py
1
3599
import numpy as np import matplotlib.pyplot as plt import pylab import h5py def read_param(h5, name): if '/parameters/dictionary/'+name in h5: return h5['/parameters/dictionary/'+name].value elif '/parameters/'+name in h5: return h5['/parameters/'+name].value else: raise RuntimeErro...
gpl-2.0
8,024,045,240,136,776,000
30.295652
133
0.601
false
2.567047
false
false
false
egel/blog
fabfile.py
1
2466
from fabric.api import * import fabric.contrib.project as project import os import shutil import sys import SocketServer from pelican.server import ComplexHTTPRequestHandler # Local path configuration (can be absolute or relative to fabfile) env.deploy_path = 'output' DEPLOY_PATH = env.deploy_path # Remote server co...
gpl-3.0
-6,074,505,324,896,450,000
25.234043
76
0.657745
false
3.605263
false
false
false
losonczylab/Zaremba_NatNeurosci_2017
scripts/FigS12_all_conditions_enrichment_model.py
1
3772
"""Figure S12 - All conditions enrichment model""" FIG_FORMAT = 'svg' import matplotlib as mpl if FIG_FORMAT == 'svg': mpl.use('agg') elif FIG_FORMAT == 'pdf': mpl.use('pdf') elif FIG_FORMAT == 'interactive': mpl.use('TkAgg') import matplotlib.pyplot as plt import cPickle as pickle import seaborn.apionly ...
mit
-5,067,075,796,666,854,000
32.678571
79
0.6307
false
2.727404
false
false
false
ikben/troposphere
examples/DynamoDB_Tables_OnDemand.py
1
6548
#!/usr/bin/python from troposphere import ( Template, If, NoValue, Equals, Ref, Output, Parameter ) from troposphere.dynamodb import ( KeySchema, AttributeDefinition, Projection, ProvisionedThroughput, Table, GlobalSecondaryIndex ) template = Template() template.se...
bsd-2-clause
3,515,053,229,599,871,500
27.593886
76
0.622022
false
4.268579
false
false
false
RoozbehFarhoodi/McNeuron
McNeuron/Neuron.py
1
70044
import sys import numpy as np from numpy import mean, cov, dot, transpose from numpy import linalg as LA import math from scipy.sparse import csr_matrix from __builtin__ import str from copy import deepcopy import matplotlib.pyplot as plt from numpy.linalg import inv #np.random.seed(0) class Neuron(object): """Ne...
mit
2,015,097,327,887,328,300
36.984816
515
0.546885
false
3.382298
false
false
false
tooxie/blatt
blatt/api/resources.py
1
2976
# -*- coding: utf-8 -*- from flask.ext.restful import fields from blatt.api.fields import (RelatedResource, Geolocation, InstanceURL, ForeignKeyField) from blatt.api.restful import BlattResource from blatt.persistence import session, Publication, Article, Journalist, Media class Article...
agpl-3.0
4,782,923,363,249,512,000
30
78
0.580309
false
4.162238
false
false
false
nrudenko/anarcho
anarchoApp/anarcho/routes/apps.py
1
2840
from anarcho.models.token import Token from anarcho.models.user import User from flask.json import jsonify import os from anarcho import storage_worker, app, db from anarcho.serializer import serialize from anarcho.access_manager import app_permissions, login_required from flask.helpers import send_file from anarcho.mo...
mit
7,978,958,861,447,964,000
30.910112
85
0.687324
false
3.242009
false
false
false
carthach/essentia
test/src/unittests/filters/test_movingaverage.py
1
2087
#!/usr/bin/env python # Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia 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 (FSF), e...
agpl-3.0
8,423,727,334,861,143,000
28.394366
79
0.662674
false
3.857671
true
false
false
stuarthodgson/cocotb
cocotb/regression.py
2
16392
''' Copyright (c) 2013 Potential Ventures Ltd Copyright (c) 2013 SolarFlare Communications 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 code must retain the above c...
bsd-3-clause
-2,425,440,293,360,589,000
37.843602
79
0.555698
false
4.63837
true
false
false
aametwally/cloudSACA
cloudSACA_Azure/EHPC-Server.py
1
3280
#!/usr/bin/python from Crypto.PublicKey import RSA from Crypto import Random import socket,threading,subprocess,os,base64,xml.dom.minidom import config,PBS,Response,Request,ServerJob as Job JOBS={} EOM="\n\n###" def startServer(): port=int(config.port) s = socket.socket(socket.AF_INET,socket.SOCK_STREAM) ...
gpl-3.0
-6,639,096,629,647,590,000
32.814433
104
0.602439
false
3.340122
false
false
false
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/scripts/tests/test_runlaunchpad.py
1
6240
# Copyright 2009 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Tests for runlaunchpad.py""" __metaclass__ = type __all__ = [ 'CommandLineArgumentProcessing', 'ServersToStart', ] import os import shutil import tempfile import...
agpl-3.0
-9,127,931,084,640,641,000
34.862069
78
0.6125
false
4.007707
true
false
false
repotvsupertuga/tvsupertuga.repository
script.module.streamtvsupertuga/lib/resources/lib/sources/it/cinemamega.py
1
3673
import re import requests,time import base64 import xbmc,xbmcaddon from ..scraper import Scraper from ..common import clean_search, clean_title,send_log,error_log dev_log = xbmcaddon.Addon('script.module.universalscrapers').getSetting("dev_log") from ..modules import cfscrape class cinemamega(Scraper): domains = ...
gpl-2.0
6,013,707,584,222,948,000
47.328947
142
0.519466
false
3.866316
false
false
false
ccmbioinfo/mugqic_pipelines
bfx/exonerate.py
1
1803
#!/usr/bin/env python ################################################################################ # Copyright (C) 2014, 2015 GenAP, McGill University and Genome Quebec Innovation Centre # # This file is part of MUGQIC Pipelines. # # MUGQIC Pipelines is free software: you can redistribute it and/or modify # it und...
lgpl-3.0
-6,422,750,426,001,053,000
40.953488
115
0.637826
false
3.936681
false
false
false
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/PyQt4/QtNetwork/QNetworkCookie.py
1
4052
# encoding: utf-8 # module PyQt4.QtNetwork # from /usr/lib/python3/dist-packages/PyQt4/QtNetwork.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore class QNetworkCookie(): # skipped bases: <class 'sip.simplewrapper'> """ QNetworkCookie(QByteArray nam...
gpl-2.0
6,562,310,998,037,599,000
32.766667
106
0.615499
false
4.047952
false
false
false
SCECcode/BBP
bbp/comps/plot_srf.py
1
20917
#!/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
-5,708,014,791,711,826,000
32.201587
80
0.553569
false
3.326495
false
false
false
hugobarzano/NoInventory
Selenium/test_catalogo.py
1
2397
# -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException...
gpl-3.0
-2,864,360,374,179,841,000
38.95
117
0.652065
false
3.699074
true
false
false
kakunbsc/enigma2.1
lib/python/Components/config.py
1
46098
from enigma import getPrevAsciiCode from Tools.NumericalTextInput import NumericalTextInput from Tools.Directories import resolveFilename, SCOPE_CONFIG, fileExists from Components.Harddisk import harddiskmanager from copy import copy as copy_copy from os import path as os_path from time import localtime, strftime # Co...
gpl-2.0
-5,019,229,601,695,854,000
25.584775
195
0.664454
false
2.98717
true
false
false
rero/reroils-app
rero_ils/modules/loans/api.py
1
6190
# -*- coding: utf-8 -*- # # This file is part of RERO ILS. # Copyright (C) 2017 RERO. # # RERO ILS is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any lat...
gpl-2.0
-3,418,947,965,592,303,000
33.971751
78
0.609208
false
3.69994
false
false
false
google/nsscache
nss_cache/maps/shadow.py
1
2400
# Copyright 2007 Google Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the ho...
gpl-2.0
9,021,171,384,939,344,000
32.802817
75
0.652917
false
3.953871
false
false
false
mr3bn/DAT210x
Module2/assignment4.py
1
2346
import pandas as pd # TODO: Load up the table, and extract the dataset # out of it. If you're having issues with this, look # carefully at the sample code provided in the reading df = pd.read_html('http://espn.go.com/nhl/statistics/player/_/stat/points/sort/points/year/2015/seasontype/2', header=1)[0] # TODO: Renam...
mit
8,383,620,943,496,560,000
31.583333
244
0.689685
false
3.165992
false
false
false
dlowder-salesforce/advent2016
advent06.py
1
1068
import sys, os import re pathname = os.path.dirname(sys.argv[0]) f = open(pathname + '/input06.txt','r') input = f.read().strip().split('\n') letters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] def frequencyMap(s): m = {} for i in range(len(let...
gpl-3.0
7,397,833,635,566,431,000
20.36
115
0.586142
false
2.926027
false
false
false
lichong012245/django-lfs-0.7.8
lfs/manage/views/carts.py
1
10423
# python imports from datetime import datetime from datetime import timedelta # django imports from django.contrib.auth.decorators import permission_required from django.core.paginator import Paginator from django.http import HttpResponse from django.shortcuts import render_to_response from django.template.loader impo...
bsd-3-clause
-5,679,406,835,815,099,000
30.020833
104
0.614506
false
3.686947
false
false
false
boriel/zxbasic
src/arch/zx48k/peephole/pattern.py
1
4181
# -*- coding: utf-8 -*- import re import itertools from typing import Dict from typing import List from typing import Optional RE_SVAR = re.compile(r'(\$(?:\$|[0-9]+))') RE_PARSE = re.compile(r'(\s+|"(?:[^"]|"")*")') class BasicLinePattern: """ Defines a pattern for a line, like 'push $1' being $1 a patte...
gpl-3.0
-789,134,962,122,211,800
30.674242
96
0.532169
false
3.846366
false
false
false
dhongu/l10n-romania
l10n_ro_account_bank_statement_import_mt940_ing/tests/test_import_bank_statement.py
1
1411
# Copyright (C) 2016 Forest and Biomass Romania # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import base64 from odoo.tests.common import TransactionCase from odoo.modules.module import get_module_resource class TestINGImport(TransactionCase): """Run test to import MT940 BRD import.""" ...
agpl-3.0
5,554,827,728,480,217,000
41.757576
100
0.659816
false
3.343602
true
false
false
yuyakanemoto/neural-style-loss
neural_style_loss_multi.py
1
3697
import os import scipy.misc import pandas as pd from argparse import ArgumentParser import time from neural_style_loss import styleloss, imread # default arguments OUTPUT = 'output.csv' LAYER_WEIGHT_EXP = 1 VGG_PATH = 'imagenet-vgg-verydeep-19.mat' POOLING = 'max' NORMALIZE = 1 VERBOSE = 1 TIMEIT = 1 def build_parse...
mit
-4,748,993,838,807,096,000
36.343434
159
0.58561
false
3.831088
false
false
false
iagcl/data_pipeline
data_pipeline/db/db_query_results.py
1
2506
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
3,803,351,040,096,441,300
29.560976
79
0.598962
false
4.313253
false
false
false
Sberned/djaio
djaio/core/urlconf.py
1
1777
#!-*- coding: utf-8 -*- import inspect from collections import namedtuple from aiohttp.web import UrlDispatcher from aiohttp import hdrs from aiohttp.test_utils import make_mocked_request VERBS = [ hdrs.METH_GET.lower(), hdrs.METH_POST.lower(), hdrs.METH_PUT.lower(), hdrs.METH_DELETE.lower() ] class ...
apache-2.0
8,866,033,871,370,243,000
28.131148
88
0.604389
false
3.498031
false
false
false
stplaydog/OPTKIT
scripts/data_analysis.py
1
12608
# # Copy right YMSys, 2015,2016 Zhaoming Yin # # @brief This script performs data analytics # 1) it can list: # name, numV, numE, numCC, avgDiam, varDiam, avgCluCoeff, varCluCoeff # 2) it can draw distribution of # clique, truss # # # MODIFIED (MM/DD/YY) ...
gpl-3.0
-1,100,012,202,485,038,300
38.898734
158
0.531726
false
3.2859
false
false
false
luizfelippesr/galmag
galmag/halo_profiles.py
1
5922
# Copyright (C) 2017,2018,2019,2020 Luiz Felippe S. Rodrigues <luizfelippesr@alumni.usp.br> # # This file is part of GalMag. # # GalMag 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 L...
gpl-3.0
2,771,070,054,194,636,300
29.525773
91
0.60689
false
3.384
false
false
false
emschorsch/easy-thumbnails
easy_thumbnails/processors.py
1
8519
import re import six try: from PIL import Image, ImageChops, ImageFilter except ImportError: import Image import ImageChops import ImageFilter from easy_thumbnails import utils def _compare_entropy(start_slice, end_slice, slice, difference): """ Calculate the entropy of two slices (from the s...
bsd-3-clause
-4,515,509,988,609,493,500
35.097458
79
0.562742
false
4.025992
false
false
false
RamonGuiuGou/l10n-spain
l10n_es_aeat/models/l10n_es_aeat_map_tax.py
1
2460
# -*- coding: utf-8 -*- # Copyright 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com> # Copyright 2014-2017 Tecnativa - Pedro M. Baeza <pedro.baeza@tecnativa.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl from openerp import models, fields, api, exceptions, _ class L10nEsAeatMapTax(models.Mo...
agpl-3.0
-2,142,182,223,258,955,300
39.327869
76
0.455285
false
3.813953
false
false
false
markovmodel/msmtools
tests/estimation/tests/test_mle_trev_given_pi.py
1
7671
# This file is part of MSMTools. # # Copyright (c) 2015, 2014 Computational Molecular Biology Group # # MSMTools 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 # (a...
lgpl-3.0
-7,695,240,549,958,906,000
40.918033
151
0.652066
false
3.377807
true
false
false
Agnishom/ascii-art-007
main.py
1
5842
#!/usr/bin/env python # # Copyright 2010 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 la...
mit
-5,926,090,419,844,823,000
34.061728
98
0.610236
false
4.004112
false
false
false
sdbonin/SOQresearch
SOQplot.py
1
2527
""" SOQplot.py - sdbonin (work in progress) read _plot array from txt and plot them """ import numpy as np import matplotlib.pyplot as plt S_plot = np.loadtxt('S_plot.txt',delimiter=',') q_plot = np.loadtxt('q_plot.txt',delimiter=',') p_plot = np.loadtxt('p_plot.txt',delimiter=',') time = np.loadtxt('time.txt',delimi...
mit
-2,696,191,542,874,873,000
25.051546
60
0.611397
false
1.95437
false
true
false
taigaio/taiga-back
taiga/userstorage/migrations/0001_initial.py
1
1491
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import taiga.base.db.models.fields from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] opera...
agpl-3.0
-7,703,106,756,495,621,000
39.297297
154
0.589537
false
4.29683
false
false
false
dper/pumptweet
pumptweet/PumpLogin.py
1
3481
import os.path import sys import twitter from dateutil.parser import parse from configparser import ConfigParser from pypump import PyPump from pypump import Client from pypump.exceptions import ClientException from requests.exceptions import ConnectionError def simple_verifier(url): print('Please follow the instruct...
mit
-6,776,578,844,620,818,000
24.595588
63
0.687159
false
3.353565
false
false
false
ArcherSys/ArcherSys
Scripts/rstpep2html.py
1
2234
<<<<<<< HEAD <<<<<<< HEAD #!K:\ArcherVMPeridot\htdocs\Scripts\python.exe # $Id: rstpep2html.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. """ A minimal front end to the Docutils Publisher, producing HTML from PEP (Pyt...
mit
-6,067,688,109,114,015,000
26.580247
76
0.713518
false
3.349325
false
true
false
ktheis/pqtutor
calculator.py
1
21622
# coding=utf-8 """ Functions to run an interpreter for expressions containing physical quantities. Based on the Q class in the quantities module, this provides functions to input and interpret expressions, calculating their values and showing the steps, and finally storing the quantities so that they can be used for f...
gpl-3.0
-7,214,875,545,875,896,000
36.877193
185
0.560398
false
3.592346
false
false
false
freaxmind/miage-m1
csi/FreeMAP/producteurs/views.py
1
1521
# -*- coding: utf-8 -*- from django.contrib.auth.decorators import login_required from django.views.decorators.csrf import csrf_exempt from django.shortcuts import render_to_response, redirect from django.template.context import RequestContext from producteurs.forms import ProducteurPropositionForm from gestion.models...
gpl-3.0
-8,363,585,596,895,973,000
35.214286
88
0.692308
false
3.727941
false
false
false
openstack/ironic
ironic/drivers/modules/ibmc/utils.py
1
6956
# # 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 # distributed under...
apache-2.0
7,757,055,855,073,051,000
39.44186
79
0.585825
false
4.301793
false
false
false
schollz/trello-changelog
trello.py
1
2403
import json import datetime import sys import random a =json.load(open(sys.argv[1],'rb')) def find_between( s, first, last ): try: start = s.index( first ) + len( first ) end = s.index( last, start ) return s[start:end] except ValueError: return "" # BOARDS boards = {} for board in a['lists'...
mit
6,869,297,867,386,190,000
26.318182
120
0.61881
false
3.389281
false
false
false
petercable/mi-instrument
mi/instrument/seabird/driver.py
1
22403
""" @package mi.instrument.seabird.driver @file mi/instrument/seabird/driver.py @author Roger Unwin @brief Base class for seabird instruments Release notes: None. """ import datetime import re from mi.core.log import get_logger, get_logging_metaclass from mi.core.instrument.instrument_protocol import CommandResponse...
bsd-2-clause
-2,113,255,483,924,937,700
36.463211
125
0.590501
false
4.772689
true
false
false
wger-project/wger
wger/gym/views/admin_notes.py
1
5958
# -*- coding: utf-8 -*- # This file is part of wger Workout Manager. # # wger Workout Manager 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 option) any ...
agpl-3.0
4,160,226,836,343,754,000
29.243655
91
0.645015
false
4.100482
false
false
false
imk1/IMKTFBindingCode
makeCallIndividualPeaksScript.py
1
1581
def makeCallIndividualPeaksScript(datasetPrefix, ofprefixListFileName, pooledTAFileName, pooledTAFileCore, peakOutputDir, fraglenListFileName, blacklistFileName, codePath, scriptFileName): # ASSUMES THAT THE FRAGMENT LENGTHS ARE IN THE SAME ORDER AS THE ofPrefix's ofprefixListFile = open(ofprefixListFileName) fra...
mit
115,318,794,299,012,770
56.62963
224
0.739405
false
3.273292
false
false
false
zardoru/vrxcl
util/extract_balance_data.py
1
5816
# -*- coding: utf-8 -*- from glob import glob from re import compile from json import dumps class Damage(object): def __init__(self): self.damage_start = 0 self.damage_addon = 0 self.speed_start = 0 self.speed_addon = 0 self.dmg_min_start = None self.dmg_min_addon = ...
gpl-2.0
3,028,734,910,971,316,000
29.615789
124
0.523728
false
3.211485
false
false
false
avikivity/scylla
test/alternator/test_query.py
1
21311
# -*- coding: utf-8 -*- # Copyright 2019 ScyllaDB # # This file is part of Scylla. # # Scylla 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 option) any l...
agpl-3.0
-8,097,653,111,144,787,000
53.925258
199
0.666933
false
3.699826
true
false
false
rbcollins123/eos_garp_all_vlans
garp_all_vlans.py
1
4023
# coding=utf-8 # Copyright (C) 2016 Intelligent Visbility, Inc. - Richard Collins # <richardc@intelligentvisibility.com> import logging import netifaces import os import signal import subprocess import sys import time """ This script can be run on an Arista EOS switch to cause all SVI interfaces to generate gratuitou...
lgpl-3.0
-1,709,095,333,053,565,700
36.95283
79
0.669898
false
3.955752
false
false
false
sai-prasanna/simple-django-blog
blog/migrations/0001_initial.py
1
1576
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import autoslug.fields from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ ...
mit
-3,379,956,058,826,820,600
35.651163
114
0.556472
false
4.541787
false
false
false
quantmind/lux
lux/utils/files.py
1
4997
''' Some code is taken from django: Copyright (c) Django Software Foundation and individual contributors. All rights reserved. ''' import os import re import itertools __all__ = ['Filehandler'] def skipfile(name): return name.startswith('.') or name.startswith('_') def directory(dir): bd, fname =...
bsd-3-clause
-187,988,342,244,856,160
30.23125
79
0.613568
false
4.509928
false
false
false
mrafieee/django-base
apps/congress/views.py
1
4962
from django.shortcuts import render_to_response,get_object_or_404 from django.template import RequestContext from apps.views import paginate from datetime import date from forms import * from models import * def list(request, language): congress_records = Congress.objects.all().order_by('priority').order_by('-opening...
gpl-3.0
-727,504,110,402,674,000
51.797872
153
0.729948
false
3.124685
false
false
false
programa-stic/barf-project
barf/arch/translator.py
1
6462
# Copyright (c) 2014, Fundacion Dr. Manuel Sadosky # All rights reserved. # 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 condit...
bsd-2-clause
4,689,553,398,422,547,000
32.481865
108
0.625503
false
4.462707
false
false
false
recipy/recipy
integration_test/version_control.py
1
2655
""" Functions to provide information about a Git repository. """ # Copyright (c) 2015-2016 University of Edinburgh and # University of Southampton. from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, print_function, unicode_lite...
apache-2.0
-7,703,090,747,470,164,000
22.289474
64
0.644444
false
4.194313
false
false
false
lovelysystems/pyjamas
library/pyjamas/ui/horizsplitpanel.py
1
12764
""" Horizontal Split Panel: Left and Right layouts with a movable splitter. /* * Copyright 2008 Google Inc. * Copyright 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net> * * Licensed under the Apache License, Version 2.0 (the "License") you may not * use this file except in compliance with the License. You m...
apache-2.0
-4,385,116,286,140,427,000
35.783862
90
0.623551
false
4.126738
false
false
false
AdL1398/PiCasso
source/modules/DecisionEngine/piresources.py
1
18280
""" title : piresources.py description : includes a) functions to manipulate a dictionary that representes the consumption of a Raspberry Pi resources b) functions for creating a json file from the dictionary and reading it f...
mit
8,001,806,750,052,898,000
34.086372
116
0.652735
false
3.681772
false
false
false
jtoppins/beaker
Server/bkr/server/tools/usage_reminder.py
1
7054
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # pkg_resources.requires() does not work if multiple versions are inst...
gpl-2.0
4,701,580,294,912,177,000
44.805195
114
0.643748
false
3.925431
true
false
false
gunesacar/tbb-fp-tests
selenium-tests/test_fp_screen_coords.py
2
1032
#!/usr/bin/python import tbbtest class Test(tbbtest.TBBTest): def test_screen_coords(self): # https://gitweb.torproject.org/torbrowser.git/blob/HEAD:/src/current-patches/firefox/0021-Do-not-expose-physical-screen-info.-via-window-and-w.patch driver = self.driver js = driver.execute_script ...
agpl-3.0
8,252,620,859,575,495,000
48.142857
157
0.655039
false
3.633803
false
false
false
skob/alerta
alerta/app/utils.py
1
9559
import datetime import pytz import re try: import simplejson as json except ImportError: import json from functools import wraps from flask import request, g, current_app try: from urllib.parse import urljoin except ImportError: from urlparse import urljoin from alerta.app import app, db from alert...
apache-2.0
-4,402,401,651,658,987,000
33.634058
167
0.568888
false
3.89845
false
false
false
jschrewe/django-mongodbforms
mongodbforms/documents.py
1
39225
import os import itertools from collections import Callable, OrderedDict from functools import reduce from django.forms.forms import (BaseForm, DeclarativeFieldsMetaclass, NON_FIELD_ERRORS, pretty_name) from django.forms.widgets import media_property from django.core.exceptions import F...
bsd-3-clause
6,904,557,605,757,164,000
38.621212
95
0.558572
false
4.604954
false
false
false
dmych/gn
db.py
1
6976
# This file is part of Geeky Notes # # Geeky Notes is a CLI Simplenote client # <https://github.com/dmych/gn> # # Copyright (c) Dmitri Brechalov, 2010-2011 # # Geeky Notes 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 Softwar...
gpl-3.0
-4,818,709,503,768,851,000
27.707819
86
0.612099
false
3.438147
false
false
false
aakashsinha19/Aspectus
Image Classification/models/differential_privacy/privacy_accountant/tf/accountant.py
1
17530
# 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
-5,226,359,574,101,129,000
41.756098
80
0.638049
false
3.547147
false
false
false
lukemans/Hello-world
ex7.py
1
1439
# Coursera Online Machine Learning Course # Exercise 7 -- Principal Component Analysis and K-Means Clustering import pandas as pd import numpy as np from scipy.optimize import minimize from ex7_utils import * import scipy.io import matplotlib.pyplot as plt # Part 1 -- Find Closest Centroids raw_mat = scipy.io.loadmat...
apache-2.0
851,453,940,738,845,200
25.648148
80
0.717165
false
2.794175
false
false
false
gc-i/wntOS
controller/DamageForm.py
1
5612
from PyQt4.QtGui import * from PyQt4.QtCore import * from ..view.Ui_DamageForm import * from ..model.DatabaseHelper import * from ..model.core_classes import CoDamage from ..utils.PluginUtils import * from ..utils.LayerUtils import * from DamageDialog import * class DamageForm(QWidget, Ui_DamageForm, DatabaseHelper):...
gpl-3.0
2,911,628,629,951,182,300
38.801418
112
0.619387
false
3.689678
false
false
false
hzlf/openbroadcast
website/legacy/obp_legacy/management/commands/__archive/migrate_legacy.py
1
12138
#-*- coding: utf-8 -*- from django.core.files import File as DjangoFile from django.core.management.base import BaseCommand, NoArgsCommand from optparse import make_option import os import sys import time import re from tagging.models import Tag from alibrary.models import Artist, Release, Media, Label, Relation, L...
gpl-3.0
-8,743,974,167,014,346,000
27.359813
115
0.424699
false
4.515625
false
false
false
lowRISC/edalize
edalize/verilator.py
1
7503
import logging import multiprocessing import os import logging from edalize.edatool import Edatool logger = logging.getLogger(__name__) CONFIG_MK_TEMPLATE = """#Auto generated by Edalize TOP_MODULE := {top_module} VC_FILE := {vc_file} VERILATOR_OPTIONS := {verilator_options} MAKE_OPTIONS := {m...
bsd-2-clause
-3,890,970,101,035,016,700
40.683333
242
0.539651
false
3.793225
true
false
false
OpenNews/opennews-source
source/people/migrations/0003_organizationadmin.py
1
1149
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2017-01-17 19:04 from __future__ import unicode_literals import caching.base from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('people', '0002_person_photo'), ] ...
mit
-1,334,810,765,854,700,300
34.90625
123
0.591819
false
4.352273
false
false
false
newvem/anyjson
anyjson/__init__.py
1
4577
"""Wraps the best available JSON implementation available in a common interface""" import sys VERSION = (0, 3, 1) __version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:]) __author__ = "Rune Halvorsen" __contact__ = "runefh@gmail.com" __homepage__ = "http://bitbucket.org/runeh/anyjson/" __docformat__ = "r...
bsd-3-clause
8,633,620,444,541,087,000
35.325397
120
0.63251
false
4.218433
false
false
false
wavefrontHQ/python-client
wavefront_api_client/models/access_control_list_write_dto.py
1
5443
# coding: utf-8 """ Wavefront REST API <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ...
apache-2.0
3,311,155,771,667,584,000
30.462428
409
0.58589
false
3.955669
false
false
false
pirate/bookmark-archiver
tests/test_list.py
1
4194
import json from .fixtures import * def test_list_json(process, disable_extractors_dict): subprocess.run(["archivebox", "add", "http://127.0.0.1:8080/static/example.com.html", "--depth=0"], capture_output=True, env=disable_extractors_dict) list_process = subprocess.run(["arch...
mit
-2,798,180,752,393,534,000
61.597015
120
0.645923
false
3.289412
true
false
false
mikemcfarlane/Code_sprints
Concurrency_1/concurrency_1_general_problem.py
1
2273
""" Looking at concurrency. Moving two head motors (pitch and yaw), and logging data simultaneously. """ # MEMORY_VALUE_NAMES is the list of ALMemory values names you want to save. ALMEMORY_KEY_NAMES = [ "Device/SubDeviceList/HeadYaw/Position/Sensor/Value", "Device/SubDeviceList/HeadYaw/Position/Actuator/Value", ...
gpl-2.0
5,231,303,321,345,811,000
29.32
75
0.652882
false
3.428356
false
false
false
architest/pymeeus
pymeeus/Neptune.py
1
113473
# -*- coding: utf-8 -*- # PyMeeus: Python module implementing astronomical algorithms. # Copyright (C) 2018 Dagoberto Salazar # # This program 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 v...
lgpl-3.0
5,247,640,929,068,069,000
44.792171
79
0.60751
false
2.366338
false
false
false
bdestombe/flopy-1
flopy/modflow/mflpf.py
1
25194
""" mflpf module. Contains the ModflowLpf class. Note that the user can access the ModflowLpf class as `flopy.modflow.ModflowLpf`. Additional information for this MODFLOW package can be found at the `Online MODFLOW Guide <http://water.usgs.gov/ogw/modflow/MODFLOW-2005-Guide/index.html?lpf.htm>`_. """ impo...
bsd-3-clause
-2,216,817,551,208,031,700
38.833063
127
0.526038
false
3.828294
false
false
false
endlessm/chromium-browser
mojo/public/tools/mojom/mojom/generate/translate.py
1
26478
# 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. """Convert parse tree to AST. This module converts the parse tree to the AST we use for code generation. The main entry point is OrderedModule, which gets pa...
bsd-3-clause
-2,127,859,092,660,964,900
34.58871
80
0.667573
false
3.595112
false
false
false
lhmlihaomin/jp
jp/settings.py
1
3170
""" Django settings for jp project. Generated by 'django-admin startproject' using Django 1.9.4. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os # Buil...
apache-2.0
-5,930,232,875,764,013,000
24.983607
91
0.686435
false
3.530067
false
false
false
ednapiranha/refrig
posts/templatetags/render_post.py
1
3168
from django.http import * from django import template from django.template.defaultfilters import stringfilter from django.template import RequestContext from mongoengine import * from profile.models import Profile from posts.models import Post, ImagePost, TextPost, LinkPost from profile.views import * import tweepy ...
bsd-3-clause
7,500,112,006,488,823,000
39.628205
212
0.645518
false
3.658199
false
false
false
nan86150/ImageFusion
bin/pilconvert.py
1
2298
#!/home/chai/workspace/GitHub/ImageFusion/bin/python # # The Python Imaging Library. # $Id$ # # convert image files # # History: # 0.1 96-04-20 fl Created # 0.2 96-10-04 fl Use draft mode when converting images # 0.3 96-12-30 fl Optimize output (PNG, JPEG) # 0.4 97-01-18 fl Made optimize an opti...
mit
-8,801,008,984,851,115,000
22.9375
76
0.550479
false
3.23662
false
false
false
nathanbjenx/cairis
cairis/gui/SecurityPatternsDialog.py
1
3037
# 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...
apache-2.0
3,398,963,292,777,533,000
42.385714
185
0.76457
false
3.863868
false
false
false
EDUlib/edx-platform
openedx/core/djangoapps/schedules/config.py
1
4292
""" Contains configuration for schedules app """ from crum import get_current_request from edx_toggles.toggles import LegacyWaffleSwitch, LegacyWaffleFlagNamespace, LegacyWaffleSwitchNamespace, WaffleFlag from lms.djangoapps.experiments.flags import ExperimentWaffleFlag from lms.djangoapps.experiments.models import E...
agpl-3.0
5,457,186,290,929,313,000
52.65
119
0.715051
false
4.068246
false
false
false
MacGyverNL/alot
alot/buffers/thread.py
1
13115
# Copyright (C) 2011-2018 Patrick Totzke <patricktotzke@gmail.com> # Copyright © 2018 Dylan Baker # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file import asyncio import urwid import logging from urwidtrees import ArrowTree, TreeBox, NestedTree from ....
gpl-3.0
995,784,562,381,729,800
37.011594
79
0.574577
false
4.091732
false
false
false