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
stevelle/glance
glance/common/exception.py
1
17727
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
apache-2.0
6,056,371,063,913,521,000
30.430851
79
0.677328
false
4.43175
true
false
false
calebtrahan/KujiIn_Python
backup/guitemplates/setgoaldialog.py
1
5432
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'setgoaldialog.ui' # # Created: Tue Dec 23 18:15:13 2014 # by: PyQt4 UI code generator 4.11.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except ...
mit
-2,910,544,525,462,350,300
60.033708
136
0.760677
false
3.964964
false
false
false
preprocessed-connectomes-project/quality-assessment-protocol
scripts/qap_check_output_csv.py
1
1302
#!/usr/bin/env python def main(): import os import argparse from qap.script_utils import check_csv_missing_subs, csv_to_pandas_df, \ write_inputs_dict_to_yaml_file, read_yml_file from qap.qap_utils import raise_smart_exception parser = argparse.ArgumentParser() parser.add_argument("o...
bsd-3-clause
6,100,006,291,971,816,000
34.216216
76
0.596006
false
3.840708
false
false
false
euklyd/PenguinBot3K
core/Webhook.py
1
3305
""" Class Name : Webhook Description: Contributors: - Patrick Hennessy License: Arcbot is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License v3; as published by the Free Software Foundation @webhook...
gpl-3.0
-4,199,915,346,113,456,600
25.653226
103
0.508926
false
4.728183
false
false
false
jonge-democraten/zues
appolo/models.py
1
1227
from django.db import models class Locatie(models.Model): def __str__(self): return self.naam naam = models.CharField(max_length=200) lat = models.FloatField() long = models.FloatField() class Meta: verbose_name_plural = 'locaties' class Dag(models.Model): def __str__(self): ...
mit
6,851,658,738,776,405,000
24.5625
66
0.647922
false
3.456338
false
false
false
maxmalysh/congenial-octo-adventure
report2/task2_compact.py
1
2980
import numpy as np ITERATION_LIMIT = 1000 # initialize the matrix A = np.array([[10., -1., 2., 0.], [-1., 11., -1., 3.], [2., -1., 10., -1.], [0., 3., -1., 8.]]) A2 = np.array( [[ 77., -23., -32., 0., 0.], [-23., 53., 0., 0., -18.], [-32.,...
unlicense
4,159,153,501,352,646,700
25.616071
72
0.437584
false
2.436631
false
false
false
alsoicode/django-maintenancemode
maintenancemode/middleware.py
1
2247
import re from django.conf import settings from django.contrib.sites.models import Site from django.core import urlresolvers from django.db.utils import DatabaseError import django.conf.urls as urls from maintenancemode.models import Maintenance, IgnoredURL urls.handler503 = 'maintenancemode.views.defaults...
bsd-3-clause
3,394,594,052,935,418,400
38.125
93
0.659991
false
4.512048
false
false
false
abetkin/app-units
examples/dj/dj/settings.py
1
2088
""" Django settings for dj project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import ...
mit
-5,127,360,724,257,778,000
23.27907
71
0.719349
false
3.2625
false
false
false
Ttl/scikit-rf
skrf/io/general.py
3
22567
''' .. module:: skrf.io.general ======================================== general (:mod:`skrf.io.general`) ======================================== General io functions for reading and writing skrf objects .. autosummary:: :toctree: generated/ read read_all read_all_networks write write_all ...
bsd-3-clause
6,781,361,543,470,911,000
29.089333
109
0.577347
false
3.761167
false
false
false
vvtam/virtualenv
virtualenv.py
1
100200
#!/usr/bin/env python """Create a "virtual" Python installation""" import base64 import sys import os import codecs import optparse import re import shutil import logging import zlib import errno import glob import distutils.sysconfig import struct import subprocess from distutils.util import strtobool __version__ = ...
mit
8,873,541,175,533,266,000
40.924686
238
0.659651
false
2.67571
true
false
false
brownplt/k3
dj-plt-belay/pltbelay/models.py
1
1096
import belaylibs.models as bcap from django.db import models class BelayAccount(bcap.Grantable): station_url = models.CharField(max_length=200) class PendingLogin(bcap.Grantable): # Key is for this server to trust the openID provider's request key = models.CharField(max_length=36) # ClientKey is a secret pro...
apache-2.0
2,200,626,802,297,134,300
32.212121
66
0.778285
false
3.351682
false
false
false
DeppSRL/open_bilanci
bilanci_project/bilanci/management/commands/couch2pg.py
1
27680
from collections import OrderedDict import logging from optparse import make_option from pprint import pprint from os import listdir from os.path import isfile, join from django.conf import settings from django.core.management import BaseCommand, call_command from django.db import connection from django.db.transaction ...
mit
6,425,402,298,802,851,000
43.718901
156
0.571676
false
4.00463
false
false
false
beetbox/audioread
audioread/rawread.py
1
4378
# This file is part of audioread. # Copyright 2011, Adrian Sampson. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, co...
mit
6,935,302,251,535,896,000
27.802632
75
0.595021
false
3.98
false
false
false
rowinggolfer/openmolar2
src/tests/class_tests/testTreatmentItem.py
1
3699
#! /usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### ## ## ## Copyright 2010-2012, Neil Wallace <neil@openmolar.com> ## ## ...
gpl-3.0
5,649,325,461,879,931,000
38.774194
79
0.47283
false
4.462002
true
false
false
andrewgodwin/django-channels
channels/generic/http.py
1
3131
from channels.consumer import AsyncConsumer from ..exceptions import StopConsumer class AsyncHttpConsumer(AsyncConsumer): """ Async HTTP consumer. Provides basic primitives for building asynchronous HTTP endpoints. """ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs...
bsd-3-clause
-8,351,045,490,236,470,000
33.032609
81
0.597253
false
4.638519
false
false
false
CartoDB/cartoframes
cartoframes/viz/constants.py
1
2813
CARTO_VL_VERSION = 'v1.4' CARTO_VL_DEV = '/dist/carto-vl.js' CARTO_VL_URL = 'https://libs.cartocdn.com/carto-vl/{}/carto-vl.min.js'.format(CARTO_VL_VERSION) AIRSHIP_VERSION = 'v2.3' AIRSHIP_COMPONENTS_DEV = '/packages/components/dist/airship.js' AIRSHIP_BRIDGE_DEV = '/packages/bridge/dist/asbridge.js' AIRSHIP_MODULE_D...
bsd-3-clause
5,031,585,193,760,696,000
23.042735
117
0.635265
false
2.807385
false
true
false
google-research/google-research
learn_to_infer/run_ring.py
1
10211
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
5,101,977,733,388,340,000
36.130909
89
0.641563
false
3.300259
true
false
false
mcolom/ipolDevel
tools/migrations/demoinfo_db_migration.py
1
4289
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public Licence (GPL) # # 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 # v...
agpl-3.0
1,223,077,201,194,674,400
31.492424
91
0.615528
false
4.421649
false
false
false
OSEHRA/VistA
Scripts/GitUtils.py
1
9780
#--------------------------------------------------------------------------- # Copyright 2013-2019 The Open Source Electronic Health Record Alliance # # 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 Licen...
apache-2.0
-2,972,550,952,275,129,300
39.580913
130
0.630573
false
3.97238
false
false
false
bcaligari/mbox_defiler
filededup.py
1
4945
#!/usr/bin/env python3 # Copyright (c) 2017 Brendon Caligari <caligari@cypraea.co.uk> # This file is released under GPL v3.0 import logging import pathlib import unfile import json class FileDedup(object): """Dedup existing files in a directory and add more unique files. The directory is first scanned and d...
gpl-3.0
-7,705,359,799,193,418,000
40.208333
103
0.575733
false
3.833333
false
false
false
hack4impact/legal-checkup
app/api/forms.py
1
1404
from flask_wtf import Form from wtforms.fields import ( BooleanField, FieldList, FormField, SelectField, SelectMultipleField, SubmitField, TextAreaField, TextField ) from wtforms.validators import InputRequired, Length class ParameterForm(Form): param_name = TextField('Parameter Nam...
mit
-5,709,190,334,332,081,000
40.294118
105
0.643162
false
4.471338
false
false
false
edonyM/emthesis
code/3point2plane.py
1
3545
#!/usr/bin/env python3 # -*- coding: utf-8 -*- r""" # .---. .----------- # / \ __ / ------ # / / \( )/ ----- (`-') _ _(`-') <-. (`-')_ # ////// '\/ ` --- ( OO).-/( (OO ).-> .-> \( OO) ) .-> # //// / // : : --- (,------...
mit
-4,273,530,887,346,554,400
32.130841
89
0.372073
false
3.131625
false
false
false
openssbd/OpenSSBD
SSBD/BDML/views.py
1
39099
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect from django.http import HttpResponse from django.core.urlresolvers import reverse from django.core import serializers fr...
gpl-3.0
288,396,403,755,675,300
43.993096
239
0.544234
false
3.978732
false
false
false
UIKit0/friture
friture/octavespectrum.py
1
9254
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009 Timoth?Lecomte # This file is part of Friture. # # Friture is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as published by # the Free Software Foundation. # # Friture is distribu...
gpl-3.0
4,978,378,201,274,751,000
35.290196
160
0.596499
false
3.513288
false
false
false
artekw/mqtt-panel
display.py
1
2265
import datetime import time from ht1632cpy import HT1632C import settings from lightsensor import getLight interface = HT1632C(2, 0) interface.pwm(settings.read('settings', 'matrix', 'default_brightness')) def dimmer(): dimmer_brightness = settings.read('settings', 'matrix', 'dimmer_brightness') default_br...
mit
5,548,840,018,202,119,000
27.325
94
0.618985
false
3.500773
false
false
false
Slko/Slot
slot/handlers/text_generation.py
1
2447
import asyncio import random from slot import requires from slot.handlers import BaseHandler, MessageHandled, command, unhandled_messages class PoemHandler(BaseHandler): def generate_poem(self, start=None): textgen = self.bot.extensions["textgen"] rhyme = self.bot.extensions["rhyme"] line...
bsd-3-clause
-6,882,219,567,834,149,000
30.881579
120
0.598019
false
3.768274
false
false
false
fhqgfss/MoHa
moha/posthf/cc/ccsd.py
1
9945
import numpy as np def spinfock(eorbitals): """ """ if type(eorbitals) is np.ndarray: dim = 2*len(eorbitals) fs = np.zeros(dim) for i in range(0,dim): fs[i] = eorbitals[i//2] fs = np.diag(fs) # put MO energies in diagonal array elif type(eorbitals) is dict: ...
mit
3,714,258,493,166,371,000
37.546512
102
0.519759
false
2.409157
false
false
false
dennerlager/sepibrews
sepibrews/statemachine.py
1
2712
import logging import logging.handlers from multiprocessing import Queue from execution_engine import ExecutionEngine class StateMachine(): def __init__(self, brewView, tempControllerAddress, interfaceLock): self.brewView = brewView self.tempControllerAddress = tempControllerAddress self.qT...
gpl-3.0
3,199,371,516,686,894,000
32.481481
81
0.574115
false
3.857752
false
false
false
pswaminathan/t1-python
terminalone/models/placementslot.py
1
3030
# -*- coding: utf-8 -*- """Provides placement_slot object.""" from __future__ import absolute_import from datetime import datetime from .. import t1types from ..entity import Entity from ..vendor import six def update_low_priority(original, candidate): for item, value in six.iteritems(candidate): if item...
apache-2.0
-3,337,957,810,650,184,000
31.934783
77
0.546865
false
3.54386
false
false
false
madprime/django_celery_fileprocess_example
django_celery_fileprocess_example/settings.py
1
2311
""" Django settings for django_celery_fileprocess_example project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.p...
apache-2.0
-7,383,880,656,827,946,000
24.966292
79
0.727391
false
3.28267
false
false
false
bdorney/CMS_GEM_Analysis_Framework
python/reparam1DObs2Gain.py
1
3162
import sys, os from ROOT import gROOT, TClass, TFile, TH1F, TIter, TKey if __name__ == "__main__": #Import Options from AnalysisOptions import * from Utilities import getall, PARAMS_GAIN #Specific Options parser.add_option("--ident", type="string", dest="strIdent", help="Substring within ...
gpl-3.0
4,429,647,154,765,510,700
34.133333
96
0.608476
false
3.552809
false
false
false
txomon/SpockBot
spock/plugins/helpers/entities.py
1
6342
""" An entity tracker """ import logging from spock.plugins.base import PluginBase from spock.utils import Info, pl_announce logger = logging.getLogger('spock') class MCEntity(Info): eid = 0 status = 0 nbt = None class ClientPlayerEntity(MCEntity): metadata = None class MovementEntity(MCEntity):...
mit
-2,425,411,795,611,821,600
29.936585
70
0.584831
false
3.593201
false
false
false
chrisspen/django-feeds
djangofeeds/conf.py
1
5159
from datetime import timedelta from django.conf import settings try: from celery import conf as celeryconf DEFAULT_ROUTING_KEY = celeryconf.DEFAULT_ROUTING_KEY except ImportError: DEFAULT_ROUTING_KEY = "celery" DEFAULT_DEFAULT_POST_LIMIT = 20 DEFAULT_NUM_POSTS = -1 DEFAULT_CACHE_MIN = 30 DEFAULT_ENTRY_WO...
bsd-2-clause
-471,363,245,432,641,150
29.347059
86
0.647606
false
3.352177
false
false
false
quartzmo/gcloud-ruby
google-cloud-dialogflow/synth.py
1
2614
# Copyright 2018 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,215,669,220,090,041,600
32.512821
116
0.685157
false
3.115614
false
false
false
pombredanne/PyGithub
github/RepositoryKey.py
1
5564
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
-5,146,577,369,882,301,000
40.522388
116
0.516894
false
4.77187
false
false
false
updownlife/multipleK
src/select_sub.py
1
3215
import random def sequentialy(qset): rset = [] for i in range(0, len(qset)): rset.append(qset[i]) return rset def randomly(_qset): qset = list(_qset) rset = [] while qset: sel = random.choice(qset) rset.append(sel) qset.remove(sel) return rset def fullBFS(qset): if l...
gpl-2.0
5,703,938,021,751,284,000
20.013072
64
0.553033
false
2.798085
false
false
false
BeagleInc/PyReadableDiff
setup.py
1
1652
import setuptools import pydiff NAME = 'PyReadableDiff' DESCRIPTION = 'Intuitive human-readable diff for text' # Use .rst markup for the long description in order to provide # the link to the repository, since PyPI doesn't support .md markup, # so we can't use the content of README.md for this purpose. LONG_DESCRI...
apache-2.0
2,248,738,196,769,096,400
27.982456
78
0.671308
false
3.92399
false
false
false
upcFrost/SDR2_translate
rpErrorHandler.py
1
26686
#------------------------------------------------------------------------------# # # # Run-time error handler for Rapyd projects # # ...
gpl-3.0
-1,601,429,762,813,613,000
42.39187
117
0.539871
false
4.308363
false
false
false
sbinet-staging/pyrame
chkpyr/chkpyr.py
1
1163
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # Copyright 2012-2015 Frédéric Magniette, Miguel Rubio-Roy # This file is part of Pyrame. # # Pyrame 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, ei...
lgpl-3.0
-3,458,277,395,945,562,000
27.317073
77
0.724376
false
3.146341
false
false
false
lbouma/Cyclopath
pyserver/util_/strutil.py
1
4807
# Copyright (c) 2006-2013 Regents of the University of Minnesota. # For licensing terms, see the file LICENSE. # MAC_RE = re.compile(r'^(mc|mac|de|van)(.)(.*)') # # def capitalize_surname(name): # '''Return a semi-intelligently capitalized version of name.''' # name = name.lower() # # capitalize letter after...
apache-2.0
-3,592,574,386,759,142,400
23.155779
104
0.59871
false
2.489384
false
false
false
Arundhatii/erpnext
erpnext/buying/doctype/request_for_quotation/request_for_quotation.py
1
12193
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe, json from frappe import _ from frappe.model.mapper import get_mapped_doc from frappe.utils import get_url, cint from frap...
gpl-3.0
6,958,179,286,313,263,000
35.28869
204
0.700238
false
3.12001
false
false
false
becomejapan/yahooads-python-lib
examples/RetargetingListService/RetargetingListService_mutate_SET.py
1
11527
# Copyright 2017 Become Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
6,747,473,012,270,576,000
29.018229
151
0.452937
false
4.03324
false
false
false
Jumpscale/core9
setup.py
1
2646
from setuptools import setup, find_packages from distutils.sysconfig import get_python_lib from setuptools.command.install import install as _install from setuptools.command.develop import develop as _develop import os def _post_install(libname, libpath): from JumpScale9 import j # here its still the boostrap Ju...
apache-2.0
2,619,547,504,338,792,000
26
100
0.592215
false
3.234719
false
false
false
Ex-sabagostar/atom-shell
script/lib/util.py
1
2645
#!/usr/bin/env python import atexit import contextlib import errno import shutil import subprocess import sys import tarfile import tempfile import urllib2 import os import zipfile def tempdir(prefix=''): directory = tempfile.mkdtemp(prefix=prefix) atexit.register(shutil.rmtree, directory) return directory @...
mit
5,613,780,633,471,564,000
20.680328
75
0.647637
false
3.457516
false
false
false
elbeardmorez/quodlibet
quodlibet/tests/test_qltk_info.py
1
1263
# -*- coding: utf-8 -*- # 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. import os from quodlibet import app from tests...
gpl-2.0
839,891,485,500,743,700
26.456522
72
0.673793
false
3.557746
false
false
false
mclarkelauer/AndroidAnalyzer
log.py
1
1320
__author__ = 'Matt Clarke-Lauer' __email__ = 'matt@clarkelauer.com' __credits__ = ['Matt Clarke-Lauer'] __date__ = 7 / 1 / 13 __version__ = '0.1' __status__ = 'Development' from datetime import datetime import os,sys,profile,traceback import pickle import inspect logString = "[DexScope:" logLevel = { 0:{"Type":...
bsd-3-clause
-860,799,496,070,189,000
23.444444
116
0.621212
false
3.076923
false
false
false
oneonestar/CloudStorage
src/client/rsa.py
1
3905
""" Load RSA keys for encryption/decryption/sign/verify. """ from ldap3 import * import json import base64 import log from cryptography import x509 from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric import rsa, padding from cryptography.hazmat.primitives.serializatio...
gpl-3.0
7,988,215,588,631,458,000
31.815126
98
0.626633
false
3.524368
false
false
false
dkopecek/amplify
third-party/quex-0.65.2/quex/engine/analyzer/state/drop_out.py
1
1840
from quex.engine.analyzer.commands.core import CommandList, \ IfPreContextSetPositionAndGoto def get_CommandList(TheAccepter, TheTerminalRouter): """If there is no stored acceptance involved, then one can directly conclude from the pre-contexts to the acceptan...
gpl-2.0
-5,333,320,043,203,639,000
41.790698
83
0.65
false
4.220183
false
false
false
cslarsen/wpm
wpm/record.py
1
1397
# -*- encoding: utf-8 -*- """ This file is part of the wpm software. Copyright 2017, 2018 Christian Stigen Larsen Distributed under the GNU Affero General Public License (AGPL) v3 or later. See the file LICENSE.txt for the full license text. This software makes use of open source software. The quotes database is *no...
agpl-3.0
5,263,892,724,204,249,000
26.94
79
0.636364
false
3.946328
false
false
false
tdjordan/tortoisegit
gitgtk/backout.py
1
4443
# # backout.py - TortoiseHg's dialog for backing out changeset # # Copyright (C) 2008 Steve Borho <steve@borho.org> # Copyright (C) 2007 TK Soh <teekaysoh@gmail.com> # import os import sys import gtk import pango from dialog import * from hgcmd import CmdDialog import histselect class BackoutDialog(gtk.Window): "...
gpl-2.0
521,526,216,457,904,060
33.44186
77
0.586766
false
3.626939
false
false
false
haarcuba/testix
setup.py
1
1689
import setuptools from distutils.core import setup LONG_DESCRIPTION =\ """ Testix is a Mocking framework for Python, meant to be used with [pytest](https://docs.pytest.org/en/latest/). read the full docs at the [project's homepage](https://github.com/haarcuba/testix). Testix is special because it allows you to specif...
mit
7,304,769,653,540,143,000
32.78
109
0.675548
false
3.821267
true
false
false
jan25/code_sorted
adventofcode/2020/4/2.py
1
2176
passports, lines = [], [] while True: try: line = input().strip() if line == "": passports.append(' '.join(lines)) lines = [] else: lines.append(line) except Exception: if lines: passports.append(' '.join(lines)) break '''...
unlicense
-457,575,433,495,296,060
29.661972
76
0.568474
false
3.099715
false
false
false
tanghaibao/jcvi
jcvi/annotation/stats.py
1
12645
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Collect gene statistics based on gff file: Exon length, Intron length, Gene length, Exon count """ import os.path as op import sys import logging from jcvi.utils.cbook import SummaryStats, percentage, human_size from jcvi.utils.range import range_interleave from jcvi....
bsd-2-clause
5,609,852,184,259,907,000
31.844156
88
0.573507
false
3.452088
false
false
false
skidekeersmaecker/raspi-cursus
labo4/mqtt.py
1
2464
import RPi.GPIO as GPIO import paho.mqtt.client as mqtt import time GPIO.setmode(GPIO.BOARD) #leds ledKitchen = 16 ledLivingroom = 18 GPIO.setup(ledKitchen, GPIO.OUT) GPIO.output(ledKitchen, False) GPIO.setup(ledLivingroom, GPIO.OUT) GPIO.output(ledLivingroom, False) #buttons buttonMaster = 11 buttonKitchen = 13 but...
mit
8,725,125,909,546,020,000
29.419753
96
0.689529
false
2.861789
false
false
false
andrei4ka/fuel-web-redhat
nailgun/nailgun/objects/serializers/release.py
1
1707
# -*- coding: utf-8 -*- # Copyright 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
apache-2.0
8,583,087,739,334,395,000
28.431034
78
0.650264
false
4.083732
false
false
false
quesnel/pyvle
src/pyvle.py
1
16780
#!/usr/bin/env python # -*- coding: utf-8 -*- # # File: pyvle.py # Author: The VLE Development Team. # Brief: Python wrapper of VLE # # VLE Environment - the multimodeling and simulation environment # This file is a part of the VLE environment (http://vle-project.org) # Copyright (C) 2003 - 2017 The VLE Development ...
gpl-3.0
-6,933,170,966,559,748,000
31.393822
87
0.638796
false
3.194365
false
false
false
wentixiaogege/newt-2.0
store/views.py
1
2855
from newt.views import AuthJSONRestView from common.response import json_response from django.conf import settings import json from importlib import import_module store_adapter = import_module(settings.NEWT_CONFIG['ADAPTERS']['STORES']['adapter']) import logging logger = logging.getLogger("newt." + __name__) # /ap...
bsd-2-clause
-4,546,405,815,730,923,500
38.666667
93
0.670053
false
3.674389
false
false
false
nschank/latexml
stringutil.py
1
2656
# import re # COMMENT_PATERN = re.compile("([^\\\\])%.*($)", flags=re.MULTILINE) # REDACT = "%" # COMMENT_REPLACE = "\\1{}\\2".format(REDACT) # def strip_comments(document_contents): # return COMMENT_PATERN.sub(COMMENT_REPLACE, document_contents) import strip_comments def strip_latex_comments(document_contents): ...
mit
2,413,618,694,096,714,000
29.181818
80
0.518449
false
3.849275
true
false
false
commtrack/commtrack-old-to-del
apps/reports/custom/grameen.py
1
7030
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import inspect from django.template.loader import render_to_string from django.db import connection import settings from xformmanager.models import Metadata, FormDefModel, ElementDefModel from reports.models import Case, SqlReport from reports.util import get_where...
bsd-3-clause
-1,309,282,711,300,028,700
46.5
116
0.644381
false
3.684486
false
false
false
chfoo/wpull
wpull/scraper/util.py
1
6973
'''Misc functions.''' import functools import gettext import itertools import logging import mimetypes import re import string import wpull.url from wpull.backport.logging import BraceMessage as __ from wpull.pipeline.item import LinkType _ = gettext.gettext _logger = logging.getLogger(__name__) def parse_refresh(...
gpl-3.0
-2,034,855,246,780,875,500
27.797521
110
0.587028
false
3.607143
false
false
false
jeremiahyan/odoo
odoo/tools/template_inheritance.py
1
9597
from lxml import etree from lxml.builder import E import copy import itertools import logging from odoo.tools.translate import _ from odoo.tools import SKIPPED_ELEMENT_TYPES, html_escape _logger = logging.getLogger(__name__) def add_text_before(node, text): """ Add text before ``node`` in its XML tree. """ ...
gpl-3.0
2,848,593,791,806,002,000
39.323529
106
0.51068
false
4.8009
false
false
false
Eric89GXL/vispy
vispy/util/fonts/tests/test_font.py
1
1301
# -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. import numpy as np import warnings from vispy.testing import assert_in, run_tests_if_main from vispy.util.fonts import list_fonts, _load_glyph, _vispy_fonts im...
bsd-3-clause
-699,862,398,090,827,600
28.568182
73
0.654881
false
3.260652
true
false
false
drJfunk/gbmgeometry
gbmgeometry/position_interpolator.py
1
4903
import astropy.io.fits as fits import astropy.units as u import numpy as np import scipy.interpolate as interpolate from gbmgeometry.utils.gbm_time import GBMTime class PositionInterpolator(object): def __init__(self, poshist=None, T0=None, trigdat=None): # Use position history file """ ...
mit
1,473,218,808,684,017,200
21.490826
84
0.451152
false
3.560639
false
false
false
rabc/Gitmark
flask/testing.py
1
2318
# -*- coding: utf-8 -*- """ flask.testing ~~~~~~~~~~~~~ Implements test support helpers. This module is lazily imported and usually not used in production environments. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from werkzeug import Client, Envir...
mit
-7,269,470,205,188,622,000
33.597015
70
0.574633
false
4.440613
false
false
false
andreoliw/clitoolkit
clit/ui.py
1
1060
"""User interface.""" import sys import time from pathlib import Path from subprocess import PIPE, CalledProcessError import click from clit.files import shell def notify(title, message): """If terminal-notifier is installed, use it to display a notification.""" check = "which" if sys.platform == "linux" el...
bsd-3-clause
1,113,306,305,299,595,500
32.125
116
0.654717
false
4.045802
false
false
false
mark-burnett/filament-dynamics
actin_dynamics/numerical/correlation.py
1
2220
# Copyright (C) 2011 Mark Burnett # # 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 i...
gpl-3.0
3,708,285,325,205,364,000
31.647059
78
0.678378
false
3.794872
false
false
false
vrthra/pygram
tests/test_accesslog.py
1
16740
from urllib.parse import urlparse import induce import collections import random import accesslog random.seed(0) def test_accesslog1(): content_lines = ''' 1.1.1.1 - - [21/Feb/2014:06:35:45 +0100] "GET /robots.txt HTTP/1.1" 200 112 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" '''...
gpl-3.0
5,739,183,233,330,992,000
84.846154
190
0.665054
false
2.223994
false
false
false
PaddlePaddle/models
dygraph/sentiment/nets.py
1
10899
# Copyright (c) 2019 PaddlePaddle 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 appli...
apache-2.0
-5,716,231,717,612,682,000
40.758621
108
0.565373
false
3.476555
false
false
false
nhmc/LAE
cloudy/find_par.py
1
13374
from __future__ import division from math import log, sqrt, pi from barak.utilities import adict from barak.absorb import split_trans_name from barak.io import parse_config, loadobj from barak.interp import AkimaSpline, MapCoord_Interpolator from cloudy.utils import read_observed import numpy as np import os from glob...
mit
7,457,585,991,942,735,000
30.842857
147
0.515253
false
2.97134
false
false
false
frederick623/wat
option_dl.py
1
1542
import sys import urllib2 import zipfile import StringIO import datetime output_path = "hkex_options" def main(argv): if len(argv) > 1: dt = datetime.datetime.strptime(argv[1], "%Y%m%d").date() else: dt = datetime.date.today() + datetime.timedelta(days=-3) while dt < datetime.date.today(): if int(dt.strfti...
apache-2.0
-3,635,285,752,176,639,000
31.145833
112
0.666018
false
2.686411
false
false
false
anish/buildbot
master/buildbot/test/unit/test_steps_source_base_Source.py
1
6613
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
8,742,843,434,144,445,000
33.805263
80
0.617118
false
4.233675
true
false
false
rschiang/ntusc-statute
scripts/utils.py
1
3691
# utils.py - additional functions import re # Common constants RE_CJK_NUMERICS = r'〇ㄧ一二三四五六七八九十百零' RE_CJK_NUMERICS_MIXED = r'〇ㄧ一二三四五六七八九十零壹貳參肆伍陸柒捌玖拾' RE_CJK_NUMERICS_SINGLE = r'一二三四五六七八九十' RE_CJK_PATTERN = '[\u3400-\u4DB5\u4E00-\u9FD5]' RE_CJK_BOUNDARY_PRE = re.compile(r'(?<=' + RE_CJK_PATTERN + r')\s*([\d\-A-Za-z\(]+...
gpl-3.0
-1,518,688,606,506,065,200
31.764151
85
0.603225
false
2.615211
false
false
false
gbiggs/rtsprofile
rtsprofile/message_sending.py
1
20553
# -*- Python -*- # -*- coding: utf-8 -*- '''rtsprofile Copyright (C) 2009-2015 Geoffrey Biggs RT-Synthesis Research Group Intelligent Systems Research Institute, National Institute of Advanced Industrial Science and Technology (AIST), Japan All rights reserved. Licensed under the GNU Lesser Ge...
lgpl-3.0
9,126,888,891,478,318,000
33.60101
89
0.57432
false
4.497374
false
false
false
kevinarpe/kevinarpe-rambutan3
rambutan3/check_args/collection/RRangeSizeMatcher.py
1
2658
from rambutan3 import RArgs from rambutan3.check_args.base.RAbstractTypeMatcher import RAbstractTypeMatcher from rambutan3.check_args.base.traverse.RTypeMatcherError import RTypeMatcherError from rambutan3.string.RMessageText import RMessageText class RRangeSizeMatcher(RAbstractTypeMatcher): """ This class is...
gpl-3.0
-1,375,920,728,825,385,700
33.973684
108
0.565839
false
3.563003
false
false
false
timmyomahony/python-parsnip
parsnip/__init__.py
1
4250
import urllib import urllib2 import cookielib from lxml import etree DEBUG = False VERSION = "0.0.1" import logging logger = logging.getLogger(__name__) if DEBUG: logging.basicConfig(level=logging.DEBUG) from parsnip import utils class Webtext(object): """ Represents a webtext to be sent to a list of recipients...
mit
8,747,260,817,803,172,000
33
111
0.702588
false
3.475061
false
false
false
Hernanarce/pelisalacarta
python/version-command-line/platformcode/platformtools.py
1
1188
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # platformtools # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ from core import config def dialog_ok(heading, line1, line2="", line3=""): return True def dialog_notification(heading,...
gpl-3.0
9,129,338,694,733,797,000
21.433962
102
0.637205
false
3.6
false
false
false
cloudera/ibis
ibis/backends/pandas/tests/conftest.py
1
1158
from pathlib import Path import pandas as pd import ibis import ibis.expr.operations as ops from ibis.backends.tests.base import BackendTest, RoundHalfToEven class TestConf(BackendTest, RoundHalfToEven): check_names = False additional_skipped_operations = frozenset({ops.StringSQLLike}) supported_to_time...
apache-2.0
8,643,831,911,716,360,000
32.085714
79
0.570812
false
4.106383
false
false
false
fabiobatalha/publication_stats
publication/thrift/server.py
1
7000
# coding: utf-8 import json import argparse import logging import os import sys from publication.controller import stats, ServerError import thriftpy import thriftpywrap from thriftpy.rpc import make_server logger = logging.getLogger(__name__) publication_stats_thrift = thriftpy.load( os.path.join(os.path.dirna...
bsd-2-clause
-4,031,151,090,188,490,000
30.96347
142
0.611143
false
4.36409
false
false
false
plotly/python-api
packages/python/plotly/plotly/graph_objs/splom/marker/_line.py
1
24938
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "splom.marker" _path_str = "splom.marker.line" _valid_props = { "autocolorscale", ...
mit
-8,391,715,932,195,973,000
36.842185
87
0.565322
false
3.982434
false
false
false
amasiero/approach_control
approach_control_manipulator/nodes/approach_control_manipulator/OpenGripper.py
1
1219
#!/usr/bin/env python import rospy import smach import numpy as np from std_msgs.msg import Float64 from dynamixel_msgs.msg import JointState class OpenGripper(smach.State): def __init__(self): smach.State.__init__(self, outcomes = ['success', 'in_progress', 'fail']) self.joint4 = rospy.Publishe...
gpl-2.0
2,137,452,575,474,509,000
26.111111
92
0.59557
false
3.533333
false
false
false
ua-snap/downscale
snap_scripts/downscaling_L48/downscale_cmip5_L48.py
1
6512
# downscale the prepped cmip5 data used in running the TEM model (IEM) # author: Michael Lindgren if __name__ == '__main__': import glob, os, rasterio, itertools from functools import partial import downscale from downscale import preprocess import numpy as np import argparse # # parse the commandline argument...
mit
-4,572,493,743,222,169,000
37.311765
151
0.670147
false
2.920179
false
false
false
gviejo/ThalamusPhysio
python/main_make_MAPinfo.py
1
14284
#!/usr/bin/env python ''' File name: main_make_movie.py Author: Guillaume Viejo Date created: 09/10/2017 Python Version: 3.5.2 To make shank mapping ''' import numpy as np import pandas as pd # from matplotlib.pyplot import plot,show,draw import scipy.io from functions import * from pylab import * from skle...
gpl-3.0
-2,535,166,758,625,621,500
36.989362
199
0.556007
false
2.672904
false
false
false
PiJoules/python-type-inference
pytype.py
1
13687
class PyType: NEW_METHOD = "__new__" INIT_METHOD = "__init__" DEL_METHOD = "__del__" REPR_METHOD = "__repr__" STR_METHOD = "__str__" BYTES_METHOD = "__bytes__" FORMAT_METHOD = "__format__" LT_METHOD = "__lt__" LE_METHOD = "__le__" EQ_METHOD = "__eq__" NE_METHOD = "__ne__" ...
mit
-4,542,938,915,994,257,400
28.245726
129
0.560532
false
4.086892
false
false
false
lipixun/pytest
rabbitmq/publishconfirm/client.py
1
2881
#!/usr/bin/env python # encoding=utf8 # The publish confirm test client import sys reload(sys) sys.setdefaultencoding('utf8') import gevent from gevent import monkey monkey.patch_all() from haigha.connections.rabbit_connection import RabbitConnection from haigha.message import Message class Client(object): """T...
gpl-2.0
3,695,272,715,719,721,500
31.370787
134
0.597015
false
3.887989
true
false
false
rmed/zoe-sysinfo
agents/sysinfo/sysinfo.py
1
12303
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Zoe Sysinfo - https://github.com/rmed/zoe-sysinfo # # Copyright (c) 2015 Rafael Medina García <rafamedgar@gmail.com> # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentati...
mit
5,714,891,798,546,808,000
29.83208
80
0.482361
false
4.089761
false
false
false
gkunter/coquery
coquery/gui/ui/findWidgetUi.py
1
2751
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'findWidget.ui' # # Created by: PyQt5 UI code generator 5.7.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_FindWidget(object): def setupUi(self, FindWidget): FindWi...
gpl-3.0
5,910,999,480,630,010,000
46.431034
102
0.708833
false
4.010204
false
false
false
haidlir/drox
lib.py
1
4946
# The MIT License (MIT) # Copyright (c) 2015 haidlir # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
mit
212,829,334,784,592,700
33.587413
105
0.573797
false
3.807544
false
false
false
dayatz/taiga-back
tests/integration/test_totals_projects.py
1
5868
# -*- coding: utf-8 -*- # Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2017 Anler Hernández <hello@anler.me> # Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alon...
agpl-3.0
-8,717,044,814,042,567,000
35.203704
82
0.701449
false
3.677116
false
false
false
cgqyh/pyalgotrade-mod
testcases/websocket_server.py
1
1284
import threading from wsgiref import simple_server from ws4py.server import wsgirefserver from ws4py.server import wsgiutils class WebSocketServerThread(threading.Thread): def __init__(self, host, port, webSocketServerClass): super(WebSocketServerThread, self).__init__() self.__host = host ...
apache-2.0
-4,481,928,351,619,121,000
33.702703
83
0.679907
false
4.15534
false
false
false
clipo/idss-seriation
seriation/database.py
1
10460
#!/usr/bin/env python # Copyright (c) 2015. Mark E. Madsen <mark@madsenlab.org> # # This work is licensed under the terms of the Apache Software License, Version 2.0. See the file LICENSE for details. """ Description here """ from mongoengine import * from seriation import idss_version import datetime import loggi...
apache-2.0
-8,235,923,105,254,227,000
36.625899
119
0.711663
false
4.02153
false
false
false
yogendersolanki91/winfsp
tools/gensrc/ntstatus.py
2
3934
#!/usr/bin/python import sys pairs = [] for line in sys.stdin: pairs.extend(line.strip().split()) pairs = zip(pairs[::2], pairs[1::2]) fixed = { 'ERROR_ACCESS_DENIED': 'STATUS_ACCESS_DENIED', 'ERROR_CANNOT_IMPERSONATE': 'STATUS_CANNOT_IMPERSONATE', 'ERROR_CONNECTION_ABORTED': 'STATUS_CONNECTION_ABORT...
gpl-3.0
-1,532,350,312,026,019,800
45.833333
80
0.678953
false
2.940209
false
false
false
godmar/problemtools
setup.py
1
2718
#!/usr/bin/env python2 from setuptools import setup, find_packages from setuptools.command.bdist_egg import bdist_egg as _bdist_egg import distutils.cmd from distutils.command.build import build as _build import os import subprocess class BuildSupport(distutils.cmd.Command): """A custom command to build the supp...
mit
-8,236,077,664,496,998,000
27.610526
95
0.611111
false
3.877318
false
false
false
CanonicalLtd/subiquity
setup.py
1
3933
#!/usr/bin/env python3 # -*- mode: python; -*- # # Copyright 2015 Canonical, Ltd. # # 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 lat...
agpl-3.0
8,198,292,872,499,578,000
29.253846
74
0.580219
false
3.598353
false
false
false
sam-m888/gprime
gprime/lib/primaryobj.py
1
12459
# # gPrime - A web-based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2011 Tim G L Lyons # # 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 versio...
gpl-2.0
-4,829,788,241,042,503,000
34.69914
79
0.609278
false
4.733663
false
false
false
rdo-infra/releng
rdoutils/cmd/check_dependants.py
1
10118
#! /usr/bin/python3 # # Mostly copied code from find_unblocked_orphans.py in fedora # # Credits to original authors: # Jesse Keating <jkeating@redhat.com> # Till Maas <opensource@till.name> # # Copyright (c) 2009-2013 Red Hat # SPDX-License-Identifier: GPL-2.0 # # From: # https://pagure.io/releng/blob/main/f/sc...
apache-2.0
-6,268,966,650,308,080,000
39.472
112
0.579957
false
3.732202
true
false
false
dhellmann/openstack-release-test
doc/source/conf.py
1
2460
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software...
apache-2.0
5,722,083,156,617,589,000
31.8
79
0.689837
false
3.880126
false
false
false
tasleson/lsm-ci
testing/server.py
1
1369
#!/usr/bin/env python3 """ Test development server. """ import socket import ssl import testlib import traceback import sys bindsocket = socket.socket() bindsocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) bindsocket.bind(("", 8675)) bindsocket.listen(5) while True: print("Waiting for a client...") ...
apache-2.0
-4,696,118,900,612,178,000
22.603448
67
0.577064
false
3.730245
false
false
false
telefonicaid/murano
murano/common/messaging/mqclient.py
1
3376
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
6,651,683,647,796,950,000
30.849057
72
0.601007
false
4.167901
false
false
false
ASoftTech/Scons-Tools-Grbd
scons_tools_grbd/Tools/Docs/Doxygen/DoxygenCommon.py
1
12301
""" DoxygenCommon Common code associated with doxygen builders """ import os, sys, os.path as path, yaml import SCons.Script from SCons.Environment import Environment from SCons.Script import File, Dir import glob from fnmatch import fnmatch from functools import reduce # Currently supported output for...
mit
-959,350,828,641,448,600
33.862974
118
0.509959
false
4.120938
false
false
false
mpdehaan/camp
camp/tracker/scenes.py
1
1248
""" Copyright 2016, Michael DeHaan <michael.dehaan@gmail.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
apache-2.0
-4,207,163,904,414,912,000
30.2
102
0.659455
false
4.065147
false
false
false