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
pagekite/PyPagekite
pagekite/ui/nullui.py
1
10192
""" This is a basic "Null" user interface which does nothing at all. """ ############################################################################## from __future__ import absolute_import from __future__ import division LICENSE = """\ This file is part of pagekite.py. Copyright 2010-2020, the Beanstalks Project eh...
agpl-3.0
2,314,659,761,549,735,400
34.512195
81
0.586637
false
scholer/cadnano2.5
cadnano/strand/insertioncmd.py
2
5135
# -*- coding: utf-8 -*- from cadnano.proxies.cnproxy import UndoCommand from cadnano.decorators.insertion import Insertion from cadnano.cntypes import ( StrandT ) class AddInsertionCommand(UndoCommand): def __init__(self, strand: StrandT, idx: int, length: int): super(AddInsertionCommand, self).__init_...
mit
-6,313,271,576,578,294,000
36.481752
79
0.614216
false
stevenwudi/Kernelized_Correlation_Filter
OBT_50_RNN_train.py
1
6825
""" author: DI WU stevenwudi@gmail.com """ import getopt import sys # some configurations files for OBT experiments, originally, I would never do that this way of importing, # it's simple way too ugly from config import * from scripts import * from KCF_CNN_RNN import KCFTracker def main(argv): trackers = [KCFTr...
gpl-3.0
-8,334,159,504,333,091,000
38.680233
105
0.488205
false
lreis2415/SEIMS
seims/preprocess/sp_extraction.py
1
1437
"""Extract spatial parameters for soil, landuse, and terrain related. @author : Liangjun Zhu @changelog: - 16-12-07 lj - rewrite for version 2.0 - 17-06-23 lj - reorganize according to pylint and google style - 18-02-08 lj - compatible with Python3. """ from __future__ import absolute_import,...
gpl-3.0
-8,365,632,222,240,427,000
30.933333
72
0.713292
false
ealter/vim_turing_machine
vim_turing_machine/struct.py
1
1051
from collections import namedtuple from vim_turing_machine.constants import BACKWARDS from vim_turing_machine.constants import DO_NOT_MOVE from vim_turing_machine.constants import FORWARDS from vim_turing_machine.constants import INVALID_STATE_CHARACTERS from vim_turing_machine.constants import VALID_CHARACTERS clas...
mit
-2,245,830,219,414,987,300
39.423077
93
0.714558
false
hdemeyer/king-phisher
king_phisher/scrubber.py
1
3276
#!/usr/bin/env python # -*- coding: utf-8 -*- # # king_phisher/scrubber.py # # 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 li...
bsd-3-clause
4,907,353,813,057,486,000
36.227273
83
0.724054
false
christophmark/bayesloop
tests/test_transitionmodels.py
1
4570
#!/usr/bin/env python from __future__ import print_function, division import bayesloop as bl import numpy as np class TestBuiltin: def test_static(self): S = bl.Study() S.loadData(np.array([1, 2, 3, 4, 5])) L = bl.om.Poisson('rate', bl.oint(0, 6, 100)) T = bl.tm.Static() ...
mit
5,765,564,429,500,397,000
30.088435
85
0.521444
false
dicksontsai/sudoku
sudoku_checker.py
1
1170
import io, sys class Sudoku(): def __init__(self, textfile): puzzle = open(textfile).readlines() class Position(): def __init__(self, row, column, box): self.row = row self.column = column self.box = box if __name__ == '__main__': puzzle = open(sys.argv[1]).readlines()...
gpl-3.0
-5,252,328,654,009,277,000
23.375
63
0.517949
false
arthur-wsw/pinax-ratings
runtests.py
1
1258
#!/usr/bin/env python import os import sys import django from django.conf import settings DEFAULT_SETTINGS = dict( INSTALLED_APPS=[ "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sites", "pinax.ratings", "pinax.ratings.tests" ], MIDDLEWARE_C...
mit
-6,897,648,623,100,419,000
22.296296
95
0.620032
false
sharmaeklavya2/zulip
zerver/lib/ccache.py
1
7539
from __future__ import absolute_import from typing import Any, Dict, Optional, Text # This file is adapted from samples/shellinabox/ssh-krb-wrapper in # https://github.com/davidben/webathena, which has the following # license: # # Copyright (c) 2013 David Benjamin and Alan Huang # # Permission is hereby granted, free ...
apache-2.0
-5,120,918,209,832,883,000
37.075758
98
0.613477
false
qxcv/comp2560
project/tests/test_pairwise_relations.py
1
2409
import numpy as np from datasets import Joints from pairwise_relations import from_dataset def generate_fake_locations(num, means, stddev=5): """Generate a matrix with four rows (one for each "point") and three columns (x-coord, y-coord and visibility). Means is a 3x2 matrix giving mean locations for eac...
apache-2.0
-8,136,137,840,983,608,000
33.414286
76
0.616853
false
petterreinholdtsen/frikanalen
fkbeta/fk/models.py
1
20257
# Copyright (c) 2012-2013 Benjamin Bruheim <grolgh@gmail.com> # This file is covered by the LGPLv3 or later, read COPYING for details. import datetime import os import uuid import pytz from django.conf import settings from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist fro...
lgpl-3.0
90,916,170,762,672,200
34.601054
129
0.630646
false
skosukhin/spack
var/spack/repos/builtin/packages/r-ggpubr/package.py
1
1832
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
4,993,525,382,914,049,000
43.682927
78
0.659389
false
psinha/paparazzi
sw/ground_segment/python/move_waypoint_example.py
1
1617
#!/usr/bin/env python from __future__ import print_function import sys from os import path, getenv from time import sleep # if PAPARAZZI_SRC not set, then assume the tree containing this # file is a reasonable substitute PPRZ_SRC = getenv("PAPARAZZI_SRC", path.normpath(path.join(path.dirname(path.abspath(__file__)),...
gpl-2.0
2,017,451,250,166,968,600
28.944444
111
0.621521
false
iut-ibk/DynaMind-ToolBox
DynaMind-GDALModules/scripts/Drainage/dm_importswmm.py
1
17024
# -*- coding: utf-8 -*- """ @file @author Chrisitan Urich <christian.urich@gmail.com> @version 1.0 @section LICENSE This file is part of DynaMind Copyright (C) 2015 Christian Urich This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as publishe...
gpl-2.0
8,308,265,447,512,826,000
37
97
0.523672
false
kosystem/git-tree
gitTree/gitTree.py
1
1927
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import subprocess C_GREEN = '\033[92m' C_BLUE = '\033[94m' C_END = '\033[00m' def grouping(fileList): root = {} for path in fileList: current = root for p in path.rstrip('\n').split('/'): current.setdefault(p, {}) ...
mit
7,526,913,242,082,758,000
24.144737
66
0.552067
false
jhamman/xray
xarray/tests/test_combine.py
1
15860
from __future__ import absolute_import from __future__ import division from __future__ import print_function from copy import deepcopy import numpy as np import pandas as pd from xarray import Dataset, DataArray, auto_combine, concat, Variable from xarray.core.pycompat import iteritems, OrderedDict from . import Tes...
apache-2.0
3,788,485,069,393,481,700
42.452055
83
0.541173
false
apache/libcloud
libcloud/compute/drivers/linode.py
2
60267
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
apache-2.0
-4,174,464,189,524,054,500
34.264482
84
0.551181
false
CloudBrewery/duplicity-swiftkeys
duplicity/patchdir.py
1
21607
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright 2002 Ben Escoto <ben@emerose.org> # Copyright 2007 Kenneth Loafman <kenneth@loafman.com> # # This file is part of duplicity. # # Duplicity is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License...
gpl-2.0
-456,289,875,767,890,050
35.560068
87
0.582589
false
chungjjang80/FRETBursts
fretbursts/tests/test_burstlib.py
1
40546
# # FRETBursts - A single-molecule FRET burst analysis toolkit. # # Copyright (C) 2014 Antonino Ingargiola <tritemio@gmail.com> # """ Module containing automated unit tests for FRETBursts. Running the tests requires `py.test`. """ from __future__ import division from builtins import range, zip from collections impor...
gpl-2.0
-812,374,004,313,463,000
34.349608
80
0.592931
false
keishi/chromium
tools/isolate/isolate_common_test.py
1
2483
#!/usr/bin/env python # Copyright (c) 2012 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 cStringIO import logging import unittest import sys import isolate_common class TraceInputs(unittest.TestCase): def _te...
bsd-3-clause
6,734,886,638,849,571,000
24.597938
72
0.391462
false
MaxTyutyunnikov/lino
obsolete/html2odt/__init__.py
1
2203
# -*- coding: UTF-8 -*- ## Copyright 2012 Luc Saffre ## This file is part of the Lino project. ## Lino 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)...
gpl-3.0
-918,762,337,038,523,100
29.597222
71
0.686791
false
indro/t2c
apps/external_apps/swaps/views.py
2
9884
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect, Http404 from django.template import RequestContext from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from django...
mit
-4,431,117,786,967,901,700
40.704641
154
0.635269
false
BiznetGIO/horizon
openstack_dashboard/dashboards/admin/instances/views.py
1
9689
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 OpenStack Foundation # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use t...
apache-2.0
-8,192,718,020,581,848,000
36.996078
79
0.611931
false
citrix-openstack-build/heat
heat/engine/resources/instance.py
1
22792
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # 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 applicab...
apache-2.0
2,669,817,716,314,624,000
37.305882
79
0.524482
false
COSMOGRAIL/COSMOULINE
pipe/4_norm_scripts/4c_fac_makecombipngmap_NU.py
1
3080
# # Similar to the 1a_checkalistars, we draw the alignment stars, this time on the combi image (to make a "nice" map) # execfile("../config.py") from kirbybase import KirbyBase, KBError from variousfct import * import star #import shutil import f2n #from datetime import datetime, timedelta # Read reference image i...
gpl-3.0
-5,670,558,067,892,289,000
36.560976
150
0.721429
false
MediaKraken/MediaKraken_Deployment
source/tools/rename_media_files.py
1
2715
""" Copyright (C) 2019 Quinn D Granfor <spootdev@gmail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but ...
gpl-3.0
-2,735,211,053,386,424,300
46.631579
105
0.52523
false
leeping/mdtraj
tests/test_pdb.py
1
10857
############################################################################## # MDTraj: A Python Library for Loading, Saving, and Manipulating # Molecular Dynamics Trajectories. # Copyright 2012-2017 Stanford University and the Authors # # Authors: Robert McGibbon # Contributors: Jason Swails, Matthew Harrigan...
lgpl-2.1
1,569,474,710,171,645,400
36.567474
182
0.592521
false
pauloschilling/sentry
src/sentry/models/user.py
1
4560
""" sentry.models.user ~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import warnings from django.contrib.auth.models import AbstractBaseUser, UserManager from django.db import Inte...
bsd-3-clause
-6,004,456,506,088,527,000
34.348837
95
0.617105
false
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/tools/filters/gtf_to_bedgraph_converter.py
1
2931
#!/usr/bin/env python import os, sys, tempfile assert sys.version_info[:2] >= ( 2, 4 ) def __main__(): # Read parms. input_name = sys.argv[1] output_name = sys.argv[2] attribute_name = sys.argv[3] # Create temp files. tmp_name1 = tempfile.NamedTemporaryFile().name tmp_name2 = tempfile...
gpl-3.0
92,477,252,772,895,820
35.6375
123
0.513477
false
georgemarshall/django
tests/auth_tests/urls.py
14
6515
from django.contrib import admin from django.contrib.auth import views from django.contrib.auth.decorators import login_required, permission_required from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth.urls import urlpatterns as auth_urlpatterns from django.contrib.messages.api import info...
bsd-3-clause
1,123,972,528,181,623,400
39.216049
114
0.698695
false
Micronaet/micronaet-product
show_photo_switch/__openerp__.py
1
1483
############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # 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 ...
agpl-3.0
4,163,398,208,031,642,600
33.488372
79
0.549562
false
PaddlePaddle/Paddle
python/paddle/fluid/contrib/slim/tests/test_imperative_qat_channelwise.py
1
1457
# 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
-7,447,396,531,800,148,000
29.354167
74
0.736445
false
CityGenerator/Megacosm-Generator
tests/test_motivation.py
1
1391
#!/usr/bin/env python # -*- coding: utf-8 -*- "Fully test this module's functionality through the use of fixtures." from megacosm.generators import Motivation from megacosm.generators import NPC import unittest2 as unittest import fixtures import fakeredis from config import TestConfiguration class TestMotivation(...
gpl-2.0
-8,748,794,249,495,837,000
27.387755
73
0.64486
false
pawelmhm/splash
splash/qwebpage.py
1
6186
# -*- coding: utf-8 -*- from __future__ import absolute_import from collections import namedtuple import sip from PyQt5.QtWebKitWidgets import QWebPage, QWebView from PyQt5.QtCore import QByteArray from twisted.python import log import six from splash.har_builder import HarBuilder RenderErrorInfo = namedtuple('Rende...
bsd-3-clause
-3,589,351,583,061,082,000
32.803279
108
0.619787
false
OpenDanbi/Sherlock
src/ClusterDialog.py
1
2053
from PySide.QtGui import QDialog, QDialogButtonBox, QVBoxLayout, QLabel, QLineEdit from PySide import QtGui, QtCore import Lifeline class ClusterDialog(QDialog): editClusterName = None def __init__(self, lifeline, defaultName, parent = None): super(ClusterDialog, self).__init__(parent) s...
lgpl-2.1
5,314,989,252,790,974,000
33.216667
127
0.6566
false
chatoooo/pbone-cloud
server.py
1
1692
from bottle import route, run, template, static_file, post, get, request, response import urllib import urllib2 from urllib2 import HTTPError @route('/js/<filepath:path>') def js(filepath): return static_file(filepath, root='./js') @route('/css/<filepath:path>') def css(filepath): return static...
mit
6,883,486,318,180,225,000
25.770492
82
0.59279
false
jalavik/inspire-next
inspire/modules/workflows/actions/hep_approval.py
1
3652
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014, 2015 CERN. # # INSPIRE 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-2.0
5,389,820,352,519,112,000
34.803922
79
0.597481
false
LenzGr/DeepSea
srv/salt/_modules/purge.py
1
2689
# -*- coding: utf-8 -*- """ Cleanup related operations for resetting the Salt environment and removing a Ceph cluster """ from __future__ import absolute_import import logging import os import shutil import pwd import grp import yaml log = logging.getLogger(__name__) def configuration(): """ Purge all the n...
gpl-3.0
-2,006,042,993,395,070,200
29.908046
81
0.628115
false
facebook/mcrouter
mcrouter/test/test_noreply.py
1
2998
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from mcrouter.test.McrouterTestCase import McrouterTestCase class TestNoReplyBase(McrouterTestCase): config = '....
mit
6,223,384,078,401,246,000
38.973333
77
0.666444
false
TaiSakuma/AlphaTwirl
tests/ROOT/compare_std_vector.py
1
2236
#!/usr/bin/env python # Tai Sakuma <tai.sakuma@cern.ch> ##__________________________________________________________________|| import os, sys import timeit import array import ROOT from alphatwirl.roottree import Events, BEvents ##__________________________________________________________________|| inputPath = 'tree....
bsd-3-clause
-5,530,343,492,700,515,000
35.064516
85
0.522361
false
rhatto/boaspraticas
conf.py
1
8046
# -*- coding: utf-8 -*- # # Boas Práticas em Desenvolvimento documentation build configuration file, created by # sphinx-quickstart on Sat Oct 31 19:44:44 2015. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # au...
gpl-3.0
-4,072,515,261,222,713,000
32.090535
98
0.709738
false
kvesteri/sqlalchemy-json-api
tests/conftest.py
1
10864
import warnings import pytest import sqlalchemy as sa from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.orm import sessionmaker from sqlalchemy_json_api import CompositeId, QueryBuilder warnings.filterwarning...
bsd-3-clause
381,387,033,388,502,140
26.296482
79
0.554308
false
tmmgarcia/frac-turtle
runner.py
1
1457
from turtle import Turtle, colormode from random import randint import sys def randColor(): return randint(0,255) def drawTriangle(t,dist): t.fillcolor(randColor(),randColor(),randColor()) t.down() t.setheading(0) t.begin_fill() t.forward(dist) t.left(120) t.forward(dist) ...
mit
-4,172,545,080,756,532,700
21.555556
63
0.575154
false
eswartz/panda3d-stuff
lib/utils/filesystem.py
1
6149
__author__ = 'ejs' import errno import glob import logging import inspect import os import sys import platform def mkdirP(path): try: os.makedirs(path) except OSError as exc: # Python >2.5 if exc.errno == errno.EEXIST and os.path.isdir(path): pass else: raise ...
mit
-939,937,366,241,566,100
29.142157
130
0.592942
false
leon-lei/learning-materials
data_science/numpy_tutorials/numpy_practice1_array_random_reshape.py
1
3008
import numpy as np # from numpy.random import randint my_list = [1,2,3,4,5,6] new_list = [[1,2,3], [4,5,6], [7,8,9]] # 1D array print('Casting a premade list into a 1D numpy array') print(np.array(my_list)) # 2D array, note the extra brackets being displayed print('\nCasting a list of lists into a 2D numpy array') ...
mit
1,797,216,221,528,837,600
33.976744
99
0.721742
false
theyosh/TerrariumPI
terrariumCollector.py
1
24965
# -*- coding: utf-8 -*- import terrariumLogging logger = terrariumLogging.logging.getLogger(__name__) import sqlite3 import time import copy import os from terrariumUtils import terrariumUtils class terrariumCollector(object): DATABASE = 'history.db' # Store data every Xth minute. Except switches and doors STO...
gpl-3.0
3,670,249,768,931,652,600
45.926692
325
0.576247
false
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/Tasking/Mcl_Cmd_Banner_Tasking.py
1
5237
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: Mcl_Cmd_Banner_Tasking.py def TaskingMain(namespace): import mcl.imports import mcl.target import mcl.tasking from mcl.object.Messa...
unlicense
-4,678,044,798,674,551,000
38.089552
110
0.47088
false
pegasus-isi/pegasus
packages/pegasus-common/test/test_json.py
1
2441
import io from enum import Enum from pathlib import Path from uuid import UUID import pytest from Pegasus.json import dump_all, dumps, load_all, loads class _Color(Enum): RED = 1 class _Html: def __html__(self): return "html" class _Json: def __json__(self): return "json" @pytest.m...
apache-2.0
-6,907,769,663,152,580,000
24.968085
76
0.487505
false
macarthur-lab/xbrowse
seqr/views/apis/phenotips_api_tests.py
1
1162
import json import mock from django.test import TestCase from django.urls.base import reverse from seqr.views.apis.phenotips_api import phenotips_edit_handler, phenotips_pdf_handler from seqr.views.utils.test_utils import _check_login, create_proxy_request_stub class PhenotipsAPITest(TestCase): fixtures = ['use...
agpl-3.0
6,250,293,494,988,709,000
40.5
113
0.707401
false
emi420/APIzza
mail.api/mail/settings-sample.py
1
4268
""" Django settings for the mail.api project. Rename this file to settings.py and replace the "CHANGEME" string in configuration options to use these sample settings. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see http...
gpl-3.0
4,870,246,465,533,267,000
29.056338
108
0.662605
false
tacone/rapache
RapacheGtk/VirtualHostGui.py
1
21051
#!/usr/bin/env python # Rapache - Apache Configuration Tool # Copyright (C) 2008 Stefano Forenza, Jason Taylor, Emanuele Gentili # # 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 versi...
gpl-3.0
3,130,645,934,634,689,000
37.911275
292
0.584485
false
bradallred/gemrb
gemrb/GUIScripts/bg2/GUICG3.py
1
3602
# GemRB - Infinity Engine Emulator # Copyright (C) 2003 The GemRB Project # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later versi...
gpl-2.0
-7,012,643,100,263,473,000
29.786325
81
0.764575
false
PaulMcInnis/JobPy
jobfunnel/resources/defaults.py
1
1253
"""Default arguments for both JobFunnelConfigManager and CLI arguments. NOTE: Not all defaults here are used, as we rely on YAML for demo and not kwargs """ import os from pathlib import Path from jobfunnel.resources.enums import (Locale, DelayAlgorithm, Provider, Remoteness) DEFAULT_LOG_LEVEL_NAME = 'INFO' DEFAULT_L...
mit
7,973,866,357,179,708,000
34.8
84
0.757382
false
770352/Dozer
dozer/cogs/general.py
1
11619
"""General, basic commands that are common for Discord bots""" import inspect import discord from discord.ext.commands import BadArgument, cooldown, BucketType, Group, has_permissions from ._utils import * from .. import db class General(Cog): """General commands common to all Discord bots.""" @command() ...
gpl-3.0
4,882,674,967,214,114,000
48.866953
146
0.58542
false
schneegor/WeatherServer
weather_server/show_weather/models.py
1
2423
# -*- coding: utf-8 -*- """ WeatherServer Copyright (C) 2015 Full Stack Embedded 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 versio...
gpl-2.0
7,606,419,842,446,554,000
35.712121
75
0.704911
false
metglobal/django-exchange
exchange/conversion.py
1
4152
from collections import namedtuple from operator import itemgetter from datetime import timedelta from django.conf import settings from exchange.adapters import BaseAdapter from exchange.utils import import_class, memoize from exchange.models import ExchangeRate from exchange.cache import (update_rates_cached, get_ra...
mit
-6,385,014,705,637,827,000
28.034965
78
0.650048
false
mylokin/schematec
tests/test_schema_array.py
1
2059
from __future__ import absolute_import import pytest import schematec.schema import schematec.converters as converters import schematec.validators as validators import schematec.exc as exc def test_empty_schema_with_empty_value(): schema = schematec.schema.array() assert schema([]) == [] def test_empty_sc...
mit
-4,460,862,772,345,532,400
26.092105
83
0.70374
false
sekikn/ambari
ambari-common/src/main/python/resource_management/libraries/functions/security_commons.py
2
11845
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
apache-2.0
-8,151,399,823,975,610,000
39.986159
128
0.678345
false
acigna/pywez
zsi/test/test_t2.py
1
3220
#!/usr/bin/env python import sys import unittest from ZSI import TC, ParsedSoap, ParseException, FaultFromZSIException, FaultFromException, SoapWriter class t2TestCase(unittest.TestCase): "Test case wrapper for old ZSI t2 test case" def checkt2(self): try: ps = ParsedSoap(IN) e...
mit
1,620,134,022,374,674,400
28.814815
101
0.557764
false
tensorflow/deepmath
deepmath/deephol/utilities/proof_checker_lib.py
1
10623
"""Exports proof logs to OCaml files to be loaded by HOL Light. Processes multiple proof logs, but can generate at most one proof per theorem. """ from __future__ import absolute_import from __future__ import division # Import Type Annotations from __future__ import print_function import tensorflow as tf from typing...
apache-2.0
2,743,703,238,344,068,600
36.013937
80
0.674574
false
AuxinJeron/ACS-VRP
src/VRPCenter.py
1
2479
from AntColony import AntColony from AntGraph import AntGraph from TspPainter import tspPainter import logging logger = logging.getLogger("logger") class VRPCenter: def __init__(self, tspparser): self.build_graph(tspparser) def build_graph(self, tspparser): self.antGraph = AntGraph(tspparser...
apache-2.0
-708,314,445,237,468,300
37.75
135
0.595401
false
kantai/passe-framework-prototype
django/middleware/server.py
1
5329
import os, Pyro4, new import django.htoken.serializer from django.utils.importlib import import_module from django.analysis.persisted import mw_socket from django.http import get_changeset PYRO_NAME = 'middleware' def pre_req(self, request, delta): request = self.cereal.deserialize(request) self.cereal.apply_...
bsd-3-clause
833,321,002,150,552,200
39.992308
102
0.579658
false
NicoVarg99/daf-recipes
ckan/ckan/ckan/ckanext/reclineview/tests/test_view.py
1
6249
# encoding: utf-8 import paste.fixture from ckan.common import config import ckan.model as model import ckan.tests.legacy as tests import ckan.plugins as p import ckan.lib.helpers as h import ckanext.reclineview.plugin as plugin import ckan.lib.create_test_data as create_test_data import ckan.config.middleware as mid...
gpl-3.0
3,710,239,937,665,848,300
33.716667
78
0.612738
false
taigaio/taiga-contrib-gitlab-auth
back/taiga_contrib_gitlab_auth/services.py
1
3705
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can redistribute it and/or mo...
agpl-3.0
-6,168,161,143,944,050,000
38.817204
100
0.652984
false
bxlab/bx-python
lib/bx_extras/stats.py
1
153779
# Copyright (c) 1999-2002 Gary Strangman; All Rights Reserved. # # This software is distributable under the terms of the GNU # General Public License (GPL) v2, the text of which can be found at # http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise # using this module constitutes acceptance of the t...
mit
3,670,309,789,992,234,000
36.216602
178
0.577693
false
Pikecillo/genna
external/4Suite-XML-1.0.2/test/Xml/Xslt/Borrowed/mb_20010914.py
1
4041
# At the time of this writing, # 4XSLT generates a traceback when you do an apply-templates on a result tree # fragment. It should generate a friendly (but equally fatal) error. # from Xml.Xslt import test_harness sheet_1 = """\ <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://ww...
gpl-2.0
-5,982,231,990,274,553,000
30.084615
80
0.642415
false
prophile/shipwreck
buildsim.py
1
6017
import random buildings = [] current_turn = 0 queued_shipments = [] MAX_SHIPMENT = 10 from fractions import Fraction messages = [] def queue_shipment(source, amount, target, turns): messages.append("Shipping {0} from {1} to {2}".format(amount, source.name, target.name)) queued_shipments.append((amount, targ...
mit
-3,679,701,480,851,682,000
29.85641
138
0.580688
false
malja/cvut-python
cviceni04/domaci_priprava.py
1
2485
# Zadání: ######### # # Implementujte následující úlohy: # # - swap(a,b), která navzájem vymění tyto dva prvky # - Napište funkci, která vypisuje 1,-1,1,-1 … # - Napište funkci, která vypisuje výsledek operace (−1)^k pro k=0,…,100. # Zamyslete se nad rychlostem výpočtu, navrhněte alternativní postupy # - Napište fun...
mit
2,412,997,842,232,370,700
20.504505
79
0.557604
false
google/apitools
apitools/gen/gen_client_test.py
1
5072
# # Copyright 2015 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 agreed to in writing...
apache-2.0
5,212,766,634,785,581,000
35.489209
79
0.527208
false
bert/geda-gaf
xorn/tests/cpython/Setup.py
1
2264
# Copyright (C) 2013-2017 Roland Lutz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed ...
gpl-2.0
2,625,262,142,088,456,700
24.727273
73
0.668286
false
jonroberts/nasaMining
bak/textrank.py
1
6131
""" *** FROM https://github.com/davidadamojr/TextRank/blob/master/textrank.py *** From this paper: http://acl.ldc.upenn.edu/acl2004/emnlp/pdf/Mihalcea.pdf External dependencies: nltk, numpy, networkx Based on https://gist.github.com/voidfiles/1646117 """ import nltk import itertools from operator import itemgetter...
mit
4,441,759,738,965,631,000
33.835227
160
0.672484
false
Fenykepy/phiroom
src/api/contact/tests.py
1
16072
from django.core import mail from django.test import TestCase from django.core.cache import cache from rest_framework.test import APIClient, APITestCase from contact.models import Description, Message from user.models import User from stats.models import Hit from user.tests import create_test_users, login from phi...
agpl-3.0
5,686,901,337,456,591,000
33.339744
81
0.593678
false
facekapow/runtime
deps/v8/tools/gen-postmortem-metadata.py
2
23848
#!/usr/bin/env python # # Copyright 2012 the V8 project authors. 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 # not...
apache-2.0
-8,884,874,755,149,568,000
38.095082
119
0.543442
false
maxterip/plugins.video.Movies-Online
resources/tools/server_rtmp.py
1
5143
# -*- coding: utf-8 -*- #------------------------------------------------------------ # tvspot - XBMC Add-on by Juarrox (juarrox@gmail.com) # Version 0.2.9 (18.07.2014) #------------------------------------------------------------ # License: GPL (http://www.gnu.org/licenses/gpl-3.0.html) # Gracias a la librería plugint...
gpl-2.0
-3,087,301,862,750,812,000
40.096
235
0.599377
false
DiCarloLab-Delft/PycQED_py3
pycqed/tests/test_chevron_sim.py
1
1198
import numpy as np from pycqed.simulations import chevron_sim as chs class TestChevronSim: @classmethod def setup_class(cls): cls.e_min = -0.0322 cls.e_max = 0.0322 cls.e_points = 20 cls.time_stop = 60 cls.time_step = 4 cls.bias_tee = lambda self, t, a, b, c: ...
mit
2,995,853,736,358,412,000
32.277778
77
0.507513
false
Fendoe/open-hackathon-o
open-hackathon-server/src/hackathon/docker/hosted_docker.py
1
24562
# -*- coding: utf-8 -*- # # ----------------------------------------------------------------------------------- # Copyright (c) Microsoft Open Technologies (Shanghai) Co. Ltd. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this softw...
mit
6,927,733,338,354,126,000
42.319224
134
0.587859
false
ISISComputingGroup/EPICS-inst_servers
server_common/channel_access.py
1
11463
from __future__ import absolute_import, print_function, unicode_literals, division from time import sleep # This file is part of the ISIS IBEX application. # Copyright (C) 2012-2016 Science & Technology Facilities Council. # All rights reserved. # # This program is distributed in the hope that it will be useful. # Thi...
bsd-3-clause
-3,149,935,148,602,946,000
36.460784
121
0.634651
false
lwahlmeier/python-litesockets
tests/sslTests.py
1
3170
from __future__ import print_function import unittest, hashlib, logging import litesockets, time from . import utils import os try: xrange(1) except: xrange=range DIRNAME = os.path.dirname(__file__) TEST_STRING = ("TEST"*100).encode('utf-8') logging.basicConfig(format="%(asctime)s - %(levelname)s - %(name)s - %...
unlicense
4,541,997,351,854,999,600
28.90566
116
0.679495
false
tedunderwood/GenreProject
python/piketty/fifteenwordsnippets.py
1
11248
# fifteenwordsnippets.py # A script that searches a HathiTrust corpus of 6,942 volumes (1700-1923), plus Hoyt & Richard's # corpus of 808 vols (1923-1950), for words related to money. It takes seven words on either # side of those words to create a snippet. # In cases where the possibly-monetary word is ambiguous, e....
mit
1,693,274,650,786,676,000
33.460123
449
0.644205
false
matthewnorman/chronosphere
cronparse.py
1
7269
import re import time import datetime CRON_ORDER = ['minute', 'hour', 'day', 'month', 'dayofweek'] BOUNDS = {'minute': (0, 59), 'hour': (0, 23), 'day': (1, 31), 'month': (1, 12), 'dayofweek': (1, 7)} def str_test(tester): if isinstance(tester, str) or isinstance(tester, unicode): return True ...
mit
799,791,373,471,677,200
34.115942
78
0.500619
false
juneJuly/sulley
network_monitor.py
1
8872
#!c:\\python\\python.exe import threading import getopt import time import sys import os from sulley import pedrpc import pcapy import impacket import impacket.ImpactDecoder PORT = 26001 IFS = [] ERR = lambda msg: sys.stderr.write("ERR> " + msg + "\n") or sys.exit(1) USAGE = "USAGE: network_monitor.py" ...
gpl-2.0
-6,967,395,600,718,050,000
32.353383
120
0.535505
false
platformio/platformio-core
platformio/builder/tools/platformio.py
1
12169
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
-4,102,121,921,136,001,500
30.772846
87
0.612376
false
alesaccoia/TF_SoundClassification
as_sound/exec/train_vad_ann_5FCL_classifier.py
1
1585
import numpy as np import as_classification.ann_models import as_sound.features.extractFeatures as ef import as_classification.utilities import os import matplotlib.pyplot as plt # ------------------------------- # CREATE MODEL # ------------------------------- model = as_classification.ann_models.ANN_5FCL() model.i...
mit
3,080,008,847,308,803,000
25.864407
126
0.625868
false
DedMemez/ODS-August-2017
battle/BattleProps.py
1
13551
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.battle.BattleProps from panda3d.core import NodePath, SequenceNode, Texture, VBase4 from direct.actor import Actor from direct.directnotify import DirectNotifyGlobal from otp.otpbase import OTPGlobals import random Props = ((5, 'partyBall', 'part...
apache-2.0
-4,398,891,153,103,457,000
39.830247
396
0.551325
false
open-switch/ops-cli
tests/test_vtysh_ct_bgp_router_cli.py
1
10162
#!/usr/bin/python # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # # GNU Zebra 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, or (at your option) any # later version. # # GN...
gpl-2.0
7,163,407,321,694,720,000
35.952727
83
0.594666
false
tulip-control/tulip-control
contrib/xml/xmlio.py
1
23496
# Copyright (c) 2014 by California Institute of Technology # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this...
bsd-3-clause
-2,195,090,474,921,197,600
24.73494
77
0.701311
false
bitdagger/mtg-scanner
scanner.py
1
8352
from __future__ import print_function import numpy as np import cv2 import math import json import sys import phash import operator import signal import base64 from debugger import MTG_Debugger from mtgexception import MTGException from transformer import MTG_Transformer """Scanner module This module is responsible...
mit
-6,063,127,265,762,515,000
36.452915
77
0.530771
false
elParaguayo/RPI-Info-Screen
displayscreen.py
1
14668
''' 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...
gpl-3.0
2,532,543,182,638,478,300
38.750678
133
0.557131
false
chrislit/abydos
abydos/distance/_baulieu_ii.py
1
4475
# Copyright 2019-2020 by Christopher C. Little. # This file is part of Abydos. # # Abydos is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
gpl-3.0
-737,164,622,069,967,200
28.248366
78
0.575419
false
hying-caritas/ibsuite
ibpy/ibpy/input.py
1
1091
# # Copyright 2009 Huang Ying <huang.ying.caritas@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # import...
gpl-2.0
-2,425,802,207,864,475,600
27.710526
70
0.68561
false
greyhavens/thane
tamarin-central/configure.py
1
10406
#!/usr/bin/env python # -*- Mode: Python; indent-tabs-mode: nil -*- # vi: set ts=4 sw=4 expandtab: # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (the "License"); you may not use this file except in compliance w...
bsd-2-clause
-431,756,292,624,213,300
34.037037
179
0.639439
false
tgcmteam/tgcmlinux
src/tgcm/contrib/mobile-manager2/src/mobilemanager/devices/huawei/Modem.py
1
2711
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Authors : David Castellanos <dcastellanos@indra.es> # # Copyright (c) 2012, Telefonica Móviles España S.A.U. # # 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...
gpl-2.0
5,042,313,276,414,435,000
36.625
79
0.578442
false
mardix/pylot
pylot/__init__.py
1
12115
""" Pylot """ import os import datetime import inspect from werkzeug.contrib.fixers import ProxyFix from flask_classy import (FlaskView, route) from flask import (Flask, abort, redirect, request, render_template, ...
mit
3,641,058,281,966,772,000
29.516373
104
0.526042
false
csdms/bob
bob/build_environment.py
1
1669
import os from ConfigParser import SafeConfigParser import warnings class BuilderEnvironment(object): """Set up environment """ required_options = set(['cmake', 'wget', 'pkg_config', 'tar', 'xz', 'svn']) def __init__(self, cfg_file='bob.cfg', environ={}): self._environ = environ self....
mit
-2,572,499,518,844,303,000
30.490566
79
0.55003
false
saebyn/django-classifieds
classifieds/utils.py
1
13685
""" """ from PIL import Image import HTMLParser import string import re import os.path from django.utils.datastructures import SortedDict from django.utils.translation import ugettext as _ from django.core.paginator import Paginator, InvalidPage from django.template.loader import get_template from django.template imp...
bsd-3-clause
-3,965,156,459,822,403,000
41.632399
304
0.628864
false
rollasoul/ghosthugs
8266_server/8266_complex_high.py
1
3299
import socket import time import machine led1 = machine.Pin(5, machine.Pin.OUT) led2 = machine.Pin(4, machine.Pin.OUT) adc = machine.ADC(0) s = socket.socket() host = "To Do: Enter ip-address of remote server" port = 12344 counter = 0 while True: try: while True: s = socket.socket() ...
mit
7,458,516,790,863,299,000
38.27381
71
0.35344
false
blaze/dask
dask/dataframe/tests/test_indexing.py
2
19852
import pandas as pd import numpy as np import pytest import dask import dask.dataframe as dd from dask.dataframe._compat import tm, PANDAS_GT_100 from dask.dataframe.indexing import _coerce_loc_index from dask.dataframe.utils import assert_eq, make_meta, PANDAS_VERSION dsk = { ("x", 0): pd.DataFrame({"a": [1, ...
bsd-3-clause
-2,490,895,421,420,393,500
30.511111
87
0.545487
false
foursquare/pants
contrib/scrooge/tests/python/pants_test/contrib/scrooge/tasks/test_scrooge_gen_integration.py
1
3904
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals from pants_test.pants_run_integration_test import PantsRunIntegrationTest class Scrooge...
apache-2.0
-673,519,894,424,633,000
34.490909
99
0.587859
false
opendatakosovo/bpo
app/mod_api/views.py
1
4818
from bson import json_util from flask import Blueprint, render_template, request from flask import Response from datetime import datetime from app import mongo from app import utils import json mod_api = Blueprint('api', __name__, url_prefix='/api') @mod_api.route('/', methods=['GET']) def index(): ''' Renders t...
cc0-1.0
-4,381,790,031,525,156,000
29.5
125
0.512661
false