repo_name
stringlengths
6
61
path
stringlengths
4
230
copies
stringlengths
1
3
size
stringlengths
4
6
text
stringlengths
1.01k
850k
license
stringclasses
15 values
hash
int64
-9,220,477,234,079,998,000
9,219,060,020B
line_mean
float64
11.6
96.6
line_max
int64
32
939
alpha_frac
float64
0.26
0.9
autogenerated
bool
1 class
ratio
float64
1.62
6.1
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
Linaro/lava-dispatcher
lava_dispatcher/utils/installers.py
1
2344
# Copyright (C) 2016 Linaro Limited # # Author: Matthew Hart <matthew.hart@linaro.org> # # This file is part of LAVA Dispatcher. # # LAVA Dispatcher 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 versi...
gpl-2.0
-4,192,824,074,895,961,000
32.485714
91
0.627133
false
3.697161
false
false
false
rjpower/fastnet
test/test_cudaconv2.py
1
1092
from pycuda import gpuarray, driver from scipy.signal import convolve2d import cudaconv2 import cudaconv2 import numpy as np import pycuda.driver as cuda import sys cudaconv2.init() def test_convolution(): imgSize = 32 filterSize = 5 padding = 2 color = 1 imgNum = 1 filterNum = 64 stride = 1 modul...
gpl-3.0
1,375,027,835,190,148,900
28.540541
128
0.711538
false
3.279279
false
false
false
pyannote/pyannote-metrics
pyannote/metrics/detection.py
1
20201
#!/usr/bin/env python # encoding: utf-8 # The MIT License (MIT) # Copyright (c) 2012-2020 CNRS # 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 limita...
mit
-7,760,661,166,790,345,000
34.069444
131
0.645941
false
3.966228
false
false
false
lcpt/xc
python_modules/postprocess/xcVtk/element_property_diagram.py
1
6110
# -*- coding: utf-8 -*- ''' Diagram display a property defined over linear elements. ''' __author__= "Luis C. Pérez Tato (LCPT) , Ana Ortega (AO_O) " __copyright__= "Copyright 2016, LCPT, AO_O" __license__= "GPL" __version__= "3.0" __email__= "l.pereztato@ciccp.es, ana.ortega@ciccp.es " from miscUtils import LogMe...
gpl-3.0
8,623,899,374,031,308,000
47.102362
112
0.678343
false
3.206824
false
false
false
tcmitchell/geni-tools
src/gcf/geni/util/cred_util.py
3
18496
#---------------------------------------------------------------------- # Copyright (c) 2010-2016 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including ...
mit
-8,162,798,833,670,636,000
45.825316
250
0.629001
false
4.164828
false
false
false
intel-hpdd/intel-manager-for-lustre
tests/unit/services/http_agent/test_register.py
1
4359
import json import mock from django.test import Client from chroma_core.models import ManagedHost, ServerProfile, Nid from chroma_core.models.registration_token import RegistrationToken from chroma_core.services.crypto import Crypto from chroma_core.services.job_scheduler.job_scheduler_client import JobSchedulerClien...
mit
4,557,491,256,692,526,600
40.514286
112
0.607938
false
4.028651
true
false
false
jjbunn/PyGeneticAlgorithm
TravellingSalesmanGA.py
1
4203
''' Created on May 5, 2015 @author: julian ''' import math import random import matplotlib.pyplot as plt from Chromosome import * REGION_SIZE = 100.0 NUMBER_OF_CITIES = 10 NUMBER_OF_CHROMOSOMES = 100 NUMBER_OF_EPOCHS = 100 MUTATION_PROBABILITY = 0.25 RANDOM_SEED = 9876 cities = {} def plot_citi...
apache-2.0
1,180,130,674,434,832,100
28.605634
104
0.595051
false
3.450739
false
false
false
JiaMingLin/de-identification
prob_models/dep_graph.py
1
3714
import common.constant as c import time import numpy as np import pandas as pd from common.base import Base from itertools import combinations from itertools import groupby class DependencyGraph(Base): # The dependency graph dep_graph = None def __init__( self, data = None, edges = None, noise_flag ...
apache-2.0
9,219,060,019,872,601,000
26.316176
88
0.660474
false
2.652857
false
false
false
nagyistoce/edx-analytics-dashboard
analytics_dashboard/core/templatetags/dashboard_extras.py
3
3284
from django import template from django.conf import settings from django.template.defaultfilters import stringfilter from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from opaque_keys.edx.keys import CourseKey from slugify import slugify register = template.Library()...
agpl-3.0
-858,292,709,170,517,100
25.918033
115
0.671133
false
3.909524
false
false
false
lsdlab/awesome_coffice
coffice/migrations/0001_initial.py
1
2228
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-04-29 03:15 from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateMode...
mit
4,686,375,144,648,305,000
47.434783
114
0.585727
false
4.18797
false
false
false
lucacontini/blog
website/views.py
1
1302
# -*- coding: utf-8 -*- from django.views.generic.list import ListView from django.views.generic import TemplateView from posts.models import Post, PostTag from posts.views import PostListView # Home page class IndexView(PostListView): template_name = "website/index.html" # FAQ class FAQView(TemplateView): ...
gpl-2.0
-6,517,135,939,094,588,000
22.25
75
0.670507
false
3.472
false
false
false
Madefire/ios-video-wall
manager.py
1
2481
#!/usr/bin/env python # Copyright (c) 2012, Madefire Inc. # All rights reserved. from __future__ import absolute_import from threading import Event, Thread from time import sleep import SocketServer import logging logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) PREPARE_DELAY = 2.5 IDLE_...
bsd-3-clause
7,586,206,250,553,452,000
24.060606
79
0.607416
false
3.907087
false
false
false
TresysTechnology/setools
setoolsgui/apol/terulequery.py
1
18847
# Copyright 2015-2016, Tresys Technology, LLC # # This file is part of SETools. # # SETools is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 2.1 of # the License, or (at your option) any l...
lgpl-2.1
-4,385,313,039,911,049,000
39.794372
98
0.614899
false
4.042686
false
false
false
akash1808/python-novaclient
novaclient/tests/fixture_data/images.py
1
4037
# 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 t...
apache-2.0
973,671,741,062,356,100
34.725664
79
0.490959
false
4.132037
true
false
false
yegong/stock
providers/spider.py
1
1719
#!/usr/bin/env python # -*- coding: utf8 -*- __author__ = 'cooper' import traceback import logging from threading import Thread from twisted.internet import reactor from scrapy.crawler import Crawler from scrapy import log, signals from scrapy.xlib.pydispatch import dispatcher from scrapy.exceptions import DontCloseSp...
apache-2.0
4,436,104,143,725,482,000
27.65
71
0.690518
false
3.880361
false
false
false
ILoveMuffins/TheGame
app/model/cell.py
1
1588
#!/usr/bin/env python3.4 from model.energy import Energy from model.matter import Matter from model.position import Position class Cell: def __init__(self, energy: Energy, matter: Matter, position: Position, max_age, min_energy: Energy, max_energy: Energy, min_matter: Matter, max_matter: Matter,...
gpl-3.0
-5,911,487,594,279,590,000
33.521739
105
0.640428
false
3.452174
false
false
false
r3tard/BartusBot
lib/protorpc/webapp_test_util.py
23
12358
#!/usr/bin/env python # # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
-5,773,854,052,402,225,000
30.050251
80
0.674057
false
4.030659
true
false
false
PapenfussLab/sv_tools
sv_tools/simulator.py
1
5099
import numpy as np import sv_data import sv_diagram as sv_d def map_kmers(f, k): """ Takes a list function f and returns a function that applies f to k-mers of a list, returning the results as a list with None values discarded. """ def g(input_list, *args, **kwargs): outputs = [f(i...
mit
5,066,468,894,900,355,000
26.711957
69
0.594823
false
3.328329
false
false
false
sagost/VideoUavTracker
CanvasMarkers.py
1
2935
# -*- coding: utf-8 -*- ''' Video Uav Tracker v 2.0 Replay a video in sync with a gps track displayed on the map. ------------------- copyright : (C) 2017 by Salvatore Agosta email : sagost@katamail.com This program is free software; you can redistribute it and/or modif...
gpl-2.0
-7,505,872,444,015,693,000
22.861789
73
0.673595
false
2.863415
false
false
false
d-k-b/udacity-deep-learning
seq2seq/helper.py
1
1420
import os def load_data(path): input_file = os.path.join(path) with open(input_file, "r", encoding='utf-8', errors='ignore') as f: data = f.read() return data def extract_vocab(data): special_words = ['<pad>', '<unk>', '<s>', '<\s>'] set_words = set([word for line in dat...
mit
4,802,038,180,412,981,000
34.410256
117
0.602817
false
3.325527
false
false
false
drogenlied/qudi
logic/jupyterkernel/display_trap.py
4
3061
# -*- coding: utf-8 -*- """ A context manager for handling sys.displayhook. Qudi 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. Qudi is di...
gpl-3.0
2,587,610,995,733,073,000
33.011111
86
0.554067
false
4.637879
false
false
false
bt3gl/Python-and-Algorithms-and-Data-Structures
First_edition_2014/ebook_src/builtin_structures/check_if_2_numbers_sum_to_k.py
2
1636
#!/usr/bin/env python __author__ = "bt3" """ Given an integer x and an unsorted array of integers, describe an algorithm to determine whether two of the numbers add up to x. 1. Using hash tables. 2. Sorting the array and keeping two pointers in the array, one in the beginning and one in the end. Whenever the sum of ...
mit
56,266,094,355,373,880
22.056338
66
0.528117
false
3.176699
false
false
false
rerobins/django_auth_addon
django_auth_addon/backend/google_authentication.py
1
3221
from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.backends import ModelBackend from apiclient.discovery import build import httplib2 import json from uuid import uuid4 from oauth2client.client import flow_from_clientsecrets from oauth2client.client import FlowExchange...
bsd-3-clause
7,810,339,707,430,348,000
32.905263
107
0.652903
false
4.087563
false
false
false
scemama/quantum_package
scripts/module/module_handler.py
1
9384
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Module utilitary Usage: module_handler.py print_descendant [<module_name>...] module_handler.py create_png [<module_name>...] module_handler.py clean [ --all | <module_name>...] module_handler.py create_git_ignore [<...
agpl-3.0
5,152,649,960,677,695,000
28.980831
109
0.507033
false
3.932942
false
false
false
lalitkumarj/NEXT-psych
gui/base/models/experiment.py
2
1041
from base import db class Experiment(db.Document): exp_uid = db.StringField() exp_key = db.StringField() perm_key = db.StringField() app_id = db.StringField() name = db.StringField() description = db.StringField() instructions = db.StringField() debrief = db.StringField() params = d...
apache-2.0
1,253,482,499,794,655,700
24.390244
79
0.605187
false
3.627178
false
false
false
simonwittber/netwrok-server
src/netwrok/member.py
2
8748
import os import hashlib import asyncio import psycopg2.extras import aiopg from . import nwdb from . import core from . import mailqueue from . import room @core.function def authenticate(client, email, password): """ Authenticate the client by matching email and password. Note, the password must not be...
mit
-5,596,224,290,785,613,000
33.714286
145
0.577732
false
4.128362
false
false
false
WillianPaiva/1flow
oneflow/core/models/reldb/item/article.py
1
23927
# -*- coding: utf-8 -*- """ Copyright 2013-2014 Olivier Cortès <oc@1flow.io> This file is part of the 1flow project. 1flow 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 versio...
agpl-3.0
7,480,019,336,841,286,000
34.234303
122
0.57919
false
4.077987
false
false
false
roijo/C-PAC_complexitytools
CPAC/GUI/interface/utils/modelconfig_window.py
3
59820
import wx import generic_class from .constants import control, dtype, substitution_map import os import yaml import modelDesign_window ID_RUN = 11 class ModelConfig(wx.Frame): # this creates the wx.Frame mentioned above in the class declaration def __init__(self, parent, gpa_settings=None): wx.Fr...
bsd-3-clause
-214,186,313,670,741,800
38.826897
568
0.508358
false
4.465845
false
false
false
tanmaykm/JuliaBox
engine/src/juliabox/plugins/vol_defcfg/defcfg.py
3
3038
import os from juliabox.jbox_util import ensure_delete, make_sure_path_exists, unique_sessname, JBoxCfg from juliabox.vol import JBoxVol class JBoxDefaultConfigVol(JBoxVol): provides = [JBoxVol.JBP_CONFIG] FS_LOC = None @staticmethod def configure(): cfg_location = os.path.expanduser(JBoxCf...
mit
4,886,966,778,760,411,000
34.337209
98
0.657999
false
3.595266
true
false
false
ryfx/modrana
modules/pyrender/renderer_labels.py
1
2300
#!/usr/bin/python # -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # #---------------------------------------------------------------------------- # Copyright 2008, authors: # * Oliver White # # This program is free software: you can redistribute it and/or modify # ...
gpl-3.0
-4,013,746,217,387,257,000
35.507937
77
0.525652
false
4.078014
false
false
false
marek/lockfree
tools/graph.py
1
1352
#!/usr/bin/env bash import plotly.offline as offline import plotly.plotly as py import plotly.graph_objs as go import csv import string import argparse parser = argparse.ArgumentParser(description='Process lockfree log') parser.add_argument ( '--input', help='input file') parser.add_argument( '--output',...
apache-2.0
-607,661,293,408,453,400
20.806452
83
0.597633
false
3.614973
false
false
false
anantzoid/VQA-Keras-Visual-Question-Answering
models.py
1
1630
from keras.models import Sequential from keras.layers import Dense, Activation, Dropout, LSTM, Flatten, Embedding, Merge from keras.layers.convolutional import Convolution2D, MaxPooling2D, ZeroPadding2D import h5py def Word2VecModel(embedding_matrix, num_words, embedding_dim, seq_length, dropout_rate): print "Crea...
mit
2,992,886,921,016,437,000
43.054054
100
0.720245
false
3.490364
false
false
false
qingqing01/models
fluid/adversarial/advbox/attacks/gradient_method.py
3
10220
""" This module provide the attack method for Iterator FGSM's implement. """ from __future__ import division import logging from collections import Iterable import numpy as np from .base import Attack __all__ = [ 'GradientMethodAttack', 'FastGradientSignMethodAttack', 'FGSM', 'FastGradientSignMethodTargeted...
apache-2.0
-1,025,681,624,726,780,700
35.76259
80
0.576321
false
4.009415
false
false
false
assamite/cc-course-UH17
week2/therex.py
1
3851
#!/usr/bin/env python __author__ = "Khalid Alnajjar" ''' A class for accessing Thesaurus Rex (v2) API Requirements: requests xmltodict (installable thourgh pip) ''' import requests, urllib.parse, time, xmltodict, json class TheRex: def __init__(self): self.base_url = 'http://ngrams.ucd.ie/therex2/common-...
mit
-341,045,641,225,821,900
46.54321
139
0.637756
false
3.469369
false
false
false
buguroo/pyknow
pyknow/deffacts.py
1
1382
from functools import update_wrapper import inspect class DefFacts: def __new__(cls, nonexpected=None, order=0): obj = super(DefFacts, cls).__new__(cls) if nonexpected is not None: raise SyntaxError("DefFacts must be instanced to allow decoration") obj.__wrapped = None ...
lgpl-3.0
-7,212,318,727,955,124,000
27.791667
79
0.561505
false
4.332288
false
false
false
mikesligo/pieproxy
ref/test.py
1
4128
''' Copyright 2013 Michael Gallagher Email: mikesligo at gmail dot 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 Foundation, either version 3 of the License, or (at your option) any la...
gpl-3.0
-3,125,814,512,734,880,000
33.4
98
0.57437
false
4.322513
false
false
false
cle1109/sigviewr
readers/lslreader.py
1
1676
# This file is part of Sigviewr. # This project is licensed under the GNU GPL (version 3 or higher). # Copyright 2014 by Clemens Brunner and Thomas Brunner. from collections import OrderedDict import time from .streamreader import StreamReader # begin HACK try: import external.pylsl.pylsl as pylsl except Import...
gpl-3.0
-737,442,427,166,842,400
27.913793
77
0.635442
false
3.897674
false
false
false
sunlaiqi/fundiy
src/shop - 副本/utils.py
1
2978
""" This file includes commonly used utilities for this app. """ from datetime import datetime today = datetime.now() year = today.year month = today.month day = today.day # Following are for images upload helper functions. The first two are used for product upload for the front and back. # The last two are used f...
mit
-4,548,247,652,537,328,000
32.987179
149
0.63283
false
2.618577
false
false
false
WeCase/WeCase
src/AboutWindow.py
1
1487
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 # WeCase -- This file implemented AboutWindow. # Copyright (C) 2013, 2014 The WeCase Developers. # License: GPL v3 or later. from PyQt4 import QtGui import version import wecasepath as path from AboutWindow_ui import Ui_About_Dialog class AboutWindow(QtGui.QDia...
gpl-3.0
4,490,473,591,975,713,000
31.326087
92
0.667115
false
3.726817
false
false
false
CSC-IT-Center-for-Science/pouta-blueprints
pebbles/views/stats.py
1
2567
from flask_restful import marshal_with, fields from flask import Blueprint as FlaskBlueprint import logging from pebbles.models import Blueprint, Instance from pebbles.server import restful from pebbles.views.commons import auth from pebbles.utils import requires_admin, memoize from collections import defaultdict ...
mit
2,162,888,116,153,482,800
31.910256
123
0.671601
false
4.029827
false
false
false
martinezmizael/Escribir-con-la-mente
object/probarRedNeuronalNormalizado.py
1
1385
# -*- encoding: utf-8 -*- ''' Created on: 2015 Author: Mizael Martinez ''' from pyfann import libfann from login import Login from escribirArchivo import EscribirArchivo import inspect, sys, os sys.path.append("../model") from baseDatos import BaseDatos auxiliar=[] np=EscribirArchivo() np.setUrl("prueba_nor...
mit
-3,499,353,600,829,294,000
27.265306
131
0.729964
false
2.421329
false
false
false
joshamilton/Hamilton_acI_2017
code/annotTransporters/01findGenesAnnotExpr.py
1
10530
############################################################################### # findGenesAnnotExpr.py # Copyright (c) 2017, Joshua J Hamilton and Katherine D McMahon # Affiliation: Department of Bacteriology # University of Wisconsin-Madison, Madison, Wisconsin, USA # URL: http://http://mcmahonlab.wisc.e...
mit
6,324,326,946,573,725,000
40.294118
349
0.531909
false
4.040675
false
false
false
mikedh/trimesh
tests/test_extrude.py
2
2901
try: from . import generic as g except BaseException: import generic as g try: import triangle # NOQA has_triangle = True except ImportError: g.log.warning('No triangle! Not testing extrude primitives!') has_triangle = False class ExtrudeTest(g.unittest.TestCase): def test_extrusion(sel...
mit
36,126,664,886,770,264
32.344828
75
0.559118
false
3.842384
true
false
false
alexblaessle/PyRW
pyrw/RWstep.py
1
5942
#=========================================================================== #License #=========================================================================== #Copyright (C) 2016 Alexander Blaessle #This software is distributed under the terms of the GNU General Public License. #This file is part of PyRW. #PyRW ...
gpl-3.0
-1,836,619,695,734,177,800
24.182203
81
0.595086
false
3.412981
false
false
false
myuuuuun/various
ContinuousAlgorithm/HW5/hw5-1.py
1
1850
#!/usr/bin/python #-*- encoding: utf-8 -*- """ Copyright (c) 2015 @myuuuuun Released under the MIT license. """ import math import numpy as np import functools import matplotlib.pyplot as plt import matplotlib.cm as cm EPSIRON = 1.0e-8 # P0〜P_(length-1)までのルジャンドル多項式の, xにおける値の配列を返す def legendre(x, length): values ...
mit
2,593,980,254,537,360,000
18.659091
92
0.561272
false
2.570579
false
false
false
Sythelux/Picarto.bundle
Contents/Libraries/Shared/util.py
1
1121
# from PicartoClientAPI import Language, ApiClient def Lang(string): # fallback return string L = Lang def generateTagline(details): ret_string = L("viewers") + ": " ret_string = "%s %d (%s: %d)" % (ret_string, details.viewers, L("total"), details.viewers_total) return ret_string def generateSu...
bsd-3-clause
-1,101,899,389,666,573,200
23.911111
100
0.628011
false
3.459877
false
false
false
sisoftrg/citrocan
app/decoder_old.py
1
21244
# Citrocan # Copyright (c) 2016 sisoftrg # The MIT License (MIT) import sys PY3 = sys.version_info >= (3, 0) class Decoder(object): connected = False cb = {} mfs = {} lamps = {} economy = False enabled = False lighting = False brightness = 0x0c ignition = 2 rpm = 0 speed...
mit
8,628,095,303,352,691,000
43.331942
199
0.538309
false
2.861089
false
false
false
jad-b/mlsl
mlsl/glcreate.py
1
1639
#!/usr/bin/env python2 """ graphlab ======== Assists with registering, loading, and configuring GraphLab by Dato. Note the python 2 shebang at the top of this file. At the time of this writing, Graphlab does not support Python 3. - jdb, 2016May09 """ import argparse import os import sys import time class VersionErro...
gpl-3.0
8,416,035,388,997,661,000
27.754386
79
0.662599
false
3.465116
false
false
false
LinguList/burmish
pyburmish/util.py
2
1315
from lingpy import Model from lingpy.sequence.sound_classes import token2class from pyburmish import burmish_path, load_burmish from unicodedata import normalize sca = Model('sca') color = Model('color') color.converter['⁵⁵'] = 'Crimson' color.converter['³⁵'] = 'LightBlue' color.converter['⁴'] = 'LightYellow' color.co...
gpl-2.0
3,261,640,945,445,530,000
23.807692
53
0.664341
false
2.648871
false
false
false
a10networks/a10sdk-python
a10sdk/core/enable/enable_management_service_https_acl_v6.py
2
3426
from a10sdk.common.A10BaseClass import A10BaseClass class VeCfg(A10BaseClass): """This class does not support CRUD Operations please use parent. :param ve_end: {"type": "number", "description": "VE port", "format": "number"} :param ve_start: {"type": "number", "description": "VE port (VE Interface n...
apache-2.0
-9,146,458,870,826,519,000
37.066667
361
0.605079
false
3.652452
false
false
false
msscully/datamart
tests/test_variables.py
1
6424
from tests import TestCase from werkzeug.urls import url_quote from datamart.models import Variable from datamart.models import Dimension from datamart.models import User from datamart.models import Role from flask import url_for class TestVariables(TestCase): def test_show_variables_anon(self): """Does a...
mit
-1,339,770,571,371,663,400
42.114094
92
0.602584
false
3.924252
true
false
false
shentianxiao/language-style-transfer
code/options.py
1
2956
import sys import argparse import pprint def load_arguments(): argparser = argparse.ArgumentParser(sys.argv[0]) argparser.add_argument('--train', type=str, default='') argparser.add_argument('--dev', type=str, default='') argparser.add_argument('--test',...
apache-2.0
5,124,892,340,955,779,000
27.980392
79
0.497294
false
4.157525
false
false
false
82Flex/DCRM
WEIPDCRM/views/admin/release.py
1
1841
# coding=utf-8 """ DCRM - Darwin Cydia Repository Manager Copyright (C) 2017 WU Zheng <i.82@me.com> This program 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 yo...
agpl-3.0
-456,847,748,279,306,400
32.472727
91
0.738729
false
3.967672
false
false
false
google-research/sound-separation
models/tools/process_wav_stitching.py
1
12647
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
2,434,115,412,898,961,400
43.375439
79
0.686645
false
3.713153
false
false
false
dansanderson/picotool
tests/pico8/gff/gff_test.py
1
2156
#!/usr/bin/env python3 import unittest from unittest.mock import Mock from unittest.mock import patch from pico8.gff import gff class TestGff(unittest.TestCase): def testGetFlags(self): g = gff.Gff.empty() g._data = bytearray([x for x in range(256)]) for x in range(256): self...
mit
-2,706,116,116,492,286,500
35.542373
69
0.543599
false
2.90175
true
false
false
windeye/spark
python/pyspark/worker.py
1
3782
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
-4,314,784,638,318,855,000
35.718447
93
0.705711
false
3.766932
false
false
false
bros-bioinfo/bros-bioinfo.github.io
COURS/M1/SEMESTRE2/ALGO/td5_Arbre.py
1
3452
# Exo 1 def pere(A, f): return A[1][f] def fils(A, p): return A[2][p] def racine(A): return A[3] def etiquette(A, f): return A[4][f] # Exo 2 def creer_arbre(): A = [] pere = {} fils = {} racine = None return [A, pere, fils, racine] def ajouter_racine(T, r): # ajoute dan...
mit
-8,699,259,828,190,913,000
17.168421
60
0.544032
false
2.268068
false
false
false
MatthijsKamstra/haxepython
04haxelow/code/bin/example.py
1
111994
# Generated by Haxe 3.4.5 # coding: utf-8 import math as python_lib_Math import math as Math from os import path as python_lib_os_Path import inspect as python_lib_Inspect import builtins as python_lib_Builtins import functools as python_lib_Functools import random as python_lib_Random import re as python_lib_Re from ...
mit
-4,816,244,440,017,755,000
40.189776
301
0.522814
false
3.026129
false
false
false
jgeskens/django
tests/transactions_regress/tests.py
4
14925
from __future__ import absolute_import from django.db import (connection, connections, transaction, DEFAULT_DB_ALIAS, DatabaseError, IntegrityError) from django.db.transaction import commit_on_success, commit_manually, TransactionManagementError from django.test import TransactionTestCase, skipU...
bsd-3-clause
6,142,881,798,479,863,000
39.667575
101
0.646767
false
4.596551
true
false
false
ReachingOut/unisubs
apps/socialauth/lib/oauthtwitter2.py
6
4688
import httplib import urllib2 import urllib import time import oauth.oauth as oauth from django.conf import settings CALLBACK_URL = 'http://example.com/newaccounts/login/done/' REQUEST_TOKEN_URL = 'https://twitter.com/oauth/request_token' AUTHORIZATION_URL = 'http://twitter.com/oauth/authorize' ACCESS_TOKEN_URL = 'h...
agpl-3.0
-4,426,484,930,953,053,700
35.913386
163
0.669582
false
3.75641
false
false
false
ammarkhann/FinalSeniorCode
lib/python2.7/site-packages/IPython/core/tests/test_profile.py
13
5499
# coding: utf-8 """Tests for profile-related functions. Currently only the startup-dir functionality is tested, but more tests should be added for: * ipython profile create * ipython profile list * ipython profile create --parallel * security dir permissions Authors ------- * MinRK """ from __futur...
mit
520,207,437,187,262,140
32.321212
78
0.601419
false
3.951833
true
false
false
Bradfield/algos
book/graphs/dijkstras_algorithm.py
2
10638
# -*- coding: utf-8 -*- """ When you surf the web, send an email, or log in to a laboratory computer from another location on campus a lot of work is going on behind the scenes to get the information on your computer transferred to another computer. The in-depth study of how information flows from one computer to anot...
cc0-1.0
-8,986,169,047,754,631,000
45.893805
94
0.736554
false
3.503471
false
false
false
xiaokaizh/SmartDoorControl
ShockTest.py
1
1145
#!/user/bin/env python # coding=utf-8 __author__ = 'xzhao' import RPi.GPIO as GPIO import time import threading GPIO.setmode(GPIO.BOARD) GPIO_shock = 12 # 振动传感器GPIO shock = 0 shocki = 0 shockSum = 0 previousShock = 0 #Shock前一个状态 GPIO.setup(GPIO_shock, GPIO.IN) def signalCollect(): while True: signalshoc...
apache-2.0
393,560,562,758,648,450
20.843137
69
0.551662
false
3.161932
false
false
false
HiSPARC/publicdb
scripts/fake-datastore-xmlrpc-server.py
1
1729
#!/usr/bin/python """ Simple XML-RPC Server to run on the datastore server. This daemon should be run on HiSPARC's datastore server. It will handle the cluster layouts and station passwords. When an update is necessary, it will reload the HTTP daemon. The basis for this code was ripped from the pyth...
gpl-3.0
-3,502,502,690,191,686,000
26.887097
73
0.665703
false
4.146283
false
false
false
liumeixia/xiaworkspace
testweb/testzh/login_regist.py
1
7225
__author__ = 'liumx' # -*- coding: utf-8 -*- from testzh.models import ArTicle1 from testzh.models import ArTicle2 from testzh.models import Usercenter from django.shortcuts import render_to_response from django.views.decorators.http import require_http_methods from django.http import HttpResponseRedirect, Http...
gpl-2.0
-7,246,749,130,745,708,000
37.886905
134
0.529026
false
3.512055
false
false
false
asendecka/djangae
djangae/tests/test_transactional.py
7
6364
from djangae.test import TestCase from djangae.db import transaction from djangae.contrib import sleuth class TransactionTests(TestCase): def test_repeated_usage_in_a_loop(self): from .test_connector import TestUser pk = TestUser.objects.create(username="foo").pk for i in xrange(4): ...
bsd-3-clause
-1,173,051,211,443,170,300
33.586957
105
0.603708
false
4.488011
true
false
false
asazodi/phdmate
crawlers/semex_cfp.py
2
4854
import requests from urllib2 import unquote from datetime import date from scrapy.http import HtmlResponse import re import cgi import json import pprint ranks = { 0:'unknown', 3:'C', 4:'B', 5:'A'} title_re = re.compile(r'<td.*?_blank">(.*?)</a') rest_re = re.compile(r'...list">(?!.*?<a)(?:&nbsp;|\xa0|\xa8){0,3}(.*?)<...
gpl-2.0
434,400,404,328,708,500
37.832
103
0.554388
false
3.435244
false
false
false
leiyangleon/FSH
ISCE_processing_scripts/insarApp_substitute/runCoherence.py
1
3709
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Copyright 2012, by the California Institute of Technology. ALL RIGHTS RESERVED. # United States Government Sponsorship acknowledged. Any commercial use must be # negotiated with the Office of Technology Transfer at the California Institu...
gpl-3.0
-9,096,079,866,505,561,000
36.846939
121
0.69938
false
3.600971
false
false
false
Nizebulous/games_solver
packages/modules/chopsticks.py
1
3581
from base import BaseGame from packages.utils import Value class Chopsticks(BaseGame): """ The finger game of Chopsticks """ DEAD_HAND = 6 def __init__(self): """ Initialize the play board """ self.board = [1, 1, 1, 1] self.players_turn = 0 self.h...
mit
1,893,841,753,697,081,600
31.853211
92
0.526389
false
3.672821
false
false
false
fox-it/django-auth-policy
django_auth_policy/tests/__init__.py
1
22907
import datetime import logging import collections from cStringIO import StringIO from django.test import TestCase, RequestFactory from django.contrib.auth import get_user_model, SESSION_KEY from django.core.urlresolvers import reverse from django.utils import timezone from django_auth_policy.forms import (StrictAuthe...
bsd-3-clause
8,727,663,295,439,031,000
42.220755
79
0.622779
false
4.073804
true
false
false
ychen820/microblog
y/google-cloud-sdk/.install/.backup/platform/gcutil/lib/google_compute_engine/gcutil_lib/version_checker.py
4
9195
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
bsd-3-clause
6,195,015,633,478,772,000
31.72242
80
0.670473
false
4.025832
true
false
false
igrad/Bag-of-Holding
Bag.py
1
2569
from SysFuncs import * from LoadSaves import * from AppInit import * from BagItem import * from Currency import * class Bag: '''An instance of a user's bag. This contains all of the meta data about the bag as well as lists the contents of the bag as ID references. Information about the items themselves ar...
gpl-3.0
618,479,454,505,748,700
29.223529
93
0.611133
false
3.563107
false
false
false
ionomy/ion
test/functional/addressindex.py
1
14802
#!/usr/bin/env python3 # Copyright (c) 2014-2015 The Bitcoin Core developers # Copyright (c) 2018-2020 The Ion Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test addressindex generation and fetching # from t...
mit
8,207,495,467,560,706,000
41.657061
143
0.639778
false
3.179807
true
false
false
google-research/tapas
tapas/utils/beam_utils.py
1
2276
# coding=utf-8 # Copyright 2019 The Google AI Language Team 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 ...
apache-2.0
4,589,415,483,412,307,500
30.178082
75
0.711775
false
3.528682
false
false
false
ryanraaum/oldowan.polymorphism
oldowan/polymorphism/polymorphism.py
1
1349
class Polymorphism(object): def __init__(self, position, insert, value, reference=''): self.position = position self.insert = insert self.value = value self.reference = reference def __cmp__(self, other): if self.position == other.position: if self.insert ...
mit
2,859,331,567,036,315,000
28.977778
67
0.55745
false
3.944444
false
false
false
wimac/home
Dropbox/skel/bin/bg.py
1
2099
#!/usr/bin/python # __author__ = 'author' import getpass try: from xml.etree import ElementTree # for Python 2.5 users except: from elementtree import ElementTree from gdata import service import gdata import atom import getopt import sys def main(): # parse command line options try: opts, args = getopt...
gpl-2.0
4,222,878,376,277,236,700
23.126437
81
0.640305
false
3.259317
false
false
false
The-Compiler/pytest
testing/test_capture.py
12
50277
import contextlib import io import os import subprocess import sys import textwrap from io import UnsupportedOperation from typing import BinaryIO from typing import cast from typing import Generator from typing import TextIO import pytest from _pytest import capture from _pytest.capture import _get_multicapture from ...
mit
4,863,957,510,946,503,000
29.413188
115
0.529708
false
4.10895
true
false
false
carlosperate/ubitflashtool
tests/test_cli.py
1
11444
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for cli.py.""" import os from unittest import mock from click.testing import CliRunner import pytest from ubittool import cli, cmds @pytest.fixture def check_no_board_connected(): """Check that there is no mbed board that PyOCD can connect to.""" try: ...
mit
5,813,955,467,411,993,000
35.330159
79
0.668822
false
3.520148
true
false
false
sugarraysam/spell_checker
tp2_20054572_20037847.py
1
2899
from multiprocessing import Pool from Word import Word import multiprocessing if __name__ == "__main__": # Verify dict.txt and input.txt exist import os, sys from PrimeTest import PrimeTest from ChainHashMap import ChainHashMap # make sure files exist if os.path.exists("dict.txt") and ...
gpl-3.0
664,518,414,141,673,000
35.2375
73
0.500862
false
4.320417
false
false
false
PolyLAN/django-wiki
wiki/admin.py
11
2901
from __future__ import unicode_literals from __future__ import absolute_import from django import forms from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from mptt.admin import MPTTModelAdmin from . import models from . import editors # Django 1.9 deprecation of contenttypes.ge...
gpl-3.0
3,458,470,543,661,273,000
29.536842
84
0.6808
false
4.222707
false
false
false
igboyes/virtool
virtool/references/utils.py
2
11303
import gzip import json from cerberus import Validator from operator import itemgetter import virtool.otus.utils ISOLATE_KEYS = [ "id", "source_type", "source_name", "default" ] OTU_KEYS = [ "name", "abbreviation", "schema" ] RIGHTS = [ "build", "modify", "modify_otu", "...
mit
7,329,266,022,629,094,000
24.4
113
0.547554
false
3.972935
false
false
false
EricssonResearch/scott-eu
simulation-ros/src/turtlebot2i/turtlebot2i_scene_graph/src/vrep_scene_graph_generator.py
1
10125
#!/usr/bin/env python from vrep_object_extractor import VrepObjectExtractor import time import vrep # add for generate scene graph import re from graphviz import Digraph import math from shapely.geometry import box # some functions for label message in scene graph nodes def get_distance(i, j): dx = j.pose[0] -...
apache-2.0
6,536,135,167,575,143,000
38.244186
254
0.560988
false
3.065395
false
false
false
powersj/tilt-shift
src/blur.py
1
1763
#!/usr/bin/python """Set of functions to blur an entire image that replicates a lens blur.""" import cv2 import numpy as np import os import shutil def make_more_vivid(image): """Modify the saturation and value of the image.""" hsv = cv2.cvtColor(image, cv2.COLOR_BGR2HSV) hue, saturation, value = cv2.spli...
apache-2.0
1,325,017,258,541,798,700
27.901639
79
0.642655
false
3.228938
false
false
false
Hybrid-Cloud/cinder
cinder/volume/drivers/falconstor/rest_proxy.py
6
58141
# Copyright (c) 2016 FalconStor, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
-2,182,897,599,370,730,200
37.000654
79
0.557318
false
3.802551
false
false
false
vincentfung13/TwitterRepManagement
user_handle/utility.py
1
2069
from user_handle.models import UserEntity from django.contrib.auth.models import User from django.http import HttpResponse from twitter_services.tweet_processing import utility as tweet_util import json # Return true if a username has been registered before and false otherwise def check_exist(username, email): tr...
mit
-1,225,466,274,652,373,500
29.426471
94
0.667956
false
3.918561
false
false
false
vcelis/M101P
week3/homework_3_1/hw1.py
1
2357
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2014 Vincent Celis # # 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 righ...
mit
-3,611,229,863,796,380,000
39.655172
256
0.712346
false
4.022184
false
false
false
averagehat/vim-fireplace-talks
vim-talks.py
1
3483
from snake import * from functools import partial #belongs as ~/.vimrc.py #"" hook to normal mode movements #":autocmd CursorMoved * :call SpeakLine() # #"nmap <silent> <C-i> :set opfunc=NetBeansCommand<CR>g@ # SPEAK_CHAR = False #speak letter-by-letter SPEAK_BLOCKING = False SETTINGS = { ":speed" : 0.5} #... compose...
epl-1.0
7,756,230,314,261,015,000
29.823009
92
0.641401
false
3.169245
false
false
false
smithsps/LawsonAPI
old/src/old/discover.py
1
1645
import subprocess import User # Starts ssh process an and returns it #NOT USED ATM def ssh(host, command): #https://gist.github.com/bortzmeyer/1284249 ssh = subprocess.Popen(['ssh', '%s' % host, '%s' % command], shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) return ssh #Runs who command with ssh...
mit
-4,881,728,816,694,318,000
25.967213
124
0.67234
false
3.448637
false
false
false
harsh8398/pybackup
pybackup/incremental_backup.py
1
2029
import os import shutil from .rsync_copy import Rsync from tqdm import tqdm from .backup import Backup class IncrementalBackup(Backup): def __init__(self, src, dst): super().__init__(src, dst) self.THRESHOLD_DIFF_RATIO = 0.75 self.WHOLE_COPY_CONST = 0 self.PARTIAL_COPY_CONST = 1 ...
mit
6,733,685,852,030,608,000
32.816667
75
0.601281
false
3.636201
false
false
false
adbrant/zuma-fpga
source/InitFpga.py
1
15060
from structs import * import globs import time import re import const import closNetwork ## build the simple network. # In the simple network, every pin of a ble get # its own inode, which can route from every input # of the IIB. This can be a cluster input or a lut feedback. def buildSimpleNetwork(cluster,key): ...
bsd-2-clause
4,496,067,873,928,476,700
35.464891
83
0.568858
false
4.001063
false
false
false
jhosmer/PySmile
tests/pysmile_tests.py
1
11679
#!/usr/bin/env python import os import glob import unittest import pysmile import json __author__ = 'Jonathan Hosmer' class PySmileTestDecode(unittest.TestCase): def setUp(self): curdir = os.path.dirname(os.path.abspath(__file__)) self.smile_dir = os.path.join(curdir, 'data', 'smile') ...
apache-2.0
6,097,365,158,100,773,000
43.238636
93
0.529669
false
2.789348
true
false
false
Fedik/gramps
gramps/gen/plug/_pluginreg.py
4
48822
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2009 Benny Malengier # 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 v...
gpl-2.0
8,956,402,882,616,859,000
33.972779
108
0.599259
false
4.145186
false
false
false
openatx/uiautomator2
uiautomator2/ext/info/__init__.py
1
2645
import json import os import datetime import atexit from uiautomator2 import UIAutomatorServer from uiautomator2.ext.info import conf class Info(object): def __init__(self, driver, package_name=None): self._driver = driver self.output_dir = 'report/' self.pkg_name = package_name s...
mit
3,852,022,439,132,349,000
32.481013
89
0.519471
false
3.668516
false
false
false
Yubico/yubiadmin
yubiadmin/apps/sys.py
1
5099
# Copyright (c) 2013 Yubico AB # 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 conditi...
bsd-2-clause
6,954,149,392,675,465,000
31.272152
76
0.578937
false
4.182937
false
false
false
hzlf/openbroadcast
website/apps/importer/migrations/0008_auto__add_field_importfile_results_tag_status__add_field_importfile_re.py
2
8256
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'ImportFile.results_tag_status' db.add_column('importer_importfile', 'results_tag_status', ...
gpl-3.0
-4,652,112,666,909,879,000
74.752294
204
0.563953
false
3.744218
false
false
false
tdyas/pants
src/python/pants/backend/codegen/wire/java/wire_gen.py
2
5773
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import logging import os from pants.backend.codegen.wire.java.java_wire_library import JavaWireLibrary from pants.backend.jvm.targets.java_library import JavaLibrary from pants.backend.jv...
apache-2.0
-4,155,171,082,662,377,500
39.943262
100
0.626364
false
4.189405
false
false
false
yetilinux/yetiweb
sitemaps.py
1
3118
from datetime import datetime, timedelta from pytz import utc from django.contrib.sitemaps import Sitemap from django.core.urlresolvers import reverse from main.models import Package from news.models import News from packages.utils import get_group_info, get_split_packages_info class PackagesSitemap(Sitemap): ch...
gpl-2.0
-5,915,928,622,169,549,000
23.551181
70
0.565106
false
3.646784
false
false
false
QingChenmsft/azure-cli
src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/proxy.py
5
2683
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
mit
3,334,482,644,374,970,400
25.83
98
0.56243
false
4.320451
false
false
false
Guismo1/OpenStack-tools
openstack-net-tenant.py
1
2923
#!/usr/bin/env python import sys import requests import json import pprint import os OS_AUTH_URL=os.environ.get('OS_AUTH_URL') OS_TENANT_ID=os.environ.get('OS_TENANT_ID') OS_TENANT_NAME=os.environ.get('OS_TENANT_NAME') OS_USERNAME=os.environ.get('OS_USERNAME') OS_PASSWORD=os.environ.get('OS_PASSWORD') if OS_AUTH_URL...
apache-2.0
7,000,381,782,790,158,000
33.388235
120
0.584673
false
3.28427
false
false
false
InsightSoftwareConsortium/ITKExamples
Utilities/CookieCutter/hooks/post_gen_project.py
1
7180
#!/usr/bin/env python # Copyright NumFOCUS # # 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.txt # # Unless required by applicable law or ...
apache-2.0
3,509,470,674,119,587,000
30.082251
78
0.613092
false
3.478682
false
false
false