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
boegel/easybuild-easyblocks
easybuild/easyblocks/t/trilinos.py
1
14884
## # Copyright 2009-2020 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://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
-7,989,532,037,056,967,000
48.122112
119
0.605079
false
ndonegan/oz
oz/Fedora.py
1
6739
# Copyright (C) 2010,2011 Chris Lalancette <clalance@redhat.com> # Copyright (C) 2012-2017 Chris Lalancette <clalancette@gmail.com> # 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; # ve...
lgpl-2.1
-5,216,823,587,740,232,000
41.651899
190
0.591334
false
alejo8591/maker
core/dashboard/urls.py
1
1121
# encoding: utf-8 # Copyright 2013 maker # License """ Core module Dashboard URLs """ from django.conf.urls.defaults import patterns, url urlpatterns = patterns('maker.core.dashboard.views', url(r'^(\.(?P<response_format>\w+))?$', 'index', name='core_dashboard_index'), # Widgets ...
mit
-4,105,597,949,055,782,400
39.035714
105
0.578055
false
braintree/braintree_python
tests/unit/test_us_bank_account.py
1
2169
from tests.test_helper import * from datetime import date from braintree.us_bank_account import UsBankAccount from braintree.us_bank_account_verification import UsBankAccountVerification class TestUsBankAccount(unittest.TestCase): def test_constructor(self): attributes = { "last_four": "1234", ...
mit
6,640,900,374,676,977,000
42.38
117
0.636699
false
GreatFruitOmsk/screenly-ose
lib/backup_helper.py
1
1182
import tarfile from datetime import datetime from os import path, getenv, remove import sh directories = ['.screenly', 'screenly_assets'] default_archive_name = "screenly-backup" static_dir = "screenly/static" def create_backup(name=default_archive_name): home = getenv('HOME') archive_name = "{}-{}.tar.gz".f...
gpl-2.0
1,541,416,736,334,106,600
27.142857
83
0.62775
false
klaricch/Transposons2
scripts/fix_cov.py
1
1053
#!/usr/bin/env python # this script outputs coverage per strain in a file that can be merged with T_kin_C_matrix_full.txt # USE: cov_fix.py import re infile="/lscr2/andersenlab/kml436/git_repos2/Transposons2/results/kinship/T_kin_C_matrix_full.txt" cov_file="/lscr2/andersenlab/kml436/git_repos2/Transposons2/results/k...
mit
-86,573,598,336,548,620
24.095238
103
0.712251
false
donK23/pyData-Projects
EventDec/event_dec/main.py
1
4294
#!/usr/bin/python import numpy as np import pickle import os from model import Model def get_input(): """ Ask user for inputs about event: Title, Main Topic, Distance to Location. Checks for correct types and value ranges. If not correct, restarts asking 5 times. :return: Tuple(Str, Int, Int) => "Tit...
apache-2.0
3,076,795,196,426,219,500
33.36
123
0.547741
false
ezhuk/aws-tools
autoscale/configure_auto_scaling.py
1
6244
#!/usr/bin/env python # Copyright (c) 2013 Eugene Zhuk. # Use of this source code is governed by the MIT license that can be found # in the LICENSE file. """Configures AWS Auto Scaling. This script is intended to simplify the process of setting up AWS Auto Scaling to automatically manage system capacity based on aver...
mit
-5,531,476,735,037,715,000
35.51462
80
0.626361
false
JulianEberius/Synonyms.tmbundle
Support/bin/pysaurus.py
1
2343
import subprocess, os, sys class Proposal(object): def __init__(self, name="", _type=None): super(Proposal, self).__init__() self.name = name self.type = _type def __repr__(self): t_string = self.type if self.type else "NoType" return t_string+": "+self.name def _filter_and_to_dict(out_line...
mit
1,299,747,679,838,129,000
26.255814
81
0.567648
false
istresearch/readthedocs.org
readthedocs/doc_builder/python_environments.py
1
8279
import logging import os import shutil from django.conf import settings from readthedocs.builds.constants import LATEST from readthedocs.doc_builder.config import ConfigWrapper from readthedocs.doc_builder.loader import get_builder_class from readthedocs.projects.constants import LOG_TEMPLATE log = logging.getLogger...
mit
6,917,855,278,388,180,000
32.654472
88
0.524822
false
battlemidget/juju-charm-dokuwiki
reactive/dokuwiki.py
1
2221
from charms.reactive import ( hook, when, only_once, is_state ) import os.path as path from charmhelpers.core import hookenv from charmhelpers.core.host import service_restart from charmhelpers.core.templating import render from subprocess import call from charms.layer import nginx, dokuwiki, php conf...
mit
3,130,398,452,329,288,700
27.844156
79
0.607834
false
MatthewWilkes/reportlab
demos/odyssey/dodyssey.py
1
7622
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details __version__=''' $Id$ ''' __doc__='' #REPORTLAB_TEST_SCRIPT import sys, copy, os from reportlab.platypus import * _NEW_PARA=os.environ.get('NEW_PARA','0')[0] in ('y','Y','1') _REDCAP=int(os.environ.get('REDCAP','0')) _CALLBACK=os.environ.ge...
bsd-3-clause
5,892,387,975,211,861,000
30.110204
104
0.581081
false
quantumlib/ReCirq
recirq/qaoa/experiments/run-optimization.py
1
3558
import datetime from recirq.qaoa.experiments.optimization_tasks import ( OptimizationAlgorithm, OptimizationTask, collect_optimization_data) from recirq.qaoa.experiments.problem_generation_tasks import ( HardwareGridProblemGenerationTask, SKProblemGenerationTask, ThreeRegularProblemGenerationTask) def ma...
apache-2.0
-4,561,343,441,696,085,000
37.673913
76
0.51321
false
Coread/channels
tests/test_sessions.py
1
13015
from __future__ import unicode_literals from django.conf import settings from django.test import override_settings from channels import DEFAULT_CHANNEL_LAYER, channel_layers from channels.message import Message from channels.sessions import ( channel_and_http_session, channel_session, enforce_ordering, http_sessi...
bsd-3-clause
-6,608,419,672,604,303,000
32.630491
111
0.590088
false
rfleissner/ChEsher
py/ui/uiChEsher.py
1
3772
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'uiChEsher.ui' # # Created: Sat May 06 23:31:14 2017 # by: PyQt4 UI code generator 4.11.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attr...
gpl-2.0
-2,557,807,808,041,299,500
43.904762
117
0.698568
false
vponomaryov/rally
tests/functional/test_cli_info.py
1
4695
# Copyright 2013: Mirantis 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 b...
apache-2.0
-449,528,375,834,169,000
38.788136
78
0.66262
false
aziele/alfpy
tests/test_distmatrix.py
1
4612
import numpy as np import os import unittest from alfpy import word_distance from alfpy.utils import distmatrix from . import utils class TestDistMatrix(unittest.TestCase): def setUp(self): id_list = ['seq1', 'seq2', 'seq3'] data = np.array([[0, 0.3531587, 0.35509333], ...
mit
2,707,070,638,536,205,300
32.179856
74
0.516262
false
Urokhtor/AeonEngine
World/Scene.py
1
2258
class Scene: """ Scene is the base class for playable environments, like exteriors, interiors and the world map. The interface defines methods that are called in different situations, such as entering a scene, or leaving a scene which allows the users to define things like loading and unload...
gpl-3.0
6,049,783,615,087,823,000
34.857143
110
0.647476
false
jacksonicson/paper.IS2015
control/Control/src/virtual/util.py
1
2155
import conf_nodes import libvirt # Established connections connections = {} def connect(node): # Check if connection exists if node in connections: return connections[node] try: print 'connecting with %s' % node conn_str = "qemu+ssh://root@%s/system" % (node) ...
mit
3,552,721,981,868,058,000
24.666667
63
0.570766
false
forcedotcom/distributions
distributions/tests/test_random.py
1
10178
# Copyright (c) 2014, Salesforce.com, Inc. 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 copyright # notice, this list of conditions...
bsd-3-clause
-5,732,946,164,069,244,000
30.220859
78
0.624582
false
espressif/esp-idf
docs/idf_extensions/gen_defines.py
1
3181
# Sphinx extension to integrate defines into the Sphinx Build # # Runs after the IDF dummy project has been built # # Then emits the new 'idf-defines-generated' event which has a dictionary of raw text define values # that other extensions can use to generate relevant data. import glob import os import pprint import r...
apache-2.0
860,299,055,666,869,500
36.869048
136
0.62056
false
rockychen-dpaw/oim-cms
registers/migrations/0003_auto_20161003_2217.py
1
7301
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2016-10-03 14:17 from __future__ import unicode_literals from django.db import migrations, models import registers.models class Migration(migrations.Migration): dependencies = [ ('registers', '0002_auto_20160919_1303'), ] operations = [ ...
apache-2.0
6,329,180,221,090,065,000
57.408
997
0.632927
false
knowledgegraph/schema
scripts/fb15k_schema/fb15k_schema.py
1
1681
#!/usr/bin/python -uB # -*- coding: utf-8 -*- # Classes of methods base_vers = ['TransE', 'ScalE'] scaltrans_vers = ['ScalTransE'] xi_vers = ['XiTransE', 'XiScalE'] semixi_vers = ['XiScalTransSE', 'XiTransScalSE'] xiscaltrans_vers = ['XiScalTransE'] simple_method_set = base_vers + xi_vers #+ scaltrans_vers + semixi_v...
gpl-2.0
4,005,579,082,999,639,600
35.543478
184
0.610351
false
GitSomeCode/RecipeApp
Proj/initial.py
1
8001
#!/usr/bin/env python import os import sys import django import random randomUser = lambda: get_user_model().objects.all()[random.randrange(0, get_user_model().objects.count())] rr = lambda x, y: random.randrange(x, y) def endall(): # Delete Snippets. for obj in Recipe.objects.all(): obj.delete() # Delete U...
gpl-2.0
5,624,774,208,467,792,000
36.38785
319
0.591801
false
yingcuhk/LeetCode
Algorithms/#1 Two Sum/PythonCode.py
1
1048
""" Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution. Example: Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9, return [0, 1]. """ class Solution(object): def t...
mit
-6,106,757,600,949,578,000
25.897436
105
0.51145
false
BoldingBruggeman/gotm
gui.py/xmlplot/data/gotmtext.py
1
35659
import os, StringIO import numpy import xmlstore.xmlstore import xmlplot.common class LinkedFileVariableStore(xmlplot.common.VariableStore,xmlstore.datatypes.DataFileEx): # XML store-derived class for storing (cached) metadata of a data file, # such as coordinate ranges. # This is implemented as XML sto...
gpl-2.0
-3,113,056,977,608,345,600
44.83419
236
0.589164
false
pointhi/searx
tests/unit/engines/test_wolframalpha_api.py
1
6796
# -*- coding: utf-8 -*- from collections import defaultdict import mock from requests import Request from searx.engines import wolframalpha_api from searx.testing import SearxTestCase class TestWolframAlphaAPIEngine(SearxTestCase): def test_request(self): query = 'test_query' dicto = defaultdict(...
agpl-3.0
-37,067,882,538,228,990
40.439024
106
0.537228
false
leleopard/pyXPArduino
avrdude/__init__.py
1
4001
""" WORKING COMMAND: ./avrdude-x64 -p ATmega2560 -c wiring -P /dev/ttyACM0 -b 115200 -U flash:w:../XPArduinoSerial.ino.mega.hex -C ./avrdude.conf -D Copyright 2011 Ryan Fobel This file is part of dmf_control_board. dmf_control_board is free software: you can redistribute it and/or modify it under the terms of the ...
gpl-3.0
7,078,639,636,861,579,000
34.40708
127
0.613097
false
MarvinT/pyMNE
pyMNE.py
1
6335
import scipy.optimize as opt import numpy as np def log_loss(p, stim, resp, order): #get number of samples and dimensionality of stimulus Nsamples, Ndim = stim.shape resp = np.reshape(resp, (-1)) #unpack p: (var names match names in Fitzgerald paper) a = p[0] h = p[1:Ndim+1].T #ca...
bsd-2-clause
-265,933,570,939,209,700
33.813187
148
0.567956
false
diego-d5000/MisValesMd
env/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/schema.py
1
3635
import psycopg2 from django.db.backends.base.schema import BaseDatabaseSchemaEditor class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): sql_create_sequence = "CREATE SEQUENCE %(sequence)s" sql_delete_sequence = "DROP SEQUENCE IF EXISTS %(sequence)s CASCADE" sql_set_sequence_max = "SELECT setv...
mit
1,921,185,768,548,475,400
40.764706
110
0.444292
false
jacquev6/MockMockMock
MockMockMock/tests/expectation_sequence.py
1
1736
# coding: utf8 # Copyright 2013-2015 Vincent Jacques <vincent@vincent-jacques.net> import unittest import MockMockMock class ExpectationSequenceTestCase(unittest.TestCase): def setUp(self): super(ExpectationSequenceTestCase, self).setUp() self.mocks = MockMockMock.Engine() self.mock = s...
mit
-7,433,056,021,587,685,000
33.72
167
0.657834
false
FrankNagel/qlc
src/webapp/quanthistling/scripts/annotations/annotations_for_shell1987.py
1
7100
# -*- coding: utf8 -*- import sys, os sys.path.append(os.path.abspath('.')) import re from operator import attrgetter import difflib # Pylons model init sequence import pylons.test import logging from quanthistling.config.environment import load_environment from quanthistling.model.meta import Sessi...
gpl-3.0
-5,964,221,520,022,913,000
36.182796
162
0.617606
false
Sakiut/FalltoSkyBot
cogs/vote.py
1
4199
# -*- coding: utf-8 -*- import asyncio import discord from discord.ext import commands from libraries.library import * class Vote: def __init__(self,bot): self.bot = bot self.VoteState = None self.Mess = None self.Requester = None self.subject = None self.Voters =...
agpl-3.0
2,839,677,344,347,168,000
37.220183
141
0.545978
false
GuildMasterInfinite/OpenGL-Loader-Generator
Command.py
1
1314
from Parameter import Parameter class Command: def __init__(self, commandTag): protoTag = commandTag.find("proto") # First we need to extract the return type. returnTag = protoTag.find("ptype") if returnTag is None: self.returnType = protoTag.text.str...
mit
5,591,670,833,149,112,000
27.2
68
0.570776
false
candlepin/subscription-manager
test/cli_command_test/test_import_cert.py
1
1647
# -*- coding: utf-8 -*- import os import sys from ..test_managercli import TestCliCommand from subscription_manager import managercli from mock import patch, Mock class TestImportCertCommand(TestCliCommand): command_class = managercli.ImportCertCommand def setUp(self): super(TestImportCertCommand,...
gpl-2.0
-5,633,443,298,836,114,000
31.94
84
0.616879
false
jbaayen/sympy
sympy/logic/boolalg.py
1
7565
"""Boolean algebra module for SymPy""" from sympy.core import Basic, Function, sympify, Symbol from sympy.utilities import flatten class BooleanFunction(Function): """Boolean function is a function that lives in a boolean space It is used as base class for And, Or, Not, etc. """ pass class And(Boolea...
bsd-3-clause
-5,416,354,216,801,459,000
28.096154
86
0.566689
false
rtfm-ctf/rtfmapi
modules/crypto/adfgx.py
1
2183
from rtfmapi.modules.crypto.base import Cipher from rtfmapi.modules.crypto.columnartransposition import ColTrans from rtfmapi.modules.crypto.polybius import PolybiusSquare #################################################################################### class ADFGX(Cipher): """The ADFGX Cipher has a key consist...
gpl-2.0
6,201,184,207,538,099,000
52.243902
114
0.636738
false
redhat-cip/hardware
hardware/smart_utils_info.py
1
2135
# 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
-615,581,868,645,036,200
44.425532
79
0.694145
false
jkyeung/XlsxWriter
xlsxwriter/test/comparison/test_chart_combined08.py
1
2754
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
bsd-2-clause
569,571,752,213,279,550
32.585366
79
0.435004
false
GoogleCloudPlatform/stackdriver-metrics-export
get_timeseries/config.py
1
1308
#!/usr/bin/env python # Copyright 2019 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-682,097,167,399,468,000
28.088889
74
0.772171
false
geraldoandradee/pytest
_pytest/python.py
1
72287
""" Python test discovery, setup and run of test functions. """ import py import inspect import sys import pytest from _pytest.main import getfslineno from _pytest.mark import MarkDecorator, MarkInfo from _pytest.monkeypatch import monkeypatch from py._code.code import TerminalRepr import _pytest cutdir = py.path.loca...
mit
4,635,053,748,566,202,000
37.146174
95
0.593329
false
Karel-van-de-Plassche/PF2q
pf2q/tools.py
1
9139
#! /usr/bin/env python # -*- coding: utf-8 -*- """ This module contains tools miscellaneous tools used throughout the PF2q module. It also contains some deprecated functions that you can use at your own risk. @author: Karel van de Plassche @licence: GPLv3 """ import os import warnings from math import ceil import num...
gpl-3.0
2,472,068,732,355,244,000
32.973978
136
0.577197
false
Robpol86/FlashAirMusic
tests/test_convert_discover.py
1
6956
"""Test functions in module.""" import json import os import time import pytest from mutagen.id3 import COMM, ID3 from flash_air_music.convert import discover, id3_flac_tags from tests import HERE @pytest.mark.parametrize('mode', ['no target', 'no prev metadata', 'st', 'ss', 'tt', 'ts', 'up to date']) def test_son...
mit
1,045,822,380,721,146,800
38.078652
116
0.63916
false
pscedu/slash2-stable
slash2/utils/tsuite2/slash2_tests/citrus_tests/nested_directories.py
1
2102
# %PSCGPL_START_COPYRIGHT% # ----------------------------------------------------------------------------- # Copyright (c) 2009-2013, Pittsburgh Supercomputing Center (PSC). # # 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 # ...
isc
9,162,428,934,181,127,000
28.194444
79
0.628449
false
StuartMacKay/checklists_scrapers
checklists_scrapers/tests/spiders/worldbirds/test_checklist_parser.py
1
7400
"""Tests for parsing the WorldBirds page containing the checklist.""" from datetime import datetime from unittest import TestCase from checklists_scrapers.spiders import DOWNLOAD_FORMAT, DOWNLOAD_LANGUAGE from checklists_scrapers.spiders.worldbirds_spider import ChecklistParser from checklists_scrapers.tests.utils imp...
bsd-3-clause
-7,731,736,121,967,977,000
35.453202
108
0.543378
false
koenedaele/pyramid_skosprovider
tests/test_functional.py
1
14118
# -*- coding: utf8 -*- from __future__ import unicode_literals from pyramid.config import Configurator from pyramid.compat import ( ascii_native_, string_types ) import json from webtest import TestApp import unittest from .fixtures.data import ( trees ) def skosmain(global_config, **settings): ...
mit
-6,984,866,525,213,781,000
35.293059
79
0.576215
false
speed-of-light/pyslider
lib/auto/match_do.py
1
1715
import numpy as np from lib.exp.base import ExpCommon from lib.exp.prepare import Prepare from lib.exp.matching import Matcher from lib.exp.evaluator.ground_truth import GroundTruth from lib.exp.evaluator.pair_evaluator import PairEvaluator class MatchDo(ExpCommon): """ Provide a simple way to rundown """...
agpl-3.0
-2,220,980,100,337,743,400
29.625
67
0.594169
false
nugget/python-insteonplm
insteonplm/messages/allLinkCleanupFailureReport.py
1
1428
"""INSTEON Message All-LinkCleanup Failup Report.""" from insteonplm.messages.message import Message from insteonplm.constants import ( MESSAGE_ALL_LINK_CEANUP_FAILURE_REPORT_0X56, MESSAGE_ALL_LINK_CEANUP_FAILURE_REPORT_SIZE, ) from insteonplm.address import Address class AllLinkCleanupFailureReport(Message):...
mit
-2,818,914,909,697,256,400
29.382979
74
0.656162
false
vispeal/VoteHelper
weibonews/weibonews/utils/db/format.py
1
1175
''' Created on Nov 19, 2013 @author: fli ''' import re from weibonews.utils.format import dict2PropertyTable _CONN_RE = re.compile(r"(?P<hosts>(?P<host>[A-Z0-9_.-]+)(?P<portpart>:(?P<port>\d+))?(?P<repls>(?P<repl>,[A-Z0-9_.-]+(:\d+)?)*))/(?P<db>\w+)", re.IGNORECASE) def parse_conn_string(conn_str): ''' parse a ...
gpl-2.0
-7,513,630,680,946,887,000
26.97619
157
0.562553
false
ArcherSys/ArcherSys
Lib/distutils/dist.py
1
149498
<<<<<<< HEAD <<<<<<< HEAD """distutils.dist Provides the Distribution class, which represents the module distribution being built/installed/distributed. """ import sys, os, re from email import message_from_file try: import warnings except ImportError: warnings = None from distutils.errors import * from dis...
mit
4,541,007,931,605,223,000
39.187634
82
0.580991
false
google/data-driven-discretization-1d
pde_superresolution/duckarray_test.py
1
2487
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-93,812,057,060,908,220
34.528571
80
0.673904
false
boh1996/LectioAPI
scrapers/subject_list.py
1
1386
#!/usr/bin/python # -*- coding: utf8 -*- from bs4 import BeautifulSoup as Soup import urls import re import proxy import functions def subject_list ( start, end, school_id ): increase = 1 subjects = [] cards = [] for code in range(0, end-start+1): cards.append(start + (code*increase)) for code in cards: u...
mit
-1,715,484,656,402,561,800
25.169811
128
0.637807
false
ccnmtl/envirocon
envirocon/envirocon_main/tests/test_models.py
1
1200
from datetime import datetime from django.contrib.auth.models import User from django.test import TestCase from envirocon.envirocon_main.models import GroundWorkClass class TestGroundWorkClassModels(TestCase): def setUp(self): self.gwc = GroundWorkClass() def test_gwc_init(self): self.assert...
gpl-2.0
-8,010,019,601,212,741,000
33.285714
63
0.633333
false
labase/activlets
src/test/test_model.py
1
6983
#! /usr/bin/env python # -*- coding: UTF8 -*- # Este arquivo é parte do programa Activlets # Copyright 2013-2015 Carlo Oliveira <carlo@nce.ufrj.br>, # `Labase <http://labase.selfip.org/>`__; `GPL <http://is.gd/3Udt>`__. # # Activlets é um software livre; você pode redistribuí-lo e/ou # modificá-lo dentro dos termos da ...
gpl-2.0
-5,709,548,360,911,511,000
41.109091
118
0.6327
false
shravya-ks/ECN-ns3
src/fd-net-device/bindings/modulegen__gcc_LP64.py
1
326067
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
2,416,059,799,803,173,400
64.005383
383
0.612623
false
msincenselee/vnpy
vnpy/gateway/deribit/deribit_gateway.py
1
17944
from typing import Callable from vnpy.trader.object import ( TickData, OrderData, TradeData, PositionData, AccountData, ContractData, OrderRequest, CancelRequest, SubscribeRequest, HistoryRequest, ) from vnpy.trader.constant import ( Direction, Offset, Exchange, ...
mit
-8,918,739,167,488,954,000
25.99697
83
0.51723
false
PeteTheAutomator/ACServerManager
session/migrations/0008_auto_20160902_1030.py
1
1888
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('session', '0007_auto_20160829_1728'), ] operations = [ migrations.AddField( model_name='preset', nam...
mit
-2,723,826,032,965,880,000
41.909091
298
0.601695
false
Vifon/ranger
ranger/core/actions.py
1
53993
# This file is part of ranger, the console file manager. # License: GNU GPL version 3, see the file "AUTHORS" for details. # pylint: disable=too-many-lines,attribute-defined-outside-init from __future__ import (absolute_import, division, print_function) import codecs import os from os import link, symlink, listdir, ...
gpl-3.0
-6,997,357,794,077,036,000
34.358874
99
0.523938
false
ndevenish/simplehistogram
simplehist/binning.py
1
2817
# coding: utf-8 """ bins.py Copyright (c) 2011 Nicholas Devenish <n.e.devenish@sussex.ac.uk> Contains the logic for creating and inspecting sequences of bins """ __license__ = """Copyright (c) 2011 Nicholas Devenish <n.e.devenish@sussex.ac.uk> MIT License <http://www.opensource.org/licenses/mit-license.php> """ im...
mit
-4,525,413,694,471,939,000
25.575472
87
0.635783
false
freesmartphone/framework
framework/subsystems/opimd/pimd_messages.py
1
29060
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Open PIM Daemon (C) 2008 by Soeren Apel <abraxa@dar-clan.de> (C) 2008 Openmoko, Inc. (C) 2009 Michael 'Mickey' Lauer <mlauer@vanille-media.de> (C) 2009 Sebastian Krzyszkowiak <seba.dos1@gmail.com> (C) 2009 Tom "TAsn" Hacohen <tom@stosb.com> GPLv2 or later Messages Dom...
gpl-2.0
2,304,018,641,984,472,000
37.850267
225
0.565141
false
algolia/algoliasearch-django
tests/test_decorators.py
1
3464
from mock import ( ANY, call, patch ) from django.test import TestCase from algoliasearch_django import algolia_engine from algoliasearch_django.decorators import disable_auto_indexing from .factories import UserFactory, WebsiteFactory from .models import User class DecoratorsTestCase(TestCase): de...
mit
4,234,139,759,728,338,400
31.074074
99
0.594977
false
diox/zamboni
lib/iarc_v2/client.py
1
7197
# -*- coding: utf8 -*- import datetime import requests from urlparse import urljoin from uuid import UUID from django.conf import settings from django.db import transaction import commonware.log from post_request_task.task import task from lib.iarc_v2.serializers import IARCV2RatingListSerializer from mkt.site.helpe...
bsd-3-clause
6,852,393,118,768,010,000
32.948113
79
0.656662
false
googlearchive/rgc-models
response_model/python/metric_learning/end_to_end/stimulus_response_embedding.py
1
11824
# Copyright 2018 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
5,079,505,258,884,534,000
46.296
157
0.617727
false
oesteban/preprocessing-workflow
fmriprep/interfaces/nilearn.py
1
5856
#!/usr/bin/env python # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Image tools interfaces ~~~~~~~~~~~~~~~~~~~~~~ """ import nibabel as nb import numpy as np from skimage import morphology as sim from scipy.ndimage.morphol...
bsd-3-clause
7,788,398,868,179,350,000
36.780645
97
0.621585
false
bcarr092/CSignal
test/test_driver.py
1
1372
#!/usr/local/bin/python import csignal_tests import unittest import sys from test_csignal import TestsCSignal f...
apache-2.0
-5,570,402,097,127,156,000
40.575758
85
0.553207
false
dgnorth/drift-base
driftbase/api/machines.py
1
8672
import logging import datetime from six.moves import http_client from flask import request, url_for, g, jsonify from flask.views import MethodView import marshmallow as ma from flask_restx import reqparse from flask_smorest import Blueprint, abort from drift.core.extensions.urlregistry import Endpoints fro...
mit
-3,955,109,177,958,503,400
37.779817
106
0.548086
false
london-python-project-nights/romaine
tests/test_parser_examples.py
1
11549
from copy import deepcopy import unittest from tests import common from romaine.parser.exceptions import ( MalformedTableError, ) class TestExamplesParser(unittest.TestCase): """ Test examples gherkin parser functionality of romaine's core. """ def setUp(self): """ Prepare...
mit
5,994,229,071,999,261,000
30.903315
78
0.601004
false
gptech/ansible
lib/ansible/modules/cloud/ovirt/ovirt_datacenters.py
1
7378
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # This file is part of Ansible # # Ansible 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 #...
gpl-3.0
4,174,724,980,898,935,000
32.085202
124
0.620358
false
brachyprint/brachyprint
doc/conf.py
1
7932
# -*- coding: utf-8 -*- # # Brachyprint documentation build configuration file, created by # sphinx-quickstart on Sun Feb 9 11:09:11 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. # #...
gpl-2.0
7,264,610,416,669,255,000
31.77686
101
0.706884
false
nanaze/pystitch
pystitch/gen_html.py
1
3100
#!/usr/bin/env python """Utilities to generate HTML from an image. Can be called from commandline. Usage: gen_html.py image.png """ from PIL import Image import os import sys import image, dmc_colors import color_map import color def _GetTextColor(bg_color): average = sum(bg_color) / float(len(bg_color)) aver...
apache-2.0
389,522,670,660,443,300
20.830986
94
0.609355
false
us-ignite/us_ignite
us_ignite/resources/models.py
1
4037
import watson from django.core.urlresolvers import reverse from django.db import models from us_ignite.constants import IMAGE_HELP_TEXT from us_ignite.common.fields import AutoUUIDField, URL_HELP_TEXT from us_ignite.resources import managers, search from django_extensions.db.fields import ( AutoSlugField, Cr...
bsd-3-clause
-1,115,998,916,674,191,100
30.294574
81
0.666089
false
Silvian/Blog
blog/migrations/0001_initial.py
1
1053
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-03-31 00:50 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True depen...
gpl-3.0
-2,739,960,257,162,213,400
32.967742
120
0.624881
false
priyankarani/sale
invoice.py
1
5078
# This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. from functools import wraps from sql import Table from trytond.model import Workflow, fields from trytond.pool import Pool, PoolMeta from trytond.transaction import Transactio...
gpl-3.0
2,947,276,314,753,443,000
31.139241
73
0.583104
false
tomlanyon/dnspython
tests/test_resolver.py
1
16287
# Copyright (C) 2003-2017 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND ...
isc
3,796,542,225,803,490,000
37.503546
94
0.587954
false
wavefrontHQ/python-client
test/test_azure_configuration.py
1
1314
# coding: utf-8 """ Wavefront REST API <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ...
apache-2.0
4,142,127,186,608,610,300
31.85
409
0.724505
false
Dolphman/pynationstates
tests/test_call.py
1
12322
import unittest import nationstates as ns from random import choice import datetime USERAGENT = "Automated Testing Builds by Circle CI for the nationstates API wrapper by The United Island Tribes. dolphdevgithub@gmail.com" import os test_nation = 'Python Nationstates API wrapper' test_nation_r = 'pynationstates_telegr...
mit
3,727,445,484,663,117,300
34.205714
194
0.600552
false
retornaz/aseba
examples/clients/python-dbus/aseba.py
1
7674
#!/usr/bin/python # -*- coding: utf-8 -*- """ A Python binding for Aseba that relies on DBus for IPC. Supports event sending/receiving as well as setting/getting an Aseba variable. Typical usage: def my_callback(evt): pass with Aseba as aseba: aseba.on_event("evt_name", my_callback) ...
lgpl-3.0
-884,170,675,327,403,400
31.508475
116
0.573514
false
koceg/gouda
gouda/engines/datasymbol.py
1
2801
import os import tempfile import cv2 try: from win32com import client as com from win32com.client import constants as c import win32api except ImportError: com = win32api = c = None from gouda.barcode import Barcode from gouda.gouda_error import GoudaError from gouda.util import debug_print, is_clsid...
gpl-2.0
-3,743,715,034,955,444,000
32.746988
88
0.573724
false
reverieinc/RevCode
revcode/rev_code_joiner.py
1
2522
def join_rev_matra(rev_word, rev_vowel): # rev_vowel_list = ["a","A","i","I","u","U","WR","WA","e","E","YE","WO","o","O","YO","x","M","X"] # rev_consonant_list = ["k","K","g","G","Fd","c","C","j","J","Z","T","HT","D","HD","N","t","Ht","d","Hd","n","Q","p","P","b","B","m","y","r","R","l","v","L","Hz","s","S"...
gpl-3.0
-6,079,757,304,389,754,000
29.756098
224
0.486915
false
simone/static-erre
ncc4roma/settings.py
1
2976
""" Django settings for ncc4roma project. Generated by 'django-admin startproject' using Django 1.8.4. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build pat...
mit
2,186,871,288,240,058,000
24.655172
71
0.684476
false
SINGROUP/pycp2k
pycp2k/classes/_each255.py
1
1114
from pycp2k.inputsection import InputSection class _each255(InputSection): def __init__(self): InputSection.__init__(self) self.Just_energy = None self.Powell_opt = None self.Qs_scf = None self.Xas_scf = None self.Md = None self.Pint = None self.Meta...
lgpl-3.0
-1,348,679,803,780,418,300
41.846154
447
0.576302
false
PlazaRoute/PlazaRoute-doc
build/upload-to-jira.py
1
1134
#!/bin/python import requests import re import os import sys base_url = "https://jira.robinsuter.ch" api_url = "/rest/api/2/issue/{}/attachments" headers = {"X-Atlassian-Token": "nocheck"} jira_user = os.environ.get("JIRA_USER") jira_pw = os.environ.get("JIRA_PW") jira_prefix = "PZ" branch = os.environ.get("TRAVIS_BR...
mit
-6,686,851,617,221,984,000
24.772727
89
0.652557
false
Neitsch/ASE4156
authentication/graphql.py
1
9125
""" GraphQL definitions for the Authentication App """ import datetime from django.contrib.auth.models import User from graphene import Argument, Field, Float, Int, List, Mutation, \ NonNull, String, relay from graphene_django import DjangoObjectType, DjangoConnectionField from trading.models import TradingAccount ...
apache-2.0
1,434,842,458,345,252,900
32.921933
96
0.637699
false
niphlod/pydal
pydal/adapters/oracle.py
1
5716
import re import sys from .._compat import integer_types, long from ..helpers.classes import Reference from .base import SQLAdapter from . import adapters, with_connection_or_raise @adapters.register_for('') class Oracle(SQLAdapter): dbengine = 'oracle' drivers = ('cx_Oracle',) cmd_fix = re.compile( ...
bsd-3-clause
5,888,488,635,870,126,000
35.407643
88
0.558782
false
dchud/sentinel
bin/scripts/test-matplotlib-evidence.py
1
5562
#!/usr/bin/env python from pylab import * from canary.context import Context from canary.loader import QueuedRecord from canary.search import SearchIndex from canary.study import Species, Study, Methodology linkages = { 'rel': 'Relationships', 'inter': 'Interspecies', 'exp': 'Exposures', 'out': '...
mit
-8,664,249,399,503,301,000
31.526316
80
0.558073
false
googleapis/googleapis-gen
google/cloud/recaptchaenterprise/v1/recaptchaenterprise-v1-py/google/cloud/recaptchaenterprise_v1/types/recaptchaenterprise.py
1
16503
# -*- 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
-4,770,193,494,667,422,000
28.054577
125
0.602375
false
OnroerendErfgoed/crabpy
tests/gateway/test_crab.py
1
87963
# -*- coding: utf-8 -*- from __future__ import unicode_literals import six import pytest from mock import Mock from crabpy.gateway.exception import ( GatewayRuntimeException, GatewayResourceNotFoundException ) from crabpy.gateway.crab import ( Gewest, Provincie, Gemeente, Deelgemeente, Taal, Bewe...
mit
-1,259,453,916,042,769,700
39.40147
116
0.621927
false
some-0n3/imgcls_utils
training.py
1
21638
"""This module implements the training for lasagne models. The classes are designed to train a lasagne model on a fixed data set with different learning rates. The training schedule can be epoch or iteration based. The classes print the training and test error to the standard output every epoch or in a given interval ...
mit
176,231,170,785,703,650
36.306897
79
0.575146
false
LLNL/spack
var/spack/repos/builtin/packages/kallisto/package.py
2
1805
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Kallisto(CMakePackage): """kallisto is a program for quantifying abundances of transcripts...
lgpl-2.1
4,159,937,988,900,654,000
35.836735
96
0.659834
false
QiJune/Paddle
python/paddle/fluid/concurrency.py
1
15959
# Copyright (c) 2018 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
3,472,421,773,289,609,700
34.151982
87
0.58619
false
preed/quickrelease
quickrelease/step.py
1
12237
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- r""" The base class for QuickRelease steps, along with error reporting classes, custom subclasses of steps, and classes to run the individual parts of the steps. L{Step}s are usually searched for in the C{quickrelease/steps} di...
mit
928,919,106,611,569,200
39.926421
836
0.659884
false
madscatt/sasmol
src/python/sasproperties.py
1
31722
''' SASSIE: Copyright (C) 2011 Joseph E. Curtis, Ph.D. 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. ...
gpl-3.0
8,536,688,091,427,886,000
43.553371
612
0.42967
false
ozamiatin/oslo.messaging
oslo_messaging/_drivers/zmq_driver/zmq_version.py
2
2194
# Copyright 2016 Mirantis, 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 ...
apache-2.0
-2,075,086,371,527,311,000
35.566667
79
0.682315
false
RedHatInsights/insights-core
insights/combiners/selinux.py
1
4702
""" SELinux ======= Combiner for more complex handling of SELinux being disabled by any means available to the users. It uses results of :class:`insights.parsers.sestatus.SEStatus`, and :class:`insights.parsers.selinux_config.SelinuxConfig` parsers and :class:`insights.combiners.grub_conf.GrubConf` combiner. It conta...
apache-2.0
-6,633,364,265,390,567,000
40.610619
187
0.676733
false
biolab/orange3-imageanalytics
orangecontrib/imageanalytics/tests/test_image_grid.py
1
1102
import logging import unittest from Orange.data import Table from orangecontrib.imageanalytics.image_grid import ImageGrid class ImageGridTest(unittest.TestCase): def setUp(self): logging.disable(logging.CRITICAL) self.grid = ImageGrid(Table("iris")) def tearDown(self): logging.disa...
gpl-3.0
5,740,264,469,137,128,000
28.783784
99
0.643376
false
ElementsProject/elements
test/functional/mempool_packages.py
1
17298
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test descendant package tracking code.""" from decimal import Decimal from test_framework.messages im...
mit
-4,680,627,966,752,416,000
44.521053
154
0.618858
false
ziethan/decanter
decanter/install.py
1
3967
from __future__ import absolute_import, print_function import tarfile import json import yaml import os import errno import requests import xml.etree.ElementTree as ET from xml.etree.ElementTree import ParseError from decanter import config def InstallFromFile(**kwargs): if kwargs.get('path') is None: ...
mit
-7,080,620,116,892,369,000
28.834586
119
0.583564
false
openstack/tacker
tacker/tests/functional/legacy/vnfm/test_tosca_vnf_reservation.py
1
10315
# # # 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 # ...
apache-2.0
6,692,200,036,185,177,000
42.893617
78
0.570431
false
fpiotrow/caldav-tester-packaging
src/serverinfo.py
1
8926
## # Copyright (c) 2006-2015 Apple 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 l...
apache-2.0
1,480,249,281,351,014,700
34.704
101
0.561058
false
cookbrite/flyingcloud
examples/flask-web-app/salt/app/application/flask_example_app/app.py
1
3120
#!/usr/bin/env python from __future__ import unicode_literals, print_function import logging import os from StringIO import StringIO from logging.handlers import RotatingFileHandler import cv2 from PIL import Image from flask import Flask, make_response, request, send_from_directory, jsonify, render_template, send_...
apache-2.0
-6,670,963,581,733,109,000
27.363636
128
0.685256
false