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
lavalamp-/ws-backend-community
lib/debugging.py
1
4429
# -*- coding: utf-8 -*- from __future__ import absolute_import from uuid import uuid4 def clear_celery_queue(): """ Clear out all tasks for the Web Sight Celery application. :return: None """ from tasknode import websight_app websight_app.control.purge() def enqueue_database_debugging_task(...
gpl-3.0
6,063,669,412,163,870,000
33.874016
96
0.669677
false
GENETX/alpg
configs/example.py
1
4948
#!/usr/bin/python3 #Artifical load profile generator v1.1, generation of artificial load profiles to benchmark demand side management approaches #Copyright (C) 2018 Gerwin Hoogsteen #This program is free software: you can redistribute it and/or modify #it under the terms of the GNU General Public Lic...
gpl-3.0
4,827,155,180,199,970,000
28.628743
126
0.760509
false
woodem/woo
examples/perf/showPlots.py
1
2971
import numpy as np from pprint import pprint dd={} for l in open('timings.txt'): if l.startswith('#'): continue ll=l[:-1].split() if len(ll)==0: continue tag,cores,nPar,nSteps=ll[0],int(ll[1]),int(ll[2]),int(ll[3]) t1,t,colliderRel=[float(i) for i in ll[4:]] key=(tag,cores,nPar,nSteps) data=...
gpl-2.0
5,512,987,470,357,769,000
33.952941
142
0.612252
false
schristakidis/p2ner
p2ner/components/serveroverlay/centralserver/centralserver/messages/messageobjects.py
1
2833
# -*- coding: utf-8 -*- # Copyright 2012 Loris Corazza, Sakis Christakidis # # 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 # # U...
apache-2.0
-8,950,229,297,693,526,000
31.563218
98
0.692199
false
dfehrenbach/Swen343_Human_Resources
hr/controllers/authentication.py
1
1073
""" This is the controller of the /confirm_login endpoint The following functions are called from here: GET """ import logging import requests import employees logging.basicConfig(filename='./log.txt',format='%(asctime)s :: %(name)s :: %(message)s') logger = logging.getLogger(__name__) def get(department="",token=...
mit
-5,626,718,884,545,181,000
36
109
0.65424
false
BiaDarkia/scikit-learn
sklearn/cluster/k_means_.py
1
61736
"""K-means clustering""" # Authors: Gael Varoquaux <gael.varoquaux@normalesup.org> # Thomas Rueckstiess <ruecksti@in.tum.de> # James Bergstra <james.bergstra@umontreal.ca> # Jan Schlueter <scikit-learn@jan-schlueter.de> # Nelle Varoquaux # Peter Prettenhofer <peter.prettenh...
bsd-3-clause
8,976,565,480,837,188,000
37.730238
81
0.611701
false
vaishaksuresh/udacity_data_analyst
P2/ProblemSets_2_to_4/P2_01.py
1
1464
import pandas import pandasql def num_rainy_days(filename): ''' This function should run a SQL query on a dataframe of weather data. The SQL query should return one column and one row - a count of the number of days in the dataframe where the rain column is equal to 1 (i.e., the number of days it...
gpl-2.0
7,580,475,719,071,482,000
38.567568
93
0.70082
false
IvanRybakov/cachewarmer
cw.py
1
3233
import urllib2 as ur import re, traceback import sys import os from scw.fetcher import Fetcher from scw.app import App class CacheWarmer(): def __init__(self, sitemap, processes = 100): self.processes = processes self.active_threads = [] self.app = App() self.urls = [] self.updated_count = 0 self.fetch...
mit
-5,689,395,381,370,856,000
28.126126
109
0.67275
false
t-neumann/slamdunk
slamdunk/contrib/RNASeqReadSimulator/src/gensimreads.py
1
9905
#!/usr/bin/env python """ This script generates simulated RNA-Seq reads (in .bed format) from known gene annotations. USAGE gensimreads.py {OPTIONS} <BED-File|-> PARAMETER BED-File\tThe gene annotation file (in BED format). Use '-' for STDIN input OPTIONS -e/--expression [expression level file] \tSpecify ...
agpl-3.0
3,342,112,633,374,298,000
30.645367
292
0.651186
false
APTrust/EarthDiver
dpnode/dpn/client/management/commands/accept_transfers.py
1
1510
""" 'Contrary to what people may say, there is no upper limit to stupidity.' - Stephen Colbert """ from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand, CommandError from dpn.data.models import Node from dpn.client.tasks import...
apache-2.0
-3,021,411,262,614,179,300
32.577778
78
0.59404
false
eduNEXT/edunext-ecommerce
ecommerce/courses/publishers.py
1
6029
from __future__ import absolute_import, unicode_literals import json import logging import six from django.utils.translation import ugettext_lazy as _ from edx_rest_api_client.exceptions import SlumberHttpBaseException from oscar.core.loading import get_model from ecommerce.core.constants import ENROLLMENT_CODE_SEAT...
agpl-3.0
152,557,083,518,754,620
40.294521
116
0.603914
false
Nic30/HWToolkit
hwt/synthesizer/rtlLevel/netlist.py
1
8089
from typing import List, Optional, Union from hdlConvertorAst.hdlAst._defs import HdlIdDef from hdlConvertorAst.hdlAst._expr import HdlValueId from hdlConvertorAst.hdlAst._structural import HdlModuleDec, HdlModuleDef, \ HdlCompInst from hwt.code import If from hwt.hdl.operatorDefs import AllOps from hwt.hdl.types....
mit
2,040,947,391,428,766,200
37.160377
105
0.593769
false
EdinburghNLP/nematus
nematus/exponential_smoothing.py
1
3493
import tensorflow as tf # How often to update smoothed variables (in terms of training steps). DEFAULT_UPDATE_FREQUENCY = 5 class ExponentialSmoothing(object): """Defines TensorFlow variables and operations for exponential smoothing. Following Marian [1], we maintain smoothed versions of all trainable ...
bsd-3-clause
2,266,908,589,127,385,000
42.123457
79
0.608932
false
thakadu/Abraxas
scripts/load_feeds.py
1
1986
"""Loads Feed data from a csv file into the feed table of the database""" import logging import csv from optparse import OptionParser from paste.deploy import appconfig #from pylons import app_globals from abraxas.config.environment import load_environment from sqlalchemy import create_engine, MetaData, select from...
bsd-3-clause
1,864,919,659,832,746,000
27.782609
76
0.613797
false
axiom-data-science/pyaxiom
pyaxiom/netcdf/sensors/dsg/timeseries/ir.py
1
1602
#!python # coding=utf-8 from pyaxiom.netcdf import CFDataset from pyaxiom import logger class IndexedRaggedTimeseries(CFDataset): @classmethod def is_mine(cls, dsg): try: rvars = dsg.get_variables_by_attributes(cf_role='timeseries_id') assert len(rvars) == 1 asser...
mit
3,502,373,414,636,524,500
31.693878
94
0.601124
false
andrewyoung1991/scons
QMTest/TestCommon.py
1
27429
""" TestCommon.py: a testing framework for commands and scripts with commonly useful error handling The TestCommon module provides a simple, high-level interface for writing tests of executable commands and scripts, especially commands and scripts that interact with the file system. All methods throw...
mit
3,280,582,583,667,174,400
36.116373
88
0.580298
false
Pikecillo/genna
external/PyXML-0.8.4/test/dom/test_entity.py
1
1296
from TestSuite import EMPTY_NAMESPACE def test(tester): tester.startGroup('Entity') tester.startTest('Testing syntax') try: from xml.dom import Entity from xml.dom.Entity import Entity except: tester.error('Error in syntax', 1) tester.testDone() tester.startTest('Crea...
gpl-2.0
7,661,269,185,216,156,000
24.411765
73
0.652778
false
opennode/waldur-mastermind
src/waldur_core/core/tests/test_admin.py
1
4743
from django.contrib.admin.sites import AdminSite from django.contrib.contenttypes.models import ContentType from django.test import TestCase, override_settings from reversion.models import Version from waldur_core.core.admin import UserAdmin from waldur_core.core.models import User from waldur_core.core.tests.helpers ...
mit
5,806,270,913,715,895,000
34.931818
83
0.654649
false
yro/veda_worker
veda_worker/generate_delivery.py
1
5380
import boto import boto.s3 from boto.s3.key import Key import hashlib import os from os.path import expanduser import sys import shutil from global_vars import * from reporting import ErrorObject from config import WorkerSetup homedir = expanduser("~") """ Gets specified Video and Encode object, and delivers file t...
gpl-3.0
7,279,386,653,945,648,000
26.589744
90
0.512639
false
yeleman/ramed-desktop
ramed/static.py
1
1980
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 nu import os import sys import platform import json import logging IS_FROZEN = hasattr(sys, 'frozen') WORKING_DIR = os.path.dirname(os.path.abspath(sys.executable if IS_FROZEN else ...
mit
2,534,540,856,373,804,000
26.774648
79
0.616633
false
SpaceGroupUCL/qgisSpaceSyntaxToolkit
esstoolkit/external/networkx/algorithms/isomorphism/ismags.py
1
42775
""" **************** ISMAGS Algorithm **************** Provides a Python implementation of the ISMAGS algorithm. [1]_ It is capable of finding (subgraph) isomorphisms between two graphs, taking the symmetry of the subgraph into account. In most cases the VF2 algorithm is faster (at least on small graphs) than this im...
gpl-3.0
-174,510,596,902,812,900
36.002595
88
0.56678
false
ngoix/OCRF
sklearn/datasets/fetch_ml_mieux.py
1
13778
from zipfile import ZipFile from io import BytesIO import logging from os.path import exists, join try: from urllib2 import urlopen except ImportError: from urllib.request import urlopen import numpy as np from .base import get_data_home from .base import Bunch from .base import _pkl_filepath from ..utils.fix...
bsd-3-clause
-8,359,151,599,805,482,000
31.495283
78
0.604369
false
capitalone/cloud-custodian
c7n/filters/vpc.py
1
10368
# Copyright 2016-2017 Capital One Services, LLC # Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 from c7n.exceptions import PolicyValidationError from c7n.utils import local_session, type_schema from .core import Filter, ValueFilter from .related import RelatedResourceFilter class Match...
apache-2.0
-2,030,043,321,442,465,000
37.831461
97
0.558738
false
vmagamedov/pi
fixers/fix_imports.py
1
2965
import os.path from lib2to3.pygram import python_symbols from lib2to3.fixer_util import Name from lib2to3.fixes.fix_imports import FixImports as BaseFixImports, alternates PATH = '{}/../pi/_requires'.format(os.path.dirname(__file__)) LIBS = [i.rstrip('.py') for i in os.listdir(PATH) if not i.startswith('_')...
bsd-3-clause
-102,682,145,929,447,380
41.357143
79
0.536931
false
swapnilsm/redis-rw-lock
setup.py
1
1796
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function import io from os.path import dirname from os.path import join from setuptools import setup def read(*names, **kwargs): return io.open( join(dirname(__file__), *names), en...
mit
9,055,668,874,280,245,000
29.965517
90
0.603563
false
rwatson/chromium-capsicum
webkit/tools/layout_tests/layout_package/platform_utils_mac.py
1
5197
# Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This is the Mac implementation of the layout_package.platform_utils package. This file should only be imported by that package.""" import os ...
bsd-3-clause
-4,367,166,175,675,160,000
34.59589
80
0.689051
false
mareknetusil/twist
demo/dynamic/flap.py
1
1495
from __future__ import print_function __author__ = "Harish Narayanan" __copyright__ = "Copyright (C) 2010 Simula Research Laboratory and %s" % __author__ __license__ = "GNU GPL Version 3 or any later version" from cbc.twist import * class Obstruction(Hyperelasticity): def mesh(self): n = 4 retur...
gpl-3.0
-6,887,895,058,826,794,000
23.508197
86
0.599331
false
jinankjain/zamboni
mkt/api/paginator.py
1
4202
import urlparse from django.core.paginator import EmptyPage, Page, PageNotAnInteger, Paginator from django.http import QueryDict from django.utils.http import urlencode from rest_framework import pagination, serializers class ESPaginator(Paginator): """ A better paginator for search results The normal ...
bsd-3-clause
899,639,658,611,445,600
36.185841
79
0.651832
false
hwen3/410-lab5
todolist.py
1
2612
import sqlite3 from flask import Flask, render_template, g, request, session, flash, redirect, url_for, abort DATABASE = 'test.db' USERNAME = 'admin' PASSWORD = 'admin' SECRET_KEY = 'he who shall not be named' app = Flask(__name__) app.config.from_object(__name__) @app.route('/') def welcome(): return '<h1>Welco...
apache-2.0
7,709,553,751,303,551,000
27.402174
97
0.609495
false
Azure/azure-storage-python
samples/blob/block_blob_usage.py
1
18393
# 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. # --------------------------------------------------------------------...
mit
8,936,790,025,452,813,000
40.474041
120
0.618625
false
mbalazin/cse599c-17sp-projects
spark-advantage/pandasbench.py
1
1488
# coding: utf-8 # In[1]: import pandas as pd import time from sys import argv logfile = argv[1] filesize = argv[2] # # Python Pandas Benchmark # In[3]: prefix = "file:////Users/tony/Dropbox/Projects/UW/cse599c-17sp-projects/spark-advantage/data/" if(filesize == 'original'): tairfname = "Tair_WA_nohead...
bsd-3-clause
-4,992,153,284,442,744,000
24.672414
108
0.623656
false
openai/baselines
baselines/ppo1/run_atari.py
1
1583
#!/usr/bin/env python3 from mpi4py import MPI from baselines.common import set_global_seeds from baselines import bench import os.path as osp from baselines import logger from baselines.common.atari_wrappers import make_atari, wrap_deepmind from baselines.common.cmd_util import atari_arg_parser def train(env_id, num_...
mit
-257,343,598,731,253,380
31.979167
87
0.670246
false
bptripp/it-cnn
tuning/clutter.py
1
2870
__author__ = 'bptripp' import numpy as np import matplotlib matplotlib.rcParams['xtick.labelsize'] = 14 matplotlib.rcParams['ytick.labelsize'] = 14 import matplotlib.pyplot as plt from cnn_stimuli import get_image_file_list from alexnet import preprocess, load_net, load_vgg def get_clutter_responses(remove_level): ...
mit
-5,060,137,306,948,743,000
35.341772
95
0.628223
false
amenonsen/ansible
lib/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_h2qp_osu_provider.py
1
13230
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 Lic...
gpl-3.0
-5,820,145,933,093,998,000
32.324937
155
0.552079
false
icyflame/batman
pywikibot/families/wikibooks_family.py
1
7244
# -*- coding: utf-8 -*- """Family module for Wikibooks.""" from __future__ import absolute_import, unicode_literals from pywikibot import family __version__ = '$Id$' # The Wikimedia family that is known as Wikibooks class Family(family.SubdomainFamily, family.WikimediaFamily): """Family class for Wikibooks.""...
mit
-3,807,221,727,684,377,000
48.278912
157
0.628934
false
mpachas/django-monthfield
month/tests.py
1
5197
from django.test import TestCase from month.models import Month from example.models import Example import datetime # Create your tests here. def TestMonthFunctions(TestCase): def test_constructors(self): m = Month(2010, 1) self.assertEqual(m.year, 2010) self.assertEqual(m.month, 1) ...
bsd-3-clause
6,722,813,776,884,100,000
28.196629
84
0.552819
false
brianjimenez/lightdock
bin/test/post/test_generate_glowworm_positions.py
1
1125
"""Test for generate_glowworm_positions post script""" import os import filecmp import shutil from ..regression import RegressionTest class TestGenerateGlowwormPositions(RegressionTest): def setup(self): self.path = os.path.dirname(os.path.realpath(__file__)) self.test_path = self.path + '/scrat...
gpl-3.0
7,381,194,362,340,665,000
37.793103
115
0.629333
false
sh0ked/vmmaster
backend/queue_producer.py
1
4076
# coding: utf-8 import aioamqp import uuid import logging from core.utils import async_wait_for log = logging.getLogger(__name__) class AsyncQueueProducer(object): messages = {} connection = None channel = None consumer_tag = None responses_queue = None commands_queue = None def __init...
mit
1,020,926,549,248,728,000
38.192308
117
0.626349
false
fsmMLK/inkscapeCircuitSymbols
0.9x/drawRLC.py
1
14781
#!/usr/bin/python import inkscapeMadeEasy_Base as inkBase import inkscapeMadeEasy_Draw as inkDraw class RLC(inkBase.inkscapeMadeEasy): # --------------------------------------------- def drawBipoleGeneral(self, parent, position=[0, 0], value='Z', label='Bipole', angleDeg=0, flagVolt=True, ...
gpl-3.0
-5,235,465,511,251,690,000
48.767677
128
0.577633
false
Iconoclasteinc/tgit
testing/drivers/track_list_tab_driver.py
1
3521
# -*- coding: utf-8 -*- from PyQt5.QtWidgets import QMenu, QTableWidget from hamcrest import contains, has_items, equal_to from cute import gestures from cute.matchers import named from cute.widgets import MenuDriver, TableViewDriver from tgit.ui.pages.track_list_tab import TrackListTab from ._screen_driver import Scr...
gpl-3.0
5,953,029,582,942,851,000
33.184466
88
0.652655
false
nict-isp/scn-openflow-driver
src/ncps_openflow/protocols/application/tcp.py
1
13729
# -*- coding: utf-8 -*- """ protocols.application.tcp ~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright (c) 2015, National Institute of Information and Communications Technology.All rights reserved. :license: GPL3, see LICENSE for more details. """ import logging from protocols.application.application import Server fro...
gpl-3.0
1,546,076,728,354,864,000
27.365702
134
0.571127
false
csningli/MultiAgent
examples/avoid_static_obstacle/static_sim.py
1
2287
# MultiAgent 2.0 # (c) 2017-2018, NiL, csningli@gmail.com import sys, math sys.path.append("../..") from mas.multiagent import * from mas.extension import ShowLabelObject POS_ERROR = 5 SPIN_SPEED = math.pi / 6.0 class SpinModule(ObjectModule) : def act(self, resp) : resp.add_msg(Message(key = "avel", ...
apache-2.0
-4,195,351,703,851,307,000
23.591398
108
0.589418
false
olivierverdier/sfepy
sfepy/mechanics/matcoefs.py
1
12857
# -*- coding: utf-8 -*- from sfepy.base.base import * ## # c: 22.07.2008 def youngpoisson_to_lame( young, poisson, plane = 'strain' ): r""" The relationship between Lame parameters and Young's modulus, Poisson's ratio (see [1],[2]): .. math:: \lambda = {\nu E \over (1+\nu)(1-2\nu)},\qquad \mu ...
bsd-3-clause
-4,280,246,495,239,971,000
33.371658
81
0.496227
false
opennode/waldur-mastermind
src/waldur_mastermind/booking/processors.py
1
4711
from django.db import transaction from django.utils import timezone from django.utils.dateparse import datetime_re, parse_datetime from django.utils.translation import ugettext_lazy as _ from rest_framework.serializers import ValidationError from waldur_mastermind.booking.utils import ( get_offering_bookings, ...
mit
1,439,147,289,079,598,300
37.933884
99
0.545956
false
manz/python-mapnik
test/python_tests/sqlite_test.py
1
20465
#!/usr/bin/env python from __future__ import print_function from nose.tools import eq_, raises from .utilities import execution_path, run_all import os import mapnik def setup(): # All of the paths used are relative, if we run the tests # from another directory we need to chdir() os.chdir(execution_path(...
lgpl-2.1
4,323,102,137,931,213,300
39.766932
305
0.538334
false
frac/lettuce
tests/functional/output_features/success_table/success_table_steps.py
1
1617
# -*- coding: utf-8 -*- # <Lettuce - Behaviour Driven Development for python> # Copyright (C) <2010> Gabriel Falcão <gabriel@nacaolivre.org> # # 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, ei...
gpl-3.0
2,192,169,248,575,762,400
28.925926
71
0.686881
false
prculley/gramps
gramps/plugins/view/geofamily.py
1
20779
# -*- python -*- # -*- coding: utf-8 -*- # # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2011-2016 Serge Noiraud # # 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 ver...
gpl-2.0
6,691,864,510,758,257,000
40.39243
104
0.455893
false
drjova/cds-demosite
tests/unit/test_provider.py
1
2108
# -*- coding: utf-8 -*- # # This file is part of CDS. # Copyright (C) 2015, 2016 CERN. # # CDS 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 v...
gpl-2.0
496,742,994,712,681,000
35.982456
76
0.695446
false
iScrE4m/RSES
tests/objects/test_stock.py
1
2053
# coding=utf-8 from pytest import raises from rses.src.objects import stock import rses_errors def test_ingredient_type_create(ingredient_type_no_create): ingredient_type = stock.IngredientType(name=ingredient_type_no_create) assert ingredient_type.id assert ingredient_type.name == ingredient_type_no_cre...
mit
7,995,718,306,625,569,000
39.254902
75
0.651242
false
kimbauters/sparsepy
search_structure.py
1
8409
import textwrap # used for embellishing the Graphviz DOT file layout class Node: # since we will be using a lot of Node instances, optimise the memory use by relying on slots rather than a dict __slots__ = ['problem', 'parent', 'action', 'effect', 'state', 'is_goal', 'children', 'visit...
mit
5,978,570,223,246,047,000
68.663866
120
0.625996
false
alexanderganderson/Diffusion-Probabilistic-Models
regression.py
1
8365
""" Defines the function approximators """ import numpy as np import theano.tensor as T # from theano.tensor.signal import downsample from blocks.bricks import Activation, MLP, Initializable, application, Identity from blocks.bricks.conv import ConvolutionalActivation from blocks.initialization import IsotropicGaussi...
mit
2,050,625,259,363,093,200
42.341969
128
0.618649
false
downpoured/labs_coordinate_pictures
src/tools/ben_python_img/img_tests.py
1
15862
import img_utils import img_convert_resize import img_resize_keep_exif import PIL from PIL import Image import sys sys.path.append('bn_python_common.zip') from bn_python_common import * def img_utils_testGetMarkFromFilename(): # tests splitting a filename that contains the "__MARKAS__" marker. assertEq(('/tes...
gpl-3.0
5,360,751,421,662,296,000
48.26087
123
0.696129
false
HoverHell/pyimapsmtpt
pyimapsmtpt/common.py
1
3253
# coding: utf8 import re import logging _log = logging.getLogger(__name__) class EventProcessed(Exception): """ A special exception to end the current event processing """ def to_bytes(val): if isinstance(val, unicode): return val.encode('utf-8') return val def get_html2text(config): tr...
gpl-2.0
-7,889,025,405,643,893,000
26.108333
78
0.597602
false
sunweaver/ganetimgr
apply/urls/user.py
1
2001
# -*- coding: utf-8 -*- vim:fileencoding=utf-8: # Copyright (C) 2010-2014 GRNET S.A. # # 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
-2,009,622,974,093,488,000
54.583333
167
0.684658
false
luisxiaomai/robotframework-anywherelibrary
src/AnywhereLibrary/base/logging.py
1
1083
import os #from robot.variables import GLOBAL_VARIABLES from robot.libraries.BuiltIn import BuiltIn from robot.api import logger from keywordgroup import KeywordGroup class Logging(KeywordGroup): # Private def _debug(self, message): logger.debug(message) def _get_log_dir(self): logfile =...
mit
-5,113,758,825,957,334,000
27.5
53
0.615882
false
regebro/hovercraft
hovercraft/generate.py
1
8341
import os import re import shutil from lxml import etree, html from pkg_resources import resource_string from .parse import rst2xml, SlideMaker from .position import position_slides from .template import ( Template, CSS_RESOURCE, JS_RESOURCE, JS_POSITION_HEADER, JS_POSITION_BODY, OTHER_RESOURCE...
mit
-971,954,912,299,686,000
33.754167
88
0.602686
false
GluuFederation/cluster-tools
recovery/recovery.py
1
10339
#!/usr/bin/env python # -*- coding: utf-8 -*- # The MIT License (MIT) # # Copyright (c) 2016 Gluu # # 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 limi...
mit
5,439,546,729,971,558,000
31.309375
96
0.610697
false
googleapis/google-cloud-cpp
google/cloud/storage/emulator/gcs/bucket.py
1
18283
# 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 agreed to in writing, s...
apache-2.0
2,046,264,609,927,782,400
37.9
98
0.587322
false
mancoast/CPythonPyc_test
cpython/234_test_sax.py
1
19309
# regression test for SAX 2.0 -*- coding: iso-8859-1 -*- # $Id: test_sax.py,v 1.24.16.1 2004/03/20 08:20:03 fdrake Exp $ from xml.sax import make_parser, ContentHandler, \ SAXException, SAXReaderNotAvailable, SAXParseException try: make_parser() except SAXReaderNotAvailable: # do...
gpl-3.0
-2,254,858,870,572,087,000
26.782734
117
0.5702
false
sio2project/oioioi
oioioi/szkopul/views.py
1
2838
import django from django.conf import settings from django.template.response import TemplateResponse from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from oioioi.base.main_page import register_main_page_view from oioioi.contests.controllers import submission_template_context from ...
gpl-3.0
-4,068,311,784,596,601,300
32.388235
87
0.686399
false
osuripple/pep.py
objects/chatFilters.py
1
1250
class chatFilters: def __init__(self, fileName="filters.txt"): """ Initialize chat filters :param fileName: name of the file containing filters. Default: filters.txt """ self.filters = {} self.loadFilters(fileName) def loadFilters(self, fileName="filters.txt"): """ Load filters from a file :param...
agpl-3.0
-5,941,986,136,163,623,000
22.148148
76
0.672
false
jef-n/QGIS
tests/src/python/providertestbase.py
1
52878
# -*- coding: utf-8 -*- """QGIS Unit test utils for provider tests. .. note:: 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. "...
gpl-2.0
-9,024,574,573,250,967,000
47.780443
221
0.604429
false
Autostew/autostew
autostew_back/event_handlers/collision.py
1
4077
from autostew_back.event_handlers.base_event_handler import BaseEventHandler from autostew_web_enums.models import EventType, ParticipantState from autostew_web_session.models.event import Event from autostew_web_session.models.participant import Participant warn_at = 0.7 environment_crash_multiplier = 0.1 class Han...
agpl-3.0
1,326,310,007,162,899,000
49.333333
131
0.704194
false
47lining/nucleator-core
lib/nucleator/cli/cli.py
1
5116
# Copyright 2015 47Lining 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
9,091,823,914,105,722,000
40.934426
146
0.585418
false
robcarver17/pysystemtrade
sysobjects/production/roll_state.py
1
2906
from enum import Enum from syscore.objects import named_object RollState = Enum("RollState",( "No_Roll", "Passive", "Force", "Force_Outright", "Roll_Adjusted")) default_state = RollState.No_Roll roll_adj_state = RollState.Roll_Adjusted roll_explanations = { RollState.No_Roll:"No rolling happ...
gpl-3.0
1,969,242,482,449,701,400
36.25641
179
0.681693
false
Bajoo/client-pc
bajoo/common/periodic_task.py
1
5677
# -*- coding: utf-8 -*- import logging from threading import Timer, Lock from ..promise import Deferred, CancelledError _logger = logging.getLogger(__name__) class PeriodicTask(object): """Generic Thread-based service, executing a task at regular interval. The task is executed first right after the call to...
gpl-3.0
-4,949,742,910,043,404,000
33.198795
79
0.550114
false
spillai/procgraph
src/procgraph_mpl/plot_anim.py
1
1093
__all__ = [ 'PlotAnim', ] class PlotAnim(object): def __init__(self): self.handle_line = {} self.handle_text = {} self.pylab = None def set_pylab(self, pylab): self.pylab = pylab def assert_pylab_given(self): if self.pylab is None:...
lgpl-3.0
-8,553,758,529,945,379,000
26.325
65
0.511436
false
silasary/StackIt
StackIt/builder.py
1
18659
import os, sys, re #Image manipulation from PIL import Image from PIL import ImageFont from PIL import ImageDraw #Check input format import mmap #XML parsing import xml.etree.ElementTree #HTML parsing from lxml import html from StackIt import scraper, config, decklist, globals from StackIt.globals import Card, spe...
mit
3,783,695,594,269,186,600
37.235656
207
0.613109
false
superfluidity/RDCL3D
code/translator/hot/tosca/tests/test_tosca_autoscaling.py
1
3440
# 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 # d...
apache-2.0
-5,870,668,493,590,456,000
36.802198
78
0.566279
false
arseneyr/essentia
test/src/unittest/temporal/test_loudnessebur128.py
1
6832
#!/usr/bin/env python # Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia 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 ...
agpl-3.0
2,107,436,726,347,414,000
46.453901
103
0.600117
false
GregSilverman/cohort_rest_api
rest_api/build_atom.py
1
14183
#!/usr/bin/env python from sqlalchemy import between from sqlalchemy.sql import and_, label from app import db, models import htsql_methods as hsql Clinical = models.ClinicalData Attribute = models.Attribute """ Example SQL atomic query for modified nested model: select * from clinical_data (selec...
gpl-3.0
-4,821,364,456,509,184,000
34.019753
131
0.476345
false
Iconoclasteinc/tgit
tgit/tagging/embedded_containers.py
1
1536
# -*- coding: utf-8 -*- # # TGiT, Music Tagger for Professionals # Copyright (C) 2013 Iconoclaste Musique Inc. # # 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...
gpl-3.0
2,475,258,062,397,315,000
29.72
93
0.747396
false
crakensio/django_training
lib/python2.7/site-packages/bpython/curtsiesfrontend/interaction.py
1
4789
import greenlet import time import curtsies.events as events from bpython.repl import Interaction as BpythonInteraction from bpython.curtsiesfrontend.manual_readline import char_sequences as rl_char_sequences class StatusBar(BpythonInteraction): """StatusBar and Interaction for Repl Passing of control back ...
cc0-1.0
-3,079,365,304,622,484,500
37.007937
129
0.618083
false
cltrudeau/django-awl
awl/templatetags/awltags.py
1
4065
# awl.templatetags.awltags.py from django import template register = template.Library() # ============================================================================ @register.filter def getitem(dictionary, keyvar): """Custom django template filter that allows access to an item of a dictionary through the ...
mit
-5,902,167,371,774,256,000
28.456522
78
0.512423
false
squidsrc/python-rocksdb
setup.py
1
1079
from setuptools import setup, find_packages from distutils.extension import Extension from Cython.Build import cythonize extension_defaults = { 'extra_compile_args': [ '-std=gnu++11', '-O3', '-Wall', '-Wextra', '-Wconversion', '-fno-strict-aliasing' ], 'langu...
bsd-3-clause
5,162,525,097,040,509,000
21.479167
51
0.578313
false
nateprewitt/pipenv
pipenv/project.py
1
17449
# -*- coding: utf-8 -*- import json import os import re import sys import base64 import hashlib import contoml import delegator import pipfile import toml from .utils import ( mkdir_p, convert_deps_from_pip, pep423_name, recase_file, find_requirements, is_file, is_vcs, python_version, cleanup_toml, is_ins...
mit
562,355,048,727,634,100
32.41954
101
0.562224
false
mrcslws/nupic.research
projects/dynamic_sparse/runs/run_test.py
1
1756
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2019, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
5,158,335,504,190,792,000
31.518519
73
0.646925
false
wendlers/scratch-pynetsense
example-src/WrappedRemoteSensor.py
1
2457
## # This file is part of the Scratch Remote Sensor (SRS) Library project # # Copyright (C) 2012 Stefan Wendler <sw@kaltpost.de> # # The SRS Library 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; eith...
lgpl-2.1
-1,918,675,807,934,093,300
26.606742
74
0.699634
false
luotao1/Paddle
python/paddle/tensor/logic.py
1
16431
# Copyright (c) 2020 PaddlePaddle 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 app...
apache-2.0
1,783,713,438,296,025,000
35.676339
128
0.585296
false
alsrgv/tensorflow
tensorflow/python/ops/math_grad.py
1
57271
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
2,105,415,834,781,362,400
33.54222
81
0.653891
false
robled/rocket-depot
setup.py
1
2523
import subprocess from distutils.log import warn, info from setuptools import setup setup( name='rocket-depot', version='1.0.0', scripts=['rocket-depot'], # metadata for upload to PyPI platforms='linux', author='David Roble', author_email='robled@electronsweatshop.com', maintainer='Dav...
gpl-3.0
8,640,305,625,367,821,000
38.421875
70
0.604439
false
mjcaley/aiospamc
tests/test_responses.py
1
3390
#!/usr/bin/env python3 import pytest import zlib from aiospamc.exceptions import * from aiospamc.header_values import CompressValue from aiospamc.incremental_parser import ResponseParser from aiospamc.responses import Response def test_init_version(): r = Response(version="4.2", status_code=0, message="EX_OK")...
mit
6,483,868,723,979,816,000
24.111111
82
0.623009
false
swegener/gruvi
lib/gruvi/address.py
1
3675
# # This file is part of Gruvi. Gruvi is free software available under the # terms of the MIT license. See the file "LICENSE" that was provided # together with this source file for the licensing terms. # # Copyright (c) 2012-2014 the Gruvi authors. See the file "AUTHORS" for a # complete list. from __future__ import a...
mit
-7,268,691,083,574,085,000
34.336538
88
0.661224
false
harrystech/arthur-redshift-etl
python/etl/monitor.py
1
36933
""" Monitoring (and logging) for ETL steps. This module provides a context for the ETL that allows to monitor the start time of an ETL step along with its successful or unsuccessful completion. Events for start, finish or failure may be emitted to a persistence layer. """ import http.server import itertools import l...
mit
-3,399,315,863,732,583,000
38.123941
110
0.600601
false
att-comdev/armada
armada/tests/unit/handlers/test_manifest.py
1
19376
# Copyright 2017 The Armada 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 in w...
apache-2.0
8,929,328,809,343,949,000
43.748268
79
0.658805
false
linuxrocks123/MailTask
mt_chronos.py
1
1986
#! /usr/bin/env python # MailTask Alpha: The Email Manager # Copyright (C) 2015 Patrick Simmons # 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 ...
gpl-3.0
-4,021,911,731,758,143,000
37.192308
84
0.703424
false
delcypher/klee-runner
tools/show-klee-dir.py
1
5821
#!/usr/bin/env python # vim: set sw=4 ts=4 softtabstop=4 expandtab: """ Perform verification of a klee-runner result yaml file and associated working directory. """ import argparse from enum import Enum import logging import os # pylint: disable=wrong-import-position from load_klee_analysis import add_kleeanalysis_to_...
mit
-734,669,082,042,310,700
36.076433
92
0.633912
false
codesy/codesy
payments/migrations/0001_initial.py
1
1590
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-08-03 23:59 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migration...
agpl-3.0
-4,125,141,983,997,128,000
38.75
118
0.597484
false
Dutchj/pbtweeter
pbtweeter/speedrun.py
1
1678
import config as cfg import json from datetime import datetime from urllib2 import urlopen, quote def get_lb(): try: response = urlopen('http://www.speedrun.com/api_records.php?amount=999&game='+quote(cfg.game)) return json.load(response) except Exception, e: print datetime.now().strft...
gpl-2.0
-8,179,702,171,126,471,000
37.136364
102
0.564958
false
wpoely86/easybuild-easyblocks
easybuild/easyblocks/r/rserve.py
1
1691
## # Copyright 2009-2016 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # Flemish Research Foundation ...
gpl-2.0
-6,841,785,805,231,180,000
37.431818
101
0.740982
false
mjirik/lisa
lisa/vessels_segmentation.py
1
3265
#! /usr/bin/python # -*- coding: utf-8 -*- # import funkcí z jiného adresáře import sys import os.path import io3d path_to_script = os.path.dirname(os.path.abspath(__file__)) #import featurevector import unittest from loguru import logger # logger = logging.getLogger() # import apdb # apdb.set_trace(); # import sc...
bsd-3-clause
-3,153,561,909,537,196,000
23.89313
94
0.616069
false
voilet/cmdb
assets/ztree/api.py
1
11656
#!/usr/bin/env python # -*- coding: utf-8 -*- # ============================================================================= # FileName: api.py # Desc: 2015-15/4/16:下午5:54 # Author: 苦咖啡 # Email: voilet@qq.com # HomePage: http://blog.kukafei520.net # History: # =======================...
agpl-3.0
1,779,326,221,662,780,700
34.814241
136
0.585927
false
Cygnus-Inc/Cygnet-Adapter
docs/conf.py
1
1240
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import sys sys.path.append(os.path.abspath('src/cygnet_adapter')) extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', ...
apache-2.0
-935,034,756,308,814,500
27.181818
81
0.670161
false
qpiel/python_estimation_source
Script/AllSourcesFit_Ctools.py
1
3157
import os,sys from os.path import join import ctools from ctoolsAnalysis.config import get_config,get_default_config from ctoolsAnalysis.LikeFit import CTA_ctools_analyser from Common_Functions import * Astropy = True try : import Coordinates.CoordHandler as CH import Coordinates.CoordUtilities as CU from ...
gpl-3.0
-4,762,860,779,201,160,000
31.214286
98
0.638581
false
Aeronautics/aero
aero/commands/install.py
1
1362
# -*- coding: utf-8 -*- from aero.__version__ import __version_info__ __author__ = 'nickl-' from .base import CommandProcessor as CommandProcessor class InstallCommand(CommandProcessor): from .base import coroutine package = '' adapter = '' def wiring(self): self.out = self.write() ...
bsd-3-clause
-6,355,324,622,234,375,000
24.698113
101
0.556535
false
pmghalvorsen/gramps_branch
gramps/gui/editors/displaytabs/groupembeddedlist.py
1
14240
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2006 Donald N. Allingham # 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; ei...
gpl-2.0
-4,655,648,685,835,140,000
34.073892
86
0.523596
false
mdevaev/emonoda
emonoda/plugins/confetti/pushover.py
1
3447
""" Emonoda -- A set of tools to organize and manage your torrents Copyright (C) 2015 Devaev Maxim <mdevaev@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 vers...
gpl-3.0
4,823,935,925,674,717,000
35.670213
128
0.577314
false
yusukemurayama/ppytrading
ppyt/filters/historical_filters.py
1
1741
# coding: utf-8 import logging from sqlalchemy.sql import func from ppyt.filters import FilterBase from ppyt.models.orm import start_session, History logger = logging.getLogger(__name__) class AverageVolumeFilter(FilterBase): """平均出来形で銘柄を絞り込むクラスです。""" _findkey = '平均出来高フィルタ' # フィルタを一意に特定できる名前をつけます。 def...
mit
-2,557,690,650,821,079,000
24.240741
79
0.567865
false
Magic-Translater/Pwntools.Doc.In.Zh-cn
source/conf.py
1
11053
# -*- coding: utf-8 -*- # # pwntools documentation build configuration file, created by # sphinx-quickstart on Wed May 28 15:00:52 2014. # # 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. # # Al...
mit
-6,300,908,279,611,668,000
30.670487
156
0.689406
false
auready/django
tests/auth_tests/test_forms.py
2
34292
import datetime import re from unittest import mock from django import forms from django.contrib.auth.forms import ( AdminPasswordChangeForm, AuthenticationForm, PasswordChangeForm, PasswordResetForm, ReadOnlyPasswordHashField, ReadOnlyPasswordHashWidget, SetPasswordForm, UserChangeForm, UserCreationForm, ...
bsd-3-clause
-8,254,887,055,535,520,000
38.944056
119
0.616743
false