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
extsui/7SegFinger
test_8digit_and_latch.py
1
4734
# -*- coding: utf-8 -*- import spidev import math def reverse_bit_order(x): x_reversed = 0x00 if (x & 0x80): x_reversed |= 0x01 if (x & 0x40): x_reversed |= 0x02 if (x & 0x20): x_reversed |= 0x04 if (x & 0x10): x_reversed |= 0x08 if (x & 0x08): x_reversed |= 0x10 if (x & 0x04): x_...
mit
-5,917,152,520,773,421,000
21.32973
60
0.575996
false
1.960927
false
false
false
examachine/bitdrill
scripts/merge-itemsets.py
1
2635
#! /usr/bin/python import sys import string import os import copy import transaction import pattern from transaction import decode_items, encode_items if len(sys.argv)!=5: print 'usage: prog <db> <freq itemset1> <freq itemset2> <support>' sys.exit(-1) else: dbname = sys.argv[1] freq1name = sys.argv[2]...
agpl-3.0
-6,056,729,359,778,043,000
23.174312
88
0.604554
false
3.092723
false
false
false
cheery/textended-edit
compositor/__init__.py
1
3711
# Used to display minitex boxes on screen. from minitex import boxmodel import renderers class Compositor(object): def __init__(self, images, debug=False): self.debug = debug self.images = images self.imglayer = renderers.ImageLayer(images) self.fontlayers = {} def get_fontlaye...
mit
-7,913,254,701,952,263,000
44.256098
123
0.575856
false
3.445682
false
false
false
adamewing/tebreak
scripts/picklereads.py
1
2261
#!/usr/bin/env python import os import pickle import argparse import logging from uuid import uuid4 from collections import defaultdict as dd logger = logging.getLogger(__name__) def output_fastq(ins, pickle, uuid): out_sr_fn = '.'.join(pickle.strip().split('.')[:-1]) + '.' + uuid + '.SR.fastq' out_dr_fn =...
mit
6,442,492,667,076,628,000
29.146667
118
0.580716
false
3.43617
false
false
false
webcomics/dosage
dosagelib/plugins/rhjunior.py
1
1471
# SPDX-License-Identifier: MIT # Copyright (C) 2019-2020 Tobias Gruetzmacher # Copyright (C) 2019-2020 Daniel Ring from ..scraper import _ParserScraper class RHJunior(_ParserScraper): stripUrl = 'https://www.rhjunior.com/%s/' imageSearch = '//div[contains(@class, "entry-content")]//img' multipleImagesPerS...
mit
-8,525,481,723,409,454,000
38.756757
83
0.558804
false
3.283482
false
false
false
zingale/hydro_examples
advection/weno.py
1
15253
import numpy from matplotlib import pyplot import advection import weno_coefficients from scipy.integrate import ode def weno(order, q): """ Do WENO reconstruction Parameters ---------- order : int The stencil width q : numpy array Scalar data to reconstruct ...
bsd-3-clause
-1,032,854,415,870,718,300
29.386454
81
0.485872
false
2.898708
false
false
false
maikelwever/autoaurbuilder
autoaurbuilder/build/management/commands/schedule.py
1
1383
from django.core.management.base import BaseCommand from package.models import Package class Command(BaseCommand): args = 'None' help = 'Checks for updates on packages and schedules rebuilds if needed.' def handle(self, *args, **kwargs): self.stdout.write("Checking for updates on packages...") ...
gpl-3.0
53,555,113,558,810,240
35.394737
85
0.550253
false
4.656566
false
false
false
jromang/retina-old
distinclude/spyderlib/widgets/externalshell/baseshell.py
1
12772
# -*- coding: utf-8 -*- # # Copyright © 2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disable=R0201 import sys import os import os.path as osp from time import ...
gpl-3.0
7,928,487,626,756,879,000
37.791277
82
0.548743
false
4.244267
false
false
false
rosenbrockc/fortpy
fortpy/interop/converter.py
1
19280
import os from .. import msg import re import xml.etree.ElementTree as ET from fortpy.testing.comparer import FileComparer class TemplateLine(object): """Represents a single line in the template file and how to format it. :arg element: the XML element that defines this line in the file. :arg group: the [g...
mit
-2,943,328,751,953,272,000
39.504202
110
0.578631
false
4.421004
false
false
false
room77/py77
pylib/util/singleton.py
1
2390
""" Singleton implementation. Usage: class A(singleton.Singleton): pass Please NOTE: id(A.Instance()), id(A)) """ __copyright__ = '2013, Room 77, Inc.' __author__ = 'Pramod Gupta' import threading # with_metaclass method from Six compatibility library. # https://github.com/benjaminp/six/blob/1.11.0/six.py#L819 def...
mit
9,167,899,862,102,201,000
28.875
98
0.648536
false
3.930921
false
false
false
caktus/django-treenav
treenav/tests/test_views.py
1
17704
from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.core.cache import cache from django.http import HttpRequest from django.template import Template from django.template.context import Context from django.test import override_settings from django.urls impor...
bsd-3-clause
514,541,756,168,908,400
35.278689
89
0.546091
false
3.881605
true
false
false
NarlikarLab/DIVERSITY
weblogoMod/weblogolib/__init__.py
1
41331
#!/usr/bin/env python # -------------------------------- WebLogo -------------------------------- # Copyright (c) 2003-2004 The Regents of the University of California. # Copyright (c) 2005 Gavin E. Crooks # Copyright (c) 2006-2011, The Regents of the University of California, through # Lawrence Berkeley Nationa...
gpl-3.0
6,209,968,925,322,337,000
34.265358
137
0.570637
false
3.89768
false
false
false
mredar/ucldc_oai_harvest
oai_harvester/oai_harvester.py
1
6784
#! /usr/bin/env python '''UCLDC OAI Harvester: Collects records from OAI interfaces and inputs to basic solr schema. Driven off the collection registry''' ''' imagining right now that this will be woken by a crontab. It then looks at the incoming queue and processes any "READY" msgs (maybe only ready ones there) shoul...
bsd-3-clause
-3,734,049,030,187,922,000
38.672515
167
0.630159
false
3.343519
false
false
false
egitto/parchment-and-copper
scratch/cryptopals/ctr.py
1
1530
from cbc import CBC_encrypt from ecb import ECB_encrypt from bytestring_tools import xor, data from math import ceil def counter_function(n): return int.to_bytes(n,9,'big')+b'\x00'*7 def CTR_keystream(key,counter_function,length,start): # start = nonce = first byte we haven't generated keystream for yet # I hav...
gpl-3.0
8,308,754,510,609,592,000
33
107
0.713725
false
2.931034
false
false
false
siconos/siconos-deb
examples/Control/Zhuravlev/ZhuravlevIvanovMCP_C.py
1
4846
import siconos.numerics as SN import numpy as np import matplotlib.pyplot as plt try: from cffi import FFI except: import sys print('no cffi module installed, exiting') sys.exit(0) withPlot = False if __name__ == '__main__': xk = np.array((1., 10.)) T = 10.0 t = 0.0 h = 1e-3 z...
apache-2.0
1,840,833,609,540,054,800
26.072626
108
0.470491
false
2.751846
false
false
false
tinyms/ArchiveX
tinyms/bpm/entity.py
1
2197
__author__ = 'tinyms' #coding=UTF8 from sqlalchemy import Column, Integer, String, Text, LargeBinary, DateTime from tinyms.core.orm import Simplify, Entity, many_to_one, many_to_many #通知引擎处理节点 @many_to_one("BPMProcessInstance") class BPMWorkflow(Entity, Simplify): node_id = Column(Integer(), nullable=False) #行...
bsd-3-clause
3,168,598,971,852,385,300
28.028986
75
0.695457
false
2.793584
false
false
false
simonsdave/yar
yar/key_service/async_creds_retriever.py
1
2387
"""This module contains functionality to async'ly retrieve credentials from the key store.""" import httplib import logging from ks_util import filter_out_non_model_creds_properties from ks_util import AsyncAction _logger = logging.getLogger("KEYSERVICE.%s" % __name__) class AsyncCredsRetriever(AsyncAction): ...
mit
6,111,016,473,754,680,000
30.826667
75
0.516967
false
4.158537
false
false
false
j-dasilva/COMP4350
apartment/rest/serializers.py
1
1201
from rest_framework import serializers class MessageSerializer(serializers.Serializer): sender = serializers.CharField(max_length=32) recipient = serializers.CharField(max_length=32) urgency = serializers.IntegerField() content = serializers.CharField(max_length=256) timestamp = serializers.Intege...
gpl-2.0
6,784,690,892,494,369,000
36.5625
62
0.766861
false
4.464684
false
false
false
bowen0701/algorithms_data_structures
lc0419_battleships_in_a_board.py
1
3508
"""Leetcode 419. Battleships in a Board Medium Given an 2D board, count how many battleships are in it. The battleships are represented with 'X's, empty slots are represented with '.'s. You may assume the following rules: - You receive a valid board, made of only battleships or empty slots. - Battleships can only be p...
bsd-2-clause
-7,352,669,705,755,854,000
26.622047
81
0.531357
false
3.64657
false
false
false
firulais/snap-RPi
RPiGPIO.py
1
3629
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Snap! extension to support Raspberry Pi -- server component. Copyright (C) 2014 Paul C. Brown <p_brown@gmx.com>. 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 F...
gpl-3.0
-8,815,553,636,177,159,000
29.225
114
0.587538
false
3.908405
false
false
false
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_10_01/models/network_interface_ip_configuration.py
1
5689
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-2,864,916,992,377,040,400
55.89
163
0.687291
false
4.031892
true
false
false
gaccardo/buxfer_api
api/buxfer.py
1
3631
import requests import settings from pybles import pybles from account import Account from transaction import Transaction from budget import Budget from reminder import Reminder requests.packages.urllib3.disable_warnings() class ErrorWithBuxferAPI( Exception ): pass class BuxferAPIUnauthorized( Exception ): pass ...
gpl-2.0
1,461,001,327,499,848,700
30.850877
80
0.590746
false
4.093574
false
false
false
jhford/picsort
picsort/sort.py
1
8858
import os import optparse import hashlib import json import shutil from xml.dom import minidom import multiprocessing # Only for CPU Count import Queue import threading import time import re try: import exifread except ImportError: print 'You are missing the exifread module. Try installing it' print 'with...
gpl-2.0
-670,674,206,479,652,600
29.335616
103
0.581847
false
3.686226
false
false
false
karstenw/nodebox-pyobjc
examples/Extended Application/matplotlib/examples/recipes/transparent_legends.py
1
1700
""" Transparent, fancy legends ========================== Sometimes you know what your data looks like before you plot it, and may know for instance that there won't be much data in the upper right hand corner. Then you can safely create a legend that doesn't overlay your data: ax.legend(loc='upper right') Other ...
mit
154,122,098,309,639,550
25.169231
82
0.641765
false
3.346457
false
false
false
lcy-seso/models
fluid/image_classification/caffe2fluid/kaffe/shapes.py
1
5047
import math from collections import namedtuple from .errors import KaffeError Tensor4DShape = namedtuple('Tensor4DShape', ['batch_size', 'channels', 'height', 'width']) Tensor3DShape = namedtuple('Tensor3DShape', ['batch_size', 'data1', 'data2']) Tensor2DShape = namedtuple('Tensor2DShape'...
apache-2.0
-4,642,686,649,229,181,000
31.772727
81
0.632059
false
3.285807
false
false
false
underloki/Cyprium
app/cli/root/crypto/text/atomicdigits.py
1
12349
#! /usr/bin/python3 ######################################################################## # # # Cyprium is a multifunction cryptographic, steganographic and # # cryptanalysis tool developped by members of The Hackademy. # # Fre...
gpl-3.0
-3,187,348,069,849,674,000
44.881041
123
0.458273
false
4.381257
false
false
false
patrickfuller/imolecule
imolecule/format_converter.py
1
7752
""" Methods to interconvert between json and other (cif, mol, smi, etc.) files """ import imolecule.json_formatter as json from collections import Counter from fractions import gcd from functools import reduce # Open Babel <= '2.4.1' try: import pybel ob = pybel.ob table = ob.OBElementTable() GetAtomi...
mit
-2,810,372,494,749,063,700
33.14978
79
0.611326
false
3.658329
false
false
false
Dangetsu/vnr
Frameworks/Sakura/py/apps/browser/core/network.py
1
6136
# coding: utf8 # network.py # 12/13/2012 jichi __all__ = 'WbNetworkAccessManager', import os from PySide.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkDiskCache from sakurakit import skfileio, sknetwork from sakurakit.skdebug import dprint import proxy, rc ## Cookie ## class WbNetworkCookieJar(sk...
gpl-3.0
-7,939,426,695,941,175,000
33.088889
119
0.683833
false
3.437535
false
false
false
jpvmm/DLearningExp
fuzzy.py
1
4518
#Fuzzy Algorithm to mark calcifications in mammography #I'm using Mandani Defuzzification #FutureBox Analytics from __future__ import division import numpy as np import matplotlib.cm as cm import matplotlib.pyplot as p from skimage.io import imread from skimage.measure import label, regionprops from skimage.exposure i...
gpl-3.0
8,367,580,780,083,394,000
27.77707
99
0.542939
false
3.172753
false
false
false
RaVenHelm/SortingClass
SortingClass.py
1
9012
from copy import copy class SortingUtilClass: @staticmethod def list_to_string(values): count = len(values) - 1 res = '' for n in values: fmt_string = '{:<3}' res += fmt_string.format(n) return res @staticmethod def print_results(comparisons, swaps): print() print('Analysis: ') print('\t{0:<...
mit
2,211,133,984,667,170,600
26.063063
114
0.642255
false
2.809227
false
false
false
dgouldin/myspaceid-python-sdk
src/openid/fetchers.py
1
14001
# -*- test-case-name: openid.test.test_fetchers -*- """ This module contains the HTTP fetcher interface and several implementations. """ __all__ = ['fetch', 'getDefaultFetcher', 'setDefaultFetcher', 'HTTPResponse', 'HTTPFetcher', 'createHTTPFetcher', 'HTTPFetchingError', 'HTTPError'] import urll...
apache-2.0
-4,169,098,957,301,690,000
31.560465
79
0.592029
false
4.300061
false
false
false
g-weatherill/oq-risklib
openquake/commonlib/tests/_utils.py
1
1745
# Copyright (c) 2010-2014, GEM Foundation. # # NRML 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 later version. # # NRML is distributed in t...
agpl-3.0
-301,822,622,540,493,440
35.354167
74
0.699713
false
3.635417
false
false
false
resolutedreamer/IR-Transmit-Receive
scripts/etc/init.d/notify_ip.py
1
6098
import smtplib import subprocess import sys import time import threading import datetime from email.mime.text import MIMEText # Please Fill in with Correct Information to use SMTP_SERVER = "smtp.gmail.com:587" SMTP_UNAME = "email@email.com" SMTP_PASSWD = "incorrect_password" DEFAULT_NOTIFY_PAUSE = 3600 DEFAULT_CHECK_...
apache-2.0
7,988,192,192,993,335,000
33.067039
108
0.61594
false
4.111935
false
false
false
shreesundara/netsnmp
pysmi/compiler.py
1
21084
import sys import os import time try: from pwd import getpwuid except ImportError: getpwuid = lambda x: ['<unknown>'] from pysmi import __name__ as packageName from pysmi import __version__ as packageVersion from pysmi.mibinfo import MibInfo from pysmi.codegen.symtable import SymtableCodeGen from pys...
bsd-2-clause
2,209,945,687,160,253,700
42.955224
266
0.572282
false
4.151211
false
false
false
ST-Data-Mining/crater
george/klazzifiers.py
1
5539
from __future__ import division,print_function from os import environ import sys HOME=environ['HOME'] PROJECT_ROOT=HOME+'/Panzer/NCSU/Spatial and Temporal/crater' EXPTS = PROJECT_ROOT+'/expts' sys.path.extend([PROJECT_ROOT,EXPTS]) sys.dont_write_bytecode = True from george.lib import * from expts.csvParser import parse...
mit
-4,664,917,264,122,412,000
28.462766
97
0.625925
false
3.111798
true
false
false
YoungKwonJo/mlxtend
mlxtend/data/iris.py
1
6046
# Sebastian Raschka 2015 # mlxtend Machine Learning Library Extensions import numpy as np def iris_data(): """Iris flower dataset. Returns -------- X, y : [n_samples, n_features], [n_class_labels] X is the feature matrix with 150 flower samples as rows, and the 3 feature columns sepal len...
bsd-3-clause
-8,277,334,933,845,212,000
32.588889
86
0.275885
false
1.697361
false
false
false
isb-cgc/ISB-CGC-data-proc
bigquery_etl/extract/utils.py
1
2377
# -*- coding: utf-8 -*- #!/usr/bin/env python # Copyright 2015, Institute for Systems Biology. # 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 # ...
apache-2.0
8,472,730,164,494,883,000
33.449275
118
0.6504
false
4.021997
false
false
false
sargm/selenium-py-traning-barancev
php4dvd/model/application.py
1
4501
from selenium.common.exceptions import * from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from php4dvd.pages.page import Page from php4dvd.pages.login_page import LoginPage ...
apache-2.0
-5,599,819,519,281,207,000
36.508333
103
0.647856
false
3.519156
false
false
false
pkilambi/ceilometer
ceilometer/storage/impl_mongodb.py
1
35357
# # Copyright 2012 New Dream Network, LLC (DreamHost) # Copyright 2013 eNovance # Copyright 2014 Red Hat, Inc # # Authors: Doug Hellmann <doug.hellmann@dreamhost.com> # Julien Danjou <julien@danjou.info> # Eoghan Glynn <eglynn@redhat.com> # # Licensed under the Apache License, Version 2.0 (the "Licens...
apache-2.0
8,195,262,560,355,288,000
39.454233
79
0.535735
false
4.363984
false
false
false
ebakan/Python
urler.py
1
1086
#!/usr/bin/env python import urllib.request def genterm(inp): def foo(x): if x.isalpha(): return x else: return '%{0}'.format(hex(ord(x))[2:]) return ''.join(map(foo,inp)) def genresults(inp): page=urllib.request.urlopen('http://ajax.googleapis.com/ajax/services/sea...
gpl-3.0
-8,417,570,026,628,726,000
25.487805
99
0.571823
false
3.12069
false
false
false
grakiss888/testapi
update/templates/update_mongodb.py
1
2865
############################################################################## # Copyright (c) 2016 ZTE Corporation # feng.xiaowei@zte.com.cn # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, ...
apache-2.0
-7,486,893,034,568,809,000
30.833333
78
0.597208
false
4.035211
false
false
false
Prev/jikji
tests/test_generator.py
1
1600
""" tests.generator --------------- Test generator of application :author: Prev(prevdev@gmail.com) """ import pytest import os import shutil from jikji import Jikji def test_generate1() : """ Testing for generating of testapp1 """ jikji = Jikji('tests/testapp1', options=['sclear']) OUTPUT_ROOT = jikji.set...
mit
-1,156,732,441,587,812,000
18.277108
74
0.63375
false
2.649007
true
false
false
fffonion/xeHentai
xeHentai/i18n/__init__.py
1
1102
#!/usr/bin/env python # coding:utf-8 # Contributor: # fffonion <fffonion@gmail.com> import importlib from ..const import * from . import en_us as lng_fallback try: _locale = LOCALE.lower() if LOCALE else 'en_us' if _locale in ('zh_cn', 'zh_sg'): _locale = 'zh_hans' elif _locale in ('zh...
gpl-3.0
-3,419,455,272,191,152,000
28.783784
97
0.549002
false
3.078212
false
false
false
hubert667/AIR
src/scripts/kmeansScipy.py
1
3802
import random, pickle, os, sys import numpy as np from clusterData import * from scipy.cluster.vq import kmeans,vq,whiten class KMeans: def __init__(self, fK, tK, filename, typeDataset): self.queryRankerList = [] self.bestKClusterGroup = [] self.queryRankerDict = {} se...
gpl-3.0
-3,934,938,312,269,193,000
41.701149
150
0.593898
false
3.760633
false
false
false
denmojo/pygrow
grow/commands/filter.py
1
2992
from grow.pods import pods from grow.pods import storage import click import os @click.command() @click.argument('pod_path', default='.') @click.option('--include-obsolete/--no-include-obsolete', default=False, is_flag=True, help='Whether to include obsolete messages. If false, obsolete' ...
mit
5,153,167,556,879,288,000
53.4
79
0.621658
false
4.367883
false
false
false
alex4108/scLikesDownloader
scLikesDownloader.py
1
12232
import soundcloud as sc from soundcloud.resource import Resource import sys import os import urllib2 import re class downloader: def __init__(self, UserURL, PATH): try: self.client = sc.Client(client_id='', client_secret='', ) self.user = self.c...
gpl-2.0
3,850,365,799,363,366,400
36.179331
172
0.435988
false
4.381089
true
false
false
ksmit799/Toontown-Source
toontown/safezone/DistributedCheckers.py
1
29924
from pandac.PandaModules import * from direct.distributed.ClockDelta import * from direct.task.Task import Task from direct.interval.IntervalGlobal import * from TrolleyConstants import * from direct.gui.DirectGui import * from toontown.toonbase import TTLocalizer from direct.distributed import DistributedNode from dir...
mit
4,444,623,332,312,362,000
39.547425
363
0.554471
false
3.929097
false
false
false
ilona-asa/LDSAproject
email_counter.py
1
2018
#!/usr/bin/env python import os rootdir ='enron_mail_20110402/maildir' for user in os.listdir(rootdir): sent_items = 0 sent = 0 _sent_mail = 0 inbox = 0 total = 0 for folder in os.listdir(rootdir+'/'+user): # print '%s\t%s' % ((folder, os.path.isdir(folde...
mit
7,093,846,238,697,374,000
41.957447
76
0.387017
false
4.01992
false
false
false
jevinw/rec_utilities
babel_util/parsers/tree.py
1
4791
#!/usr/bin/env python import logging class TreeFile(object): """Handling functions for tree files, as produced by Infomap. The file should be a plain text file with the following format: <cluster_id> <score> <paper_id> 1:1:1:1 0.000021 "123456" 1:1:1:2 0.023122 "8675309" """ def __init__(...
agpl-3.0
51,877,899,420,969,890
31.591837
98
0.540388
false
4.444341
false
false
false
evilchili/shiptrak
mmsn/settings/__init__.py
1
4072
""" Django settings for mmsn 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/ """ import socket import dj_database_url from django.utils.crypto import get_rando...
mit
-5,726,247,871,517,285,000
26.513514
100
0.658644
false
3.343186
false
false
false
igemsoftware/HFUT-China_2015
design/search_part.py
1
5122
""" search_part.py realize the part search @author: Bowen """ from elasticsearch import Elasticsearch from design.models import parts, teams, team_parts, part_papers, paper import traceback def getPart(partName): """ find the part with part name @param partName: name of a part @type partName: str ...
apache-2.0
1,825,477,763,711,557,600
28.606936
85
0.545881
false
3.889142
false
false
false
ruipgil/TrackToTrip
scripts/test/test_t_mode_changepoint.py
1
2236
from tracktotrip import Track import tracktotrip.transportation_mode as tm from changepy import pelt from changepy.costs import normal_mean import numpy as np import matplotlib.pyplot as plt temp_trk = [ Track.from_gpx('/Users/ruipgil/tracks/backup/2015-07-23_1.gpx')[0], Track.from_gpx('/Users/ruipgil/tracks/...
mit
-9,132,506,782,880,904,000
24.123596
97
0.647138
false
2.833967
false
false
false
pybel/pybel-tools
src/pybel_tools/analysis/neurommsig/export.py
1
8861
# -*- coding: utf-8 -*- """This module contains the functions needed to process the NeuroMMSig excel sheets as well as export as BEL. To run, type :code:`python3 -m pybel_tools.analysis.neurommsig` in the command line """ import itertools as itt import logging import os import re import time from functools import pa...
mit
6,785,736,960,564,687,000
33.341085
112
0.611174
false
3.241859
false
false
false
ilya-epifanov/ansible
lib/ansible/cli/doc.py
1
11138
# (c) 2014, James Tanner <tanner.jc@gmail.com> # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed i...
gpl-3.0
-8,255,860,300,840,190,000
35.638158
158
0.532412
false
4.280553
false
false
false
linktlh/Toontown-journey
otp/uberdog/GlobalOtpObjectUD.py
1
1956
from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD MANAGER_CLASS = '' class GlobalOtpObjectUD(DistributedObjectGlobalUD): notify = directNotify.newCategory('GlobalOtpObjectUD') def announceGenerate(self): DistributedObjectGlobalUD.announceGenerate(self) self.s...
apache-2.0
-1,745,958,492,094,661,600
37.352941
97
0.685072
false
3.761538
false
false
false
xiangke/pycopia
mibs/pycopia/mibs/UCD_SNMP_MIB.py
1
28770
# python # This file is generated by a program (mib2py). Any edits will be lost. from pycopia.aid import Enum import pycopia.SMI.Basetypes Range = pycopia.SMI.Basetypes.Range Ranges = pycopia.SMI.Basetypes.Ranges from pycopia.SMI.Objects import ColumnObject, MacroObject, NotificationObject, RowObject, ScalarObject, N...
lgpl-2.1
7,706,995,773,191,167,000
27.97281
525
0.714599
false
2.569668
false
false
false
CFDEMproject/LAMMPS
tools/moltemplate/src/ltemplify.py
1
94070
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Andrew Jewett (jewett.aij at g mail) # http://www.chem.ucsb.edu/~sheagroup # License: 3-clause BSD License (See LICENSE.TXT) # Copyright (c) 2012, Regents of the University of California # All rights reserved. """ ltemplify.py The "ltemplify.py" script...
gpl-2.0
-8,459,022,808,084,960,000
45.248771
148
0.452418
false
3.89121
false
false
false
axptwig/CSCI-2963--Intro-to-Open-Source
files/Lab7/words5unordered.py
1
2890
""" Words/Ladder Graph ------------------ Generate an undirected graph over the 5757 5-letter words in the datafile words_dat.txt.gz. Two words are connected by an edge if they differ in one letter, resulting in 14,135 edges. This example is described in Section 1.1 in Knuth's book [1]_,[2]_. References ---------- .....
mit
7,894,361,437,417,402,000
35.125
100
0.582699
false
3.559113
false
false
false
ph1l/ocemr
ocemr/modelviz.7.py
1
6810
#!/usr/bin/env python """Django model to DOT (Graphviz) converter by Antonio Cavedoni <antonio@cavedoni.org> Make sure your DJANGO_SETTINGS_MODULE is set to your project or place this script in the same directory of the project and call the script like this: $ python modelviz.py [-h] [-d] [-i <model_names>] [-e <mode...
gpl-3.0
-5,578,806,056,656,196,000
29.538117
114
0.5442
false
3.793872
false
false
false
mkrapp/pystable
src/pystable.py
1
11946
from ConfigParser import SafeConfigParser import sys, os from string import Template import markdown2 import shutil import glob from dateutil.parser import parse import calendar def parse_config(posts_directory): global site_title, site_subtitle, site_author, \ site_aboutme, site_info, site_syntax, \ ...
gpl-2.0
7,100,139,526,058,622,000
38.556291
194
0.597438
false
3.464617
true
false
false
pmeier82/django-spikeval
djspikeval/views/algorithm.py
1
2234
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import apps from django.contrib import messages from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse_lazy from django.db.models import Q from django.shortcuts import redirect from django.v...
bsd-3-clause
-5,051,124,523,755,810,000
29.60274
117
0.703671
false
3.878472
false
false
false
FlowBoat/Flow-Tech-NeurAlgae
Versions/v2/v2.0/NeurAlgae2.0.py
1
15860
# FlowTech | NeurAlgae ## 2017 CWSF Science Fair | NeurAlgae: HAB Prediction Using Machine Learning Algorithms #Describes and trains a neural network for the analysis and prediction of algal bloom data #Copyright (C) 2017 Zachary Trefler and Atif Mahmud #This program is free software: you can redistribute it and/or m...
gpl-3.0
-8,447,979,558,048,298,000
41.98103
123
0.674149
false
3.020377
false
false
false
temnoregg/django-muzo
muzo/ws.py
1
7137
from SOAPpy import WSDL from django.utils.translation import gettext_lazy as _ from django.conf import settings from os.path import dirname from signature import CSignature from models import MERCHANT_NUM MUZO_ORDER_STATES = { 0: _('UNKNOWN'), 1: _('REQUESTED'), 2: _('PENDING'), 3: _('CREATED'), 4: _('APPROVE...
mit
-1,142,081,912,268,378,500
34.507463
136
0.676475
false
2.978715
false
false
false
IntelLabsEurope/infrastructure-repository
monitoring_service/epa_database/hw_reources.py
1
12910
# Copyright 2015 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
apache-2.0
8,347,671,430,936,619,000
32.273196
114
0.608521
false
3.645863
false
false
false
GrahamDumpleton/ispyd
ispyd/manager.py
1
2308
import atexit import cmd import ConfigParser import os import socket import threading import traceback import sys from ispyd.shell import RootShell class ShellManager(object): def __init__(self, config_file): self.__config_file = config_file self.__config_object = ConfigParser.RawConfigParser() ...
apache-2.0
-6,454,305,951,312,017,000
27.85
78
0.555893
false
4.289963
true
false
false
jart/tensorflow
tensorflow/python/eager/backprop.py
1
29803
# Copyright 2017 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
6,596,691,934,725,755,000
33.494213
108
0.664497
false
3.782107
false
false
false
waytai/pytracemalloctext
tests/python_memleak.py
1
3305
""" Memory usage of Python < 3.3 grows between some function calls, randomly, whereas it should stay stable. The final memory usage should be close to the initial memory usage. Example with Python 2.6: Initial memory: VmRSS: 3176 kB After call #1: VmRSS: 4996 kB After call #2...
mit
-3,558,270,381,872,102,400
27.247863
103
0.645386
false
3.35874
false
false
false
cburschka/NBT
examples/block_analysis.py
1
8106
#!/usr/bin/env python """ Finds the contents of the different blocks in a level, taking different data values (sub block types) into account. """ import locale, os, sys import glob # local module try: import nbt except ImportError: # nbt not in search path. Let's see if it can be found in the parent folder ...
mit
-2,987,137,642,103,406,600
45.855491
152
0.596348
false
3.370478
false
false
false
rockfruit/bika.lims
bika/lims/browser/batch/analysisrequests.py
1
2111
# This file is part of Bika LIMS # # Copyright 2011-2016 by it's authors. # Some rights reserved. See LICENSE.txt, AUTHORS.txt. from operator import itemgetter from bika.lims import bikaMessageFactory as _ from bika.lims.utils import t from bika.lims.browser.analysisrequest import AnalysisRequestAddView as _ARAV from ...
agpl-3.0
2,410,436,482,305,657,300
39.596154
77
0.71009
false
4.083172
false
false
false
09zwcbupt/ryu
ryu/lib/packet/udp.py
1
2010
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
-6,886,356,583,741,292,000
34.892857
72
0.612438
false
3.595707
false
false
false
iandees/all-the-places
locations/spiders/ljsilvers.py
1
1524
# -*- coding: utf-8 -*- import scrapy import json import re from locations.items import GeojsonPointItem class LjsilversSpider(scrapy.Spider): name = "ljsilvers" allowed_domains = ["ljsilvers.com"] start_urls = ( 'http://www.ljsilvers.com/locator?postalcode=76010', ) def parse(self, resp...
mit
-8,044,704,276,494,561,000
32.130435
115
0.467192
false
4.04244
false
false
false
twhyntie/tasl-data-management
wrappers/test_nod.py
1
1166
#!/usr/bin/env python # -*- coding: utf-8 -*- #...the usual suspects. import os, inspect #...for the unit testing. import unittest #...for the logging. import logging as lg # The wrapper class to test. from nod import NOD class TestNOD(unittest.TestCase): def setUp(self): pass def tearDown(self)...
mit
-4,170,661,468,903,382,500
21
77
0.559177
false
3.491018
true
false
false
certik/hermes-gui
hermesgui/core/handle_hermes.py
1
1543
from hermes2d import Mesh, H1Shapeset, PrecalcShapeset, H1Space, \ WeakForm, Solution, ScalarView, LinSystem, DummySolver, \ MeshView, set_verbose, plot_mesh_mpl_simple from hermes2d.forms import set_forms from hermes2d.mesh import read_hermes_format def read_mesh(filename): nodes, ...
bsd-3-clause
3,263,927,270,197,432,300
28.113208
73
0.657161
false
3.276008
false
false
false
nkoep/blaplay
blaplay/blagui/blaqueue.py
1
13341
# blaplay, Copyright (C) 2014 Niklas Koep # 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 distribut...
gpl-2.0
1,768,491,662,655,170,000
33.562176
78
0.58174
false
3.972901
false
false
false
juliantaylor/scipy
scipy/optimize/cobyla.py
2
9434
""" Interface to Constrained Optimization By Linear Approximation Functions --------- .. autosummary:: :toctree: generated/ fmin_cobyla """ from __future__ import division, print_function, absolute_import import numpy as np from scipy.lib.six import callable from scipy.optimize import _cobyla from .optimize...
bsd-3-clause
-2,557,425,230,123,296,300
32.572954
79
0.587662
false
4.024744
false
false
false
dcsch/pyif
pyif/util.py
1
1607
def is_whitespace(c): if c == " " or c == "\t" or c == "\n": return True return False def compress_whitespace(s): """ Remove extraneous whitespace from the string, that being all whitespace at the beginning and end of the string and anything beyond a single space within the string. """...
mit
-8,638,453,769,667,749,000
25.783333
92
0.481643
false
3.958128
false
false
false
mz314/django-sass-processor
sass_processor/management/commands/compilescss.py
1
7090
# -*- coding: utf-8 -*- import os import sass from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.template.loader import get_template # noqa Leave this in to preload template locations from django.utils.importlib import import_...
mit
-9,080,522,471,985,560,000
44.448718
130
0.621157
false
4.379246
false
false
false
Nithanaroy/random_scripts
CreateNeoDB.py
1
1357
from py2neo import Graph graph = Graph("http://neo4j:1234@localhost:7474/db/data/") # Insert data insert_query = ''' UNWIND {pairs} as pair MERGE (p1:Person {name:pair[0]}) MERGE (p2:Person {name:pair[1]}) MERGE (p1)-[:KNOWS]-(p2); ''' data = [["Jim", "Mike"], ["Jim", "Billy"], ["Anna", "Jim"], ["Anna", "Mik...
mit
8,349,724,321,448,204,000
24.12963
90
0.640383
false
2.640078
false
false
false
aularon/meld
setup_win32.py
1
3455
#!/usr/bin/env python import glob import os import site import sys from cx_Freeze import setup, Executable import meld.build_helpers import meld.conf site_dir = site.getsitepackages()[1] include_dll_path = os.path.join(site_dir, "gnome") missing_dll = [ 'libgtk-3-0.dll', 'libgdk-3-0.dll', 'libatk-1.0-0...
gpl-2.0
3,119,004,850,918,130,700
24.404412
85
0.557453
false
2.952991
false
false
false
lypnol/graph-theory
problem-02/submissions/coco-backtracking-improved.py
1
2420
from submission import Submission def calculate_length(permutation, matrix): n = len(permutation) length = 0 for i in range(n-1): length += matrix[permutation[i]][permutation[i+1]] length += matrix[permutation[-1]][permutation[0]] return length def glouton(graphe, depart=None): sommets...
mit
-6,264,765,515,762,897,000
32.611111
115
0.62686
false
3.333333
false
false
false
z3r0zh0u/pyutls
MyProcLib.py
1
4286
""" My Process Execution Library """ import os import time import Queue import platform import threading import subprocess NewLine = '\n' if platform.system() == 'Windows': NewLine = '\r\n' def queue_output(out, queue): """Queue output""" for line in iter(out.readline, b''): queue.put...
gpl-2.0
-2,528,289,493,108,418,600
20.984615
112
0.519365
false
3.953875
false
false
false
GammaC0de/pyload
src/pyload/plugins/downloaders/ZippyshareCom.py
1
4071
# -*- coding: utf-8 -*- import re import urllib.parse from bs4 import BeautifulSoup from pyload.core.utils.misc import eval_js from ..anticaptchas.ReCaptcha import ReCaptcha from ..base.simple_downloader import SimpleDownloader class ZippyshareCom(SimpleDownloader): __name__ = "ZippyshareCom" __type__ = "...
agpl-3.0
-8,509,155,195,058,406,000
33.5
110
0.519774
false
3.59629
false
false
false
mbelmadani/motifgp
motifgp/hammingregex.py
1
6109
import re import numpy def sxor(s1,s2): # convert strings to a list of character pair tuples # go through each tuple, converting them to ASCII code (ord) # perform exclusive or on the ASCII code # then convert the result back to ASCII (chr) # merge the resulting array of characters as a string...
lgpl-3.0
-8,711,762,516,253,431,000
32.201087
187
0.549026
false
3.926093
false
false
false
johnshiver/football_tools
football/core/models/weekly_stats.py
1
1824
from django.db import models from django.conf import settings from model_utils.models import TimeStampedModel class WeeklyStats(TimeStampedModel): player = models.ForeignKey('core.Player', related_name='player_stats') season = models.ForeignKey('core.Season') week = models.ForeignKey('core.Week', related...
mit
6,390,556,806,062,743,000
37.808511
74
0.655702
false
3.640719
false
false
false
our-city-app/oca-backend
src/rogerthat/migrations/delete_all_models_by_kind.py
1
1605
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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 appl...
apache-2.0
3,319,584,261,818,788,000
31.755102
107
0.697196
false
3.429487
false
false
false
JohnyEngine/CNC
opencamlib/scripts/drop-cutter/drop_cutter_one-triangle_2.py
1
2299
import ocl import pyocl import camvtk import vtk import math def drawPoints(myscreen, clpoints, ccpoints): c=camvtk.PointCloud( pointlist=clpoints, collist=ccpoints) c.SetPoints() myscreen.addActor(c ) if __name__ == "__main__": print ocl.version() myscreen = camvtk.VTKScreen() # tria...
apache-2.0
785,468,906,210,808,400
27.7375
79
0.606351
false
2.554444
false
false
false
bnoi/scikit-tracker
sktracker/io/tests/test_metadataio.py
1
2350
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from nose.tools import assert_raises from sktracker import data from sktracker.io import get_metadata from sktracker.io import validate_metad...
bsd-3-clause
3,016,241,812,330,578,000
31.191781
82
0.513191
false
3.962901
false
false
false
iABC2XYZ/abc
Scripts/RFQVane/VaneStructure2.py
1
7067
# -*- coding: utf-8 -*- """ Created on Fri Mar 03 11:11:22 2017 @author: A """ import matplotlib.pyplot as plt import numpy as np from scipy.optimize import fsolve from scipy.special import iv #from scipy.signal import find_peaks_cwt plt.close('all') zStart=0+0.67 zEnd=230.045+0.67 zStep=0.005###...
gpl-3.0
-2,863,287,004,672,663,600
19.009146
93
0.554636
false
2.199489
false
false
false
sepeth/relationships
relationships/relationship.py
1
4426
import redis from keys import key_list as default_key_list class Relationship(object): def __init__(self, redis_connection=None, key_list=None, actor=None): if key_list: default_key_list.update(key_list) self.key_list = default_key_list if redis_connection: se...
mit
7,119,113,668,999,396,000
30.614286
108
0.592634
false
3.613061
false
false
false
martinburchell/crossword_collective
crossword.py
1
11875
import os.path import urllib import smtplib import string import StringIO from email.mime.image import MIMEImage from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from lxml import etree from lxml.html.soupparser import fromstring from lxml.cssselect import CSSSelector from PIL impor...
gpl-3.0
-6,237,270,378,994,270,000
29.924479
182
0.527663
false
3.66852
false
false
false
martinloland/rov
pc/func.py
1
3401
''' func.py - General classes - Handling events initatied by user input ''' class SENS: def __init__(self): self.press = 1.0 self.temp = 0 self.volt = 0 self.curr = 0 self.roll = 0 self.yaw = 0 self.pitch = 0 self.ax = 0 self.ay = 0 self.az = 0 self.compass = 0 self.depth =...
mit
-3,157,018,102,161,540,600
23.780303
100
0.626286
false
2.707803
false
false
false
prateek-1708/pg-aws-python
src/ecs-deploy.py
1
4415
#!/usr/bin/python3 import boto3 import argparse import pprint import sys ############################################################################## def debug(args): print('Cluster Name: {}'.format(args.cluster)) print('Service Name: {}'.format(args.service)) print('Image Version: {}'.format(args.imag...
mit
2,897,100,967,628,455,400
28.637584
102
0.560589
false
4.332679
false
false
false
UdK-VPT/Open_eQuarter
mole3/qgisinteraction/plugin_interaction.py
1
13083
from qgis.PyQt import QtCore from qgis.core import QgsProject, QgsCoordinateReferenceSystem, QgsMapLayer, QgsRasterLayer, QgsVectorLayer from qgis.core import QgsField, QgsFeature, QgsDistanceArea, QgsPoint from qgis import utils from os import path import sys from mole3.qgisinteraction.layer_interaction import find_l...
gpl-2.0
1,665,867,565,011,549,700
39.630435
153
0.595047
false
4.166561
false
false
false
fugwenna/bunkbot
src/roulette/roulette_cog.py
1
1297
from random import randint from discord.ext.commands import command, Context, Cog from ..bunkbot import BunkBot from ..channel.channel_service import ChannelService from ..core.bunk_exception import BunkException from ..core.bunk_user import BunkUser from ..core.registry import CHANNEL_SERVICE, USER_SERVICE fr...
mit
-3,034,951,817,091,481,600
32.131579
72
0.642251
false
3.727011
false
false
false
kkozarev/mwacme
src/catalog/hek_find_halo_cmes_v2.py
1
4200
# -*- coding: utf-8 -*- import json import os from sunpy.net import hek from pprint import pprint from datetime import datetime,timedelta from time import strftime import numpy as np import matplotlib.pyplot as plt client = hek.HEKClient() #SEARCH FOR FAST AND WIDE CMEs IN THE HEK! #'FAST' means linear speed higher th...
gpl-2.0
-4,243,700,712,274,347,500
38.622642
118
0.689762
false
2.851324
false
false
false
flavors/countries
setup.py
1
1907
import os import re from setuptools import find_packages, setup def get_long_description(): for filename in ('README.rst',): with open(filename, 'r') as f: yield f.read() def get_version(package): with open(os.path.join(package, '__init__.py')) as f: pattern = r'^__version__ = [...
mit
4,646,107,103,152,200,000
28.796875
71
0.567908
false
3.806387
false
false
false
russellb/nova
nova/notifier/list_notifier.py
1
2207
# Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
7,981,357,401,778,414,000
30.084507
79
0.676031
false
4.310547
false
false
false
lorien/grab
tests/grab_redirect.py
1
4599
# coding: utf-8 from six.moves.urllib.parse import quote, unquote from grab.error import GrabTooManyRedirectsError from tests.util import BaseGrabTestCase, build_grab def build_location_callback(url, counter): meta = { 'counter': counter, 'url': url, } def callback(): if meta['co...
mit
2,294,489,589,820,108,000
31.560284
79
0.557613
false
3.699436
true
false
false
quarkslab/irma
common/src/plugins/manager.py
1
4896
# # Copyright (c) 2013-2018 Quarkslab. # This file is part of IRMA project. # # 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 in the top-level directory # of this distribution and at: # # http:...
apache-2.0
8,253,696,942,616,350,000
42.327434
78
0.520221
false
5.219616
false
false
false
menify/sandbox
tags/aql_beta_1_16032008/setup.py
1
3780
import logging import utils import options _Warning = logging.Warning #//===========================================================================// _site_setup = [] _user_setup = {} _tools_setup = {} _tools_post_setup = {} def ResetSetup( site_setup = _site_setup, tools_setup = _tools_se...
mit
3,797,604,539,554,396,000
31.033898
101
0.462169
false
3.884892
false
false
false