repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
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
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
CCallahanIV/data-structures
src/test_priorityq.py
1
4519
"""This Module contains testing for the Priority Q.""" import pytest TEST_SET = [ [(17, 1), (99, 2), (15, 1), (99, 3), (1, 2), (9, 3)] ] BAD_PRIO = [True, False, [1, 2], (), {"oops": "This is bad"}, "No more, please!"] BAD_INIT = [[(1, 2), (1, 2, 3)], True, False, "whoops"] @pytest.fixture def empty_priority_q(...
mit
-5,064,511,433,917,170,000
30.381944
89
0.658553
false
platformio/platformio-core
platformio/commands/update.py
1
2091
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
-3,055,954,892,819,605,500
34.440678
84
0.726925
false
fridayy/movie-trailer-uc
main/fresh_tomatoes.py
1
6763
import webbrowser import os import re # Styles and scripting for the page main_page_head = ''' <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Fresh Tomatoes!</title> <!-- Bootstrap 3 --> <link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.m...
gpl-3.0
-8,687,864,254,606,987,000
32.815
144
0.554488
false
Jolopy/GimpHub
app/Gimp_Plugins/GimpHub.py
1
11216
#!/usr/bin/env python from socketIO_client import SocketIO, BaseNamespace from gimpfu import * import os import time from threading import Thread from array import array import requests import configparser import websocket import _thread import http.client import numpy as np class GimpHubImage(object): def __i...
gpl-2.0
6,784,750,085,857,365,000
27.612245
100
0.502675
false
trondth/master
masters_project_config.py
1
1060
import ConfigParser import os.path PROJECTDIR = os.path.dirname(os.path.abspath(__file__)) if os.path.isfile(PROJECTDIR + '/masters_project.cfg'): CONFIGFILE = PROJECTDIR + '/masters_project.cfg' else: CONFIGFILE = PROJECTDIR + '/masters_project-default.cfg' #print CONFIGFILE config = ConfigParser.ConfigPar...
mit
-3,513,187,572,238,241,000
33.193548
129
0.667925
false
protojour/aux
aux/internals/__init__.py
1
1574
from aux import working_dir import os import sys def no_plugin_name_message(): print "No plugin name" sys.exit(0) def plugin_creator_routine(plugincreator, arguments): # print plugincreator, arguments plugin_home_directory = working_dir() if 'service' in plugincreator: if ...
bsd-3-clause
-8,956,666,608,450,789,000
41.540541
106
0.494917
false
shiyifuchen/PyFem
pyfem/pyfem/fem/Assembly.py
1
4289
# -*- coding: utf-8 -*- from numpy import zeros, ones, ix_ from pyfem.util.dataStructures import Properties from pyfem.util.dataStructures import elementData from scipy.sparse import lil_matrix import time ####################################### # General array assembly routine for: # # * assembleInternalForce ...
gpl-3.0
7,672,155,459,087,517,000
31.5
95
0.592213
false
alanamarzoev/ray
python/ray/rllib/ppo/ppo.py
1
10442
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import time import numpy as np import pickle import tensorflow as tf from tensorflow.python import debug as tf_debug import ray from ray.rllib.common import Agent, TrainingResult from ray.rllib.ppo....
apache-2.0
5,208,887,426,928,940,000
37.249084
79
0.559088
false
Axelrod-Python/axelrod-evolver
tests/integration/test_fsm.py
1
12018
import unittest import tempfile import csv import axelrod as axl import axelrod_dojo as dojo C, D = axl.Action.C, axl.Action.D player_class=axl.EvolvableFSMPlayer class TestFSMPopulation(unittest.TestCase): temporary_file = tempfile.NamedTemporaryFile() def test_score(self): name = "score" ...
mit
-4,841,699,481,762,460,000
40.298969
96
0.451739
false
3dfxsoftware/cbss-addons
project_conf/model/project.py
1
4367
# # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # # # 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, eith...
gpl-2.0
-1,541,785,040,471,365,400
45.956989
294
0.580948
false
stephrdev/django-formwizard
formwizard/storage/cookie.py
1
1712
from django.conf import settings from django.core.exceptions import SuspiciousOperation from django.utils import simplejson as json from django.utils.hashcompat import sha_constructor import hmac from formwizard import storage sha_hmac = sha_constructor class CookieStorage(storage.BaseStorage): encoder = json....
bsd-3-clause
-7,821,872,325,361,776,000
30.127273
80
0.625584
false
Parisson/TimeSide
timeside/server/tests/test_provider.py
1
3126
#! /usr/bin/env python from timeside.server.tests.timeside_test_server import TimeSideTestServer from rest_framework import status from django.conf import settings import os class TestProvider(TimeSideTestServer): """ test item creation with providers """ def setUp(self): TimeSideTestServer.setUp(s...
agpl-3.0
454,302,127,132,744,260
41.256757
103
0.601408
false
foursquare/pants
tests/python/pants_test/backend/python/tasks/test_select_interpreter.py
1
7548
# coding=utf-8 # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import os from builtins import str from textwrap import dedent import mock from pex.inte...
apache-2.0
-4,960,126,751,737,372,000
47.696774
110
0.714361
false
carloscadena/django-imager
imagersite/imagersite/test.py
1
7374
"""Test for registration view.""" from bs4 import BeautifulSoup from django.contrib.auth.models import User from django.core import mail from django.test import Client from django.test import RequestFactory from django.test import TestCase from django.urls import reverse from imagersite.views import home_view from dja...
mit
-4,183,117,079,725,359,000
34.451923
102
0.60415
false
MalloyDelacroix/DownloaderForReddit
DownloaderForReddit/viewmodels/add_reddit_object_list_model.py
1
5090
""" Downloader for Reddit takes a list of reddit users and subreddits and downloads content posted to reddit either by the users or on the subreddits. Copyright (C) 2017, Kyle Hickey This file is part of the Downloader for Reddit. Downloader for Reddit is free software: you can redistribute it and/or modify it und...
gpl-3.0
6,999,803,051,143,106,000
36.426471
118
0.651277
false
binarybana/samcnet
exps/priorstrength.py
1
2301
import sys, os, random import zlib, cPickle ############### SAMC Setup ############### import numpy as np import scipy as sp import networkx as nx from samcnet.samc import SAMCRun from samcnet.bayesnetcpd import BayesNetSampler, BayesNetCPD from samcnet import utils from samcnet.generator import * if 'WORKHASH' in o...
mit
5,560,503,565,455,464,000
26.722892
82
0.616688
false
cordery/django-countries-plus
countries_plus/utils.py
1
7136
# coding=utf-8 import re import requests import six from django.core.exceptions import ValidationError from .models import Country DATA_HEADERS_ORDERED = [ 'ISO', 'ISO3', 'ISO-Numeric', 'fips', 'Country', 'Capital', 'Area(in sq km)', 'Population', 'Continent', 'tld', 'CurrencyCode', 'CurrencyName', 'Phone', ...
mit
7,095,548,300,540,033,000
23.904255
99
0.467749
false
tensorflow/graphics
tensorflow_graphics/image/color_space/tests/srgb_test.py
1
3322
# Copyright 2020 The 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
apache-2.0
3,111,544,979,320,867,000
40.525
79
0.688742
false
EderSantana/seya
tests/test_conv_rnn.py
1
2708
# encoding: utf-8 """Test seya.layers.recurrent module""" from __future__ import print_function import unittest import numpy as np from keras.models import Sequential from keras.layers.core import TimeDistributedDense from keras.layers.convolutional import Convolution2D from seya.layers.conv_rnn import ConvRNN, Conv...
bsd-3-clause
-2,647,198,628,031,803,000
35.594595
80
0.60192
false
open-mmlab/mmdetection
configs/scnet/scnet_r50_fpn_1x_coco.py
1
4975
_base_ = '../htc/htc_r50_fpn_1x_coco.py' # model settings model = dict( type='SCNet', roi_head=dict( _delete_=True, type='SCNetRoIHead', num_stages=3, stage_loss_weights=[1, 0.5, 0.25], bbox_roi_extractor=dict( type='SingleRoIExtractor', roi_layer=...
apache-2.0
1,226,587,664,530,429,400
35.580882
79
0.464925
false
jiaaro/django-alert
alert/utils.py
1
8238
from alert.exceptions import AlertIDAlreadyInUse, AlertBackendIDAlreadyInUse,\ InvalidApplicableUsers import django from django.conf import settings from django.utils import timezone from django.template.loader import render_to_string, get_template from django.contrib.sites.models import Site from django.template i...
mit
-3,880,105,067,049,292,300
30.930233
224
0.59092
false
mrgigabyte/proxybot
original_proxy_bot.py
1
5906
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import telebot import config import dbhelper # Initialize bot bot = telebot.TeleBot(config.token) # Handle always first "/start" message when new chat with your bot is created @bot.message_handler(commands=["start"]) def command_start(message): bot.send_message(me...
mit
1,987,259,348,465,000,200
44.782946
119
0.66661
false
Forage/Gramps
gramps/gen/merge/mergerepositoryquery.py
1
2677
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2010 Michiel D. Nauta # # 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
-7,466,816,308,397,948,000
35.671233
80
0.583115
false
ottogroup/palladium
palladium/tests/test_server.py
1
27350
from datetime import datetime import io import json import math from threading import Thread from time import sleep from unittest.mock import call from unittest.mock import Mock from unittest.mock import patch import dateutil.parser from flask import request import numpy as np import pytest import ujson from werkzeug....
apache-2.0
-4,794,314,816,951,428,000
34.064103
123
0.519305
false
griimick/feature-mlsite
app/static/hindi-dependency-parser-2.0/bin/normalize_bojar_lrec_2010.py
1
1281
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys vowels_to_be_replaced= {} def replace_null(from_chr_num, to_chr_num): for x in range(from_chr_num, to_chr_num): vowels_to_be_replaced[chr(x)]= "" #replace_null(0x0900, 0x0904) #replace_null(0x093A, 0x0950) #replace_null(0x0951, 0x0958) #replace_nu...
mit
5,023,343,353,184,191,000
25.777778
47
0.617427
false
UTSA-ICS/keystone-kerberos
keystone/common/cache/core.py
1
7934
# Copyright 2013 Metacloud # # 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
-1,035,624,296,600,986,400
35.731481
79
0.659692
false
balint256/ice
tlm/ui.py
1
18027
#!/usr/bin/env python # -*- coding: utf-8 -*- # # ui.py # # Copyright 2014 Balint Seeber <balint256@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 2 of the ...
gpl-3.0
-1,446,360,939,147,403,300
30.460733
179
0.669107
false
jwilliamn/handwritten
extraction/FormatModel/TestingCornersAlgorithms.py
1
1349
import numpy as np import cv2 import time import helloworld def countNonZero(sum, i_j, x_y = None): if x_y is None: i = i_j[0] j = i_j[1] if i<0 or j<0: return 0 return sum[i,j] else: i = i_j[0] j = i_j[1] x = x_y[0] y = x_y[1] ...
gpl-3.0
-184,997,578,644,377,950
24.961538
80
0.4596
false
Kate-Willett/HadISDH_Marine_Build
EUSTACE_SST_MAT/make_and_full_qc.py
1
45398
#!/usr/local/sci/bin/python2.7 ''' # KW changed make_and_qc_db.py to make_and_full_qc.py # KW changed by adding --month1 and --month2 make_and_full_qc.py invoked by typing:: python2.7 make_and_full_qc.py -i configuration.txt --year1 1850 --year2 1855 --month 1 --month2 12 # KW edited to reflect that code now produc...
cc0-1.0
-7,735,936,863,802,000,000
46.289583
202
0.617296
false
maximeolivier/pyCAF
pycaf/importer/importNetwork/importSwitch/cisco_switch.py
1
3141
#| This file is part of pyCAF. | #| | #| pyCAF is free software: you can redistribute it and/or modify | #| it under the terms of the GNU General Public License as published by | #| t...
gpl-3.0
3,787,811,056,711,934,000
41.445946
107
0.584527
false
mdomke/signaling
docs/source/conf.py
1
9322
# -*- coding: utf-8 -*- # # signaling documentation build configuration file, created by # sphinx-quickstart on Sun Apr 24 11:07:31 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # #...
mit
-5,357,621,713,983,783,000
31.144828
80
0.706393
false
evilncrazy/vake
vake.py
1
2076
import sys, os import subprocess import re import select """ Runs an instance of make, echoing the stdout and storing the stderr line by line. """ def run_make(args): p = subprocess.Popen(["make"] + args, stdout = subprocess.PIPE, stderr = subprocess.PIPE) stderr = [] while p.poll() == None: reads = [p.s...
mit
-6,059,614,288,028,511,000
27.067568
124
0.587669
false
cloudera/recordservice
tests/query_test/test_partitioning.py
1
4640
# Copyright (c) 2012 Cloudera, 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 o...
apache-2.0
1,965,043,666,579,426,000
40.428571
89
0.708405
false
hickeroar/simplebayes
simplebayes/__init__.py
1
10281
# coding: utf-8 """ The MIT License (MIT) Copyright (c) 2015 Ryan Vennell 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,677,386,702,332,478,000
32.376623
78
0.603502
false
prasanna08/oppia
core/storage/topic/gae_models.py
1
25011
# coding: utf-8 # # Copyright 2018 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
apache-2.0
-248,851,925,992,345,250
38.7
82
0.65963
false
CentralLabFacilities/m3meka
python/m3/omnibase.py
1
31978
# -*- coding: utf-8 -*- #M3 -- Meka Robotics Robot Components #Copyright (c) 2010 Meka Robotics #Author: edsinger@mekabot.com (Aaron Edsinger) #M3 is free software: you can redistribute it and/or modify #it under the terms of the GNU Lesser General Public License as published by #the Free Software Foundation, either v...
mit
7,803,926,033,021,083,000
42.44837
150
0.492682
false
exu/poligon
python/python_koans/python2/koans/about_dice_project.py
1
2001
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * import random class DiceSet(object): def __init__(self): self._values = [] @property def values(self): return self._values def roll(self, n): self._values = [] for i in range(0, n): ...
mit
-2,024,257,727,222,899,500
26.791667
78
0.587206
false
blckshrk/Weboob
modules/parolesmania/backend.py
1
1697
# -*- coding: utf-8 -*- # Copyright(C) 2013 Julien Veyssier # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
agpl-3.0
5,074,640,716,121,560,000
31.018868
86
0.714791
false
harisbal/pandas
pandas/tests/generic/test_generic.py
1
36186
# -*- coding: utf-8 -*- # pylint: disable-msg=E1101,W0612 from copy import copy, deepcopy from warnings import catch_warnings, simplefilter import pytest import numpy as np import pandas as pd from pandas.core.dtypes.common import is_scalar from pandas import (Series, DataFrame, Panel, date_range...
bsd-3-clause
2,502,932,496,458,174,000
34.03001
79
0.520063
false
tdjordan/tortoisegit
gitproc.py
1
3594
# # front-end for TortoiseHg dialogs # # Copyright (C) 2007 TK Soh <teekaysoh@gmail.com> # import os import sys from tortoisegit.tgitutil import get_prog_root # always use git exe installed with TortoiseHg tgitdir = get_prog_root() try: os.environ['PATH'] = os.path.pathsep.join([tgitdir, os.environ['PATH']]) exce...
gpl-2.0
-3,280,306,436,063,970,300
30.80531
97
0.553422
false
Guymer/PyGuymer
return_dict_of_ISO_subtitle_streams.py
1
2124
# -*- coding: utf-8 -*- ############################################################################################## # This file is deprecated because Python 2.x is deprecated # # A Python 3.x version of this file can be found at: # # ...
apache-2.0
-7,274,281,633,515,023,000
35.62069
94
0.469397
false
hyperspy/hyperspy_gui_ipywidgets
hyperspy_gui_ipywidgets/tests/test_tools.py
1
9853
import numpy as np import hyperspy.api as hs from hyperspy_gui_ipywidgets.tests.utils import KWARGS from hyperspy.signal_tools import (Signal1DCalibration, ImageContrastEditor, EdgesRange) class TestTools: def setup_method(self, method): self.s = hs.signals.Signal1D(1 ...
gpl-3.0
6,585,736,890,534,469,000
37.944664
81
0.563077
false
google-research/language
language/nqg/model/parser/training/training_utils.py
1
3956
# coding=utf-8 # Copyright 2018 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
2,828,534,664,817,358,000
40.642105
80
0.623357
false
Nablaquabla/sns-analysis
sns-test.py
1
2499
import os import time as tm import sys # Handles the creation of condor files for a given set of directories # ----------------------------------------------------------------------------- def createCondorFile(dataDir,outDir,time): # Condor submission file name convention: run-day-time.condor with open('/home/...
gpl-3.0
-34,610,708,783,304,316
28.4
81
0.517407
false
seikichi/tuitwi
tuitwi/state.py
1
11226
#!/usr/bin/python # -*- coding: utf-8 -*- import os import curses import curses.ascii class State(object): '''Stateパターン用の基底クラス''' def __init__(self, stdscr, form): self._form = form self._stdscr = stdscr self._func = {} self._func[curses.KEY_RESIZE] = self._resize self...
mit
-3,273,382,893,051,582,000
32.550152
116
0.588965
false
knaggsy2000/stormforce-mq
plugins/plugin_core_serverdetails.py
1
8457
#!/usr/bin/env python # -*- coding: utf-8 -*- ######################################################################### # Copyright/License Notice (Modified BSD License) # ######################################################################### ###################################################...
bsd-3-clause
8,567,733,712,468,731,000
36.923767
420
0.601987
false
BIGBALLON/cifar-10-cnn
Tensorflow_version/vgg_19_pretrain.py
1
12039
# -*- coding:utf-8 -*- # ========================================================== # # File name: vgg_19.py # Author: BIGBALLON # Date created: 07/22/2017 # Python Version: 3.5.2 # Description: implement vgg19 network to train cifar10 # ========================================================== # import t...
mit
7,394,086,289,216,242,000
38.952218
218
0.553963
false
kaichogami/wavenet
model.py
1
15261
"""Model for wavenet. Defines ops in tensorflow sense""" import numpy as np import tensorflow as tf MIN_DIL = 2 MAX_DIL = 4096 def _dilated_convolution(X, filters, dilation, name): """Helper function to carry out dilated convolution Parameters ========== X : tf.Tensor of shape(batch, width, height, ...
mit
-5,600,043,305,285,726,000
39.914209
92
0.539283
false
evernym/zeno
plenum/test/bls/test_state_proof.py
2
7251
from plenum.common.constants import ROOT_HASH, MULTI_SIGNATURE, PROOF_NODES, TXN_TYPE, DATA, TXN_TIME, STATE_PROOF, \ MULTI_SIGNATURE_VALUE, MULTI_SIGNATURE_PARTICIPANTS, MULTI_SIGNATURE_SIGNATURE, \ MULTI_SIGNATURE_VALUE_LEDGER_ID, \ MULTI_SIGNATURE_VALUE_STATE_ROOT, MULTI_SIGNATURE_VALUE_TXN_ROOT, MULTI_S...
apache-2.0
-3,428,471,672,437,637,600
42.680723
117
0.654255
false
ping/instagram_private_api
instagram_private_api/endpoints/collections.py
1
3411
import json from ..compatpatch import ClientCompatPatch class CollectionsEndpointsMixin(object): """For endpoints in related to collections functionality.""" def list_collections(self): return self._call_api('collections/list/') def collection_feed(self, collection_id, **kwargs): """ ...
mit
5,582,873,594,909,179,000
34.905263
101
0.522427
false
sudhir-serpentcs/business-requirement
business_requirement_deliverable_project/models/project.py
1
3606
# -*- coding: utf-8 -*- # © 2016 Elico Corp (https://www.elico-corp.com). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import api, fields, models from openerp.tools.translate import _ from openerp.exceptions import ValidationError class Project(models.Model): _inherit = "proje...
agpl-3.0
-5,362,266,994,235,058,000
36.947368
77
0.56699
false
Azure/azure-sdk-for-python
sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/aio/operations/_job_collections_operations.py
1
32666
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
8,264,408,306,828,113,000
47.465875
198
0.644799
false
crowdworks/redash
redash/cli/groups.py
1
3319
from __future__ import print_function from sys import exit from sqlalchemy.orm.exc import NoResultFound from flask.cli import AppGroup from click import argument, option from redash import models manager = AppGroup(help="Groups management commands.") @manager.command() @argument('name') @option('--org', 'organizat...
bsd-2-clause
-6,601,441,871,846,674,000
32.525253
91
0.637843
false
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/StLa/PyScripts/Strangeland.py
1
7705
import dsz.version.checks import dsz.lp import dsz.version import dsz.ui import dsz.path import dsz.file import dsz.control import dsz.menu import dsz.env tool = 'StLa' version = '1.2.0.1' resDir = dsz.lp.GetResourcesDirectory() logdir = dsz.lp.GetLogsDirectory() STLA_PATH = ('%s%s' % (resDir, tool)) def stlaverify(i...
unlicense
-3,926,526,841,632,269,000
44.064327
197
0.615834
false
crickert1234/ParamAP
ParamAP.py
1
51951
#!/usr/bin/env python3 ''' ParamAP.py (parametrization of sinoatrial myocyte action potentials) Copyright (C) 2018 Christian Rickert <christian.rickert@ucdenver.edu> 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 ...
gpl-2.0
1,966,777,943,420,654,000
57.713793
315
0.51666
false
baohaojun/dico
dicoweb/settings-sample.py
1
2553
# Django settings for Dicoweb project. # # This file is part of GNU Dico. # Copyright (C) 2008-2010, 2012 Wojciech Polak # # GNU Dico 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, or ...
gpl-3.0
7,779,301,981,850,678,000
27.685393
78
0.725421
false
freedomofpress/securethenews
api/tests.py
1
3776
""" Tests basic API operations against simple test data. """ from rest_framework.test import APITestCase from rest_framework import status from django.urls import reverse from sites.models import Site, Scan from urllib.parse import urljoin urlroot = reverse('api-root-v1') def create_site(): """ Make an examp...
agpl-3.0
1,047,488,480,759,842,800
32.714286
74
0.628708
false
danielktaylor/PyLimitBook
pylimitbook/book.py
1
4650
#!/usr/bin/python from collections import deque from pylimitbook.tick import Bid, Ask, Trade from pylimitbook.tree import Tree from builtins import input from six.moves import cStringIO as StringIO def parse_csv(columns, line): """ Parse a CSV line that has ',' as a separator. Columns is a list of the co...
mit
-3,987,454,480,899,093,000
31.517483
88
0.517849
false
evernote/pootle
pootle/apps/pootle_store/views.py
1
33949
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010-2013 Zuza Software Foundation # Copyright 2013-2014 Evernote Corporation # # This file is part of Pootle. # # 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...
gpl-2.0
359,415,182,582,297,860
34.474399
80
0.605732
false
wallstreetweb/django-time-metrics
runtests.py
1
1187
import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_URLCONF="time_me...
mit
1,709,264,231,324,621,600
20.196429
72
0.555181
false
Andrew414/KForest
KForest/KForest/KForest.py
1
4318
import random import pylab as pl import numpy as np import pandas as pd from sklearn.cross_validation import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.datasets import make_moons, make_circles, make_classification from sklearn.neighbors import KNeighborsClassifier from sklearn.svm im...
gpl-2.0
-3,674,565,233,713,391,600
49.209302
384
0.432608
false
rgbkrk/binder
web/app.py
1
4824
import Queue import json import signal from tornado import gen from tornado.ioloop import IOLoop from tornado.web import Application, RequestHandler from tornado.httpserver import HTTPServer from binder.service import Service from binder.app import App from .builder import Builder # TODO move settings into a config...
apache-2.0
1,329,055,373,027,206,000
28.595092
98
0.623134
false
kzvyahin/cfme_tests
cfme/tests/infrastructure/test_host_analysis.py
1
5050
# -*- coding: utf-8 -*- import pytest from cfme import test_requirements from cfme.configure.tasks import is_host_analysis_finished from cfme.exceptions import ListAccordionLinkNotFound from cfme.infrastructure import host from cfme.web_ui import listaccordion as list_acc, toolbar, InfoBlock from utils import conf fro...
gpl-2.0
2,383,283,383,539,621,400
39.4
99
0.629703
false
blaze33/django
tests/modeltests/model_forms/tests.py
1
66035
from __future__ import absolute_import, unicode_literals import datetime import os from decimal import Decimal from django import forms from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import ValidationError from django.db import connection from django.db.models.query import E...
bsd-3-clause
-1,320,706,784,182,750,000
42.529993
219
0.605936
false
dfreedman55/Python4NetworkEngineers
week2/exercise3.py
1
1448
#!/usr/bin/env python import telnetlib import time import socket import sys class DefineNetworkDevice(object): def __init__(self, ip, uname, pword): ''' Object initialization ''' self.ip = ip self.uname = uname self.pword = pword self.TELNET_PORT = 23 self.TELNET_TIMEOUT = 6 def TelnetConnect(self...
gpl-2.0
-9,119,668,020,921,804,000
24.403509
112
0.709945
false
lgarren/spack
var/spack/repos/builtin/packages/perl-file-pushd/package.py
1
1587
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
8,270,129,451,982,892,000
45.676471
93
0.680529
false
sirex/databot
databot/pipes.py
1
26342
import collections import datetime import itertools import sqlalchemy as sa import traceback import tqdm from databot.db.serializers import serrow, serkey from databot.db.utils import strip_prefix, create_row, get_or_create, Row from databot.db.windowedquery import windowed_query from databot.db.models import Compress...
agpl-3.0
-4,314,377,841,758,033,000
33.033592
118
0.534242
false
wateraccounting/wa
Collect/ALEXI/monthly.py
1
1291
# -*- coding: utf-8 -*- """ Created on Mon Aug 28 07:54:17 2017 @author: tih """ import os import sys from DataAccess import DownloadData def main(Dir, Startdate='', Enddate='', latlim=[-60, 70], lonlim=[-180, 180], Waitbar = 1): """ This function downloads monthly ALEXI data Keyword arguments: Dir -...
apache-2.0
8,970,401,376,894,572,000
31.275
108
0.656081
false
GStreamer/cerbero
recipes/custom.py
1
6402
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python import os from collections import defaultdict from cerbero.build import recipe from cerbero.build.source import SourceType from cerbero.build.cookbook import CookBook from cerbero.enums import License, FatalError def running_on_cerbero_ci(): return os....
lgpl-2.1
1,029,590,351,478,202,200
44.728571
104
0.565761
false
rs2/pandas
pandas/tests/resample/test_datetime_index.py
1
59222
from datetime import datetime from functools import partial from io import StringIO import numpy as np import pytest import pytz from pandas._libs import lib from pandas.errors import UnsupportedFunctionCall import pandas as pd from pandas import DataFrame, Series, Timedelta, Timestamp, isna, notna import pandas._te...
bsd-3-clause
-6,043,365,303,713,031,000
32.10341
88
0.59103
false
Gabotero/GNURadioNext
gr-vocoder/python/qa_alaw_vocoder.py
1
1619
#!/usr/bin/env python # # Copyright 2011,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your optio...
gpl-3.0
-122,898,077,962,167,760
32.040816
70
0.678196
false
emilroz/openmicroscopy
components/tools/OmeroPy/src/omero/util/populate_metadata.py
1
21324
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Populate bulk metadata tables from delimited text files. """ # # Copyright (C) 2011-2014 University of Dundee. All rights reserved. # # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as p...
gpl-2.0
-6,591,823,371,403,086,000
38.343173
89
0.570718
false
indictools/grammar
common.py
1
7812
import sys,os import time from os import walk, path from os.path import splitext, join from json import dumps from config import * import signal import subprocess import re import shutil import glob from flask import * def wl_batchprocess(args, cmd, func): wloads = args.get('wlnames').split(',') print "In wl" ...
gpl-3.0
-2,206,379,886,968,884,200
31.280992
99
0.549283
false
gongghy/checkio_python
Home/The_Most_Wanted_Letter.py
1
1140
def checkio(text): text = text.lower() text = [letter for letter in text if letter.isalpha()] d = dict.fromkeys(text, 0) for char in text: d[char] += 1 value = 0 for item in d.items(): if item[1] > value: value = item[1] lesser_keys = [] for item in d.items():...
mit
6,739,730,774,419,538,000
34.625
85
0.566667
false
sassoftware/rbuild
plugins/buildplatform.py
1
1623
# # Copyright (c) SAS Institute 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 w...
apache-2.0
2,555,375,464,297,706,000
34.282609
74
0.726433
false
holinnn/lupin
lupin/validators_combination.py
1
2335
from .validators import Validator from .errors import ValidationError class ValidatorsNullCombination(object): """Used as a default validators combination when a field has no validators. """ def __call__(self, *args, **kwargs): """Null combination does nothing""" def __and__(self, other)...
mit
-41,909,928,816,466,660
27.47561
67
0.600428
false
cmars/pystdf
pystdf/IO.py
1
7630
# # PySTDF - The Pythonic STDF Parser # Copyright (C) 2006 Casey Marshall # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later versi...
gpl-2.0
-556,588,033,002,586,940
29.277778
99
0.634076
false
sebastic/NLExtract
bag/src/postgresdb.py
1
6307
__author__ = "Matthijs van der Deijl" __date__ = "$Dec 09, 2009 00:00:01 AM$" """ Naam: postgresdb.py Omschrijving: Generieke functies voor databasegebruik binnen BAG Extract+ Auteur: Milo van der Linden, Just van den Broecke, Matthijs van der Deijl (originele versie) Versie: 1.0 ...
gpl-3.0
7,929,668,450,521,569,000
35.04
154
0.562232
false
lig/django-actionviews
tests/base/test_views.py
1
7169
from django.conf.urls import patterns from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import resolve import pytest from actionviews.base import TemplateResponseMixin from actionviews.decorators import require_method @pytest.fixture(params=list(range(1))) def TestView(request, mo...
bsd-3-clause
-6,750,235,519,553,566,000
25.650558
74
0.644302
false
zstackio/zstack-woodpecker
integrationtest/vm/mini/multiclusters/paths/multi_path212.py
1
2650
import zstackwoodpecker.test_state as ts_header import os TestAction = ts_header.TestAction def path(): return dict(initial_formation="template5", checking_point=1, faild_point=100000, path_list=[ [TestAction.create_mini_vm, 'vm1', 'cluster=cluster2'], [TestAction.change_vm_ha, 'vm1'], [TestAction.create_min...
apache-2.0
-6,065,373,242,281,944,000
41.758065
104
0.700377
false
pdl30/rnaseq_misc
discarded_splicing.py
1
6194
#!/usr/bin/python ######################################################################## # 12 Jan 2015 # Patrick Lombard, Centre for Stem Stem Research # Core Bioinformatics Group # University of Cambridge # All right reserved. ######################################################################## import subproce...
gpl-2.0
4,559,426,243,221,062,700
43.884058
162
0.685986
false
dmsurti/mayavi
tvtk/pyface/ui/wx/decorated_scene.py
1
11998
#------------------------------------------------------------------------------ # # Copyright (c) 2006, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions d...
bsd-3-clause
49,747,729,586,761,630
37.210191
89
0.471245
false
bakhtout/odoo-educ
addons/openeducat_erp/op_subject/__init__.py
1
1083
# -*- coding: utf-8 -*- #/############################################################################# # # Tech-Receptives Solutions Pvt. Ltd. # Copyright (C) 2004-TODAY Tech-Receptives(<http://www.tech-receptives.com>). # # This program is free software: you can redistribute it and/or modify # it under th...
agpl-3.0
-3,839,420,797,204,608,000
44.125
80
0.617729
false
yati-sagade/RyDyrect
settings.py
1
1727
# Initialize App Engine and import the default settings (DB backend, etc.). # If you want to use a different backend you have to remove all occurences # of "djangoappengine" from this file. from djangoappengine.settings_base import * import os import people # Activate django-dbindexer for the default database DATABASE...
bsd-3-clause
59,960,683,604,811,500
31.584906
83
0.734221
false
avih/treeherder
deployment/update/update.py
1
5356
""" Deploy this project in stage/production. Requires commander_ which is installed on the systems that need it. .. _commander: https://github.com/oremj/commander """ import os import requests import sys from commander.deploy import hostgroups, task sys.path.append(os.path.dirname(os.path.abspath(__file__))) impor...
mpl-2.0
-1,774,610,298,137,748,000
36.985816
98
0.673824
false
Lysovenko/wxRays
addons.py
1
11809
#!/usr/bin/env python # -*- coding: utf-8 -*- "This is Plugin Manager" # wxRays (C) 2013 Serhii Lysovenko # # 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 (a...
gpl-3.0
4,603,559,879,106,108,400
34.676737
78
0.538234
false
spivachuk/sovrin-node
indy_node/test/state_proof/test_state_proofs_for_get_requests.py
1
12398
import base64 import random import time import base58 import pytest from common.serializers import serialization from common.serializers.serialization import state_roots_serializer from crypto.bls.bls_multi_signature import MultiSignature, MultiSignatureValue from plenum.bls.bls_store import BlsStore from plenum.comm...
apache-2.0
3,612,552,977,990,105,600
34.022599
110
0.611228
false
hubert667/AIR
build/billiard/billiard/_reduction3.py
2
7954
# # Module which deals with pickling of objects. # # multiprocessing/reduction.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # from __future__ import absolute_import import copyreg import functools import io import os import pickle import socket import sys __all__ = ['send...
gpl-3.0
4,350,371,272,115,698,000
30.943775
79
0.587126
false
Afonasev/Blog
backend/posts/management/commands/fill_fake_data.py
1
2311
from random import choice, randint from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand from faker import Faker from backend.posts import models fake = Faker() def make_text(min_paragraphs, max_paragraphs): return '\n'.join(fake.paragraphs( nb=randint(min_p...
mit
-8,112,549,477,395,559,000
27.182927
74
0.536132
false
exaile/exaile
plugins/ipconsole/__init__.py
1
8594
# This plugin is adapted from the Python Console plugin and the IPython # cookbook at: # http://ipython.scipy.org/moin/Cookbook/EmbeddingInGTK # Copyright (C) 2009-2010 Brian Parma # Updated 2012 Brian Parma # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU...
gpl-2.0
9,188,069,743,243,977,000
31.187266
86
0.603677
false
curtisalexander/learning
python/talk-python/jumpstart/file-search/program.py
1
1784
from collections import namedtuple import os SearchResult = namedtuple('SearchResult', 'file, line, text') def main(): print_header() folder = get_folder_from_user() if not folder: print("Sorry we can't search that location.") return text = get_search_text_...
mit
-3,788,486,095,612,305,400
22.473684
73
0.556054
false
lnls-sirius/dev-packages
siriuspy/siriuspy/clientconfigdb/configdb_client.py
1
9599
"""Define a class to communicate with configuration database API.""" import json as _json import datetime as _datetime from urllib import parse as _parse from urllib.request import Request as _Request, urlopen as _urlopen from urllib.error import URLError as _URLError import dateutil.parser import numpy as _np from ...
gpl-3.0
-8,357,856,691,299,465,000
34.420664
78
0.59277
false
ttreeagency/PootleTypo3Org
pootle/apps/pootle_store/util.py
1
6417
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2004-2012 Zuza Software Foundation # # This file is part of translate. # # translate 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...
gpl-2.0
8,377,143,370,565,134,000
30.455882
76
0.616332
false
steven-murray/pydftools
pydftools/model.py
1
4956
""" A module for defining generative distribution function models. All models *must* be subclassed from :class:`~Model`, which provides the abstract base methods required to implement. """ import numpy as np from .utils import numerical_jac, numerical_hess class Model(object): """ Base class defining a gene...
mit
2,237,806,698,947,694,600
25.934783
141
0.521186
false
ControCurator/controcurator
cronjobs/clusterComments.py
1
25964
import numpy as np import pandas as pd import nltk from nltk.stem.snowball import SnowballStemmer from sklearn.feature_extraction.text import TfidfVectorizer from bs4 import BeautifulSoup import re import os import codecs from sklearn import feature_extraction from sklearn.cluster import KMeans from pprint import pprin...
mit
6,142,809,010,730,646,000
55.689956
246
0.749615
false
ngaut/vitess
test/utils.py
1
20433
#!/usr/bin/env python import json import logging import optparse import os import shlex import shutil import signal import socket from subprocess import Popen, CalledProcessError, PIPE import sys import time import unittest import urllib2 import MySQLdb import environment from vtctl import vtctl_client from mysql_f...
bsd-3-clause
-868,375,695,319,744,000
30.053191
121
0.635687
false
perrette/iis
setup.py
1
2732
#!/usr/bin/env python """ """ #from distutils.core import setup import os, sys, re from distutils.core import setup import warnings with open('README.md') as file: long_description = file.read() # # Track version after pandas' setup.py # MAJOR = 0 MINOR = 0 MICRO = 0 ISRELEASED = False VERSION = '%d.%d.%d' % (MAJ...
mit
8,472,331,363,098,328,000
26.877551
94
0.598097
false
Azure/azure-sdk-for-python
sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/__init__.py
1
5836
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
2,823,532,459,695,357,400
41.289855
94
0.723441
false
vpelletier/neoppod
neo/tests/zodb/testReadOnly.py
1
1032
# # Copyright (C) 2009-2016 Nexedi SA # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed...
gpl-2.0
-3,604,143,858,798,651,000
34.586207
71
0.763566
false
sonofeft/XYmath
xymath/gui/pagedata.py
1
14524
from __future__ import print_function from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import range from builtins import object import time from tkinter import * from xymath.gui.double_wt_entrygrid import EntryGrid from numpy import array, doubl...
gpl-3.0
-422,575,960,700,958,340
38.363144
110
0.594327
false