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
wiredrive/wtframework
wtframework/wtf/testobjects/tests/test_watched_test_case.py
1
5126
########################################################################## # This file is part of WTFramework. # # WTFramework 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 L...
gpl-3.0
-9,188,379,825,369,977,000
29.331361
78
0.588958
false
ljmanso/AGM2
tools/agmdsr/src/genericworker.py
1
3256
# # Copyright (C) 2017 by YOUR NAME HERE # # This file is part of RoboComp # # RoboComp 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
1,309,409,873,425,347,300
28.333333
106
0.727273
false
raphaelvalentin/Utils
ngspice/syntax/nport.py
1
5197
from ngspice.syntax import * from functions.science import flatten from rawdata import touchstone from interpolate import interp1d __all__ = ['Nport'] class VCVSx(Netlist): __name__ = "vcvs" __type__ = "instance" __indent__ = "" def __init__(self, name='E1', nodes=('in', 'out', 'sensp', 'sensm...
gpl-2.0
2,556,812,261,765,248,500
34.59589
103
0.557629
false
kylef/pyppp
pyppp/django/forms.py
1
3810
from django import forms from django.conf import settings from django.http import HttpResponseRedirect from django.views.decorators.cache import never_cache from django.contrib.auth import authenticate, REDIRECT_FIELD_NAME from django.contrib.formtools.wizard import FormWizard from pyppp.django import login from pyppp...
bsd-2-clause
4,494,156,654,408,472,000
38.6875
134
0.623622
false
google/nerfactor
nerfactor/models/base.py
1
5484
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-6,663,748,743,042,805,000
37.34965
80
0.578957
false
dials/dials
command_line/apply_mask.py
1
3188
import pickle from dxtbx.format.image import ImageBool from iotbx.phil import parse import dials.util help_message = """ This program augments a experiments JSON file with one or more masks specified by the user. Its only function is to input the mask file paths to the experiments JSON file, but means that the use...
bsd-3-clause
306,330,743,678,722,560
29.951456
86
0.620452
false
WGBH/django-textplusstuff
textplusstuff/datastructures.py
1
5466
from __future__ import unicode_literals import json from django.utils.encoding import force_text from django.utils.safestring import mark_safe from .parser import ( MarkdownFlavoredTextNode, ModelStuffNode, TextPlusStuffLexer, TextPlusStuffParser ) class TextPlusStuff(object): def __init__(self...
mit
2,719,036,316,729,344,000
35.932432
79
0.5397
false
horazont/aiosasl
tests/test_stringprep.py
1
5198
######################################################################## # File name: test_stringprep.py # This file is part of: aiosasl # # LICENSE # # This program 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 ...
lgpl-3.0
873,962,870,824,638,300
30.125749
74
0.558869
false
prophile/jacquard
jacquard/directory/base.py
1
1451
"""Base class for directory implementations.""" import abc import collections UserEntry = collections.namedtuple("UserEntry", "id join_date tags") UserEntry.__doc__ = """ Description of attributes of a single user. Internally this is a `collections.namedtuple`. """ UserEntry.id.__doc__ = """String user ID.""" User...
mit
-3,654,069,613,207,161,300
27.45098
100
0.645762
false
UfSoft/trac-google-search
tracext/google/search/__init__.py
1
3529
# -*- coding: utf-8 -*- # vim: sw=4 ts=4 fenc=utf-8 et # ============================================================================== # Copyright © 2008 UfSoft.org - Pedro Algarvio <ufs@ufsoft.org> # # Please view LICENSE for additional licensing information. # ========================================================...
bsd-3-clause
4,980,436,316,728,324,000
42.02439
80
0.55924
false
skymill/automated-ebs-snapshots
automated_ebs_snapshots/command_line_options.py
1
3302
""" Command line options """ import argparse import sys import os.path from ConfigParser import SafeConfigParser from automated_ebs_snapshots.valid_intervals import VALID_INTERVALS settings = SafeConfigParser() settings.read('{}/settings.conf'.format( os.path.dirname(os.path.realpath(__file__)))) parser = argpa...
apache-2.0
5,670,893,979,281,945,000
28.482143
73
0.648092
false
pombredanne/dask
dask/tests/test_async.py
1
5236
from __future__ import absolute_import, division, print_function from operator import add from copy import deepcopy import dask import pytest from dask.async import * fib_dask = {'f0': 0, 'f1': 1, 'f2': 1, 'f3': 2, 'f4': 3, 'f5': 5, 'f6': 8} def test_start_state(): dsk = {'x': 1, 'y': 2, 'z': (inc, 'x'), 'w'...
bsd-3-clause
5,824,641,980,801,946,000
27.456522
75
0.442704
false
nagordon/mechpy
mechpy/composites.py
1
71681
# coding: utf-8 ''' Module for composite material analysis Hyer-Stress Analysis of Fiber-Reinforced Composite Materials Herakovich-Mechanics of Fibrous Composites Daniel-Engineering Mechanics of Composite Materials Kollar-Mechanics of COmposite Structures NASA- Basic Mechancis of Lamianted Composites ht...
mit
4,286,907,931,120,713,000
37.298794
238
0.518464
false
StoneyJackson/unzipR
unzipr.py
1
4368
# unzipR - A library for recursively extracting files. # Copyright (C) 2014 Stoney Jackson <dr.stoney@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 ...
gpl-3.0
7,436,011,763,455,285,000
31.117647
80
0.695971
false
postlund/home-assistant
tests/components/sonarr/test_sensor.py
1
30602
"""The tests for the Sonarr platform.""" from datetime import datetime import time import unittest import pytest import homeassistant.components.sonarr.sensor as sonarr from homeassistant.const import DATA_GIGABYTES from tests.common import get_test_home_assistant def mocked_exception(*args, **kwargs): """Mock...
apache-2.0
-6,594,276,752,610,751,000
41.612813
88
0.383187
false
aio-libs/aioredis
aioredis/connection.py
1
59561
import asyncio import errno import inspect import io import os import socket import ssl import threading import time import warnings from distutils.version import StrictVersion from itertools import chain from typing import ( Any, Iterable, List, Mapping, Optional, Set, Tuple, Type, ...
mit
5,627,629,003,666,229,000
36.155958
97
0.589312
false
toast38coza/ansible-modules
library/kong_plugin.py
1
3447
#!/usr/bin/python import requests class KongPlugin: def __init__(self, base_url, api_name): self.base_url = "{}/apis/{}/plugins" . format(base_url, api_name) self.api = api_name def list(self): return requests.get(self.base_url) def _get_plugin_id(self, name, plugins_li...
mit
-6,333,525,935,479,312,000
27.262295
115
0.551494
false
SmartCash/smartcash
contrib/seeds/generate-seeds.py
1
4382
#!/usr/bin/python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the directory tha...
mit
-8,129,644,415,492,418,000
30.753623
98
0.573026
false
mathandy/Classifiers2LearnWith
experiments/vgg16_pre-trained/vgg16_pre-trained.py
1
9463
"""A pre-trained implimentation of VGG16 with weights trained on ImageNet.""" ########################################################################## # Special thanks to # http://www.cs.toronto.edu/~frossard/post/vgg16/ # for converting the caffe VGG16 pre-trained weights to TensorFlow # this file is essentially ju...
mit
468,354,589,904,741,300
43.219626
87
0.594843
false
burgerdev/volumina
volumina/utility/preferencesManager.py
1
4045
############################################################################### # volumina: volume slicing and editing library # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/or # modify it und...
lgpl-3.0
-6,503,057,252,922,043,000
36.453704
93
0.578245
false
pydanny/dj-stripe
tests/test_source.py
1
3473
""" dj-stripe Card Model Tests. """ import sys from copy import deepcopy from unittest.mock import patch from django.contrib.auth import get_user_model from django.test import TestCase from djstripe.models import Source from . import ( FAKE_CUSTOMER_III, FAKE_SOURCE, FAKE_SOURCE_II, AssertStripeFksMi...
bsd-3-clause
3,751,142,363,640,409,000
29.734513
87
0.610135
false
Mause/pyalp
pyalp/gs_interface/interface.py
1
2747
from os.path import join, dirname HERE = dirname(__file__) import logging from apps.tournaments.models import Server, GameRequest from .rpc_client import get_interface import yaml resource_load = lambda name: yaml.load(open( join(HERE, 'resources', name) )) game_ports = resource_load('game_ports.yaml') game_nam...
mit
-7,299,512,025,326,176,000
22.478632
78
0.626866
false
guziy/basemap
setup.py
1
6013
from __future__ import (absolute_import, division, print_function) import glob import io import os import sys from setuptools.dist import Distribution if sys.version_info < (2, 6): raise SystemExit("""matplotlib and the basemap toolkit require Python 2.6 or later.""") # Do not require numpy for just querying the...
gpl-2.0
8,225,000,807,982,011,000
38.559211
111
0.634791
false
alexandrul-ci/robotframework
src/robot/utils/normalizing.py
1
3987
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework 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 ...
apache-2.0
-7,067,595,486,309,116,000
31.680328
79
0.635566
false
joshishungry/artificial_intel
assignments/lab4/map_coloring_csp.py
1
2656
#!/usr/bin/env python """ Implementation of the Map coloring problem from 2006 Quiz 2 """ import sys from csp import CSP, Variable, BinaryConstraint, solve_csp_problem, \ basic_constraint_checker def map_coloring_csp_problem(): constraints = [] variables = [] # order of the variables here is the order...
apache-2.0
-4,624,747,162,642,793,000
31
70
0.508283
false
ianrenton/playbulb-tools
weathercheck/weathercheck.py
1
1370
# Python script to set a Playbulb LED colour based on the current weather. # Run me as a cron job for ambient weather information! # by Ian Renton # https://github.com/ianrenton/playbulb-tools # Uses python OpenWeatherMap wrapper from https://github.com/csparpa/pyowm import pyowm, re, subprocess #### Config #### # Y...
bsd-3-clause
7,456,926,169,413,411,000
34.128205
121
0.651095
false
gogoair/foremast
src/foremast/securitygroup/create_securitygroup.py
1
11172
# Foremast - Pipeline Tooling # # Copyright 2018 Gogo, 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...
apache-2.0
-642,778,247,066,717,200
33.481481
113
0.568654
false
ReactiveX/RxPY
rx/core/operators/merge.py
1
4401
from typing import Callable, Optional import rx from rx import from_future from rx.core import Observable from rx.disposable import CompositeDisposable, SingleAssignmentDisposable from rx.internal.concurrency import synchronized from rx.internal.utils import is_future def _merge(*sources: Observable, max_...
mit
6,199,957,247,772,746,000
34.208
101
0.561918
false
chesterbarryang/odoo_ultrasteel
stock_ownership_availability_rules/__openerp__.py
1
1316
# -*- coding: utf-8 -*- # Author: Leonardo Pistone # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or...
lgpl-3.0
-5,975,717,935,321,529,000
33.631579
77
0.674012
false
ioam/paramtk
paramtk/odict.py
1
46083
from __future__ import generators # odict.py # An Ordered Dictionary object # Copyright (C) 2005 Nicola Larosa, Michael Foord # E-mail: nico AT tekNico DOT net, fuzzyman AT voidspace DOT org DOT uk # This software is licensed under the terms of the BSD license. # http://www.voidspace.org.uk/python/license.shtml # Bas...
bsd-3-clause
3,860,535,775,826,466,300
32.248918
93
0.493306
false
drichner/docklr
docklr_tests.py
1
2273
__author__ = 'drichner' """ docklr -- docklr_tests.py Copyright (C) 2014 Dan Richner 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 v...
gpl-2.0
8,067,488,863,393,696,000
27.78481
106
0.6674
false
Rosebotics/pymata-aio
examples/sparkfun_redbot/sparkfun_experiments/Exp5_Bumpers.py
1
2908
#!/usr/bin/python """ Exp5_Bumpers -- RedBot Experiment 5 Now let's experiment with the whisker bumpers. These super-simple switches let you detect a collision before it really happens- the whisker will bump something before your robot crashes into it. This sketch was written by SparkFun Electronics, with l...
gpl-3.0
8,720,228,147,168,475,000
25.436364
95
0.671939
false
pgr-me/metis_projects
04-marijuana/library/utilities.py
1
3623
from nytimesarticle import articleAPI import collections import math import datetime import re import pickle # api keys prasmuss = '7b4597b0dc6845688a8f90c00f3e60b6' peter_gray_rasmussen = '67391c8a5c6c2d8926eb3d9c5d136c59:7:72273330' proton = 'f8c34c7cda7848f997a9c273815d28a9' api = articleAPI(proton) def convert(d...
gpl-3.0
5,287,285,362,401,634,000
35.979592
114
0.645598
false
gmelenka/BraidedCompositeDesign
main.py
1
49822
from kivy.app import App from kivy.lang import Builder from kivy.uix.boxlayout import BoxLayout from kivy.uix.gridlayout import GridLayout from kivy.uix.floatlayout import FloatLayout from kivy.properties import ObjectProperty from kivy.uix.spinner import Spinner from kivy.uix.listview import ListItemButton from kivy....
mit
7,503,996,245,676,990,000
37.383667
164
0.571615
false
indianajohn/ycmd
ycmd/tests/server_utils_test.py
1
1633
# Copyright (C) 2016 ycmd contributors # # This file is part of ycmd. # # ycmd is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ycmd...
gpl-3.0
749,113,430,439,658,800
35.288889
71
0.746479
false
rpetrenko/test-reporter
server/api/common.py
1
1323
# This source code is licensed under the Apache license found in the # LICENSE file in the root directory of this project. import logging from flask_restplus import Api from server import settings from bson import json_util import json log = logging.getLogger(__name__) api = Api(version='1.0', title='Test...
apache-2.0
-776,886,979,894,500,600
23.962264
68
0.643991
false
duanyp1991/purchase-workflow
purchase_requisition_multicurrency/__openerp__.py
1
1212
# -*- coding: utf-8 -*- # # # Author: Yannick Vaucher # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License,...
agpl-3.0
4,557,405,406,151,952,400
30.894737
77
0.665017
false
bolkedebruin/airflow
airflow/hooks/docker_hook.py
1
1156
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
7,498,838,845,523,876,000
38.862069
85
0.762976
false
pplonski/keras2cpp
dump_to_simple_cpp.py
1
3089
import numpy as np np.random.seed(1337) from keras.models import Sequential, model_from_json import json import argparse np.set_printoptions(threshold=np.inf) parser = argparse.ArgumentParser(description='This is a simple script to dump Keras model into simple format suitable for porting into pure C++ model') parser....
mit
5,338,512,930,857,991,000
41.902778
167
0.557462
false
SpatialMetabolomics/maori-upload
webapp/app.py
1
7885
import os from os.path import dirname, exists, isdir, join, splitext import base64 import hmac import hashlib import json import boto3 import tempfile import re import tornado.ioloop import tornado.web from tornado.options import define, options from datetime import datetime as dt import yaml from notify import post_t...
apache-2.0
-8,586,711,336,116,844,000
34.518018
182
0.592137
false
Valloric/ycmd
ycmd/completers/language_server/generic_lsp_completer.py
1
1922
# Copyright (C) 2019 ycmd contributors # # This file is part of ycmd. # # ycmd is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ycmd...
gpl-3.0
7,591,909,427,674,534,000
32.137931
78
0.727888
false
bsmithyman/galoshes
galoshes/meta.py
1
7934
''' Low-level programming constructs for key-value stores Originally developed as part of Zephyr https://zephyr.space/ ''' from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import super from future import s...
mit
-61,783,569,254,275,260
32.761702
113
0.592135
false
anisotropi4/goldfinch
bin/dump-tree.py
1
1613
#!/usr/bin/python3 import xml.etree.cElementTree as ET import sys import argparse parser = argparse.ArgumentParser(description='Strip namespace and a list of xml-tags in a tsv format') parser.add_argument('--path', dest='path', type=str, default='', help='output directory file') parser.add_argume...
mit
1,958,677,056,999,847,400
22.376812
102
0.555487
false
biolink/ontobio
tests/test_enrich.py
1
1478
from ontobio.ontol_factory import OntologyFactory from ontobio.assoc_factory import AssociationSetFactory from ontobio.assocmodel import AssociationSet import logging import random CVP = 'MP:0004084' # cardiomyopathy MUS = 'NCBITaxon:10090' def test_construct(): """ enrichment test build a gene set from ...
bsd-3-clause
8,935,766,011,242,972,000
29.163265
84
0.608254
false
pydio/pydio-sync
src/pydio/res/i18n/html_strings.py
1
9431
def _(a_string): return a_string var_1=_('How can I find my server URL?') var_2=_('The server URL is the adress that you can see in your browser when accessing Pydio via the web.') var_3=_('It starts with http or https depending on your server configuration.') var_4=_('If you are logged in Pydio and you see the last pa...
gpl-3.0
-2,384,637,885,232,840,700
37.493878
184
0.693564
false
Neurita/boyle
boyle/files/utils.py
1
1412
# coding=utf-8 """ Utilities for file management. """ # ------------------------------------------------------------------------------ # Author: Alexandre Manhaes Savio <alexsavio@gmail.com> # # 2015, Alexandre Manhaes Savio # Use this at your own risk! # ----------------------------------------------------------------...
bsd-3-clause
4,066,195,155,547,318,300
20.723077
96
0.550992
false
hguemar/cinder
cinder/api/contrib/admin_actions.py
1
11497
# Copyright 2012 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 applicable law or a...
apache-2.0
-87,235,681,852,157,700
36.449511
79
0.596677
false
litedesk/litedesk-webserver-provision
src/provisioning/models.py
1
20144
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2014, Deutsche Telekom AG - Laboratories (T-Labs) # # 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...
apache-2.0
4,245,768,454,504,376,300
32.186161
90
0.610653
false
davidh-ssec/pyresample
pyresample/test/test_kd_tree.py
1
44711
from __future__ import with_statement import os import sys import six import numpy as np from pyresample import geometry, kd_tree, utils from pyresample.test.utils import catch_warnings if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest class Test(unittest.TestCase): @cl...
lgpl-3.0
5,617,309,494,279,428,000
46.768162
112
0.501666
false
bender-bot/bender
bender/_tests/test_main.py
1
2381
from io import StringIO import pkg_resources import pytest import threading import bender._main from bender.backbones.console import BenderConsole from bender.decorators import backbone_start from bender.testing import VolatileBrain, DumbMessage @pytest.mark.timeout(3.0) def test_main(mock): stdout = StringIO() ...
lgpl-3.0
-8,346,947,514,074,849,000
28.395062
78
0.677866
false
aaltay/beam
sdks/python/apache_beam/runners/portability/spark_runner_test.py
1
6533
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
7,796,007,208,722,939,000
32.849741
77
0.69325
false
gaccardo/buxfer_api
api/reporter.py
1
16970
import os import math from reportlab.pdfgen import canvas from reportlab.graphics.shapes import Drawing from reportlab.graphics.charts.piecharts import Pie from reportlab.graphics.charts.legends import Legend from reportlab.lib.colors import black, red, purple, green, \ maroon, brown, pink, white, HexColor from re...
gpl-2.0
-7,674,272,941,585,014,000
32.537549
81
0.478197
false
stephanie-wang/ray
python/ray/tune/suggest/variant_generator.py
1
8452
import copy import logging import numpy import random from ray.tune import TuneError from ray.tune.sample import sample_from logger = logging.getLogger(__name__) def generate_variants(unresolved_spec): """Generates variants from a spec (dict) with unresolved values. There are two types of unresolved values...
apache-2.0
5,152,314,125,364,362,000
29.846715
78
0.57442
false
mattpap/sympy-polys
sympy/solvers/ode.py
1
115902
""" This module contains dsolve() and different helper functions that it uses. dsolve() solves ordinary differential equations. See the docstring on the various functions for their uses. Note that partial differential equations support is in pde.py. Note that ode_hint() functions have docstrings describing their vari...
bsd-3-clause
-7,464,464,908,759,745,000
40.646425
91
0.579524
false
rwl/PyCIM
CIM14/IEC61968/AssetModels/ToWindingSpec.py
1
6782
# Copyright (C) 2010-2011 Richard Lincoln # # 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, modify, merge, publish...
mit
7,964,606,802,234,008,000
48.867647
328
0.696697
false
walterbender/infoslicer
infoslicer/widgets/Gallery_View.py
1
8660
# Copyright (C) IBM Corporation 2008 from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GObject from gi.repository import GdkPixbuf import os import cPickle import logging from Editable_Textbox import Editable_Textbox from infoslicer.processing.Article_Data import * from ...
gpl-2.0
-250,266,366,728,502,240
45.065217
111
0.600577
false
mrchristine/dbc-notebooks
tools/pyspark_sync/workspace.py
1
12134
import base64 import argparse import json import requests import sys import os import fnmatch WS_LIST = "/workspace/list" WS_STATUS = "/workspace/get-status" WS_MKDIRS = "/workspace/mkdirs" WS_IMPORT = "/workspace/import" WS_EXPORT = "/workspace/export" LS_ZONES = "/clusters/list-zones" error_401 = """ Credentials ar...
apache-2.0
-2,087,793,057,794,017,300
39.178808
120
0.589171
false
tkanemoto/unittest-xml-reporting
xmlrunner/result.py
1
18019
import os import sys import time import traceback import six import re from os import path from six import unichr from six.moves import StringIO from .unittest import TestResult, _TextTestResult # Matches invalid XML1.0 unicode characters, like control characters: # http://www.w3.org/TR/2006/REC-xml-20060816/#chars...
bsd-2-clause
3,852,937,358,608,100,400
33.191651
99
0.571896
false
googleads/google-ads-python
google/ads/googleads/v8/services/services/domain_category_service/transports/base.py
1
3692
# -*- 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
-2,947,684,209,471,778,000
35.92
78
0.660347
false
ask/kamqp
kamqp/client_0_8/basic_message.py
1
3707
# Copyright (C) 2007-2008 Barry Pederson <bp@barryp.org> # # This 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; either # version 2.1 of the License, or (at your option) any later version. # # ...
lgpl-2.1
-81,401,606,623,979,250
29.385246
75
0.642029
false
openearth/aeolis-python
aeolis/gridparams.py
1
6901
'''This file is part of AeoLiS. AeoLiS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. AeoLiS is distributed in the hope that it will...
gpl-3.0
-2,599,561,361,544,794,000
34.947917
114
0.409941
false
jpirko/lnst
lnst/Recipes/ENRT/VlansOverTeamRecipe.py
1
6663
from lnst.Common.Parameters import Param, StrParam from lnst.Common.IpAddress import ipaddress from lnst.Controller import HostReq, DeviceReq, RecipeParam from lnst.Recipes.ENRT.BaseEnrtRecipe import BaseEnrtRecipe from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import ( OffloadSubConfigMixin) from lnst.R...
gpl-2.0
2,490,923,806,000,048,600
38.660714
75
0.590275
false
sony/nnabla
python/src/nnabla/utils/nnp_graph.py
1
10867
# Copyright 2018,2019,2020,2021 Sony Corporation. # Copyright 2021 Sony Group Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
apache-2.0
1,661,325,578,871,901,400
34.168285
105
0.594092
false
bwohlberg/sporco
tests/admm/test_tvl2.py
1
6275
from __future__ import division from builtins import object from past.utils import old_div import numpy as np from sporco.admm import tvl2 import sporco.metric as sm class TestSet01(object): def setup_method(self, method): np.random.seed(12345) self.D = np.random.randn(16, 15) self.Dc =...
bsd-3-clause
3,366,329,822,207,616,500
28.050926
77
0.499602
false
jrwdunham/old-webapp
onlinelinguisticdatabase/lib/base.py
1
1441
# Copyright (C) 2010 Joel Dunham # # This file is part of OnlineLinguisticDatabase. # # OnlineLinguisticDatabase 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 o...
gpl-3.0
-2,711,575,708,464,094,700
35.025
77
0.739764
false
denz/flask_introspect
test/test_base_view.py
1
20172
from types import NoneType from collections import OrderedDict as odict import unittest from pprint import pprint from flask.ext.introspect import TreeView, Tree, DictViewMixin, ObjectViewMixin, NOTEXIST class O(object): def __init__(self, **kwargs): self.__dict__.update(kwargs) class O1(object): de...
bsd-3-clause
-2,047,304,181,324,625,700
40.766046
131
0.45925
false
MirkoRossini/pybuilder_django_enhanced_plugin
src/integrationtest/python/django_test_creates_report_files_tests.py
1
1205
__author__ = 'Mirko Rossini' import unittest import shutil from integrationtest_support import IntegrationTestSupport from pybuilder.errors import BuildFailedException from common import BUILD_FILE_TEMPLATE class DjangoEnhancedPluginTest(IntegrationTestSupport): def test_django_test(self): # self.set_tmp...
bsd-3-clause
-743,992,517,311,579,300
39.166667
117
0.691286
false
eduardoneira/SistemasDistribuidos_TPFinal
CentroMonitoreoCiudad/FaceRecognizer/modules/old_feature_matcher.py
1
4628
#!/bin/python3 import numpy as np import cv2 import base64 import pdb from tkinter import * from matplotlib import pyplot as plt class FeatureMatcher: __PORC_DISTANCE = 0.7 def __init__(self,feature_extractor='SURF',upright=True,min_match_count=10,threshold=400): self.MIN_MATCH_COUNT = min_match_count ...
gpl-3.0
3,252,840,999,377,199,600
36.942623
123
0.645635
false
mpdehaan/camp
camp/core/scale.py
1
3292
""" Copyright 2016, Michael DeHaan <michael.dehaan@gmail.com> 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...
apache-2.0
5,020,501,145,689,694,000
29.766355
89
0.536148
false
ingkebil/trost
scripts/process_xls.py
1
1832
#!/usr/bin/python # -*- coding: utf8 -*- import os import sys import math import xlrd import data_objects as DO import cast """ Excel cell type decides which cast function to use. """ CAST_FUNC = {xlrd.XL_CELL_EMPTY: str, xlrd.XL_CELL_TEXT: cast.cast_str, xlrd.XL_CELL_NUMBER: float, ...
gpl-2.0
-938,439,755,346,230,800
30.050847
97
0.566048
false
induane/stomp.py3
stomp/test/threading_test.py
1
3873
try: from queue import Queue, Empty, Full except ImportError: from Queue import Queue, Empty, Full import threading import sys import time import unittest import stomp from testutils import * class MQ(object): def __init__(self): self.connection = stomp.Connection(get_standard_host(), 'admin', 'p...
apache-2.0
8,511,249,930,972,715,000
30.745902
84
0.46992
false
Dziolas/invenio
modules/bibformat/lib/elements/bfe_keywords.py
1
2158
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio 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-2.0
7,402,563,837,806,346,000
34.966667
85
0.616775
false
oudalab/phyllo
phyllo/extractors/frodebertusDB.py
1
2443
import sqlite3 import urllib from urllib.request import urlopen from bs4 import BeautifulSoup, NavigableString import nltk nltk.download('punkt') from nltk import sent_tokenize def parseRes2(soup, title, url, cur, author, date, collectiontitle): chapter = '-' sen = "" num = 1 [e.extract() for e in s...
apache-2.0
8,485,862,798,001,893,000
31.573333
103
0.548506
false
DTOcean/dtocean-core
tests/test_data_definitions_simplepie.py
1
2601
import pytest import matplotlib.pyplot as plt from aneris.control.factory import InterfaceFactory from dtocean_core.core import (AutoFileInput, AutoFileOutput, AutoPlot, Core) from dtocean_core.data import CoreMetaData from d...
gpl-3.0
-4,399,417,363,574,288,400
23.308411
63
0.522107
false
anrl/gini3
frontend/src/gbuilder/UI/Edge.py
1
4871
"""The graphical representation of connections of nodes""" import math from PyQt4 import QtCore, QtGui from Core.Item import * from Core.globals import options, mainWidgets, defaultOptions class Edge(QtGui.QGraphicsLineItem, Item): def __init__(self, startItem, endItem, parent=None, scene=None): ...
mit
1,296,057,378,893,043,700
29.836601
133
0.554917
false
seanjh/CanadianInsiderTransactions
__main__.py
1
1156
"""Canadian Insider Transactions. Usage: sedi_transactions <issuer_num>... Options: -h --help Show this screen. --version Show version. """ import os from docopt import docopt from sedi_transactions.transactions import SEDIView OUTPUT_PATH = os.path.abspath( os.path.join(os.path.abspath(__f...
mit
6,034,782,397,232,671,000
25.906977
76
0.595156
false
eyp-developers/statistics
statistics/migrations/0044_topic_overview_link.py
1
2256
# Generated by Django 2.0.1 on 2018-07-25 07:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('statistics', '0043_merge_20180207_1821'), ] operations = [ migrations.AddField( model_name='session', name='topic_ov...
gpl-3.0
-440,385,167,275,794,300
58.368421
864
0.542996
false
takmid/inasafe
safe_qgis/test_impact_calculator.py
1
8436
""" InaSAFE Disaster risk assessment tool developed by AusAid - **Impact calculator test suite.** Contact : ole.moller.nielsen@gmail.com .. 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 Found...
gpl-3.0
-7,854,523,289,256,302,000
38.420561
79
0.615695
false
f-prettyland/angr
angr/state_plugins/fast_memory.py
1
8768
import logging import claripy from ..storage.memory import SimMemory from ..errors import SimFastMemoryError l = logging.getLogger("angr.state_plugins.fast_memory") l.setLevel(logging.DEBUG) class SimFastMemory(SimMemory): def __init__(self, memory_backer=None, memory_id=None, endness=None, contents=None, width...
bsd-2-clause
-5,351,947,909,110,622,000
37.28821
171
0.591811
false
JohnLunzer/flexx
flexx/event/__init__.py
1
11458
""" The event module provides a simple system for properties and events, to let different components of an application react to each-other and to user input. In short: * The :class:`HasEvents <flexx.event.HasEvents>` class provides objects that have properties and can emit events. * There are three decorators to cr...
bsd-2-clause
7,249,233,369,221,251,000
32.211594
82
0.710159
false
timothycrosley/thedom
thedom/document.py
1
6794
''' Document.py Provides elements that define the html document being served to the client-side Copyright (C) 2015 Timothy Edmund Crosley 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 Softwar...
gpl-2.0
7,022,688,719,562,299,000
31.507177
104
0.584781
false
jiyfeng/RSTParser
model.py
1
3945
## model.py ## Author: Yangfeng Ji ## Date: 09-09-2014 ## Time-stamp: <yangfeng 11/05/2014 20:44:25> ## Last changed: umashanthi 11/19/2014 """ As a parsing model, it includes the following functions 1, Mini-batch training on the data generated by the Data class 2, Shift-Reduce RST parsing for a given text sequence 3...
mit
-4,449,401,833,782,390,000
30.56
93
0.570089
false
sherpaman/MolToolPy
bin/hbond_stat.py
1
1064
#!/usr/bin/env python from sys import argv,stderr #Prende in input il nome di un file che contiene, i dati di coppie di residui per ogni frame. #Ogni riga ha il seguente formato: #frame atom1_id res1_name res1_id atom1_name atom2_id res2_name res2_id atom2_name ........... #0 8661 T 273 N3 ...
gpl-2.0
-7,142,410,232,880,668,000
23.159091
102
0.575729
false
release-engineering/releng-sop
tests/test_koji_clone_tag.py
1
4609
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests of KojiCloneTagForReleaseMilestone script. """ import unittest import os import sys from mock import Mock, patch DIR = os.path.dirname(__file__) sys.path.insert(0, os.path.join(DIR, "..")) from releng_sop.common import Environment, Release # noqa from releng_sop...
mit
-7,335,552,442,738,275,000
33.395522
114
0.602734
false
sebp/scikit-survival
sksurv/preprocessing.py
1
3945
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
gpl-3.0
-6,087,449,575,147,389,000
31.073171
91
0.628897
false
mikesname/ehri-collections
ehriportal/portal/migrations/0012_auto__add_field_authority_languages__add_field_authority_scripts.py
1
17152
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Authority.languages' db.add_column('portal_authority', 'languages', self.gf('jsonfield.fie...
mit
2,309,109,972,575,588,000
80.67619
174
0.543027
false
jtbattle/wangemu
wvdutil/wvdHandler_base.py
1
4196
# Purpose: template class for file handler for the wvdutil.py program # Author: Jim Battle # # Version: 1.0, 2018/09/15, JTB # massive restructuring of the old wvdutil code base # Version: 1.1, 2021/06/19, JTB # get rid of bilingualism (aka python2 support); # convert to inline type hints instead of type h...
mit
-7,556,717,784,087,207,000
39.346154
87
0.602717
false
endlessm/chromium-browser
build/win/reorder-imports.py
4
4054
#!/usr/bin/env python # Copyright 2014 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. import glob import optparse import os import shutil import subprocess import sys sys.path.insert(0, os.path.join(os.path.dirname(__fil...
bsd-3-clause
5,867,402,285,721,175,000
41.229167
78
0.694869
false
qedsoftware/commcare-hq
corehq/apps/callcenter/fixturegenerators.py
1
4228
from xml.etree import ElementTree from datetime import datetime import pytz from corehq.apps.callcenter.app_parser import get_call_center_config_from_app from casexml.apps.phone.models import OTARestoreUser from corehq.util.soft_assert import soft_assert from corehq.util.timezones.conversions import ServerTime from di...
bsd-3-clause
1,972,465,104,134,683,000
31.274809
106
0.62228
false
mikemhenry/arcade
examples/sprite_tiled_map.py
1
6561
""" Load a map stored in csv format, as exported by the program 'Tiled.' Artwork from http://kenney.nl """ import arcade SPRITE_SCALING = 0.5 SCREEN_WIDTH = 800 SCREEN_HEIGHT = 600 # How many pixels to keep as a minimum margin between the character # and the edge of the screen. VIEWPORT_MARGIN = 40 RIGHT_MARGIN = 1...
mit
-5,013,089,162,620,566,000
30.242857
76
0.53757
false
scottrice/Ice
tests/steam_grid_updater_tests.py
1
2915
import os import tempfile import unittest from mockito import * from pysteam import grid from pysteam import shortcuts from ice import model from ice import roms from ice import steam_grid_updater from testinfra import fixtures class SteamGridUpdaterTests(unittest.TestCase): def setUp(self): self.steam_fix...
mit
7,511,073,260,580,224,000
37.866667
124
0.723499
false
anderspitman/scikit-bio
skbio/sequence/distance.py
1
5233
""" Sequence distance metrics (:mod:`skbio.sequence.distance`) ========================================================== .. currentmodule:: skbio.sequence.distance This module contains functions for computing distances between scikit-bio ``Sequence`` objects. These functions can be used directly or supplied to other...
bsd-3-clause
-1,355,334,489,428,729,900
28.398876
79
0.623543
false
kennedyshead/home-assistant
homeassistant/components/media_player/__init__.py
1
39109
"""Component to interface with various media players.""" from __future__ import annotations import asyncio import base64 import collections from contextlib import suppress import datetime as dt import functools as ft import hashlib import logging import secrets from typing import final from urllib.parse import urlpars...
apache-2.0
7,419,448,609,892,268,000
30.31225
105
0.620727
false
Bdanilko/EdPy
src/lib/program.py
1
21793
#!/usr/bin/env python2 # * **************************************************************** ** # File: program.py # Requires: Python 2.7+ (but not Python 3.0+) # Note: For history, changes and dates for this file, consult git. # Author: Brian Danilko, Likeable Software (brian@likeablesoftware.com) # Copyright 2015-2017...
gpl-2.0
-59,243,137,877,478,696
33.757576
104
0.581976
false
kevinkellyspacey/standalone-dell-recovery
Dell/recovery_xml.py
1
5532
#!/usr/bin/python3 # -*- coding: utf-8 -*- # # «recovery_xml» - Helper Class for parsing and using a bto.xml # # Copyright (C) 2010-2011, Dell Inc. # # Author: # - Mario Limonciello <Mario_Limonciello@Dell.com> # # This is free software; you can redistribute it and/or modify it under # the terms of the GNU General Pub...
gpl-2.0
-9,137,183,234,520,056,000
34.677419
82
0.565099
false
BarrelfishOS/barrelfish
tools/harness/machines/gem5.py
1
5282
########################################################################## # Copyright (c) 2012-2016 ETH Zurich. # All rights reserved. # # This file is distributed under the terms in the attached LICENSE file. # If you do not find this file, copies can be found by writing to: # ETH Zurich D-INFK, Universitaetstr 6, CH...
mit
70,575,520,908,050,710
37.554745
115
0.639152
false
sbc100/yapf
yapf/yapflib/format_decision_state.py
1
38486
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
1,545,245,249,763,236,600
37.06726
80
0.644364
false
demisto/content
Packs/ThinkstCanary/Integrations/ThinkstCanary/ThinkstCanary_test.py
1
3171
import demistomock as demisto MOCK_PARAMS = { 'access-key': 'fake_access_key', 'secret-key': 'fake_access_key', 'server': 'http://123-fake-api.com/', 'unsecure': True, 'proxy': True } def test_fetch_incidents(mocker, requests_mock): """ Given: An existing last run time. When: Running...
mit
-3,411,973,804,248,822,300
47.784615
120
0.62567
false
rajarsheem/libsdae-autoencoder-tensorflow
deepautoencoder/stacked_autoencoder.py
1
6154
import numpy as np import deepautoencoder.utils as utils import tensorflow as tf allowed_activations = ['sigmoid', 'tanh', 'softmax', 'relu', 'linear'] allowed_noises = [None, 'gaussian', 'mask'] allowed_losses = ['rmse', 'cross-entropy'] class StackedAutoEncoder: """A deep autoencoder with denoising capability"...
mit
-4,848,992,055,917,937,000
41.441379
79
0.524862
false
foglamp/FogLAMP
python/foglamp/services/core/api/plugins/discovery.py
1
4032
# -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END import logging import json from aiohttp import web from foglamp.common.plugin_discovery import PluginDiscovery from foglamp.services.core.api.plugins import common from foglamp.common import logger from foglamp.services.core....
apache-2.0
2,274,135,026,468,009,700
44.818182
155
0.624008
false