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
jlweand/DssVisualizer
app/plugins/datasource/elasticsearch/multiIncludeThroughput.py
1
5393
# Copyright (C) 2016 Jamie Acosta, Jennifer Weand, Juan Soto, Mark Eby, Mark Smith, Andres Olivas # # This file is part of DssVisualizer. # # DssVisualizer 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, eit...
gpl-3.0
8,172,515,192,321,630,000
54.597938
142
0.76043
false
pydanny/dj-stripe
djstripe/contrib/rest_framework/views.py
1
2877
""" .. module:: dj-stripe.contrib.rest_framework.views. :synopsis: Views for the dj-stripe REST API. .. moduleauthor:: Philippe Luickx (@philippeluickx) """ from rest_framework import status from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.v...
bsd-3-clause
8,368,867,647,684,724,000
33.25
82
0.63017
false
eloylp/scirocco-pyclient
test/unit/requestadapter_test.py
1
13891
import copy import json import os import unittest from urllib3.request import urlencode from sciroccoclient.exceptions import SciroccoInitParamsError from sciroccoclient.http.requestadapter import RequestsAdapter, RequestAdapterResponse, RequestManagerResponseHandler, \ RequestManagerDataResponseHandler, RequestM...
agpl-3.0
-8,494,715,706,143,805,000
41.221884
130
0.664243
false
zachpodbielniak/PodNet
Linux/Python/PodNet.py
1
1132
''' ____ _ _ _ _ _ ____ ___ | _ \ ___ __| | \ | | ___| |_ / \ | _ \_ _| | |_) / _ \ / _` | \| |/ _ \ __| / _ \ | |_) | | | __/ (_) | (_| | |\ | __/ |_ / ___ \| __/| | |_| \___/ \__,_|_| \_|\___|\__| /_/ \_\_| |___| File: PodNet.py Author: Zach Podbieln...
gpl-3.0
-1,405,519,365,035,746,000
21.64
72
0.577739
false
jul/dsat
mics_utils/universal_testing_client.py
1
2218
#!/usr/bin/env python # -*- coding: utf-8 -*- from time import time, sleep, asctime as _asctime import sched from random import randint import logging import logging.handlers import sys,os import readline from readline import write_history_file, read_history_file import zmq from simplejson import dumps, load, loads fr...
bsd-2-clause
6,014,448,464,119,381,000
23.362637
81
0.608029
false
Grumbel/rfactorlcd
tests/test_ac_state.py
1
1625
# rFactor Remote LCD # 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 your option) any later versi...
gpl-3.0
-4,213,333,178,204,055,000
28.545455
71
0.693538
false
NeCTAR-RC/swift
test/unit/common/middleware/test_dlo.py
1
42593
#-*- coding:utf-8 -*- # Copyright (c) 2013 OpenStack Foundation # # 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 applic...
apache-2.0
-5,741,970,016,733,686,000
41.293942
79
0.562573
false
nlhepler/freetype-py3
examples/glyph-outline.py
1
1311
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # # FreeType high-level python API - Copyright 2011 Nicolas P. Rougier # Distributed under the terms of the new BSD license. # # ---------------------------------------------------------------...
bsd-3-clause
-7,109,555,045,368,138,000
31.775
79
0.56598
false
HybridF5/jacket
jacket/tests/compute/unit/fake_notifier.py
1
3739
# Copyright 2013 Red Hat, 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 agre...
apache-2.0
6,867,932,777,672,015,000
39.641304
78
0.57395
false
cernops/keystone
keystone/policy/backends/rules.py
1
2753
# Copyright (c) 2011 OpenStack Foundation # 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 ...
apache-2.0
-5,975,855,063,058,688,000
28.923913
78
0.680712
false
s910324/Sloth
bokehPlotter/bokehLine.py
1
1301
class bokehLine(object): def __init__(self, line, symbol = None, viewNum = None, parent = None): self.line = line self.symbol = symbol self.viewNum = viewNum self.style = None self.val = {'name' : self.line.name, 'color' : self.line.line_color, 'width' : self.line.line_width, 's...
lgpl-3.0
-8,097,567,311,734,556,000
30.731707
72
0.607994
false
pbrisk/dcf
test/unittests/curve_tests.py
1
5566
# -*- coding: utf-8 -*- # dcf # --- # A Python library for generating discounted cashflows. # # Author: sonntagsgesicht, based on a fork of Deutsche Postbank [pbrisk] # Version: 0.4, copyright Saturday, 10 October 2020 # Website: https://github.com/sonntagsgesicht/dcf # License: Apache License 2.0 (see LICENSE f...
apache-2.0
6,485,428,454,609,017,000
36.863946
107
0.614625
false
dwcoder/diceware
tests/test_config.py
1
5149
import os from diceware.config import ( OPTIONS_DEFAULTS, valid_locations, get_configparser, get_config_dict, configparser, ) class TestConfigModule(object): # tests for diceware.config def test_defaults(self): # there is a set of defaults for options available assert OPTIONS_DEFA...
gpl-3.0
-8,182,861,869,564,112,000
39.543307
77
0.606331
false
SalesforceFoundation/mrbelvedereci
metaci/testresults/migrations/0009_auto_20181207_2010.py
1
1093
# Generated by Django 2.1.3 on 2018-12-07 20:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("testresults", "0008_merge_20180911_1915"), ] operations = [ migrations.AlterField( model_name="testclass", name="tes...
bsd-3-clause
-2,158,632,882,686,530,300
25.658537
52
0.399817
false
demonchild2112/travis-test
grr/server/grr_response_server/gui/selenium_tests/report_test.py
1
4596
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from absl import app from selenium.webdriver.common import keys from grr_response_core.lib import rdfvalue from grr_response_server import data_store from grr_response_server.gui import...
apache-2.0
-8,424,589,681,675,763,000
34.90625
79
0.708442
false
rahuldan/sympy
sympy/sets/fancysets.py
2
46732
from __future__ import print_function, division from sympy.logic.boolalg import And from sympy.core.add import Add from sympy.core.basic import Basic from sympy.core.compatibility import as_int, with_metaclass, range, PY3 from sympy.core.expr import Expr from sympy.core.function import Lambda, _coeff_isneg from sympy....
bsd-3-clause
-3,314,107,003,832,846,000
31.430257
90
0.499444
false
himanshu-setia/keystone
keystone/tests/unit/test_v3_federation.py
1
149331
# 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
-3,845,853,793,140,106,000
39.458141
79
0.530533
false
awlange/brainsparks
src/calrissian/regularization/particle_regularize_l2.py
1
5014
import numpy as np class ParticleRegularizeL2(object): """ L2 regularizer for charges """ def __init__(self, coeff_lambda=0.0, zeta=8.0): self.coeff_lambda = coeff_lambda self.zeta = zeta self.n = 1 def cost(self, particle_input, layers): c = 0.0 # c = np...
mit
2,553,449,654,175,343,000
36.984848
141
0.406063
false
ricomoss/python-april-2014
class3/script.py
1
2799
#!/usr/bin/env python def get_highest_test_score(test_scores): highest_score = 0 name = None for key, val in test_scores.items(): if val > highest_score: highest_score = val name = key return name, highest_score def exercise1(): test_scores = { 'james': 75...
mit
1,735,881,688,317,963,000
22.521008
75
0.510539
false
NathanW2/qmap
src/qmap/floatingtoolbar.py
1
1226
from PyQt4.QtGui import QToolBar, QActionGroup from PyQt4.QtCore import Qt, QPoint from utils import log class FloatingToolBar(QToolBar): """ A floating QToolBar with no border and is offset under its parent """ def __init__(self, name, parent): """ parent: The parent of this toolbar. Should be another toolba...
gpl-2.0
2,753,613,497,718,192,000
31.263158
87
0.709625
false
willrp/willbuyer
backend/tests/integration/controller/api/cart/test_select_all_controller.py
1
1098
import pytest from flask import json from json.decoder import JSONDecodeError from backend.util.response.cart import CartSchema def test_select_all_controller(flask_app, es_create): prod_list = es_create("products", 2) item_id = prod_list[0].meta["id"] item_id_2 = prod_list[1].meta["id"] with flask_...
mit
-7,319,561,115,062,300,000
27.153846
53
0.577413
false
OpenSoccerManager/opensoccermanager-editor
structures/skills.py
1
1651
#!/usr/bin/env python3 # This file is part of OpenSoccerManager-Editor. # # OpenSoccerManager 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
-8,273,877,856,923,382,000
31.372549
79
0.566929
false
philgyford/django-ditto
ditto/pinboard/admin.py
1
2602
from django.contrib import admin from django.db import models from django.forms import Textarea, TextInput from taggit.managers import TaggableManager from taggit.forms import TagWidget from ..core.admin import DittoItemModelAdmin from .models import Account, Bookmark @admin.register(Account) class AccountAdmin(adm...
mit
3,542,037,757,899,506,000
24.762376
86
0.468486
false
xrubio/abm4s3
python/experimentTransmission.py
1
2038
# # Copyright (c) 2015 - Xavier Rubio-Campillo # This file 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 # # The source code is distr...
gpl-3.0
6,615,233,437,712,181,000
30.353846
79
0.675662
false
SCM-NV/qmworks-namd
nanoqm/workflows/workflow_coupling.py
1
2751
"""Workflow to compute the derivate coupling between states. The ``workflow_derivative_couplings`` expected a file with a trajectory-like file with the molecular geometries to compute the couplings. Index ----- .. currentmodule:: nanoqm.workflows.workflow_coupling .. autosummary:: """ __all__ = ['workflow_derivative...
mit
748,809,113,016,834,600
29.566667
95
0.727008
false
topwebmaster/cookiecutter-django
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py
1
2180
{% if cookiecutter.use_celery == 'y' %} import os from celery import Celery from django.apps import apps, AppConfig from django.conf import settings if not settings.configured: # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.l...
bsd-3-clause
2,726,470,006,636,422,000
36.586207
99
0.658257
false
zawata/AccessLog
dependencies/miscFunc.py
1
1108
''' A file of small misc. functions ''' import socket import subprocess import httplib2 class Singleton(type): ''' Singlton Design Pattern metaclass ''' _instances = {} def __call__(cls, *args, **kwargs): if cls not in cls._instances: cls._instances[cls] = super(Singleton, cls)...
gpl-3.0
-1,916,738,916,484,150,300
22.083333
81
0.609206
false
cloudbase/maas
src/maastesting/tests/test_package.py
1
1985
# Copyright 2013 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Tests for the `maastesting` package.""" from __future__ import ( absolute_import, print_function, unicode_literals, ) str = None __metaclass__ = type __all__ ...
agpl-3.0
5,368,649,101,309,266,000
26.191781
71
0.644332
false
dyoussef/s2p
s2plib/rectification.py
1
16836
# Copyright (C) 2015, Carlo de Franchis <carlo.de-franchis@cmla.ens-cachan.fr> # Copyright (C) 2015, Gabriele Facciolo <facciolo@cmla.ens-cachan.fr> # Copyright (C) 2015, Enric Meinhardt <enric.meinhardt@cmla.ens-cachan.fr> from __future__ import print_function import os import numpy as np from s2plib import rpc_mod...
agpl-3.0
-1,560,706,240,523,697,700
40.985037
102
0.61125
false
derwentx/WooGenerator
tests/test_parsing_special_v2.py
1
4047
import os import time import unittest from context import get_testdata, TESTS_DATA_DIR, woogenerator from woogenerator.parsing.special import CsvParseSpecial from woogenerator.utils import Registrar, TimeUtils class TestCSVParseSpecialV2(unittest.TestCase): def setUp(self): # import_name = TimeUtils.get...
gpl-2.0
6,171,959,762,056,906,000
31.902439
97
0.619471
false
qtproject/qt-creator
share/qtcreator/debugger/qttypes.py
2
103408
############################################################################ # # Copyright (C) 2016 The Qt Company Ltd. # Contact: https://www.qt.io/licensing/ # # This file is part of Qt Creator. # # Commercial License Usage # Licensees holding valid commercial Qt licenses may use this file in # accordance with the co...
gpl-3.0
5,603,281,900,807,769,000
33.923337
103
0.568351
false
gaspar0069/upodder
upodder/test/test_upodder.py
1
1760
import unittest import shutil from upodder import upodder BASEDIR = '/tmp/upodder_testing' class TestUpodder(unittest.TestCase): feeds = [ "http://popupchinese.com/feeds/custom/sinica", "http://www.radiolab.org/feeds/podcast/", "http://99percentinvisible.org/feed/"...
bsd-3-clause
-4,540,895,720,556,814,300
34.22
93
0.578977
false
dmpayton/django-fbi
django_fbi/views.py
1
1651
from django.conf import settings from django.http import HttpResponse from django.shortcuts import get_object_or_404, redirect, render_to_response from django.views.decorators.cache import never_cache from django.views.decorators.csrf import csrf_exempt from django_fbi.app import apps from django_fbi.backends import ge...
mit
6,748,672,571,937,231,000
40.275
86
0.727438
false
dotKom/onlineweb4
utils/helpers.py
1
1794
# -*- coding: utf8 -*- import json from datetime import date, datetime import pytz from django.conf import settings from django.db import models from django.db.models.query import QuerySet from django.utils.timezone import make_aware class JsonHelper(json.JSONEncoder): def default(self, obj): if isinsta...
mit
-845,939,318,202,271,400
26.6
86
0.636009
false
CSC-IT-Center-for-Science/chipster-job-manager
jobmanager/tests/test_jobs_db.py
1
8528
from __future__ import unicode_literals import pytest import datetime from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker from jobmanager.models import Base, JobNotFound from jobmanager.models import (add_job, get_job, get_jobs, get_next_from_queue, update_job_comp, ...
mit
6,564,160,316,904,330,000
44.849462
97
0.591581
false
scott-maddox/openbandparams
src/openbandparams/examples/advanced/GaInAsSb_on_GaSb/Plot_Strained_Band_Offset_vs_Composition_of_Quaternary3.py
1
2475
# # Copyright (c) 2013-2014, Scott J Maddox # # This file is part of openbandparams. # # openbandparams 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 # ...
agpl-3.0
8,786,756,771,074,003,000
33.873239
77
0.628283
false
gbiggs/rtcshell
rtcshell/rtls.py
1
13317
#!/usr/bin/env python # -*- Python -*- # -*- coding: utf-8 -*- '''rtcshell Copyright (C) 2009-2010 Geoffrey Biggs RT-Synthesis Research Group Intelligent Systems Research Institute, National Institute of Advanced Industrial Science and Technology (AIST), Japan All rights reserved. Licensed und...
epl-1.0
7,676,000,197,927,443,000
36.198324
79
0.490501
false
nodebox/nodebox-opengl
examples/07-filter/05-render.py
1
2168
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * # The render() command executes a function with drawing commands # in an offscreen (i.e. hidden) canvas and returns an Image object. # This is useful ...
bsd-3-clause
8,009,919,124,711,394,000
36.37931
78
0.686808
false
ace02000/pyload
module/plugins/accounts/SimplydebridCom.py
1
1696
# -*- coding: utf-8 -*- import time from module.plugins.internal.Account import Account class SimplydebridCom(Account): __name__ = "SimplydebridCom" __type__ = "account" __version__ = "0.15" __status__ = "testing" __config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to us...
gpl-3.0
2,483,385,987,593,713,700
35.869565
106
0.470519
false
aliciawyy/CompInvest
load/load_data.py
1
1779
""" This is the general interface to load data, either we want to load the data from internet through panda or load local data through QSTK for tests. @author Alice Wang """ import pandas.io.data as web from load_local_data import load_local_data_from_yahoo def load_stock_close_price(start_date, end_date, ls_symbols,...
mit
1,172,195,368,799,243,300
32.566038
91
0.66498
false
edisonlz/fruit
web_project/base/site-packages/redis_model/models/dattributes.py
1
28317
# -*- coding: UTF-8 -*- import os,sys import datetime import time from redis_client import RedisClient import types import logging #加载配置 import setting from setting import logger try: from functools import wraps, update_wrapper except ImportError: from django.utils.functional import wraps, update_wrapper # Pyt...
apache-2.0
6,926,544,624,200,830,000
29.264579
197
0.511115
false
NLeSC/eEcology-script-wrapper
script_wrapper/tests/tasks/test_classification.py
1
2262
# Copyright 2013 Netherlands eScience Center # # 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 t...
apache-2.0
2,386,582,424,575,353,000
35.483871
74
0.61008
false
Laurawly/tvm-1
tests/python/driver/tvmc/test_frontends.py
1
7125
# 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 u...
apache-2.0
9,198,593,536,956,242,000
34.447761
89
0.723228
false
south-coast-science/scs_mfr
src/scs_mfr/test/gps_test.py
1
1442
""" Created on 18 May 2017 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) """ import sys from scs_core.position.nmea.gprmc import GPRMC from scs_dfe.gps.pam_7q import PAM7Q from scs_host.bus.i2c import I2C from scs_host.sys.host import Host from scs_mfr.test.test import Test # ----------------------...
mit
4,718,465,073,288,030,000
21.888889
118
0.398752
false
bfalacerda/strands_executive
task_executor/scripts/mdp_task_executor.py
1
63607
#!/usr/bin/env python from __future__ import with_statement import rospy from Queue import Queue, Empty from strands_executive_msgs.msg import Task, ExecutionStatus, DurationMatrix, DurationList, ExecutePolicyAction, ExecutePolicyFeedback, ExecutePolicyGoal, MdpStateVar, StringIntPair, StringTriple, MdpAction, MdpAct...
mit
-8,600,928,490,053,119,000
46.717179
306
0.572468
false
AaronRegan/ObjectTracker
hog.py
1
3796
# import the necessary packages from __future__ import print_function from non_max_suppression import non_max_suppression from myqueue import myqueue from frames import frames from object import Object import numpy as np import argparse import datetime import imutils import cv2 import time ap = argparse.ArgumentParser...
mit
-1,399,075,531,900,514,000
32.59292
110
0.606164
false
bokeh/bokeh
tests/unit/bokeh/sampledata/test_airport_routes.py
1
2266
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2021, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
bsd-3-clause
-1,342,589,427,822,301,700
34.40625
89
0.319506
false
ReconCell/smacha
smacha/test/smacha_test_examples/random_outcomes.py
1
6029
#!/usr/bin/env python import smach import random class RandomOutcomeState(smach.State): def __init__(self, input_keys = ['outcome'], output_keys = ['outcome'], callbacks = {}, outcomes=['succeeded']): smach.State.__init__(self, input_keys=input_keys, output_keys=output_keys, outcomes=outcomes) ...
bsd-3-clause
-3,053,937,580,244,111,000
35.107784
141
0.532427
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.1/Lib/distutils/command/build_clib.py
1
8098
"""distutils.command.build_clib Implements the Distutils 'build_clib' command, to build a C/C++ library that is included in the module distribution and needed by an extension module.""" __revision__ = "$Id: build_clib.py 72379 2009-05-06 07:26:24Z tarek.ziade $" # XXX this module has *lots* of code ripped-off quite...
mit
-2,797,674,694,629,372,000
37.379147
76
0.568782
false
francescomarucci/VectorGeoreferencer
__init__.py
1
1403
# -*- coding: utf-8 -*- """ /*************************************************************************** VectorGeoreferencer A QGIS plugin Deforms vector to adapt them despite heavy and irregular deformations ------------------- begin ...
gpl-2.0
1,166,935,515,956,048,400
52.961538
77
0.404847
false
illagrenan/django-make-app
django_make_app/renderers.py
1
1282
# -*- encoding: utf-8 -*- # ! python2 from __future__ import (absolute_import, division, print_function, unicode_literals) from jinja2 import FileSystemLoader, Environment class TemplateRenderer(object): def __init__(self, templates_directory, template_name, item): """ :type templates_directory:...
mit
-4,592,002,837,051,133,000
27.488889
84
0.583463
false
clarete/curdling
curdling/services/base.py
1
3236
from __future__ import absolute_import, print_function, unicode_literals from ..signal import Signal, SignalEmitter from ..util import logger from distlib.compat import queue import sys import threading import time import traceback # See `Service._worker()`. This is the sentinel that gently stops the iterator # over ...
gpl-3.0
-2,457,431,602,473,947,000
33.425532
87
0.57293
false
pazagra/catkin_ws
src/RGBDHand/src/Planeees.py
1
4011
import roslib import rospy import sys import timeit import os import Image_Process import cv2 import cv2.cv as cv import numpy as np import BoW import Analysis import Segmentation from sklearn import cluster import Descriptors class Learn: def __init__(self): path = "/media/iglu/Data/Dataset/DatasetIglu/Da...
gpl-3.0
117,786,366,276,852,400
37.576923
304
0.540763
false
carlosperate/LightUpPi-Alarm
LightUpHardware/test/HardwareSwitch_test.py
1
4048
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # Unit test for the HardwareSwitch module. # # Copyright (c) 2015 carlosperate https://github.com/carlosperate/ # # Licensed under The MIT License (MIT), a copy can be found in the LICENSE file # # These test require the Wemo Switch to be on the network at the defined IP...
mit
-2,191,243,379,043,929,300
33.305085
79
0.63414
false
shub0/algorithm-data-structure
python/BST_iterator.py
1
1180
#! /usr/bin/python ''' Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the next smallest number in the BST. Note: next() and hasNext() should run in average O(1) time and uses O(h) memory, where h is the height of the tree...
bsd-3-clause
5,504,190,055,761,006,000
30.052632
117
0.620339
false
Loudr/pale
pale/endpoint.py
1
25122
# -*- coding: utf-8 -*- import datetime import json import logging import sys import threading import arrow from pale import config as pale_config from pale.arguments import BaseArgument from pale.fields import ResourceField, ListField, ResourceListField from pale.errors import APIError, ArgumentError, AuthenticationE...
mit
-4,322,117,158,030,105,000
39.454106
103
0.578656
false
code-ape/SocialJusticeDataProcessing
category.py
1
6149
import tools import settings def base_demographic(data, demographic_questions): breakdowns = {} for question_num in demographic_questions: responses = tools.get_responses_to_number(question_num, data) title = tools.get_question_title(question_num, data) values = tools.extract_vals_from_...
apache-2.0
-8,700,736,649,998,507,000
37.192547
93
0.623191
false
ASMlover/study
compiler/eLisp/eLisp/expr/definition.py
1
1898
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # Copyright (c) 2015 ASMlover. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyrig...
bsd-2-clause
3,584,847,533,250,403,000
37.734694
70
0.748156
false
cklein/wtforms
tests/form.py
1
8085
from __future__ import unicode_literals from unittest import TestCase from wtforms.form import BaseForm, Form from wtforms.meta import DefaultMeta from wtforms.fields import StringField, IntegerField from wtforms.validators import ValidationError from tests.common import DummyPostData class BaseFormTest(TestCase): ...
bsd-3-clause
2,748,992,602,378,828,000
30.956522
98
0.574644
false
drewverlee/art
tests/test_app_user_interaction.py
1
2114
#!/usr/local/bin/python import unittest import sys from selenium import webdriver servers = { 'live' : 'http://safe-sands-8472.herokuapp.com/', 'local': 'http://127.0.0.1:5000/' } class TestApp(unittest.TestCase): BASE = servers['local'] @classmethod def setUpClass(cls): ...
mit
6,670,995,368,726,679,000
31.030303
96
0.625828
false
rlowrance/re-local-linear
transactions-subset2-test.py
1
3987
# create files # WORKING/transactions-subset2-train.pickle # WORKING/transactions-subset2-test.pickle # # The test data consists of a 10% random sample of all the data. # # Unlike the R version, the data are not stratified by sale month. # import built-ins and libraries import numpy as np import pandas as pd import pd...
mit
-6,138,869,236,464,987,000
29.906977
78
0.589917
false
Sult/daf
apps/corporations/models/corporations.py
1
1185
from django.db import models #from django.conf import settings #from config.storage import OverwriteStorage #from utils.common import icon_size_name from utils.connection import * class CorporationApi(models.Model): """ charactertype apis """ api = models.OneToOneField('apies.Api') corporationid = model...
mit
-2,615,864,952,555,058,000
27.902439
66
0.681857
false
googleapis/python-compute
google/cloud/compute_v1/services/addresses/transports/rest.py
1
20223
# -*- coding: utf-8 -*- # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-8,557,189,965,289,486,000
41.307531
105
0.608911
false
ningirsu/stepmania-server
smserver/controllers/legacy/login.py
1
2496
""" Login controller """ from smserver.smutils.smpacket import smpacket from smserver.smutils.smpacket import smcommand from smserver.stepmania_controller import StepmaniaController from smserver.resources import user_resource from smserver import models from smserver import exceptions from smserver import __version__...
mit
2,024,049,548,031,647,500
33.191781
89
0.588141
false
iamshang1/Projects
Advanced_ML/Human_Activity_Recognition/LSTM/record_fetcher_between_subject.py
1
24384
import numpy as np import glob import sys import random class record_fetcher(object): ''' creates feature arrays and labels from raw accelerometer/demographic data splits features and labels between subjects into test/train sets methods: - fetch(batch_size,minibatch_size,binary,seed) ...
mit
2,176,022,732,392,023,600
45.096408
167
0.530635
false
reaperhulk/pynacl
src/nacl/__init__.py
1
1499
# Copyright 2013 Donald Stufft and individual contributors # # 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...
apache-2.0
646,718,397,534,372,700
27.283019
79
0.661107
false
meteorfox/PerfKitBenchmarker
perfkitbenchmarker/linux_packages/openblas.py
1
1365
# Copyright 2014 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
6,253,825,726,855,896,000
33.125
78
0.731136
false
dmarley/tfrs
server/models/User.py
1
1571
""" REST API Documentation for the NRS TFRS Credit Trading Application The Transportation Fuels Reporting System is being designed to streamline compliance reporting for transportation fuel suppliers in accordance with the Renewable & Low Carbon Fuel Requirements Regulation. OpenAPI spec version: v1 ...
apache-2.0
-2,166,037,394,678,073,900
40.342105
208
0.741566
false
designcc/django-ccpages
ccpages/tests/test_listeners.py
1
3074
import os from unittest import skipUnless from decimal import Decimal from django.test import TestCase from django.conf import settings from django.core.files import File from ccpages.forms import PagePasswordForm from ccpages.models import Page, PageAttachment class ListenerTestCases(TestCase): @skipUnless(os.pa...
bsd-3-clause
8,473,854,025,559,766,000
32.053763
77
0.571893
false
repotvsupertuga/tvsupertuga.repository
script.module.openscrapers/lib/openscrapers/sources_openscrapers/de/filmpalast.py
1
6036
# -*- coding: UTF-8 -*- # ..#######.########.#######.##....#..######..######.########....###...########.#######.########..######. # .##.....#.##.....#.##......###...#.##....#.##....#.##.....#...##.##..##.....#.##......##.....#.##....## # .##.....#.##.....#.##......####..#.##......##......##.....#..##...##.##.....#....
gpl-2.0
9,050,439,875,432,628,000
40.061224
117
0.444997
false
victorhahncastell/deepdiff
deepdiff/contenthash.py
1
8366
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function import sys from collections import Iterable from collections import MutableMapping from collections import defaultdict from decimal import Decimal from hashlib import sha1 import logging from deep...
mit
5,563,972,840,234,503,000
29.421818
95
0.536338
false
mrsamuelbarnes/Blockchain-Ballot
crypto.py
1
6940
# Import required modules import sys import random # Import custom modules import file # Definition for a public key class PublicKey: def __init__(self, n, g): # 'n' is a product of the two primes chosen for the key self.n = n # 'g' is the public exponent used to encrypt messages ...
mit
-8,274,426,283,300,570,000
25.48855
110
0.63415
false
intel-analytics/analytics-zoo
pyzoo/zoo/pipeline/api/keras/optimizers.py
1
4419
# # Copyright 2018 Analytics Zoo 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 applicable law or agreed to...
apache-2.0
-793,365,526,256,598,700
32.732824
94
0.61394
false
gsi-upm/Sefarad
docs/conf.py
1
8585
# -*- coding: utf-8 -*- # # Senpy documentation build configuration file, created by # sphinx-quickstart on Tue Feb 24 08:57:32 2015. # # 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. # # All...
apache-2.0
7,806,735,911,868,815,000
29.770609
79
0.699709
false
01org/yoko-tool
tests/test_unified.py
1
9054
#!/usr/bin/env python # # Copyright (C) 2013-2020 Intel Corporation # SPDX-License-Identifier: GPL-2.0-only # # -*- coding: utf-8 -*- # vim: ts=4 sw=4 tw=100 et ai si # # Author: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> """ This is a 'py.test' test for the PowerMeter module. """ # pylint: disable=redefined...
gpl-2.0
-5,944,822,185,982,959,000
31.220641
97
0.607908
false
arenadata/ambari
ambari-server/src/main/resources/stacks/BigInsights/4.0/services/HIVE/package/scripts/hive_server_upgrade.py
1
8007
""" 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 use this ...
apache-2.0
-3,441,732,457,333,918,700
46.1
138
0.749594
false
xgfone/snippet
snippet/example/python/project/project/common/utils.py
1
2500
# encoding: utf-8 from __future__ import absolute_import, print_function, unicode_literals, division import pbr.version from six import text_type as unicode_type from six import string_types as basestring_type from six import binary_type as bytes_type _BYTES_TYPES = (bytes_type, type(None)) _UNICODE_TYPES ...
mit
5,995,021,948,278,806,000
34.231884
82
0.6908
false
maralorn/pythonlights
sound.py
1
1790
#!/usr/bin/python # open a microphone in pyAudio and get its FFT spectrum import pyaudio import numpy as np FORMAT = pyaudio.paInt16 CHANNELS = 2 RATE = 44100 INPUT_BLOCK_TIME = 0.08 GLIDING_DIVIDER = 4 INPUT_FRAMES_PER_BLOCK = int(RATE*INPUT_BLOCK_TIME/GLIDING_DIVIDER) soundtype = np.dtype([('l',np.int16),('r',...
mit
-6,446,139,762,912,498,000
29.862069
76
0.569832
false
infoxchange/barman
barman/lockfile.py
1
9546
# Copyright (C) 2011-2017 2ndQuadrant Limited # # This file is part of Barman. # # Barman 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 versio...
gpl-3.0
-7,858,874,542,976,082,000
32.261324
79
0.610937
false
leonsas/django-push-notifications
push_notifications/gcm.py
1
4098
""" Google Cloud Messaging Previously known as C2DM Documentation is available on the Android Developer website: https://developer.android.com/google/gcm/index.html """ import json try: from urllib.request import Request, urlopen from urllib.parse import urlencode except ImportError: # Python 2 support from urlli...
mit
1,631,497,409,407,225,000
27.068493
120
0.724012
false
mtmail/Nominatim
test/python/test_tokenizer_factory.py
1
2134
""" Tests for creating new tokenizers. """ import pytest from nominatim.db import properties from nominatim.tokenizer import factory from nominatim.errors import UsageError from dummy_tokenizer import DummyTokenizer @pytest.fixture def test_config(def_config, tmp_path, property_table, tokenizer_mock): def_config....
gpl-2.0
4,339,036,780,527,847,400
27.453333
72
0.73477
false
abhikeshav/ydk-py
cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_controller_optics_oper.py
1
95722
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
apache-2.0
6,047,835,209,121,108,000
53.172043
271
0.538622
false
daStrauss/subsurface
src/superSolve/wrapCvxopt.py
1
2619
''' Created on Jul 9, 2012 Copyright © 2013 The Board of Trustees of The Leland Stanford Junior University. 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.apac...
apache-2.0
-7,317,539,029,297,520,000
30.926829
99
0.688694
false
rouxcode/django-filer-addons
filer_addons/tests/test_management_commands.py
1
2189
# -*- coding: utf-8 -*- from django.test import TestCase from filer.tests import create_superuser from filer.models import File, Folder from filer_addons.tests.utils import create_django_file class ManagementCommandsTests(TestCase): def setUp(self): self.superuser = create_superuser() self.client...
mit
-3,994,054,243,302,470,000
30.724638
88
0.602101
false
jsanmor/sm-status-log
docs/conf.py
1
7848
# -*- coding: utf-8 -*- # # smstatuslog_project documentation build configuration file, created by # sphinx-quickstart on Sun Feb 17 11:46:20 2013. # # 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 f...
gpl-2.0
-5,517,463,744,943,174,000
31.429752
80
0.707569
false
pmarti/pyclutter
examples/hello.py
1
1992
import sys import clutter class HelloClutter: def __init__ (self, message): self.stage = clutter.Stage() self.stage.set_color(clutter.color_from_string('DarkSlateGrey')) self.stage.set_size(800, 600) self.stage.set_title('My First Clutter Application') self.stage.connect('ke...
lgpl-2.1
-3,097,715,510,959,132,000
32.2
72
0.601908
false
AtalM2/iAtal
src/python/test_broken.py
1
1071
#!/usr/bin/env python # -*- coding: utf-8 -*- import elements import enums #globals ended = False compteur = 0 map_ = False def init(aMap): global map_ map_ = aMap def robot_init(): global undergroundSensor undergroundSensor = sensor(enums.Level.Underground, 1) global greenActuator greenActuator = actuator...
gpl-3.0
7,224,220,530,610,876,000
19.557692
63
0.703461
false
3liz/QgisQuickOSMPlugin
quick_osm_processing/advanced/download_overpass.py
1
3441
""" /*************************************************************************** QuickOSM QGIS plugin OSM Overpass API frontend ------------------- begin : 2017-11-11 copyright : (C) 2017 by Etienne Trimaille email ...
gpl-2.0
8,111,771,314,235,636,000
34.112245
78
0.503051
false
anselg/handy-scripts
latency/plot_histogram.py
1
4785
#! /usr/bin/env python ########################################################################## # Import modules ########################################################################## import sys import os import re import h5py as h5 import numpy as np import pandas as pd from matplotlib.backends.backend_pdf imp...
gpl-3.0
245,206,177,885,361,280
25.731844
84
0.491118
false
mivade/qCamera
qcamera/camprops.py
1
5831
"""Camera properties""" import os.path import json # TODO: don't allow updating of properties that don't exist in the # default self.props set in __init__ from . exceptions import CameraPropertiesError PATH = os.path.split(os.path.abspath(__file__))[0] class CameraProperties(object): """Class used for...
bsd-2-clause
4,954,028,469,685,111,000
31.130682
79
0.513291
false
osantana/quickstartup
tests/website/tests.py
1
2616
import pytest from django.test import override_settings from django.urls import NoReverseMatch from quickstartup.qs_pages.models import Page from quickstartup.qs_pages.urlresolver import page_reverse from ..base import TEMPLATES, check_contains, check_in_html, check_template_used pytestmark = pytest.mark.django_db ...
mit
-3,780,522,163,532,078,000
30.071429
96
0.708046
false
prodromou87/gem5
configs/example/se.py
1
8904
# Copyright (c) 2012-2013 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functiona...
bsd-3-clause
1,964,174,809,649,631,000
33.78125
100
0.677673
false
toobaz/pandas
scripts/tests/test_validate_docstrings.py
1
37241
import io import random import string import textwrap import pytest import numpy as np import pandas as pd import validate_docstrings validate_one = validate_docstrings.validate_one class GoodDocStrings: """ Collection of good doc strings. This class contains a lot of docstrings that should pass the va...
bsd-3-clause
-8,343,854,184,638,662,000
26.203068
88
0.481485
false
paulmartel/voltdb
tests/scripts/examples/sql_coverage/strings-schema.py
1
1950
#!/usr/bin/env python # This file is part of VoltDB. # Copyright (C) 2008-2016 VoltDB Inc. # # 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 limitati...
agpl-3.0
-670,619,887,001,274,900
43.318182
73
0.657436
false
thedrow/cython
Cython/Compiler/Tests/TestJediTyper.py
1
3980
# -*- coding: utf-8 -*- # tag: jedi from __future__ import absolute_import import unittest from textwrap import dedent from contextlib import contextmanager from tempfile import NamedTemporaryFile from ..ParseTreeTransforms import NormalizeTree, InterpretCompilerDirectives from .. import Main, Symtab, Visitor from ....
apache-2.0
-3,737,469,438,165,437,000
28.701493
84
0.576884
false
Gorah/py_accuracy_report
runreport.py
1
34212
#Script written for Python 2.7 #Dependencies to download: pyodbc (SQL Server Drivers) import pyodbc import datetime import sys import re from contextlib import contextmanager LATE_CASES = {} @contextmanager def get_connection(): """ Connect to DB """ cnxn = pyodbc.connect('DRIVER={SQL SERVER};SER...
gpl-2.0
-7,754,132,641,585,172,000
40.519417
123
0.512949
false
closeio/socketshark
socketshark/utils.py
1
3506
import asyncio import ssl import time from urllib.parse import urlsplit, urlunsplit import aiohttp from . import constants as c def _get_rate_limit_wait(log, resp, opts): """ Returns the number of seconds we should wait given a 429 HTTP response and HTTP options. """ max_wait = 3600 wait =...
mit
-1,969,585,453,855,249,400
32.711538
78
0.51911
false
Architizer/Feedly
feedly/serializers/cassandra/aggregated_activity_serializer.py
1
1244
from feedly.activity import AggregatedActivity from feedly.serializers.aggregated_activity_serializer import AggregatedActivitySerializer import pickle class CassandraAggregatedActivitySerializer(AggregatedActivitySerializer): def __init__(self, model): self.model = model def dumps(self, aggregated)...
bsd-3-clause
-4,981,306,401,176,553,000
35.588235
90
0.67283
false
tgquintela/pythonUtils
pythonUtils/tests.py
1
1339
""" tests ----- The module which call and centralize all the tests utilities. """ from parallel_tools import test_parallel_tools from Logger import test_logger from TUI_tools import test_tui_tools from CodingText import test_codingtext from ProcessTools import test_processtools from numpy_tools import test_numpytool...
mit
7,229,336,468,678,593,000
25.78
61
0.779686
false
Micutio/CAB_Simulations
SugarScape/ca/ss_cell.py
1
1856
""" Module containing the cell definition for the Sugarscape world. """ from cab.ca.cell import CellHex __author__ = 'Michael Wagner' __version__ = '1.0' class WorldCell(CellHex): def __init__(self, x, y, gc): super().__init__(x, y, gc) self.t_gen = None self.sugar = 0 self.spice...
mit
2,815,983,188,803,360,300
28.460317
72
0.542026
false