repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
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
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
wimoverwater/Sick-Beard
sickbeard/properFinder.py
1
9652
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 t...
gpl-3.0
6,596,478,407,435,919,000
41.089286
188
0.594592
false
4.423465
false
false
false
zejn/babbage
babbage/query/ordering.py
1
1438
import six from babbage.query.parser import Parser from babbage.exc import QueryException class Ordering(Parser): """ Handle parser output for sorting specifications, a tuple of a ref and a direction (which is 'asc' if unspecified). """ start = "ordering" def order(self, ast): if isinstance(...
mit
-4,660,107,442,955,513,000
34.95
78
0.573713
false
4.108571
false
false
false
Spedwards/UltimateControl
UltimateControl.py
1
9253
### CONFIGURATION ### VERSION = '1.0.1' USERAGEN = '''App: Ultimate Control Version: %s Description: Control Panel for Reddit. Read messages, reply to comments, swap accounts, etc. Known Issues: Possible faults on Mac/Linux Author: /u/Spedwards'''%VERSION ### /CONFIGURATION ### import ctypes,getp...
gpl-2.0
1,076,868,625,494,481,900
24.42033
98
0.581325
false
2.903357
false
false
false
yugangw-msft/azure-cli
src/azure-cli/azure/cli/command_modules/databoxedge/generated/custom.py
2
13374
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incor...
mit
4,120,492,971,632,638,000
39.404834
87
0.470166
false
5.041086
false
false
false
hfutsuchao/Python2.6
按经纪公司统计.py
1
2385
# -*- coding: utf-8 -*- # 统计几天内CPC总消费额度 import time, MySQLdb, os from pychartdir import * result = open('result.txt','w') #频道类型 arr = [1,3,5,6,7,8,9] dic = {} sum = 0 timeNow = int(time.time()) dateNow = time.strftime('%Y-%m-%d',time.localtime(timeNow)) dayNow = time.strftime('%H:%M:%S',time.localtime(ti...
gpl-2.0
-4,520,024,245,775,749,600
49.8
377
0.637183
false
2.792566
false
false
false
steveb/heat-cfntools
tools/hacking.py
1
22033
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012, Cloudscaling # 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 # # ...
apache-2.0
154,821,341,850,869,150
33.588697
79
0.588481
false
3.850577
true
false
false
pra85/calibre
src/calibre/gui2/convert/page_setup.py
1
3638
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' from PyQt4.Qt import Qt, QAbstractListModel, QVariant, SIGNAL from calibre.gui2.conv...
gpl-3.0
4,707,226,165,205,911,000
37.294737
78
0.603079
false
3.623506
false
false
false
shiroyuki/Tori
tori/db/expression.py
1
9031
# -*- coding: utf-8 -*- import json import re class InvalidExpressionError(Exception): """ Generic Invalid Expression Error """ class DataObject(object): @property def in_json(self): raise RuntimeError('Unknown data object') def __str__(self): return str(self.in_json) def __repr_...
mit
-8,579,741,047,393,244,000
33.872587
143
0.590632
false
4.156006
false
false
false
tizonia/tizonia-openmax-il
clients/gmusic/gmusicproxy/tizgmusicproxy.py
1
64541
# Copyright (C) 2011-2020 Aratelia Limited - Juan A. Rubio and contributors # # Portions Copyright (C) 2014 Dan Nixon # (see https://github.com/DanNixon/PlayMusicCL) # # This file is part of Tizonia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with...
lgpl-3.0
-8,566,116,457,785,269,000
36.220877
166
0.488961
false
4.436417
false
false
false
coleifer/sqlite-web
sqlite_web/sqlite_web.py
1
28149
#!/usr/bin/env python import datetime import hashlib import math import operator import optparse import os import re import sys import threading import time import webbrowser from collections import namedtuple, OrderedDict from functools import wraps from getpass import getpass from io import TextIOWrapper # Py2k com...
mit
7,096,503,714,492,770,000
30.735062
87
0.591353
false
3.88048
false
false
false
Ghini/ghini.desktop
bauble/plugins/tag/__init__.py
1
30761
# -*- coding: utf-8 -*- # # Copyright (c) 2005,2006,2007,2008,2009 Brett Adams <brett@belizebotanic.org> # Copyright (c) 2012-2018 Mario Frasca <mario@anche.no> # # This file is part of ghini.desktop. # # ghini.desktop is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publi...
gpl-2.0
3,148,559,957,841,150,000
34.727062
124
0.569585
false
3.827423
false
false
false
septicmk/MEHI
MEHI/paralleled/registration.py
1
4281
################################ # Author : septicmk # Date : 2015/07/23 19:20:39 # FileName : registration.py ################################ import numpy as np import math from MEHI.utils.tool import exeTime def _generate_H(imgA, imgB): ''' Usage: - calc the grey level histogram of ...
bsd-3-clause
7,370,186,484,585,331,000
26.731544
108
0.510628
false
2.753055
false
false
false
RobFisher/mailshare
settings_example.py
1
6974
# Django settings for mailshare project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. '...
bsd-3-clause
-3,954,156,090,264,829,000
34.401015
128
0.666475
false
3.771769
false
false
false
nikhila05/MicroSite
micro_admin/migrations/0001_initial.py
1
4049
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('auth', '0001_initial'), ] operations = [ migrations.CreateModel( name='User', ...
gpl-2.0
-7,370,626,334,019,041,000
56.842857
244
0.566807
false
4.165638
false
false
false
Azure/azure-sdk-for-python
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_03_31/_container_service_client.py
1
4255
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
2,756,128,479,042,033,000
44.265957
172
0.672855
false
4.483667
true
false
false
colemckown/SpaghettiBot
SpaghettiBot/bot.py
1
8329
# bot.py ### Copyright 2017 Cole McKown """ This file is part of SpaghettiBot. SpaghettiBot 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 optio...
gpl-3.0
-1,718,825,684,996,029,000
29.287273
97
0.555049
false
3.615017
false
false
false
ablab/rectangles
N50.py
1
1382
############################################################################ # Copyright (c) 2011-2012 Saint-Petersburg Academic University # All Rights Reserved # See file LICENSE for details. ############################################################################ def NG50(numlist, reference_length, percentage =...
gpl-2.0
-785,177,476,873,318,400
33.55
77
0.637482
false
3.598958
false
false
false
katiecheng/Bombolone
core/upload.py
1
6986
# -*- coding: utf-8 -*- """ upload.py ~~~~~~ :copyright: (c) 2014 by @zizzamia :license: BSD (See LICENSE for details) """ import cStringIO import os import werkzeug import time from random import randint from flask import request from imghdr import what from PIL import Image # Imports inside Bombolo...
bsd-3-clause
2,226,826,221,960,201,500
34.768421
103
0.576295
false
3.747854
false
false
false
sitian/wing
services/whub/util/bridge.py
1
3177
# bridge.py # # Copyright (C) 2013 Yi-Wei Ci <ciyiwei@hotmail.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 # ...
gpl-2.0
-1,648,800,382,939,889,400
28.981132
78
0.615675
false
3.292228
false
false
false
CityGrid/arsenal
helpers/rp_arsenal_esx/setup.py
1
1578
'''setup script for arsenal VMWare ESXi client.''' # Copyright 2015 CityGrid Media, 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...
apache-2.0
-4,472,757,941,217,949,700
30.56
75
0.67237
false
3.452954
false
false
false
danielpecak/salesman
myio.py
1
2731
#!/usr/bin/env python # -*- coding:utf-8 -*- """Module to manage Input and Output. This is important to save the evolution at some stage and load it later and continue.""" from os import listdir, remove ##### ##### Managin snapshots ##### def saveSnapshot(continent,popNo,xmen,t,population,bestpopulation,prefix=None): ...
mit
3,555,769,135,009,577,000
32.716049
160
0.588429
false
3.255066
false
false
false
jason-weirather/Au-public
iron/pythonlib/GenePredFuzzyBasics.py
1
33359
# Class for finding general genepred matches import sys, random, string from GenePredBasics import GenePredEntry from RangeBasics import Bed import base64 # Similar to genepred but no requirement for exact borders class FuzzyGenePred: #set use_dir true if you want to use direction and make it direction specific #s...
apache-2.0
6,250,429,021,135,553,000
40.908291
151
0.642106
false
3.120288
false
false
false
hpfem/agros2d
resources/test/test_suite/fields/flow.py
1
8536
import agros2d from test_suite.scenario import Agros2DTestCase from test_suite.scenario import Agros2DTestResult class TestFlowPlanar(Agros2DTestCase): def setUp(self): # problem problem = agros2d.problem(clear = True) problem.coordinate_type = "planar" problem.mesh_type = ...
gpl-2.0
-5,755,130,634,333,286,000
48.633721
149
0.567362
false
3.040969
true
false
false
hycis/Pynet
scripts/nii/show_weights.py
1
1681
import matplotlib matplotlib.use('Agg') import cPickle from matplotlib import pyplot as plt import os data_dir = '/Volumes/Storage/models' img_save_dir = '/Volumes/Storage/weights' models = [('clean', 'AE1110_Scale_Warp_Blocks_2049_500_tanh_tanh_gpu_sgd_clean_continue_20141110_1235_21624029'), ('gaussian...
apache-2.0
-5,928,276,268,707,594,000
41.025
119
0.647829
false
3.001786
false
false
false
eljost/pysisyphus
pysisyphus/config.py
1
1054
import configparser import os from pathlib import Path import sys DEFAULTS = { "mwfn": "Multiwfn", "jmol": "jmol", "packmol": "packmol", } # First try to read pysisyphusrc path an environment variable try: pysisrc_env = os.getenv("PYSISRC", default=None) config_fn = Path(pysisrc_env).resolve() ...
gpl-3.0
7,448,853,088,029,907,000
25.35
78
0.639469
false
3.335443
true
false
false
Jumpscale/jumpscale6_core
lib/JumpScale/baselib/influxdb/Influxdb.py
1
1167
from JumpScale import j import redis from influxdb import client as influxdb class InfluxdbFactory: """ """ def __init__(self): pass def get(self, host='localhost', port=8086,username='root', password='root', database=None, ssl=False, verify_ssl=False, timeout=None, use_udp=False, udp_port=4...
bsd-2-clause
4,074,254,483,548,780,000
39.241379
168
0.65467
false
3.392442
false
false
false
rhertzog/parrainage
parrainage/app/management/commands/import_maires.py
1
1725
# Copyright 2017 Raphaël Hertzog # # This file is subject to the license terms in the LICENSE file found in # the top-level directory of this distribution. import argparse from datetime import datetime import csv import logging from django.core.management.base import BaseCommand from parrainage.app.models import Elu...
mit
2,805,436,106,531,161,000
35.574468
79
0.562536
false
3.924658
false
false
false
TomAugspurger/pandas
pandas/core/window/common.py
1
8492
"""Common utility functions for rolling operations""" from collections import defaultdict from typing import Callable, Optional import warnings import numpy as np from pandas.core.dtypes.generic import ABCDataFrame, ABCSeries from pandas.core.generic import _shared_docs from pandas.core.groupby.base import GroupByMi...
bsd-3-clause
4,070,948,489,017,571,300
33.241935
86
0.500471
false
4.493122
false
false
false
frac/celery
celery/concurrency/base.py
1
3691
import os import sys import time import traceback from celery import log from celery.datastructures import ExceptionInfo from celery.utils.functional import partial from celery.utils import timer2 def apply_target(target, args=(), kwargs={}, callback=None, accept_callback=None, pid=None): if accept_callb...
bsd-3-clause
9,222,525,072,499,953,000
27.612403
74
0.578976
false
4.133259
false
false
false
jadarve/lluvia
doc/source/conf.py
1
1964
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
apache-2.0
8,355,958,424,054,608,000
34.071429
79
0.662933
false
4.15222
true
false
false
Zenohm/mafiademonstration
src/libs/garden/garden.dragndrop/DragNDropWidget.py
1
7101
#!/usr/bin/python # -*- coding: UTF-8 -*- from kivy.core.window import Window from kivy.animation import Animation import copy from kivy.uix.widget import Widget from kivy.properties import ( ListProperty, NumericProperty, BooleanProperty, ObjectProperty) class DragNDropWidget(Widget): # let kivy take care of...
mit
5,651,998,982,746,169,000
36.17801
157
0.567385
false
3.78115
false
false
false
geekosphere/wootpaste
wootpaste/blueprint/frontend.py
1
11931
# -*- coding: utf-8 -*- from forms import * from errors import * from wootpaste import mail, config from wootpaste.database import db_session from wootpaste.models import * from wootpaste.utils.helpers import * from wootpaste.utils import * if config['paste.spam_ml']: import wootpaste.utils.spam_ml as spam_ml f...
agpl-3.0
6,217,632,890,019,818,000
35.375
130
0.647976
false
3.740125
true
false
false
ooici/coi-services
ion/services/dm/presentation/catalog_management_service.py
1
4457
#!/usr/bin/env python ''' @author Luke Campbell <LCampbell@ASAScience.com> @file ion/services/dm/presentation/catalog_management_service.py @description Catalog Management Service ''' from pyon.public import PRED,RT from pyon.util.log import log from pyon.util.arg_check import validate_is_instance from pyon.core.excep...
bsd-2-clause
-5,771,011,219,976,491,000
36.453782
132
0.64595
false
4.149907
false
false
false
xtr4nge/module_ap
includes/ap-picker.py
1
3724
#!/usr/bin/env python #REF: http://stackoverflow.com/questions/21613091/how-to-use-scapy-to-determine-wireless-encryption-type import datetime a = datetime.datetime.now() import logging logging.getLogger("scapy.runtime").setLevel(logging.ERROR) from scapy.all import * import sys, getopt import json from multiproces...
gpl-3.0
-1,751,523,744,158,714,600
25.225352
121
0.542427
false
3.56705
false
false
false
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/pyshared/orca/scripts/apps/notify-osd/script.py
1
3625
# Orca # # Copyright 2009 Eitan Isaacson # # 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. # # This library is ...
gpl-3.0
-5,192,629,922,613,932,000
34.891089
80
0.576552
false
4.480841
false
false
false
yueyoum/django-siteuser
example/example/settings.py
1
6381
# Django settings for example project. import os CURRENT_PATH = os.path.dirname(os.path.realpath(__file__)) EXAMPLE_PATH = os.path.dirname(CURRENT_PATH) PROJECT_PATH = os.path.dirname(EXAMPLE_PATH) import djcelery djcelery.setup_loader() try: import siteuser except ImportError: import sys sys.path.append(...
bsd-3-clause
387,109,508,472,534,900
29.535885
88
0.689234
false
3.517641
false
false
false
juliantaylor/scipy
scipy/special/generate_ufuncs.py
2
42850
#!/usr/bin/python """ generate_ufuncs.py Generate Ufunc definition source files for scipy.special. Produces files '_ufuncs.c' and '_ufuncs_cxx.c' by first producing Cython. This will generate both calls to PyUFunc_FromFuncAndData and the required ufunc inner loops. The syntax in the ufunc signature list is <li...
bsd-3-clause
8,449,107,289,027,954,000
42.858751
144
0.512275
false
3.253854
false
false
false
ChromiumWebApps/chromium
tools/memory_inspector/memory_inspector/core/native_heap.py
1
1107
# 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. from memory_inspector.core import stacktrace class NativeHeap(object): """A snapshot of outstanding (i.e. not freed) native allocations. This is typic...
bsd-3-clause
-1,821,081,537,914,032,600
26.675
80
0.698284
false
3.739865
false
false
false
engdan77/edoautohome
edo.py
1
87477
#!/usr/bin/env python2.7 # edo.py - This Module is for the most used classes and methods # URL: https://github.com/engdan77/edoautohome # Author: Daniel Engvall (daniel@engvalls.eu) __version__ = "$Revision: 20160725.1240 $" import sys import threading import SocketServer def edoGetDateTime(): import time ...
mit
4,622,001,913,561,012,000
35.282455
193
0.528893
false
3.970813
false
false
false
athento/django-kong-admin
kong_admin/sync/consumers.py
1
7071
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import uuid from abc import ABCMeta, abstractmethod from kong.exceptions import ConflictError from kong_admin.models import ConsumerReference, BasicAuthReference, KeyAuthReference, OAuth2Reference from .base import KongProxySyncEngine c...
bsd-3-clause
-1,189,745,109,247,307,000
37.429348
109
0.66002
false
3.735341
false
false
false
ffalcinelli/pydivert
pydivert/packet/__init__.py
1
11253
# -*- coding: utf-8 -*- # Copyright (C) 2016 Fabio Falcinelli, Maximilian Hils # # 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 Foundation, either version 3 of the License, or # (at your option) an...
lgpl-3.0
-978,875,195,511,951,900
31.151429
115
0.563761
false
4.083091
false
false
false
myarjunar/QGIS
python/plugins/processing/algs/gdal/GridNearest.py
1
4625
# -*- coding: utf-8 -*- """ *************************************************************************** GridNearest.py --------------------- Date : October 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com *************...
gpl-2.0
8,602,079,880,092,043,000
41.045455
99
0.561514
false
4.231473
false
false
false
burke-software/django-ldap-groups
ldap_groups/models.py
1
1084
from django.db import models from django.contrib.auth.models import Group from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class LDAPGroup(models.Model): """ An LDAPGroup defines a mapping between an LDAP Organizational Unit (OU) and a django.contrib.auth.models....
bsd-2-clause
-3,251,567,315,692,780,000
39.148148
80
0.734317
false
4.284585
false
false
false
nikste/tensorflow
tensorflow/contrib/legacy_seq2seq/python/kernel_tests/seq2seq_test.py
1
43178
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
3,885,149,311,893,245,400
38.004517
96
0.574783
false
3.547613
true
false
false
AlexanderSk/fail2ban
fail2ban/server/ticket.py
1
2463
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*- # vi: set ft=python sts=4 ts=4 sw=4 noet : # This file is part of Fail2Ban. # # Fail2Ban 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;...
gpl-2.0
-5,847,687,461,748,439,000
23.878788
102
0.676817
false
3.328378
false
false
false
alexgibson/lumbergh
careers/base/tests/test_middleware.py
1
1302
from mock import Mock from django.http import HttpResponseRedirect from django.test import RequestFactory from careers.base.middleware import LocaleRedirectionMiddleware from careers.base.tests import TestCase class RedirectionTests(TestCase): def setUp(self): self.requestfactory = RequestFactory() ...
mpl-2.0
-4,925,404,940,375,150,000
33.263158
74
0.64977
false
4.2
true
false
false
Repo3DS/shop-cache
IconManager.py
1
1882
from PIL import Image import os, hashlib class IconManager: def __init__(self, icon_index = 0, image_dir = "images"): self.icon_index = icon_index self.image_index = -1 if not icon_index else int(icon_index / 441) self.image_array = [] self.icon_hashes = [] self.image_dir = image_dir # Load images i...
mit
2,605,755,780,355,179,000
32.017544
83
0.651966
false
2.723589
false
false
false
unbornchikken/genevo-python
test/optimizers/optimizationcases.py
1
5251
import torch import numbers import string import numpy as np import array import genevo as g import math from ..common import GTestCase class OptimizationCases(GTestCase): def run_simple_problem_test(self, opt_factory): max_iteration = 50 target = 42.0 treshold = 0.1 def fitness_fu...
apache-2.0
8,821,476,827,457,318,000
30.449102
81
0.528661
false
3.909903
false
false
false
petr-devaikin/app
pointer/web/ar_markers/hamming/marker.py
1
1687
import cv2 from numpy import mean, binary_repr, zeros from numpy.random import randint from scipy.ndimage import zoom from coding import encode, HAMMINGCODE_MARKER_POSITIONS MARKER_SIZE = 7 class HammingMarker(object): def __init__(self, id, contours=None): self.id = id self.contours = contours...
mit
4,416,678,292,770,802,000
30.240741
99
0.62537
false
3.394366
false
false
false
stephanie-wang/ray
python/ray/tune/examples/xgboost_example.py
1
1529
import xgboost as xgb import numpy as np import sklearn.datasets import sklearn.metrics from sklearn.model_selection import train_test_split from ray import tune def XGBCallback(env): tune.track.log(**dict(env.evaluation_result_list)) def train_breast_cancer(config): data, target = sklearn.datasets.load_br...
apache-2.0
-8,646,225,971,472,312,000
30.204082
79
0.627207
false
3.107724
true
false
false
blockstack/proofchecker
tests/unit_tests.py
1
3121
#!/usr/bin/env python # -*- coding: utf-8 -*- """ proofchecker ~~~~~ :copyright: (c) 2014-2015 by Halfmoon Labs, Inc. :copyright: (c) 2016 blockstack.org :license: MIT, see LICENSE for more details. """ import os import sys import json import unittest import requests # Hack around absolute paths c...
gpl-3.0
-7,110,617,430,103,976,000
24.373984
84
0.606216
false
3.637529
true
false
false
iocoop/beancount
src/python/beancount/plugins/book_conversions_test.py
1
10879
__author__ = "Martin Blais <blais@furius.ca>" import unittest import textwrap from beancount import loader from beancount.parser import cmptest from beancount.plugins import book_conversions from beancount.utils import test_utils class TestBookConversions(cmptest.TestCase): @loader.load_doc() def test_book...
gpl-2.0
-8,808,919,447,525,352,000
34.786184
96
0.548488
false
3.469069
true
false
false
alfa-jor/addon
plugin.video.alfa/channels/vporn.py
1
5411
# -*- coding: utf-8 -*- #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os, sys from core import jsontools as json from core import scrapertools from core import servertools from core.item import Item from platformcode import config, logger from core import httptoo...
gpl-3.0
69,964,132,804,695,430
43.719008
119
0.611532
false
3.60493
false
false
false
RevSquare/gipsy_toolbar
gipsy_toolbar/migrations/0002_auto__chg_field_gipsytoolbarmenu_url.py
1
1654
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'GipsyToolbarMenu.url' db.alter_column(u'gipsy_toolbar_...
bsd-3-clause
1,733,207,060,608,434,200
46.285714
156
0.64208
false
3.651214
false
false
false
jdmonaco/vmo-feedback-model
src/compare.py
1
8362
# encoding: utf-8 """ compare.py -- Functions for comparing double-rotation session responses Exoported namespace: mismatch_response_tally, mismatch_rotation, cluster_mismatch_rotation, population_spatial_correlation, correlation_matrix, correlation_diagonals, common_units Created by Joe Monaco on 2010-02-1...
mit
8,423,933,800,227,329,000
35.356522
81
0.641952
false
3.799182
false
false
false
acesonl/remotecare
remotecare/apps/questionnaire/default/models.py
1
7543
# -*- coding: utf-8 -*- """ This module contains all the default questionnaire models :subtitle:`Class definitions:` """ from django import forms from django.db import models from django.utils.translation import ugettext as _ from apps.questionnaire.models import QuestionnaireBase from core.models import DateField, Ch...
gpl-3.0
-5,148,538,560,475,391,000
29.538462
78
0.600689
false
3.21526
false
false
false
wmhi/python-learn
python_syntax_dictionary.py
1
1766
# dictionary just like remap in linux # 3 ways to define dictionary dictionary_1 = {"wm": "me", "hlh": "ok"} dictionary_2 = dict((("wm", "me"), ("hlh", "ok"))) dictionary_3 = dict(wm="me", hlh='ok') print(type(dictionary_1), list(dictionary_1), dictionary_1) print(type(dictionary_2), list(dictionary_2), dictionary_2...
gpl-3.0
-3,179,476,289,846,931,000
25.358209
92
0.729898
false
3.120141
false
false
false
chrrrles/fuel-library
deployment/puppet/cobbler/templates/scripts/pmanager.py
1
47232
#!/usr/bin/env python import json import math import re class PManager(object): def __init__(self, pm_data): if isinstance(pm_data, (str, unicode)): self.pm_data = json.loads(pm_data) else: self.pm_data = pm_data self.data = self.pm_data['ks_spaces'] self.k...
apache-2.0
7,334,154,159,211,329,000
39.403764
104
0.433689
false
3.997969
false
false
false
raasss/digitalocean_api_python_client
digitalocean_api_python_client/snapshot_resource.py
1
1346
from .api import Api import logging class SnapshotResource(Api): def __init__(self): self.path = '/v2/snapshots' def all(self, resource_type=None, page=None, per_page=None): logging.info('List all snapshots. (resource_type={}, page={}, per_page={})'.format(resource_type, page, per_page)) ...
gpl-3.0
5,113,930,920,083,966,000
39.787879
122
0.471768
false
4.471761
false
false
false
BlackEarth/bl
bl/dict.py
1
4554
# definition of a dict-replacement class that allows dot-notation attribute access import collections class Dict(dict): """A dict class that: * allows dot-notation attribute access, returning None if key not found * sorts keys on calls to keys() and items() and repr(), making many things easier ...
mpl-2.0
-813,925,482,015,069,300
35.95
97
0.514054
false
3.846284
false
false
false
carpedm20/lstm-char-cnn-tensorflow
models/TDNN.py
1
1385
import tensorflow as tf from .ops import conv2d from base import Model class TDNN(Model): """Time-delayed Nueral Network (cf. http://arxiv.org/abs/1508.06615v4) """ def __init__(self, input_, embed_dim=650, feature_maps=[50, 100, 150, 200, 200, 200, 200], kernels=[1,2,3,4,5,6,7], c...
mit
5,082,752,087,497,373,000
31.209302
92
0.605054
false
3.281991
false
false
false
michalmielczynski/RayPump-Addon
raypump_ui_panel_linux_deb.py
1
7681
bl_info = { 'name': 'RayPump Online Accelerator', 'author': 'michal.mielczynski@gmail.com, tiago.shibata@gmail.com', 'version': '(0, 3, 4)', 'blender': (2, 6, 6), 'location': 'Properties > Render > RayPump.com', 'description': 'Easy to use free online GPU-farm for Cycles', 'category': 'Rende...
mit
-2,432,505,322,550,769,000
35.061033
112
0.580263
false
4.013062
false
false
false
niwinz/tornado-webtools
webtools/utils/timezone.py
1
1173
from datetime import datetime, timedelta, tzinfo import pytz utc = pytz.utc _localtime = None def get_default_timezone_name(application=None): if application is None: from webtools.application import get_app application = get_app() return application.conf.TZ def get_default_timezone(applica...
bsd-3-clause
-8,871,662,357,836,546,000
24.5
95
0.72549
false
3.884106
false
false
false
lbouma/Cyclopath
pyserver/item/feat/terrain.py
1
1983
# Copyright (c) 2006-2013 Regents of the University of Minnesota. # For licensing terms, see the file LICENSE. import os import sys import conf import g from item import geofeature from item.util.item_type import Item_Type from util_ import gml log = g.log.getLogger('terrain') class Geofeature_Layer(object): #...
apache-2.0
-6,559,681,302,402,936,000
21.280899
74
0.639939
false
3.277686
false
false
false
sony/nnabla
python/src/nnabla/grad.py
1
15682
# Copyright 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 # # Un...
apache-2.0
-537,957,525,530,826,100
38.205
382
0.561599
false
3.929341
false
false
false
mpihlak/skytools-dev
python/skytools/adminscript.py
1
3636
#! /usr/bin/env python """Admin scripting. """ import sys, inspect from skytools.scripting import DBScript from skytools.quoting import quote_statement __all__ = ['AdminScript'] class AdminScript(DBScript): """Contains common admin script tools. Second argument (first is .ini file) is takes as command ...
isc
-6,132,317,425,804,299,000
28.803279
78
0.525853
false
3.702648
false
false
false
jmorse/numbness
config.py
1
1356
import sys from math import log, ceil def set_config(rounds, teams, closeness, slots): global NUMROUNDS, NUMTEAMS, CLOSENESS, NUMSLOTS NUMROUNDS = rounds # How many rounds to schedule in the competition NUMTEAMS = teams # The number of teams taking part CLOSENESS = closeness # Minimum number...
bsd-2-clause
-6,737,194,192,355,794,000
34.684211
92
0.665929
false
3.26747
false
false
false
sdispater/orator
tests/schema/integrations/test_sqlite.py
1
4231
# -*- coding: utf-8 -*- from ... import OratorTestCase from . import IntegrationTestCase, User, Post from orator import Model from orator.connections import SQLiteConnection from orator.connectors.sqlite_connector import SQLiteConnector class SchemaBuilderSQLiteIntegrationTestCase(IntegrationTestCase, OratorTestCase...
mit
6,028,895,003,069,735,000
28.587413
88
0.617821
false
4.326176
true
false
false
ISRyuu/ISNNTF
MYYOLO.py
1
16338
import tensorflow as tf import numpy as np import time from ISNNTF_DS import ConvolutionalLayer from ISNNTF_DS import FullyConnectedLayer from ISNNTF_DS import ISTFNN from TFRConverter import VOC_TFRecords def leaky_relu(x): return tf.nn.leaky_relu(x, alpha=0.1) def YOLO_layers(mbs): keep_prob = tf.placehol...
bsd-3-clause
-4,331,951,014,391,955,000
33.395789
104
0.468417
false
3.802188
true
false
false
wavemoth/wavemoth
examples/residual_blocks.py
1
2300
from __future__ import division # Have a closer look at the residual blocks # Conclusion: No residual block is likely to be so permuted, or # so steeply changing, that we can't start recursion on the same l # across a block (the problem beeing that some P_lm's are too small to be # represented in IEEE floating point)....
gpl-2.0
-4,992,201,464,129,781,000
27.395062
89
0.633043
false
3.091398
false
false
false
NeCTAR-RC/heat
heat/engine/resources/neutron/port.py
1
8859
# # 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
2,627,913,174,355,255,300
35.607438
79
0.567333
false
4.445058
false
false
false
ohsu-qin/qipipe
qipipe/qiprofile/demographics.py
1
2018
""" This module updates the qiprofile database Subject demographics information from the demographics Excel workbook file. """ import re from qirest_client.model.subject import Subject from .xls import Worksheet from . import parse SHEET = 'Demographics' """The input XLS sheet name.""" COL_ATTRS = {'Race': 'races'} ...
bsd-2-clause
-8,847,790,809,053,024,000
28.676471
77
0.67443
false
4.160825
false
false
false
eviljeff/olympia
src/olympia/activity/models.py
1
24494
import json import string import uuid from collections import defaultdict from copy import copy from datetime import datetime from django.apps import apps from django.conf import settings from django.db import models from django.utils import timezone from django.utils.functional import cached_property from django.uti...
bsd-3-clause
-999,813,664,649,911,000
36.281583
79
0.581081
false
4.145904
false
false
false
sankalpg/MelodicAnalysisDatasets
Scripts/melodySimilarityDatasetUtil.py
1
3216
import os, sys import numpy import json import time def verify_melodic_similarity_dataset_files(file_list, root_dir, ext, replace_str): """ """ #reading the dataset file lines = open(file_list, 'r').readlines() files_present = 0 files_absent = 0 for line in lines: fname = line.strip() audiopath = os.path...
agpl-3.0
892,559,838,839,523,600
35.134831
217
0.644279
false
2.964055
false
false
false
tschijnmo/drudge
drudge/term.py
1
68650
"""Tensor term definition and utility.""" import abc import collections import functools import itertools import operator import types import typing import warnings from collections.abc import Iterable, Mapping, Callable, Sequence from sympy import ( sympify, Symbol, KroneckerDelta, Eq, solveset, S, Integer, Add,...
mit
-3,954,528,875,983,035,000
29.403012
80
0.568565
false
4.157834
false
false
false
ihgazni2/dlixhict-didactic
xdict/hdict_xml.py
1
6775
import copy from lxml import etree from xdict import utils from xdict import hdict_object def get_lxml_etree_root_type(): html_text='<html><boby></body></html>' root = etree.HTML(html_text) return(type(root)) def attrib_str_to_dict(attrib_str): html_text = '' html_text = ''.join(('<div...
mit
582,503,362,632,674,300
43.469799
213
0.553948
false
3.362283
false
false
false
AustrianGeekForce/p1tr-legacy
plugins/search.py
1
1590
"""Plugin for generating search links for wikipedia, google, yahoo and wikia.""" from lib.plugin import Plugin class SearchPlugin(Plugin): def __init__(self): Plugin.__init__(self, 'search') self._set_summary('Plugin to provide a quick way to generate search \ links') self._add_c...
bsd-3-clause
4,311,565,900,596,862,500
40.842105
92
0.58239
false
3.965087
false
false
false
broodhand/ntes
tmp_test/tmp_testNetsData.py
1
1359
# -*- coding: utf-8 -*- """ Created on Fri Mar 18 13:07:18 2016 @author: Administrator """ from urllib import request import json,re,time time1='' update='' with request.urlopen('http://api.money.126.net/data/feed/1160220,money.api') as f: data = f.read() myjson = re.search(r'\(.*\)',data.decode('ut...
gpl-3.0
-4,995,166,211,744,251,000
31.380952
99
0.545254
false
3.167832
false
false
false
yongshengwang/builthue
apps/beeswax/src/beeswax/views.py
1
34814
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
-3,382,681,893,441,415,000
33.469307
160
0.671081
false
3.546659
false
false
false
estaban/pyload
module/plugins/hoster/FileomCom.py
1
1845
# -*- coding: utf-8 -*- ############################################################################### # 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 # Licen...
gpl-3.0
826,097,979,582,909,800
35.9
82
0.591328
false
3.548077
false
false
false
dydus0x14/ifacegen
generator/ifacegen.py
1
3337
# Created by Evgeny Kamyshanov on March, 2014 # Copyright (c) 2013-2014 BEFREE Ltd. # Modified by Evgeny Kamyshanov on March, 2015 # Copyright (c) 2014-2015 Evgeny Kamyshanov # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Softw...
mit
1,263,040,944,066,479,900
34.892473
153
0.735091
false
3.553781
false
false
false
317070/kaggle-heart
configurations/j4_iranet.py
1
6959
from default import * import theano import theano.tensor as T import lasagne as nn import deep_learning_layers import layers import preprocess import postprocess import objectives import theano_printer import updates cached = "memory" # Save and validation frequency validate_every = 10 validate_train_set = False sa...
mit
-2,605,311,616,676,672,500
41.432927
155
0.688892
false
2.847381
false
false
false
quantumlib/OpenFermion-PySCF
openfermionpyscf/_run_pyscf.py
1
9055
# 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 # distribu...
apache-2.0
1,328,316,290,526,723,000
34.233463
79
0.635008
false
3.556559
false
false
false
pombredanne/zippysnippy
snippy/ui.py
1
3197
#!/usr/bin/env python # -*- coding: ascii -*- import urwid class SelText(urwid.Text): """A selectable text widget. See urwid.Text.""" def selectable(self): return True def keypress(self, size, key): return key # don't handle any keys class JKListbox(urwid.ListBox): """Listbox that also scrolls its...
agpl-3.0
-4,619,514,685,211,151,000
24.99187
75
0.622459
false
3.445043
false
false
false
tomslee/airbnb-data-collection
airbnb_s3_upload.py
1
9128
#!/usr/bin/python3 # ============================================================================ # Manage files in S3 # ============================================================================ import boto3 import os import pandas as pd import logging import zipfile from airbnb_config import ABConfig AWS_S3_BUCKET...
mit
6,713,593,001,887,515,000
37.677966
114
0.558282
false
3.393309
true
false
false
wearpants/osf.io
api/addons/views.py
1
3006
import importlib from rest_framework.exceptions import NotFound from rest_framework import generics, permissions as drf_permissions from framework.auth.oauth_scopes import CoreScopes from api.addons.serializers import AddonSerializer from api.base.permissions import TokenHasScope from api.base.settings import ADDONS...
apache-2.0
5,098,986,114,050,244,000
34.364706
111
0.654358
false
4.520301
false
false
false
byu-osl/city-issue-tracker
app/models/user.py
1
3161
import re from flask import jsonify from app import db from subscriptions import subscriptions from sqlalchemy.orm import validates from citmodel import CITModel class User(CITModel): """ A Model to define Users and their information Attributes userId (int): The primary key of the User email (string): The User'...
gpl-2.0
-4,578,793,112,342,892,500
28.542056
129
0.682695
false
2.999051
false
false
false
amancevice/legacy
connectors/Oracle UCM/Oracle UCM Connector.py
1
10225
""" Description: Creates content within an Oracle UCM instance Author: A Mancevice Project Resources: "webservice" - URL of the UCM Web Service "user" - username for the UCM Instance "password" - password for the UCM Instance "verbose" - toggle logging. If set to True, service calls will will be...
mit
-8,419,702,211,996,838,000
40.909836
160
0.696626
false
3.196311
false
false
false
praekelt/vumi-go
go/billing/migrations/0003_auto__chg_field_account_user.py
1
7072
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): depends_on = ( ("base", "0009_migrate_user_to_gouser"), ) def forwards(self, orm): # Changing field 'Account.user' ...
bsd-3-clause
6,034,672,838,439,185,000
68.333333
187
0.556137
false
3.63039
false
false
false
cmpilato/thotkeeper
thotkeeper/__init__.py
1
1924
# ThotKeeper -- a personal daily journal application. # # Copyright (c) 2004-2021 C. Michael Pilato. All rights reserved. # # By using this file, you agree to the terms and conditions set forth in # the LICENSE file which can be found at the top level of the ThotKeeper # distribution. # # Website: http://www.thotkeepe...
bsd-2-clause
4,923,428,614,020,073,000
33.981818
73
0.591996
false
4.093617
false
false
false
ptphp/PyLib
src/tornado/demos/lihuashu/models/board.py
1
2286
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' @author: Joseph @email:liseor@gmail.com Created on 2012-7-20 ''' from riakClient.document import Document from config.settings import globalSetting from models.thumb import Thumb class Board(Document): bucket_name = globalSetting['boardBucket'] data = { ...
apache-2.0
-1,735,987,443,739,803,000
27.575
70
0.414698
false
4.249071
false
false
false
cybertec-postgresql/pgwatch2
webpy/pgwatch2.py
1
38573
import glob import logging import os import datadb import crypto import utils from datetime import datetime from datetime import timedelta SERVICES = {'pgwatch2': {'log_root': '/var/log/supervisor/', 'glob': 'pgwatch2-stderr*'}, 'influxdb': {'log_root': '/var/log/supervisor/', 'glob': 'influxdb-stderr*'},...
bsd-3-clause
-1,369,007,851,694,881,800
42.882821
252
0.58458
false
3.33792
true
false
false
openSUSE/vdsm
vdsm/libvirtvm.py
1
59771
# # Copyright 2009-2011 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed ...
gpl-2.0
4,866,331,733,094,308,000
39.632903
149
0.554265
false
4.065225
true
false
false
flowsha/zhwh
web/com/zhwh/models/sp.py
1
2534
# -*- coding: utf-8 -*- # #Copyright 2013 Xiangxiang Telecom Corporation. #@author: liusha """This module contains implementations of sp models. """ from uuid import uuid1 from sqlalchemy import Column, String, DateTime from com.zhwh.models.base import Base, MyBase class PendingBill(Base, MyBase): """SP pending ...
apache-2.0
4,594,060,162,650,795,500
42.706897
320
0.616417
false
2.713062
false
false
false
Molecular-Image-Recognition/Molecular-Image-Recognition
code/rmgpy/scoop_framework/utilTest.py
2
4086
#!/usr/bin/env python # encoding: utf-8 -*- ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2002-2017 Prof. William H. Green (whgreen@mit.edu), # Prof. Richard H. West (r.west@neu.edu) and the RMG Team (rmg_dev@mit.edu) # ...
mit
-7,764,133,282,884,403,000
28.185714
80
0.627264
false
4.221074
true
false
false
gantzgraf/vape
vase/sample_filter.py
1
22732
from .gt_filter import GtFilter from .sv_gt_filter import SvGtFilter class SampleFilter(object): ''' A class for filtering VCF records on sample calls''' def __init__(self, vcf, cases=[], controls=[], n_cases=0, n_controls=0, confirm_missing=False, gq=0, dp=0, max_dp=0, ad=0, max_ad=0, ...
gpl-3.0
-7,891,873,971,137,422,000
46.064182
79
0.456933
false
4.302858
false
false
false
sgraham/nope
tools/telemetry/telemetry/value/value_unittest.py
1
8474
# 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 os import unittest from telemetry import page as page_module from telemetry import value from telemetry.page import page_set class TestBase(unittest...
bsd-3-clause
3,576,303,071,849,446,400
29.37276
80
0.614114
false
3.651012
true
false
false
davy39/eric
Plugins/VcsPlugins/vcsMercurial/HgAnnotateDialog.py
1
10447
# -*- coding: utf-8 -*- # Copyright (c) 2010 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a dialog to show the output of the hg annotate command. """ from __future__ import unicode_literals try: str = unicode except NameError: pass import os import re from PyQt5.QtCore impor...
gpl-3.0
2,528,743,820,729,731,600
31.646875
79
0.562458
false
4.477925
false
false
false
Atomistica/atomistica
tests/rebo2_molecules.py
1
6263
# ====================================================================== # Atomistica - Interatomic potential library and molecular dynamics code # https://github.com/Atomistica/atomistica # # Copyright (2005-2020) Lars Pastewka <lars.pastewka@imtek.uni-freiburg.de> # and others. See the AUTHORS file in the top-level A...
gpl-2.0
-5,817,409,686,535,207
34.994253
79
0.506467
false
2.937617
true
false
false
mthipparthi/parliament-search
parliamentsearch/items.py
1
1318
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html from enum import Enum import scrapy class MemberofParliament(scrapy.Item): """ Data structure to define Member of Parliament information """ mp_id = s...
mit
-3,429,457,756,649,703,400
20.983333
61
0.621396
false
3.278607
false
false
false