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
guyskk/validater
tests/validators/test_union.py
2
4635
import pytest from validr import T, SchemaError, Invalid from . import case, compiler @case({ T.union([T.int, T.list(T.int)]): [ (111, 111), ([111, 222], [111, 222]), ([], []), [None, '', 'xxx'], ], T.union([T.str, T.list(T.str)]).optional: [ ([], []), (None...
mit
-4,217,504,772,218,959,400
27.262195
83
0.559655
false
3.123315
true
false
false
bioinformatist/Gao-s-SB
src/gaosb/core/app.py
1
17034
import os import re import subprocess import sys from collections import defaultdict from Bio import Entrez from Bio import SeqIO from PyQt5 import QtWidgets, QtCore from PyQt5.QtCore import Qt from PyQt5.QtGui import QDesktopServices from PyQt5.QtWidgets import QMessageBox from gaosb.gui.mainwindow import Ui_MainWin...
mit
3,340,780,258,272,860,700
43.826316
119
0.584361
false
4.153621
false
false
false
mcgill-robotics/Firmware
src/lib/parameters/px4params/markdownout.py
1
5359
from xml.sax.saxutils import escape import codecs class MarkdownTablesOutput(): def __init__(self, groups): result = ("# Parameter Reference\n" "> **Note** **This list is auto-generated from the source code** and contains the most recent parameter documentation.\n" "\n")...
bsd-3-clause
-3,405,098,370,564,607,000
50.038095
397
0.500653
false
4.069096
false
false
false
rcbops/keystone-buildpackage
keystone/middleware/auth_token.py
1
16245
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (c) 2010-2011 OpenStack, 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/lice...
apache-2.0
-5,634,659,186,557,328,000
39.919395
79
0.565528
false
4.485091
false
false
false
Zosoled/Cumulus
robot/Cumulus/resources/locators_45.py
1
15089
"""Locators for Spring '19""" npsp_lex_locators={ 'breadcrumb': "//li[contains(@class, 'slds-breadcrumb__item')]/span[text()='{}']", 'breadcrumb-link':"//a[@title='{}' and contains(@class,'BreadCrumbItem')]", 'placeholder': "//*[contains(@placeholder,'{}')]", 'app_launcher':{ 'select-option':'/...
bsd-3-clause
5,331,987,870,339,931,000
79.265957
295
0.577441
false
2.998013
false
false
false
relman/sevpn-mgmt-py
tests/cedar/test_session.py
1
6285
# -*- coding: utf-8 -*- import mock import socket import ssl import unittest from SevpnMgmtPy.cedar import Session, Watermark class TestSession(unittest.TestCase): def test_start_rpc_session(self): ba = bytearray('\xab\xcd\xef') hello_pack = mock.MagicMock() hello_pack.get_va...
mit
4,562,754,564,933,619,000
41.645833
118
0.590772
false
3.649826
true
false
false
Islandman93/reinforcepy
reinforcepy/learners/dqn/asynchronous/recurrent_thread_learner.py
1
2073
import numpy as np from .q_thread_learner import QThreadLearner class RecurrentThreadLearner(QThreadLearner): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.lstm_state_for_training = self.network.get_lstm_state() def reset(self): super().reset() se...
gpl-3.0
1,719,155,660,870,951,400
40.46
118
0.599132
false
3.978887
false
false
false
ruchikd/Algorithms
Python/RankingSystem/rankingSystem.py
1
1182
class Students: def __init__ (self, name, percentage): self.name = name self.percentage = percentage def getPercentile(percentageList): percentageList = sorted(percentageList, reverse=True) print percentageList rank = [] for x in range(len(percentageList)): if percentageList[x][0] != percentageList[x-1][0...
gpl-3.0
-1,034,714,512,743,438,600
27.166667
100
0.639594
false
2.787736
false
false
false
sam-m888/gramps
gramps/plugins/export/export.gpr.py
1
6420
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2009 Benny Malengier # # 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) ...
gpl-2.0
3,462,252,224,130,837,000
31.755102
82
0.58676
false
3.512035
false
false
false
1200wd/1200wd_addons
delivery_transsmart_address_consolidation/models.py
1
2895
# -*- coding: utf-8 -*- ############################################################################## # # Delivery Transsmart Ingegration - Address Consolidation # Copyright (C) 2016 1200 Web Development (<http://1200wd.com/>) # (C) 2015 ONESTEiN BV (<http://www.onestein.nl>) # # This program is ...
agpl-3.0
3,679,411,118,529,793,000
47.25
105
0.597927
false
4.314456
false
false
false
caromedellin/data-play
definingMarkovThings.py
1
2434
# -*- coding: utf-8 -*- """ Created on Thu Feb 25 17:58:31 2016 Markov Chain Monte Carol ( or something like that, MCMC) @author: katar """ import numpy import random """ Concept: 1) define a markov chain 2) run a monte carlo simulation using the markov chain to """ stateNames =['tropics','ci...
mit
5,411,008,059,433,275
24.354167
68
0.639688
false
3.632836
false
false
false
Nexenta/cinder
cinder/volume/drivers/huawei/rest_client.py
1
87896
# Copyright (c) 2016 Huawei Technologies Co., Ltd. # 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 # # ...
apache-2.0
-4,538,004,271,043,138,000
36.530316
79
0.533608
false
3.796967
false
false
false
rnowling/pop-gen-models
single-pop/single_pop.py
1
3379
import sys import numpy as np import numpy.random as npr from sklearn.neighbors.kde import KernelDensity from scipy.special import gammaln import matplotlib.pyplot as plt from calculate_phist import read_counts from calculate_phist import normalize_haplotypes def log_factorial(n): return gammaln(n+1) def log_multino...
apache-2.0
8,938,292,461,647,494,000
27.166667
100
0.692513
false
2.635725
false
false
false
SUNET/eduid-webapp
src/eduid_webapp/reset_password/schemas.py
1
4836
# -*- coding: utf-8 -*- # # Copyright (c) 2019 SUNET # 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 # noti...
bsd-3-clause
-5,484,295,031,040,792,000
38.966942
84
0.771299
false
4.176166
false
false
false
USGSDenverPychron/pychron
pychron/experiment/run_history_view.py
1
3330
# =============================================================================== # Copyright 2017 ross # # 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/LICE...
apache-2.0
-8,427,186,691,387,601,000
34.806452
116
0.552252
false
4.236641
false
false
false
matrix-org/synapse
synapse/rest/client/v2_alpha/sendtodevice.py
1
2257
# Copyright 2016 OpenMarket Ltd # # 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 writin...
apache-2.0
-4,605,852,789,595,255,000
32.686567
86
0.677891
false
3.687908
false
false
false
michaelsmit/openparliament
parliament/hansards/views.py
1
10309
import datetime from urllib import urlencode from django.core.paginator import Paginator, InvalidPage, EmptyPage from django.core import urlresolvers from django.http import HttpResponse, Http404, HttpResponsePermanentRedirect, HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.template im...
agpl-3.0
-1,658,530,165,151,227,600
35.953405
107
0.639732
false
3.640184
false
false
false
felixbb/forseti-security
google/cloud/security/common/gcp_type/resource.py
1
4605
# Copyright 2017 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 or agreed to in writing, s...
apache-2.0
-8,266,424,038,210,735,000
27.962264
75
0.608252
false
4.398281
false
false
false
willemt/yabtorrent
clib.py
1
5248
#!/usr/bin/env python # encoding: utf-8 # Willem-Hendrik Thiart, 2014 from waflib.Configure import conf import simplejson as json import os import itertools # TODO # Add exception for instances where there are multiple packages with same name class PackageNotFoundException(Exception): pass class ClibPackage...
bsd-3-clause
3,550,750,064,680,354,000
27.677596
95
0.619855
false
3.825073
false
false
false
dionyziz/rupture
backend/breach/tests/test_views.py
1
8744
from django.test import Client, TestCase from django.core.urlresolvers import reverse from breach.models import Target, Victim, Round, SampleSet import json from binascii import hexlify from mock import patch class ViewsTestCase(TestCase): def setUp(self): self.client = Client() self.target1 = Ta...
mit
-1,765,085,259,026,067,200
35.739496
152
0.592292
false
3.870739
true
false
false
crazy-canux/xplugin_nagios
plugin/plugins/jit/src/jit/session.py
1
6030
# -*- coding: utf-8 -*- # Copyright (C) Canux CHENG <canuxcheng@gmail.com> # # 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 ...
gpl-2.0
458,092,327,978,902,800
34.470588
80
0.58524
false
4.40146
false
false
false
kelle/astropy
astropy/io/ascii/tests/test_read.py
1
47925
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS import re from io import BytesIO, open from collections import OrderedDict import locale import platform import pytest import numpy as np from ....extern import six # noqa from ....extern.six.moves impor...
bsd-3-clause
-193,984,975,679,825,300
36.198758
140
0.531704
false
3.485777
true
false
false
mlperf/training_results_v0.7
NVIDIA/benchmarks/ssd/implementations/mxnet/mlperf_log_utils.py
1
2395
import collections import os import subprocess import numpy as np from mlperf_logging.mllog import constants as mlperf_constants from mlperf_logging import mllog class MPIWrapper(object): def __init__(self): self.comm = None self.MPI = None def get_comm(self): if self.comm is None: ...
apache-2.0
3,036,545,671,648,611,000
25.032609
92
0.609186
false
3.321775
false
false
false
vladrulez/old_scripts
crtfile_check.py
1
2457
#!/usr/bin/env python # vim: set filetype=python ts=4 sw=4 et si # -*- coding: utf-8 -*- # Author: Vladimir Blokhin ########################### import sys,os,re,tempfile,subprocess def run_command(command): p = subprocess.Popen(command,stdout=subprocess.PIPE, shell=True) return p.communicate()[0] def...
apache-2.0
4,660,238,692,914,844,000
38.015873
126
0.553521
false
3.525108
false
false
false
markcharyk/data-structures
data_structures/b_tree.py
1
5000
from data_structures.stack import Stack class Node(object): def __init__(self, key=None, val=None, capacity=3): self.count = 0 if key is not None: self.count = 1 self.elems = [(key, val)] for i in xrange(capacity-1): self.elems.append((None, None)) s...
mit
-6,869,153,203,930,512,000
31.051282
76
0.5344
false
3.837299
false
false
false
Antiun/yelizariev-saas
saas_portal/models/saas_portal.py
1
19270
# -*- coding: utf-8 -*- import openerp from openerp import models, fields, api, SUPERUSER_ID, exceptions from openerp.addons.saas_utils import connector, database from openerp import http from openerp.tools import config, scan_languages from openerp.tools.translate import _ from openerp.addons.base.res.res_partner impo...
lgpl-3.0
926,847,361,229,939,000
37.463074
172
0.56082
false
3.806796
false
false
false
ucsb-cs/submit
submit/__init__.py
1
5135
from pyramid.authentication import AuthTktAuthenticationPolicy from pyramid.authorization import ACLAuthorizationPolicy from pyramid.config import Configurator from pyramid.security import ALL_PERMISSIONS, Allow, Authenticated from pyramid.session import UnencryptedCookieSessionFactoryConfig from sqlalchemy import engi...
bsd-2-clause
7,304,255,547,139,121,000
46.110092
79
0.652775
false
3.734545
true
false
false
NedJunk/APlasticBag
driver.py
1
1662
import tweepy, time, sys, yaml, json class Bot(object): """docstring for Bot""" def __init__(self): super(Bot, self).__init__() self.creds = None self.api = self.load_api() def load_api(self): with open('credentials.yaml', 'r') as f: self.creds = yaml.load(f) auth = tweepy.OAuthHandler(self.creds[...
mit
1,130,375,862,517,401,700
23.820896
89
0.633574
false
2.70684
false
false
false
Grumbel/rfactortools
minised.py
1
5031
#!/usr/bin/env python3 # Minimal sed replacement # Copyright (C) 2014 Ingo Ruhnke <grumbel@gmail.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...
gpl-3.0
5,226,501,209,795,802,000
34.429577
110
0.570463
false
4.106939
false
false
false
NikNitro/Python-iBeacon-Scan
sympy/simplify/tests/test_hyperexpand.py
2
38226
from random import randrange from sympy.simplify.hyperexpand import (ShiftA, ShiftB, UnShiftA, UnShiftB, MeijerShiftA, MeijerShiftB, MeijerShiftC, MeijerShiftD, MeijerUnShiftA, MeijerUnShiftB, MeijerUnShiftC, MeijerUnShiftD, Re...
gpl-3.0
-4,302,785,560,351,931,400
35.755769
85
0.488333
false
2.41341
true
false
false
Kimanicodes/wananchi
AfricasTalkingGateway.py
1
8915
""" COPYRIGHT (C) 2014 AFRICASTALKING LTD <www.africastalking.com> # AFRICAStALKING SMS GATEWAY CLASS IS A FREE SOFTWARE IE. CAN BE MODIFIED AND/OR REDISTRIBUTED UNDER THER TERMS OF GNU GENERAL PUBLIC LICENCES AS PUBLISHED BY THE ...
mit
-3,734,447,362,411,763,000
36.616034
138
0.616713
false
4.217124
false
false
false
UstadMobile/exelearning-ustadmobile-work
exe/webui/reflectionblock.py
1
4588
# =========================================================================== # eXe # Copyright 2004-2006, University of Auckland # # 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 ...
gpl-2.0
4,420,733,821,103,434,000
35
79
0.592197
false
4.533597
false
false
false
wtsi-hgi/irobot
irobot/tests/unit/authentication/test_http.py
1
5773
""" Copyright (c) 2017 Genome Research Ltd. Author: Christopher Harrison <ch12@sanger.ac.uk> 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 ...
gpl-3.0
799,001,320,884,289,400
36.487013
87
0.691841
false
4.123571
true
false
false
fbrglez/gitBed
xBed/pLib/B/coord.py
1
8879
from itertools import imap import time import sys import os import pwd import platform import random from math import log def neighborhood(coordPivot = [0, 1, 0, 1, 0, 1, 0]): thisCmd = "B.coord.neighborhood" ABOUT = """ Procedure {} takes a binary coordinate such as 0101010 (here of size L = 7) and returns a...
gpl-2.0
6,644,329,746,872,474,000
31.763838
153
0.585088
false
3.516436
false
false
false
seekuoitdc/clubcheckout
workingdemo/basic/3server.py
1
4657
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from os import curdir, sep import urlparse, pickle, os p = 'htmlsnips/' nofile = 'Bud, I can\'t find the file.' def makePage(): if not os.path.isfile('login.html'): try: with open(p+'header.xml', 'r') as h, open(p+'login.xml','r') as i, open(p+'login.h...
mit
-1,395,616,687,712,345,600
26.556213
171
0.625725
false
2.824136
false
false
false
zsiciarz/variablestars.net
observations/utils.py
1
1279
import time def jd_now(): """ Returns Julian Date at the current moment. """ return 2440587.5 + time.time() / 86400.0 def normalize_star_name(name): """ Normalize star name with GCVS names, for example: V339 -> V0339. """ digits = "123456789" if name[0] == "V" and name[1] in digi...
mit
-9,047,926,380,575,265,000
29.452381
83
0.647381
false
3.592697
false
false
false
grimoirelab/perceval
perceval/backends/core/git.py
1
46476
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2019 Bitergia # # 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 ...
gpl-3.0
-6,328,113,162,280,307,000
33.812734
104
0.579107
false
4.222313
false
false
false
atcemgil/notes
HiddenMarkovModel.py
1
8122
import numpy as np from notes_utilities import randgen, log_sum_exp, normalize_exp, normalize class HMM(object): def __init__(self, pi, A, B): # p(x_0) self.pi = pi # p(x_k|x_{k-1}) self.A = A # p(y_k|x_{k}) self.B = B # Number of possible latent states at ea...
mit
8,853,695,844,268,049,000
32.155102
144
0.481039
false
3.076515
false
false
false
dandygithub/kodi
addons/plugin.audio.dandy.amdm.ru/default.py
1
19076
#!/usr/bin/python # -*- coding: utf-8 -*- # Writer (c) 2018, dandy # Rev. 1.0.0 # Licence: GPL v.3: http://www.gnu.org/copyleft/gpl.html import os import urllib import urllib2 import sys import re import socket import json import xbmc import xbmcplugin import xbmcgui import xbmcaddon from operator import itemgetter im...
gpl-3.0
-8,952,606,456,916,527,000
43.157407
249
0.554152
false
3.634909
false
false
false
daviskirk/climatecontrol
climatecontrol/processors.py
1
7460
"""Fragment processors.""" import glob import logging import os from typing import Any, Callable, Iterable, Iterator, Mapping, Sequence, Tuple, Type from climatecontrol.constants import REMOVED from climatecontrol.file_loaders import ( FileLoader, NoCompatibleLoaderFoundError, iter_load, load_from_file...
mit
-7,791,123,304,986,514,000
32.00885
105
0.591555
false
4.58231
false
false
false
gem/oq-hazardlib
openquake/hazardlib/tests/gsim/fukushima_tanaka_1990_test.py
1
1631
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2013-2017 GEM Foundation # # OpenQuake 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 Licen...
agpl-3.0
-6,087,422,980,811,626,000
33.702128
74
0.716125
false
3.288306
true
false
false
WilliamWickerson/MLProject
fastNetwork.py
1
7332
from random import uniform import numpy def sigmoidFunction(x): try: ret = 1 / (1 + numpy.exp(-x)) except OverflowError: ret = 0 return ret def softMax(array): exp = [numpy.exp(x) for x in array] return numpy.array([x / sum(exp) for x in exp]) global sigmoid sigmoid = nump...
mit
3,611,374,203,057,257,500
44.259259
122
0.564103
false
3.963243
false
false
false
aspidites/beets
beetsplug/web/__init__.py
1
3486
# This file is part of beets. # 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, copy, ...
mit
7,085,092,965,231,370,000
26.888
77
0.644291
false
3.310541
true
false
false
sadaszewski/scimd
tables.py
1
4234
# # Copyright (C) 2015, Stanislaw Adaszewski # s.adaszewski@gmail.com # http://algoholic.eu # # License: 2-clause BSD # from markdown import Extension from markdown.blockprocessors import BlockProcessor from markdown.util import etree import numpy as np from collections import defaultdict import numpy.core.defchararr...
bsd-2-clause
5,751,365,898,379,827,000
38.943396
102
0.467643
false
3.425566
false
false
false
levilucio/SyVOLT
UMLRT2Kiltera_MM/Properties/from_thesis/HSS3_then2_IsolatedLHS.py
1
2493
from core.himesis import Himesis, HimesisPreConditionPatternLHS import uuid class HSS3_then2_IsolatedLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HSS3_then2_IsolatedLHS. """ # Flag this instanc...
mit
4,887,928,618,606,839,000
42.736842
125
0.486963
false
4.986
false
false
false
daniestevez/gr-satellites
python/pwsat2_submitter.py
1
4853
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2018 Daniel Estevez <daniel@destevez.net> # # This file is part of gr-satellites # # SPDX-License-Identifier: GPL-3.0-or-later # # This contains code taken from # https://github.com/PW-Sat2/SimpleUploader-radio.pw-sat.pl # That code is licenced under the foll...
gpl-3.0
-5,202,236,390,342,492,000
34.423358
79
0.621059
false
4.198097
false
false
false
KenKundert/abraxas
abraxas/secrets.py
1
4131
# Generate a Secret import hashlib import string # Globals {{{1 DEFAULT_PASSPHRASE_LENGTH = 4 DEFAULT_PASSWORD_LENGTH = 12 DEFAULT_SEPARATOR = ' ' DEFAULT_ALPHABET = string.ascii_letters + string.digits # Utilities {{{1 # Partition a string into chunks, each of chars_per_chunk characters, and return # them one at a ...
gpl-3.0
9,177,539,458,046,021,000
38.721154
80
0.614863
false
3.995164
false
false
false
imk1/IMKTFBindingCode
makeGetMergedPeakSignalsScript.py
1
2401
import sys import argparse from itertools import izip def parseArgument(): # Parse the input parser=argparse.ArgumentParser(description=\ "Get the positions with the top scores and their scores") parser.add_argument("--bedFileNameList", required=True,\ help='File with list of bed files') parser.add_argument(...
mit
2,729,998,446,542,933,000
52.355556
279
0.73511
false
3.541298
false
false
false
dutradda/alquimia
alquimia/models_attrs_reflect.py
1
4950
# Copyright 2015 Diogo Dutra # This file is part of alquimia. # alquimia is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # Th...
lgpl-3.0
-8,595,888,538,156,235,000
38.285714
79
0.566061
false
3.69403
false
false
false
asfaltboy/GitSavvy
core/git_mixins/active_branch.py
1
5082
import re import string class ActiveBranchMixin(): def get_current_branch_name(self): """ Return the name of the last checkout-out branch. """ stdout = self.git("branch", "--no-color") try: correct_line = next(line for line in stdout.split("\n") if line.startsw...
mit
898,024,055,494,178,700
32.88
145
0.552538
false
4.310433
false
false
false
mrshelly/openerp71313
openerp/addons/project_issue/project_issue.py
1
29439
#-*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
-5,293,886,448,232,704,000
48.637437
272
0.55716
false
3.913708
false
false
false
CSIRT-MU/Stream4Flow
applications/statistics/tls_classification/web-interface/controllers/tls_classification_statistics.py
1
3061
# -*- coding: utf-8 -*- # Import Elasticsearch library import elasticsearch from elasticsearch_dsl import Search, Q, A # Import advanced python collections import collections # Import global functions from global_functions import escape #----------------- Main Functions -------------------# def tls_classification_s...
mit
1,838,573,191,144,077,300
32.637363
126
0.600131
false
4.038259
false
false
false
potatolondon/django-mediagenerator
mediagenerator/utils.py
1
4864
import functools import threading from . import settings as media_settings from .settings import (GLOBAL_MEDIA_DIRS, PRODUCTION_MEDIA_URL, IGNORE_APP_MEDIA_DIRS, MEDIA_GENERATORS, DEV_MEDIA_URL, GENERATED_MEDIA_NAMES_MODULE) from django.conf import settings from django.core.exceptions import ImproperlyConfigure...
bsd-3-clause
4,704,164,287,700,974,000
30.79085
107
0.633224
false
3.814902
false
false
false
erdc/proteus
proteus/tests/surface_tension/rising_bubble_rans3p/pressure_n.py
1
1214
from __future__ import absolute_import from proteus import * from proteus.default_n import * try: from .pressure_p import * except: from pressure_p import * triangleOptions = triangleOptions femSpaces = {0:pbasis} stepController=FixedStep #matrix type numericalFluxType = NumericalFlux.ConstantAdvection_exteri...
mit
7,385,446,270,750,596,000
25.391304
61
0.788303
false
3.372222
false
true
false
bnbowman/HlaTools
src/pbhla/fasta/subset_sequences.py
1
1114
#! /usr/bin/env python import sys from pbcore.io.FastaIO import FastaReader, FastaWriter from pbhla.fasta.utils import write_fasta def subset_sequences( fasta_file, summary_file, output_file ): seq_ids = identify_sequences( summary_file ) sequences = subset_sequence_records( fasta_file, seq_ids ) write_f...
bsd-3-clause
4,959,454,841,425,011,000
29.944444
62
0.630162
false
3.559105
false
false
false
FInAT/FInAT
finat/restricted.py
1
8971
from functools import singledispatch from itertools import chain import FIAT from FIAT.polynomial_set import mis import finat from finat.fiat_elements import FiatElement from finat.physically_mapped import PhysicallyMappedElement # Sentinel for when restricted element is empty null_element = object() @singledispa...
mit
-7,434,664,180,916,831,000
33.442308
102
0.669793
false
4.068605
false
false
false
quozl/terminal-activity
terminal.py
1
22474
# Copyright (C) 2007, Eduardo Silva <edsiper@gmail.com>. # Copyright (C) 2008, One Laptop Per Child # Copyright (C) 2009, Simon Schampijer # # 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; eithe...
gpl-2.0
-2,182,430,564,190,434,800
35.131833
81
0.577512
false
3.772704
false
false
false
delving/nave
nave/void/migrations/0010_auto_20151111_1409.py
1
5725
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.utils.timezone import django_extensions.db.fields from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_nam...
gpl-2.0
6,720,341,373,530,971,000
46.31405
172
0.597205
false
4.569034
false
false
false
google-research/falken
service/learner/brains/brain_cache.py
1
3449
# Copyright 2021 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, ...
apache-2.0
-6,403,035,016,022,707,000
37.752809
79
0.690055
false
3.752992
false
false
false
reiven/pungabot
modules/module_alias.py
1
1945
# -*- coding: utf-8 -*- import sys aliases = {} def init(config): dbCursor.execute("SELECT alias, command FROM ALIASES") for alias, command in dbCursor.fetchall(): config_alias(alias, command) def config_alias(alias, command): mod = globals() aliases[alias] = command mod['command_' + al...
gpl-3.0
6,981,636,021,889,717,000
26.8
75
0.558869
false
3.635514
false
false
false
KasenJ/CommunityPython
code/push/google/protobuf/text_format.py
1
22190
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
gpl-2.0
-4,898,001,095,182,444,000
29.027064
79
0.656242
false
3.904628
false
false
false
ManjusakaSL/Practice
second/sunspots_roto.py
1
1140
from reportlab.lib import colors from reportlab.graphics.shapes import * from reportlab.graphics import renderPDF data = [ # Year Month Predicted High Low (2007, 8, 113.2, 114.2, 112.2), (2007, 9, 112.8, 115.8, 109.8), (2007, 10, 111.0, 116.0, 106.0), (2007, 11, 109.8, ...
gpl-3.0
2,743,289,408,048,314,400
34.625
75
0.584211
false
2.5
false
false
false
mupi/tecsaladeaula
accounts/forms.py
1
8712
# -*- coding: utf-8 -*- import datetime import requests from django.contrib.auth import get_user_model from django import forms from django.utils.translation import ugettext_lazy as _ from django.conf import settings from django.core.mail import send_mail from django.template.loader import get_template from django.temp...
agpl-3.0
9,010,623,114,994,189,000
36.068085
170
0.593962
false
3.857839
false
false
false
persandstrom/home-assistant
homeassistant/monkey_patch.py
1
2319
"""Monkey patch Python to work around issues causing segfaults. Under heavy threading operations that schedule calls into the asyncio event loop, Task objects are created. Due to a bug in Python, GC may have an issue when switching between the threads and objects with __del__ (which various components in HASS have). ...
apache-2.0
-5,944,090,392,623,569,000
30.337838
71
0.657611
false
4.126335
false
false
false
SteveDiamond/cvxpy
cvxpy/atoms/norm1.py
2
3043
""" Copyright 2013 Steven Diamond 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...
gpl-3.0
-3,142,778,377,888,879,000
27.439252
80
0.595465
false
3.90629
false
false
false
HomeRad/TorCleaner
tests/proxy/rfc2616/test_datedwarn.py
1
4112
# -*- coding: iso-8859-1 -*- # Copyright (C) 2005-2010 Bastian Kleineidam """ """ import time from .. import ProxyTest from wc.http.date import get_date_rfc1123 class test_datedwarn_1old_0cur_0fut(ProxyTest): def test_datedwarn_1old_0cur_0fut(self): self.start_test() def get_response_headers(self, ...
gpl-2.0
-7,466,143,769,899,152,000
28.163121
62
0.561284
false
3.316129
true
false
false
dreibh/planetlab-lxc-plcapi
PLC/Timestamp.py
1
5841
# # Utilities to handle timestamps / durations from/to integers and strings # # datetime.{datetime,timedelta} are powerful tools, but these objects are not # natively marshalled over xmlrpc # import time, calendar import datetime from PLC.Faults import * from PLC.Parameter import Parameter, Mixed # a dummy class mos...
bsd-3-clause
-3,804,732,864,046,200,000
34.834356
128
0.580209
false
4.43845
false
false
false
mitsuhiko/click
src/click/shell_completion.py
1
16736
import os import re from .core import Argument from .core import MultiCommand from .core import Option from .core import ParameterSource from .parser import split_arg_string from .utils import echo def shell_complete(cli, ctx_args, prog_name, complete_var, instruction): """Perform shell completion for the given ...
bsd-3-clause
513,507,486,935,452,400
29.935305
86
0.61048
false
4.190285
false
false
false
edquist/autopyfactory
autopyfactory/plugins/batchsubmit/CondorGRAMBatchSubmitPlugin.py
1
3021
#!/bin/env python # # AutoPyfactory batch plugin for Condor # from CondorCEBatchSubmitPlugin import CondorCEBatchSubmitPlugin from autopyfactory import jsd class CondorGRAMBatchSubmitPlugin(CondorCEBatchSubmitPlugin): def __init__(self, apfqueue, config=None): if not config: qcl = apfqu...
gpl-3.0
525,848,070,490,070,600
34.964286
106
0.576299
false
3.525088
false
false
false
lowandrew/OLCTools
olctools/accessoryFunctions/accessoryFunctions.py
1
43913
#!/usr/bin/env python3 # noinspection PyProtectedMember from Bio.Application import _Option, AbstractCommandline, _Switch from Bio.SeqRecord import SeqRecord from Bio.Seq import Seq from Bio import SeqIO from subprocess import Popen, PIPE, STDOUT from collections import defaultdict import subprocess import datetime imp...
mit
-7,311,287,848,453,213,000
43.401416
120
0.585339
false
4.251016
false
false
false
mulllhausen/btc-inquisitor
mysql_grunt.py
1
1676
"""module containing some general mysql-related functions""" import MySQLdb, re import config_grunt import email_grunt import filesystem_grunt def connect(): "connect and do setup" global cursor, mysql_db mysql_params = config_grunt.config_dict["mysql"] mysql_connection_params = { "host": mysq...
gpl-2.0
-2,934,982,580,133,302,000
28.928571
79
0.655131
false
3.83524
false
false
false
breznak/nupic.biodat
ECG/MIT-BIH-Arrhythmia/model/swarm/permutations.py
1
3870
ECG_MIN = 850 ECG_MAX = 1311 NCOLS = 2048 NCELLS = 4 HZ=360 AHEAD=1 DATA_FILE=u'file://./inputdata.csv' ITERATIONS=15000 # or -1 for whole dataset #override for swarming # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, ...
gpl-2.0
-2,569,282,454,392,104,400
34.833333
156
0.659948
false
3.854582
false
false
false
sonictk/MARI-Extension-Pack
Scripts/Tools/View/extPack_screenshot_all_channels.py
1
3102
# ------------------------------------------------------------------------------ # Screenshot All Channels # ------------------------------------------------------------------------------ # Will do Screenshots of all Channels and export them based on the path provided # in Screenshot Settings # ------------------------...
bsd-3-clause
2,963,752,662,484,094,000
43.314286
110
0.637653
false
4.892744
false
false
false
jonboiser/kolibri
kolibri/logger/serializers.py
1
5206
from django.db.models import Sum from django.utils.timezone import now from kolibri.auth.models import FacilityUser from kolibri.core.serializers import KolibriModelSerializer from kolibri.logger.models import AttemptLog, ContentSessionLog, ContentSummaryLog, ExamAttemptLog, ExamLog, MasteryLog, UserSessionLog from res...
mit
-7,620,453,246,340,688,000
42.383333
150
0.675951
false
4.158147
false
false
false
team-xue/xue
xue/classes/migrations/0001_initial.py
1
2157
# encoding: 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 model 'Major' db.create_table('classes_major', ( ('id', self.gf('django.d...
bsd-3-clause
6,245,965,156,871,212,000
37.944444
104
0.552156
false
3.921818
false
false
false
olitheolix/qtmacs
qtmacs/auxiliary.py
1
49418
# Copyright 2012, Oliver Nagy <olitheolix@gmail.com> # # This file is part of Qtmacs. # # Qtmacs 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...
gpl-3.0
1,003,229,690,201,010,400
33.924382
79
0.574649
false
4.402102
false
false
false
bloodes/python
fixture/address.py
1
9007
from model.address import Adress import re class Address: def __init__(self, app): self.app = app def create_new_address(self, address): wd = self.app.wd # open home page self.app.open_home_page_address() # add_new_address wd.find_element_by_link_text("add ne...
apache-2.0
6,659,749,808,211,276,000
43.369458
194
0.608527
false
3.32976
false
false
false
konne88/MediaCMN
filter/options.py
1
3243
# MediaCMN - Tools to create a consistent music library. # Copyright (C) 2009 Konstantin Weitz # # 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 op...
gpl-3.0
8,575,420,399,519,680,000
44.041667
161
0.629356
false
4.089533
false
false
false
mitodl/micromasters
grades/management/commands/complete_course_run_freeze.py
1
2627
""" Sets the global freeze status for the course run to "complete" """ from celery.result import GroupResult from django.core.cache import caches from django.core.management import BaseCommand, CommandError from courses.models import CourseRun from grades.models import CourseRunGradingStatus from grades.tasks import C...
bsd-3-clause
2,715,154,964,011,390,500
36
102
0.598782
false
4.243942
false
false
false
all-of-us/raw-data-repository
rdr_service/lib_fhir/fhirclient_4_0_0/models/account_tests.py
1
4654
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b on 2019-05-07. # 2019, SMART Health IT. import os import io import unittest import json from . import account from .fhirdate import FHIRDate class AccountTests(unittest.TestCase): def instantiate_from(self, filename): ...
bsd-3-clause
8,311,534,683,422,182,000
50.142857
145
0.672969
false
3.357864
true
false
false
hobson/pug-nlp
pug/nlp/tests.py
1
1514
#!/usr/bin/env python """ Uses the python unittest module to test this app with `python -m unittest pug.nlp`. """ # from django.test import TestCase from unittest import TestCase, main import doctest from pug.nlp import util, http, penn_treebank_tokenizer, detector_morse class NLPDocTest(TestCase): def test_mod...
mit
-613,868,315,280,102,900
35.926829
145
0.677675
false
3.785
true
false
false
tensorflow/mesh
mesh_tensorflow/transformer/transformer_layers.py
1
85747
# coding=utf-8 # Copyright 2021 The Mesh TensorFlow 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
-6,227,173,806,520,915,000
39.106174
109
0.649749
false
3.790593
false
false
false
alirizakeles/zato
code/zato-server/src/zato/server/service/internal/email/smtp.py
1
2958
# -*- coding: utf-8 -*- """ Copyright (C) 2014 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ from __future__ import absolute_import, division, print_function, unicode_literals # stdlib from contextlib import closing from time import time # Zato from zato.c...
gpl-3.0
4,681,710,267,024,434,000
31.444444
127
0.67089
false
3.291995
false
false
false
firelab/windninja-mobile
WindNinja-Server/windninja_server/windninjaqueue/manager.py
1
3293
import sys import time import datetime from operator import itemgetter import subprocess import windninja_server.windninjaqueue.windninja as wn import windninja_server.windninjaqueue.queue as wnqueue VERBOSE = False CANCEL = False LOOP_PAUSE = 5 MAX_RUNNING_JOBS = 5 # NOTES: this is a simple 'max' processes queue m...
unlicense
3,838,413,664,077,272,600
32.927835
121
0.583105
false
4.013415
true
false
false
saisankargochhayat/algo_quest
techdevguide/longestsubsequence.py
1
3538
# The Challenge # Given a string S and a set of words D, find the longest word in D that is a subsequence of S. # Word W is a subsequence of S if some number of characters, possibly zero, can be deleted from S to form W, without reordering the remaining characters. # Note: D can appear in any format (list, hash table...
apache-2.0
2,336,088,256,580,298,000
46.106667
246
0.637033
false
3.785638
false
false
false
hpbader42/Klampt
Python/klampt/vis/glinterface.py
1
2832
class GLPluginInterface: """Users can add their own hooks into the visualizer by overloading this class's methods. Each method should return True if the user event was processed. A return value of True stops cascading events to a parent interface.""" def __init__(self): self.window = None...
bsd-3-clause
5,007,778,894,906,032,000
36.76
97
0.629944
false
4.12828
false
false
false
ismailsunni/healthsites
django_project/core/settings/prod.py
1
2660
# -*- coding: utf-8 -*- from .project import * # noqa # Hosts/domain names that are valid for this site; required if DEBUG is False # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts ALLOWED_HOSTS = ['*'] DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', ...
bsd-2-clause
-4,110,860,493,750,997,000
29.227273
77
0.503008
false
4.042553
false
false
false
pwil3058/pysm_wsm
scm/scm_events.py
1
1384
### -*- coding: utf-8 -*- ### ### Copyright (C) 2016 Peter Williams <pwil3058@gmail.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; version 2 of the License only. ### ### This pr...
gpl-2.0
-4,610,620,243,944,773,600
43.645161
153
0.721821
false
2.982759
false
false
false
LaboratoireMecaniqueLille/crappy
crappy/tool/GUI_Arduino/frame_objects.py
1
6752
# coding: utf-8 import tkinter as tk from tkinter import ttk class FrameObjects(tk.Frame): """A very simple class that should be inherited by frames, to help create and maintain in order the file. How it works: - After frames defined, create a dict (or an orderedDict, for convenience), that will contain e...
gpl-2.0
-4,450,019,639,442,583,000
34.350785
79
0.551392
false
4.358941
false
false
false
wathen/PhD
MHD/FEniCS/ShiftCurlCurl/CppGradient/Efficient/CurlCurlSecondOrder.py
1
5726
import petsc4py, sys petsc4py.init(sys.argv) from petsc4py import PETSc import os, inspect from dolfin import * import numpy import ExactSol import MatrixOperations as MO import CheckPetsc4py as CP import HiptmairPrecond import HiptmairSetup from timeit import default_timer as timer m = 8 errL2b =numpy.zeros((m-1,1))...
mit
-7,598,322,120,128,838,000
32.48538
191
0.627314
false
2.756861
false
false
false
CarlosRA97/explorer-interface
GPIO/ventanas.py
1
1952
#!/usr/bin/env python2.7 from Tkinter import * import tkMessageBox # from RPi.GPIO import * # # from wiringpi2 import * from time import sleep pinesGPIO = [2,3,4,17,27,22,10,9,11,14,15,18,23,24,25,8,7] pinesGPIO # setmode(BCM) # setwarnings(False) def stp(pin): setup(pin, OUT) def on(pin): output(pin,1) def...
gpl-2.0
9,020,848,000,113,857,000
18.717172
82
0.620902
false
2.703601
false
false
false
amirfefer/Cyber-Camera
server.py
1
4344
from flask import Flask, render_template, Response,send_file, request, session, redirect, url_for import camera import flask_httpauth import config import os import io import threading import time import hashlib import logging import datetime import ssl import cloud app = Flask(__name__) conf = config.Configuration() ...
gpl-3.0
-3,400,487,777,179,422,000
31.909091
128
0.638352
false
3.4752
false
false
false
auag92/n2dm
Asap-3.8.4/Projects/NanoparticleMC/resume_amc_gas.py
1
2557
#PBS -l nodes=20:ppn=4:opteron4 #PBS -q verylong #PBS -N amc_n100_conv1 #PBS -m ae import os from montecarlo import SurfaceMonteCarloData from ase.cluster.cubic import FaceCenteredCubic from ase.cluster import data from asap3.MonteCarlo.Metropolis import Metropolis from asap3.MonteCarlo.Moves import SurfaceMove from as...
mit
3,836,986,307,182,625,000
31.782051
108
0.707861
false
3.077016
false
false
false
gaurav/phylo2owl
tests/test_alt_inputs.py
1
2038
#!/usr/bin/env python """ test_alt_inputs.py: Test whether phylo2owl supports multiple input types, including NEXUS and NexML. All of these file types should return exactly the same RDF/XML output. """ import libphylo2owl import pytest import os def test_newick_convert_to_OWL(path_tre): """ Test all .tre files...
mit
-6,772,687,858,154,553,000
30.84375
94
0.631501
false
3.276527
true
false
false
channsoden/hannsoden-bioinformatics
WholeGenomePhylogeny/partition_finder_tools.py
1
5531
# defunct partion finder functions def configure_PF(alignment_file, user_tree = '', branchlengths = 'linked', models='GTR+G', criteria = 'aicc', partition = '', search = 'kmeans'): # Create a partition_finder.cfg file cfg = open('partition_finder.cfg', 'w') cfg.write("# ALIGNMENT FILE #\n") cfg.write(...
gpl-3.0
-6,557,690,750,098,337,000
37.950704
152
0.580004
false
3.687333
false
false
false
gdietz/OpenMEE
edit_funnel_plot_form.py
1
1408
''' Created on Dec 12, 2013 @author: george ''' import sys from PyQt4 import QtCore, QtGui from PyQt4.Qt import * from common_wizard_pages.funnel_page import FunnelPage class EditFunnelPlotForm(QDialog): def __init__(self, funnel_params, parent=None): super(EditFunnelPlotForm, self).__init__(parent) ...
gpl-3.0
8,065,206,704,558,094,000
25.584906
86
0.618608
false
3.724868
false
false
false
yaybu/touchdown
touchdown/goals/get_signin_url.py
1
1515
# Copyright 2015 Isotoma Limited # # 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...
apache-2.0
427,314,541,821,620,000
30.5625
74
0.675248
false
3.986842
false
false
false
nycz/urd
matrix.py
1
2130
def default_item(): return ('', (0,0)) class Matrix(): def __init__(self): self.data = [[default_item()]] def __str__(self): return '\n'.join(repr(row) for row in self.data) # return '\n'.join('\t|\t'.join(repr(x) for x in row) for row in self.data) def __contains__(self, key...
mit
-8,434,596,789,365,278,000
25.625
83
0.518779
false
3.349057
false
false
false
HenryHu/pybbs
Board.py
1
46243
#!/usr/bin/env python # vim: set fileencoding=utf-8 : from Util import Util import Config import struct import json import base64 import BCache import User import BRead import BoardManager import UserManager import PostEntry from Error import * from Log import Log from cstruct import CStruct import fcntl import time im...
bsd-2-clause
-6,797,301,592,258,830,000
34.182165
112
0.515176
false
3.938145
false
false
false
zsjohny/jumpserver
apps/settings/forms/ldap.py
1
1449
# coding: utf-8 # from django import forms from django.utils.translation import ugettext_lazy as _ from common.fields import FormDictField, FormEncryptCharField from .base import BaseForm __all__ = ['LDAPSettingForm'] class LDAPSettingForm(BaseForm): AUTH_LDAP_SERVER_URI = forms.CharField( label=_("L...
gpl-2.0
-8,382,868,198,799,438,000
30.5
79
0.634921
false
3.763636
false
false
false