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
jojoblaze/Woodstock
data/templates/signup.mako.py
1
3819
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1298770751.096385 _template_filename='/home/jojo/pylons_projects/woodstock/woodstock/templates/signup.mako' _template_uri='/signup.mako' ...
gpl-3.0
-8,944,819,669,884,613,000
32.5
743
0.581042
false
3.418979
false
false
false
MartinSoto/Seamless
src/plugins/lirc.py
1
1844
# Seamless DVD Player # Copyright (C) 2004 Martin Soto <martinsoto@users.sourceforge.net> # # 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)...
gpl-2.0
4,236,236,327,357,102,600
33.148148
69
0.62961
false
4.12528
false
false
false
yahoo/TensorFlowOnSpark
tensorflowonspark/TFManager.py
1
2236
# Copyright 2017 Yahoo Inc. # Licensed under the terms of the Apache 2.0 license. # Please see LICENSE file in the project root for terms. from __future__ import absolute_import from __future__ import division from __future__ import nested_scopes from __future__ import print_function from multiprocessing.managers imp...
apache-2.0
-1,944,213,321,138,364,400
25.939759
129
0.711538
false
3.802721
false
false
false
STREAM3/visisc
_visisc_modules/EventDataModel.py
1
12474
# Copyright (C) 2014, 2015, 2016 SICS Swedish ICT AB # # Main author: Tomas Olsson <tol@sics.se> # # License: BSD 3 clause from numpy import array,r_, ndarray from pyisc import AnomalyDetector, DataObject from pyisc import P_PoissonOnesided, P_Poisson from visisc import _EventDataModel, \ EventHierarchyElement, \...
bsd-3-clause
4,326,833,483,550,511,000
43.713262
167
0.578884
false
4.067167
false
false
false
helenwarren/pied-wagtail
wagtail/wagtailadmin/templatetags/wagtailadmin_tags.py
1
3218
from django import template from django.core import urlresolvers from django.utils.translation import ugettext_lazy as _ from wagtail.wagtailadmin import hooks from wagtail.wagtailadmin.menu import MenuItem from wagtail.wagtailcore.models import get_navigation_menu_items, UserPagePermissionsProxy from wagtail.wagtail...
bsd-3-clause
6,854,908,379,575,165,000
31.836735
123
0.69826
false
3.914842
false
false
false
ppsirg/openshiftDeploy
ready_to_deploy_example/blpass/wsgi/blpass/blpass/settings.py
1
5355
""" Django settings for blpass project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) imp...
gpl-2.0
4,071,179,701,920,582,000
27.036649
91
0.682726
false
3.415179
false
false
false
colour-science/colour
colour/contrast/barten1999.py
1
17067
# -*- coding: utf-8 -*- """ Barten (1999) Contrast Sensitivity Function =========================================== Defines the *Barten (1999)* contrast sensitivity function: - :func:`colour.contrast.contrast_sensitivity_function_Barten1999` References ---------- - :cite:`Barten1999` : Barten, P. G. (1999). Cont...
bsd-3-clause
3,376,031,520,470,536,700
36.675497
79
0.587918
false
3.450667
true
false
false
chetan/cherokee
admin/wizards/uwsgi.py
1
14584
# -*- coding: utf-8 -*- # # Cherokee-admin's uWSGI Wizard # # Authors: # Taher Shihadeh <taher@octality.com> # Alvaro Lopez Ortega <alvaro@alobbs.com> # # Copyright (C) 2010 Alvaro Lopez Ortega # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GN...
gpl-2.0
-1,414,187,419,765,483,000
31.408889
247
0.610326
false
3.063866
true
false
false
garyd203/flying-circus
src/flyingcircus/_raw/codecommit.py
1
1270
"""Raw representations of every data type in the AWS CodeCommit service. See Also: `AWS developer guide for CodeCommit <https://docs.aws.amazon.com/codecommit/latest/userguide/index.html>`_ This file is automatically generated, and should not be directly edited. """ from attr import attrib from attr import a...
lgpl-3.0
4,461,252,906,516,049,400
27.863636
113
0.73937
false
4.219269
false
false
false
jrichte43/ProjectEuler
Problem-0186/solutions.py
1
1811
__problem_title__ = "Connectedness of a network" __problem_url___ = "https://projecteuler.net/problem=186" __problem_description__ = "Here are the records from a busy telephone system with one million " \ "users: The telephone number of the caller and the called number in " \ ...
gpl-3.0
8,526,298,695,389,920,000
46.5
100
0.538504
false
3.993363
false
false
false
dpaiton/OpenPV
pv-core/analysis/python/plot_proximity_2nd_exclusive.py
1
4186
""" Plots the Histogram """ import os import sys import numpy as np import matplotlib.pyplot as plt import matplotlib.mlab as mlab import matplotlib.cm as cm import PVReadWeights as rw import PVConversions as conv import scipy.cluster.vq as sp import math import random if len(sys.argv) < 2: print "usage: time_stabi...
epl-1.0
-7,084,743,835,861,948,000
23.057471
105
0.54085
false
2.719948
false
false
false
mjschultz/django-tastefulpy
tests/basic/tests/resources.py
1
6411
from django.contrib.auth.models import User from django.http import HttpRequest from tastefulpy.bundle import Bundle from tastefulpy.fields import ToOneField, ToManyField from tastefulpy.resources import ModelResource from basic.api.resources import SlugBasedNoteResource from basic.models import Note, AnnotatedNote, Sl...
bsd-3-clause
8,056,960,922,753,189,000
33.101064
97
0.65372
false
3.729494
true
false
false
battlehorse/rhizosphere
appengine/src/py/handlers/doc.py
1
1543
#!/usr/bin/env python # # Copyright 2010 The Rhizosphere 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 # # U...
apache-2.0
4,601,348,499,294,468,600
28.673077
74
0.702528
false
3.736077
false
false
false
spacepajamas/DiaTop
Mapping/Mapping_3_get_TOP_word_distribution.py
1
2386
# coding: utf-8 import numpy as np import pandas as pd import os import json import sys import re from collections import Counter #### import datetime mylist = [] today = datetime.date.today() mylist.append(today) date = str(mylist[0]) # print the date object, not the container ;-) #### topic_dist_dfname = sys.argv[...
gpl-3.0
8,766,361,902,126,300,000
28.097561
105
0.621961
false
2.971357
false
false
false
plazas/wfirst-detectors-vnl
code/bias_nonlinearity_vs_beta_version2.py
1
24495
#!/usr/bin/python import numpy as np import os import sys import math import matplotlib matplotlib.use('Pdf') import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable from matplotlib.backends.backend_pdf import PdfPages import matplotlib.font_manager as fm ## 7-20-15 ## Simple code to ...
mit
-2,120,859,853,378,731,500
36.454128
268
0.616452
false
2.547317
false
false
false
stevecrozz/optionshouse-api-client
tests/response_fixture.py
1
14015
AUTH_LOGIN_RESPONSE = { "EZMessage":{ "data":{ "lastName":"Doe", "funded":"true", "nasdaq":{ "professional":"false", "agree":"true" }, "authToken":"b7b426ef-8e20-46f1-bad6-1244f0b6de02", "nyse":{ "professional":"false", ...
gpl-3.0
8,688,621,776,684,135,000
29.525054
60
0.423025
false
3.746257
false
false
false
mfitzp/smrtr
core/middleware.py
1
1187
from django.conf import settings from django.http import HttpResponseRedirect from django.template import RequestContext from django.core.exceptions import PermissionDenied from django.contrib.auth.views import login from core.views import * class RequireLoginMiddleware(object): def __init__( self ): ...
bsd-3-clause
5,610,095,557,820,775,000
38.566667
93
0.622578
false
4.479245
false
false
false
effigies/PySurfer
surfer/viz.py
1
110278
import os from os.path import join as pjoin from tempfile import mkdtemp from warnings import warn import numpy as np from scipy import stats, ndimage, misc from scipy.interpolate import interp1d from matplotlib.colors import colorConverter import nibabel as nib from mayavi import mlab from mayavi.tools.mlab_scene_m...
bsd-3-clause
4,961,174,037,160,292,000
37.789307
79
0.518907
false
4.187666
false
false
false
themotleyfool/django-offline-messages
offline_messages/migrations/0001_initial.py
1
1680
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import jsonfield.fields from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('contenttypes', '0...
bsd-3-clause
4,627,862,076,759,330,000
36.333333
114
0.558333
false
4.666667
false
false
false
googleapis/googleapis-gen
google/cloud/securitycenter/v1/securitycenter-v1-py/google/cloud/securitycenter_v1/services/security_center/pagers.py
1
32304
# -*- 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
-1,597,406,854,641,823,200
41.957447
105
0.657039
false
4.568519
true
false
false
Orav/kbengine
kbe/res/scripts/common/Lib/site-packages/pip/_vendor/html5lib/serializer/htmlserializer.py
1
13229
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type import gettext _ = gettext.gettext try: from functools import reduce except ImportError: pass from ..constants import voidElements, booleanAttributes, spaceCharacters from ..constants import r...
lgpl-3.0
3,097,852,555,493,873,000
39.340625
119
0.521052
false
4.854679
false
false
false
FreshXOpenSource/wallaby-app-crm
wallaby/apps/crm/rooms/tickets.py
1
6272
# Copyright (c) by it's authors. # Some rights reserved. See LICENSE, AUTHORS. from wallaby.pf.room import * import wallaby.backends.couchdb as couchdb from wallaby.plugins.couchdb.document import * from wallaby.pf.peer.database import * from wallaby.pf.peer.viewer import * from wallaby.pf.peer.multiViewer import * ...
bsd-2-clause
-2,272,778,632,203,881,700
30.20398
101
0.546397
false
3.917552
false
false
false
asherbender/mcl
mcl/messages/messages.py
1
24010
"""Object specification for creating messages in MCL. The :mod:`~.messages.messages` module provides a means for implementing MCL message objects. This is done through the :class:`.Message` object. Since :class:`.Message` objects derive from python dictionaries, they operate near identically. :class:`.Message` objec...
bsd-3-clause
-5,560,837,598,931,066,000
35.656489
83
0.61137
false
4.589945
false
false
false
pignacio/var-log-recetas
var_log_recetas/ingredient/migrations/0002_initial_ingredients.py
1
2713
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def create_measure_units(apps, schema_editor): MeasureUnit = apps.get_model('ingredient', 'MeasureUnit') db_alias = schema_editor.connection.alias MeasureUnit.objects.using(db_alias).bulk_create([ ...
gpl-3.0
5,447,176,207,372,048,000
41.390625
91
0.597862
false
3.280532
false
false
false
FPGAwars/apio
apio/managers/downloader.py
1
2304
# -*- coding: utf-8 -*- # -- This file is part of the Apio project # -- (C) 2016-2019 FPGAwars # -- Author Jesús Arroyo # -- Licence GPLv2 # -- Derived from: # ---- Platformio project # ---- (C) 2014-2016 Ivan Kravets <me@ikravets.com> # ---- Licence Apache v2 from email.utils import parsedate_tz from math import cei...
gpl-2.0
6,235,525,954,317,994,000
26.746988
79
0.623535
false
3.714516
false
false
false
vmax-feihu/hue
desktop/libs/notebook/src/notebook/connectors/spark_shell.py
1
8921
#!/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
8,104,299,454,335,192,000
31.089928
117
0.61047
false
3.523302
false
false
false
waveform80/oliphant
docs/conf.py
1
3848
#!/usr/bin/env python3 # vim: set et sw=4 sts=4 fileencoding=utf-8: # # The MIT License (MIT) # # Copyright (c) 2014-2015 Dave Jones <dave@waveform.org.uk> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # i...
mit
5,657,725,867,801,998,000
28.829457
79
0.633576
false
3.739553
false
false
false
igsr/igsr_analysis
BEDTools/BEDTools.py
1
4620
''' Created on 24 Apr 2017 @author: ernesto ''' import subprocess import tempfile class BEDTools: ''' Class used to perform different operations with the BEDTools package. This is essentially a wrapper for the BEDTools package. The functionality is quite limited and additional functions will be added...
apache-2.0
-600,444,568,850,752,000
30.006711
100
0.498052
false
4.542773
false
false
false
zeldin/libsigrokdecode
decoders/spdif/pd.py
1
8991
## ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2014 Guenther Wenninger <robin@bitschubbser.org> ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version ...
gpl-3.0
-5,038,679,791,654,598,000
35.697959
86
0.530197
false
3.427754
false
false
false
JNU-Include/CNN
lib/softmax_onehot.py
1
2438
import tensorflow as tf from file2buffer import File2Buffer from neural_network import NeuralNetwork from lib.nntype import NNType class SoftmaxOnehot (NeuralNetwork): Y_one_hot = None def set_placeholder(self, num_of_input, num_of_output): self.X = tf.placeholder(tf.float32, [None, num_of_input]) ...
mit
4,101,979,121,624,030,700
41.666667
130
0.630757
false
2.995074
false
false
false
joerg-krause/upmpdcli
src/mediaserver/cdplugins/qobuz/exception.py
1
1086
from __future__ import print_function ''' qobuz.exception ~~~~~~~~~~~~~~~ :part_of: xbmc-qobuz :copyright: (c) 2012 by Joachim Basmaison, Cyril Leclerc :license: GPLv3, see LICENSE for more details. ''' import sys import pprint import traceback class QobuzXbmcError(Exception): def __init__(...
gpl-2.0
1,213,666,413,833,839,400
31.909091
77
0.514733
false
3.261261
false
false
false
MatthieuDartiailh/eapii
eapii/core/has_i_props.py
1
26370
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------ # Copyright 2014 by Eapii Authors, see AUTHORS for more details. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENCE, distributed with this software. #------------...
bsd-3-clause
740,333,654,297,545,200
34.539084
79
0.560713
false
4.614173
false
false
false
fosfataza/protwis
build/management/commands/parse_excel_annotations.py
1
18588
from django.core.management.base import BaseCommand, CommandError from django.core.management import call_command from django.conf import settings from django.db import connection from common.alignment import Alignment, ClosestReceptorHomolog from protein.models import Protein, ProteinSegment from structure.models imp...
apache-2.0
6,456,276,811,557,499,000
42.12761
132
0.498924
false
3.814488
false
false
false
vinaymayar/python-game-workshop
lesson6/solution_return.py
1
1783
"""lesson6/solution_return.py Contains solutions for functions that return values. """ # Exercise 6: Write a function my_name that returns your name. Remember # to test your function by calling it and print the result. # print(my_name()) -> "Vinay Mayar" def my_name(): return "Vinay Mayar" print(my_name()) ...
mit
-6,011,757,241,365,324,000
24.84058
74
0.607403
false
3.063574
false
false
false
fcaneto/py_programming_exercises
others/sowpods/sowpods.py
1
3068
import time def timed_function(f): def f_timer(*args, **kwargs): start = time.time() result = f(*args, **kwargs) end = time.time() print('> %s took %s seconds' % (f.__name__, end - start)) return result return f_timer def read_swopods(): words = [] with open('so...
mit
-7,031,068,858,553,519,000
23.75
113
0.555737
false
3.559165
false
false
false
pasaunders/code-katas
src/parenthetics.py
1
2219
"""A script to test if the parentheticals of a string are matched.""" class Queue(object): """A singly linked list, to hold parens.""" def __init__(self): """Initialize a Queue class.""" self.head = None self.length = 0 # def enqueue(self, data): # """Add a value to the q...
mit
-3,740,751,714,495,872,500
26.7375
69
0.529518
false
3.819277
false
false
false
joxer/Baka-No-Voltron
tmp/android.dist/private/renpy/add_from.py
1
3056
# Copyright 2004-2015 Tom Rothamel <pytom@bishoujo.us> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, m...
gpl-2.0
-3,361,583,998,807,433,700
25.119658
101
0.661976
false
3.968831
false
false
false
chrislit/abydos
tests/distance/test_distance_baulieu_i.py
1
2856
# 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
3,979,587,235,103,986,700
36.578947
70
0.642157
false
3.208989
true
false
false
rmmbear/Android-QA-Helper
helper/extract_data.py
1
30899
""" Other modules expect that all extraction functions' names start with 'extract_'. """ import re import string import logging from collections import OrderedDict import helper LOGGER = logging.getLogger(__name__) SIZE_PREFIXES = {x:1024**y for y, x in enumerate(" KMGTP")} # source: https://www.khronos.org/regist...
gpl-3.0
-587,591,065,393,223,000
34.232611
189
0.582673
false
3.485505
false
false
false
torchtarget/accounts_downloader
HSBC/HSBCOpenTestDirect.py
1
1780
import time from selenium import webdriver from selenium.common.exceptions import TimeoutException from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait brows...
gpl-3.0
-5,120,247,033,813,328,000
38.555556
108
0.741573
false
3.266055
false
true
false
stephenfin/patchwork
patchwork/migrations/0015_add_series_models.py
1
3074
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('patchwork', '0014_remove_userprofile_primary_project'), ] operations = [ migrations.CreateM...
gpl-2.0
-5,498,517,678,572,326,000
44.880597
171
0.585556
false
4.404011
false
false
false
fabrizziop/encryption-modular
lib_user_input.py
1
1852
import getpass from lib_file_ops import * from lib_keyslot import is_header_psk from lib_gui import * def input_int_until_list_or_default(list_desired, default_val): is_done = False while is_done == False: try: tv = int(input()) if tv in list_desired: is_done = True else: print('Incorrect Value') ...
gpl-2.0
-2,521,419,785,190,123,000
24.040541
64
0.704644
false
2.982287
false
false
false
ucamhal/ravenpy
raven/raven_django/backends.py
1
4276
# Copyright (c) 2012 Hal Blackburn <hwtb2@caret.cam.ac.uk> and # CARET, University of Cambridge http://www.caret.cam.ac.uk/ # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Softwa...
mit
8,166,771,306,197,634,000
49.305882
80
0.684752
false
4.678337
false
false
false
SavinaRoja/challenges
Rosalind/String_Algorithms/REVP.py
1
3254
#!/usr/bin/env python # -*- coding: utf-8 -*- """Locating Restriction Sites Usage: REVP.py <input> [--compare] [--max=MAX] [--min=MIN] REVP.py (--help | --version) Options: --compare run a speed comparison of various methods --max=MAX Set the maximum length of palindrome to search for, even ...
unlicense
4,442,858,641,994,704,000
27.051724
80
0.614935
false
3.472785
false
false
false
circuitsforfun/Wav2Header
wav2header.py
1
5200
#!/usr/bin/python #//////////////////////////////////////////////////////////////////////////////// #// // #// wav2Header.py // #// -PYTHON SCRIPT- ...
gpl-3.0
4,546,926,191,659,368,000
31.298137
131
0.3975
false
4.362416
false
false
false
yumikohey/WaiterCar
self-driving-car-ai/server.py
1
7617
#!/usr/bin/env python # coding: Latin-1 # Load library functions we want import SocketServer import RPi.GPIO as io io.setmode(io.BCM) # Constant values # PWM_MAX = 100 # Disable warning from GPIO io.setwarnings(False) # Here we configure the GPIO settings for the left and right motors spinning dire...
mit
-5,007,044,393,506,858,000
31.279661
118
0.620717
false
3.452856
false
false
false
kthordarson/youtube-dl-ruv
youtube_dl/utils.py
1
43616
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import calendar import codecs import contextlib import ctypes import datetime import email.utils import errno import gzip import itertools import io import json import locale import math import os import pipes import platform import...
unlicense
-7,128,415,689,819,608,000
30.176555
240
0.576096
false
3.627714
false
false
false
sanja7s/SR_Twitter
src_CAPITAL/Soc_Sem_Capital.py
1
5448
#!/usr/bin/env python # -*- coding: UTF-8 -*- ''' analyze assortativity of the graphs in terms of sentiment ''' from igraph import * import networkx as nx import os import numpy as np import matplotlib.mlab as mlab import matplotlib.pyplot as plt import os import matplotlib.cm as cm from collections import defaultdict...
mit
2,786,904,285,392,879,000
21.894958
99
0.646109
false
2.483136
false
false
false
wcjohns/poach
gpio/stepper_motor.py
1
2057
#!/usr/bin/python #-------------------------------------- # ___ ___ _ ____ # / _ \/ _ \(_) __/__ __ __ # / , _/ ___/ /\ \/ _ \/ // / # /_/|_/_/ /_/___/ .__/\_, / # /_/ /___/ # # Stepper Motor Test # # A simple script to control # a stepper motor. # # Author : Matt Hawkins ...
lgpl-3.0
-6,791,374,788,318,470,000
19.777778
128
0.584346
false
2.475331
false
false
false
mazafrav/JdeRobot
src/tools/colorTuner_py/filters/rgbFilter.py
1
1363
from threading import Lock import cv2 import numpy as np '''Max Values supported by OpenCV''' RGBMAX = [255,255,255] RGBMIN = [0,0,0] class RgbFilter: def __init__(self): self.lock = Lock() self.MAX = RGBMAX self.MIN = RGBMIN self.uLimit = self.MAX self.dLimit = self...
gpl-3.0
-8,469,146,792,431,476,000
18.211268
61
0.559795
false
3.300242
false
false
false
foxscotch/foxrollbot
db.py
1
3694
import os import sqlite3 from pathlib import Path from jinja2 import Template from roll import RollCommand from errors import * class SavedRollManager: """ Class for managing saved rolls. Attributes: db (str): URI of database used for connections """ TABLE = 'saved_rolls' """str: N...
mit
5,504,732,386,518,892,000
29.278689
76
0.539253
false
4.577447
false
false
false
Karkus476/flexlay
flexlay/util/sexpr_reader.py
1
1596
# Flexlay - A Generic 2D Game Editor # Copyright (C) 2014 Ingo Ruhnke <grumbel@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option)...
gpl-3.0
3,790,031,150,815,291,000
26.517241
71
0.612155
false
3.685912
false
false
false
patoloughlin/tagforthat
PythonCode/test_corpus.py
1
3073
#!/usr/bin/env python import unittest import sys,os import index import classifier path = os.path.abspath(__file__) sys.path.append(os.path.join(os.path.dirname(path), "../")) import utils from settings import settings corpus = [ dict(question_id=0,tags=["Windows","crash","bluescreen"],body="Help! Windows 8 cr...
gpl-3.0
-8,579,990,683,114,029,000
61.714286
242
0.708103
false
3.632388
true
false
false
Signiant/ultron
ultron/plugins/eb/__init__.py
1
11821
import boto3,json,imp,pprint from botocore.exceptions import ClientError import logging appversions = [] def log (message): print id() + ": " + message def id(): return "eb" def get_env_elb(envname,region, current_session): client = current_session.client('elasticbeanstalk') response = "" elb_na...
mit
1,354,183,845,398,758,700
33.767647
158
0.561966
false
3.94823
false
false
false
portfors-lab/sparkle
sparkle/stim/types/stimuli_classes.py
1
15924
import logging import ntpath import os import numpy as np import yaml from scipy.signal import chirp, hann, square, butter, lfilter, buttord from sparkle.stim.abstract_component import AbstractStimulusComponent from sparkle.tools.audiotools import audiorate, audioread, make_tone, make_carrier_tone, signal_amplitude f...
gpl-3.0
5,100,014,708,183,515,000
30.975904
133
0.579942
false
3.612523
false
false
false
selboo/starl-mangle
switch/post_security.py
1
14058
#!/usr/bin/env python #coding=utf-8 import logging import os.path import re import sys import telnetlib from compiler.ast import Print from types import BooleanType import os,time,paramiko,optparse debugging = 0 log = logging.getLogger() #hdlr = logging.StreamHandler( sys.stdout ) #formatter = log.Formatter( '%(ascti...
apache-2.0
-5,841,469,361,818,844,000
33.496314
131
0.556695
false
3.235769
true
false
false
BuildingLink/sentry
tests/sentry/utils/test_data_scrubber.py
1
11947
# -*- coding: utf-8 -*- from __future__ import absolute_import from sentry.constants import FILTER_MASK from sentry.testutils import TestCase from sentry.utils.data_scrubber import SensitiveDataFilter VARS = { 'foo': 'bar', 'password': 'hello', 'the_secret': 'hello', 'a_password_here': 'hello', ...
bsd-3-clause
-5,240,779,456,825,479,000
31.464674
129
0.572529
false
3.409532
true
false
false
cschwede/swift-containerlist
containerlist/middleware.py
1
5527
# Copyright (c) 2013 Christian Schwede <info@cschwede.de> # # 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
-575,241,135,822,902,100
35.124183
79
0.606658
false
4.155639
false
false
false
pixunil/Cinnamon
files/usr/share/cinnamon/cinnamon-settings/bin/ChooserButtonWidgets.py
1
21376
from __future__ import division from gi.repository import Gtk, GObject, GLib, GdkPixbuf import cairo import tweenEquations import os import math import gettext gettext.install("cinnamon", "/usr/share/locale") TWEEN_SHAPES = ["Quad", "Cubic", "Quart", "Quint", "Sine", "Expo", "Circ", "Elastic", "Back", "Bounce"] TWEEN_...
gpl-2.0
598,406,912,072,054,500
33.871126
111
0.584207
false
3.544354
false
false
false
StephenOrJames/UBinE
locate/rooms.py
1
4367
def get_building(quadrangle, room_number): """Finds and returns the building that a room is in for a specific quadrangle, or None""" quadrangle = quadrangle.lower() def in_ranges(ranges): """Determines if a room is in a list of ranges (each specified by tuples)""" for first, last in ranges...
mit
-7,027,488,491,047,506,000
43.111111
99
0.476529
false
3.123748
false
false
false
WillBrennan/SkinDetector
FromFile.py
1
1679
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Will Brennan' import argparse import logging import cv2 import skin_detector logger = logging.getLogger('main') if __name__ == '__main__': parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('image_paths', type=str, nargs='+'...
mit
-3,747,232,836,383,487,000
39.95122
116
0.636689
false
3.57234
false
false
false
gregpechiro/dndtools
dndtools/dnd/monsters/views.py
1
4836
# Create your views here. from django.shortcuts import get_object_or_404, render_to_response from django.template.context import RequestContext from dndtools.dnd.menu import menu_item, submenu_item, MenuItem from dndtools.dnd.dnd_paginator import DndPaginator from dndtools.dnd.filters import MonsterFilter from dndtools...
mit
7,452,719,161,051,088,000
46.421569
100
0.555211
false
4.03
false
false
false
brownnrl/moneyguru
core/gui/transaction_panel.py
1
4467
# Copyright 2019 Virgil Dupras # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/gpl-3.0.html import weakref from datetime import date from core.util import first from...
gpl-3.0
-5,317,012,373,037,943,000
31.136691
98
0.660398
false
4.143785
false
false
false
fgdorais/MarkovModel
markov.py
1
2632
from __future__ import unicode_literals # Python 2/3 compatibility # from __future__ import print_function # Python 2/3 compatibility # import sys import argparse import modelio from parser import TokenParser from trainer import MarkovTrainer from generator import MarkovGenerator parser = argparse.ArgumentParser(d...
mit
-3,570,370,338,337,834,500
37.705882
114
0.68465
false
3.509333
false
false
false
shashisp/blumix-webpy
app/gluon/utils.py
1
11493
#!/usr/bin/env python # -*- coding: utf-8 -*- """ | This file is part of the web2py Web Framework | Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> | License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) This file specifically includes utilities for security. ---------------------------------------------...
mit
-7,430,571,778,533,494,000
31.650568
97
0.599495
false
3.661357
false
false
false
beccannlittle/gateway
gateway/controllers/minigame/aha.py
1
1033
""" aha minigame. introduces user to the game and assists choosing an idea for a venture """ from django.contrib.auth import logout, authenticate, login from django.shortcuts import render from gateway.models.Aha import Aha, Aha_Form from gateway.models.venture import Venture from django.db import transaction def ah...
mit
2,944,371,058,039,807,500
26.918919
78
0.603098
false
3.770073
false
false
false
zenotech/MyCluster
mycluster/slurm.py
1
13281
from builtins import str import os import re import math from string import Template # from datetime import timedelta from .mycluster import check_output from .mycluster import get_timedelta from .mycluster import get_data from .mycluster import load_template from jinja2 import Environment, FileSystemLoader """ sa...
bsd-3-clause
-1,084,601,180,716,060,200
32.369347
145
0.496198
false
3.678947
true
false
false
zerotired/kotori
kotori/io/protocol/influx.py
1
3796
# -*- coding: utf-8 -*- # (c) 2016-2017 Andreas Motl <andreas@getkotori.org> import arrow from arrow.parser import DateTimeParser from datetime import datetime, timedelta from twisted.logger import Logger from kotori.io.protocol.util import is_number from kotori.util.common import tdelta log = Logger() class QueryTr...
agpl-3.0
5,612,831,170,566,948,000
29.612903
137
0.637513
false
3.754698
false
false
false
pchumphreys/ubiquitous-quack
commandLineFileBrowser.py
1
21059
# Allow access to command-line arguments import sys import os import subprocess import markdown import codecs import pickle # Import the core and GUI elements of Qt from PySide.QtCore import * from PySide.QtGui import * #Useful script! from send2trash import send2trash # Extra module for markdown from markdownEditor ...
apache-2.0
-8,520,088,722,618,856,000
31.751166
147
0.75355
false
3.412575
false
false
false
clranc/HostGrab
url.py
1
2157
#Url linked list handler import os.path from UrlLL import UrlList Path = "url.list" DLPath = "hlist/" def add(Url): if os.path.isfile(Path) == False: UrlFile = open(Path,"w") List = UrlList() List.add(Url) List.fWrite(UrlFile) List.printList() return else: ...
gpl-2.0
6,249,301,886,832,723,000
24.678571
74
0.491887
false
3.770979
false
false
false
bjoernricks/python-quilt
tests/test_pop.py
1
2898
#!/usr/bin/env python # vim: fileencoding=utf-8 et sw=4 ts=4 tw=80: # python-quilt - A Python implementation of the quilt patch system # # Copyright (C) 2017 Björn Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of python-quilt for details. import os.path import six from helpers import QuiltTe...
mit
-5,621,312,368,692,360,000
28.262626
67
0.575078
false
3.329885
true
false
false
intchloe/exitmap
src/exitmap.py
1
12070
# Copyright 2013, 2014 Philipp Winter <phw@nymity.ch> # # This file is part of exitmap. # # exitmap 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 la...
gpl-3.0
-932,819,446,632,745,000
32.434903
79
0.601906
false
4.136395
true
false
false
capiscuas/libreGTFS
other/fixing_boundaries_Jakarta/detect_redundant_ways.py
1
3866
import xml.etree.cElementTree as ET input_filename = "unique_nodes.osm" output_filename = "ready_to_fix.osm" # Parse the XML from the OSM file tree = ET.ElementTree(file=input_filename) #I tried to use the library OSMAPI to parse the OSM files into python structures # but it hanged the laptop cause it took too much...
gpl-3.0
-3,870,585,583,029,788,000
39.28125
136
0.543973
false
3.556578
false
false
false
beeftornado/sentry
tests/sentry/snuba/test_tasks.py
1
13624
from __future__ import absolute_import import abc from uuid import uuid4 import responses from exam import patcher from mock import Mock, patch from six import add_metaclass from sentry.snuba.models import QueryDatasets, QuerySubscription, SnubaQuery, SnubaQueryEventType from sentry.snuba.tasks import ( apply_da...
bsd-3-clause
-5,761,123,563,209,410,000
35.427807
99
0.585437
false
4.133495
true
false
false
Sergey010289/Address_book_flask
models.py
1
1539
# -*- coding: utf-8 -*- from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///task2.db' db = SQLAlchemy(app) class Users(db.Model): __tablename__ = 'users' id = db.Column(db.Integer, primary_key=True) name = db.Colu...
mit
3,616,191,841,287,895,600
27.5
89
0.623132
false
3.274468
false
false
false
lennin92/peppers
net-test.py
1
2084
from utils.settings import CAFFE_PATH, DPLOY_MODEL_FILE, \ TRAIN_MODEL_FILE, PRETRAINED, BASE_SHAPE import sys sys.path.append(CAFFE_PATH) import caffe try: import cv2 except ImportError as E: import cv as cv2 import numpy as np import os # Set the right path to your model definition file, pretrained mod...
gpl-3.0
-1,961,589,484,464,984,300
34.931034
133
0.642514
false
2.835374
false
false
false
nanshihui/PocCollect
component/cacti/cactifiledisclosure.py
1
1103
#!/usr/bin/env python # encoding: utf-8 from t import T import requests,urllib2,json,urlparse class P(T): def __init__(self): T.__init__(self) def verify(self,head='',context='',ip='',port='',productname={},keywords='',hackinfo=''): target_url = "http://"+ip+":"+str(port)+"/cacti.sql" r...
mit
-6,480,751,637,654,577,000
32.424242
93
0.485041
false
3.981949
false
false
false
clickwork/clickwork
main/views/base.py
1
10670
from django import forms from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.core.urlresolvers import resolve, reverse from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template.loader import get_templat...
mit
-6,907,276,051,042,295,000
42.198381
119
0.616401
false
4.026415
false
false
false
lasa/website
app/slide.py
1
3434
import time from app import db, utils from app.models import Post, Slide from flask import redirect, request from flask_wtf import Form from wtforms import validators, StringField, SelectField URL_REGEX = r'((http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&/=]*))|\/[-a-zA-Z0-...
agpl-3.0
9,013,213,698,612,016,000
35.147368
267
0.618229
false
3.406746
false
false
false
googleapis/googleapis-gen
google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/services/services/account_budget_proposal_service/transports/grpc.py
1
12388
# -*- 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
9,219,464,548,002,433,000
45.052045
118
0.629077
false
4.658894
false
false
false
russomi/appengine-pipeline-read-only
test/pipeline_test.py
2
173889
#!/usr/bin/python2.5 # # Copyright 2010 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
-3,168,384,846,593,172,500
35.989789
80
0.667932
false
3.730083
true
false
false
david-caro/python-foreman
tests/test_defs.py
1
2453
#!/usr/bin/env python # encoding: utf-8 from __future__ import absolute_import, division, print_function import os import six import pytest from foreman.client import Foreman, Resource, requests from .mocks import SessionMock URL = 'foreman.example.com' class HasConflictingMethods(Exception): def __init__(se...
gpl-2.0
4,626,727,628,531,730,000
24.821053
72
0.626987
false
3.856918
false
false
false
hubo1016/vlcp
vlcp/service/sdn/ioprocessing.py
1
77228
''' Created on 2016/4/13 :author: hubo ''' from vlcp.service.sdn.flowbase import FlowBase from vlcp.server.module import depend, ModuleNotification, call_api,api import vlcp.service.sdn.ofpportmanager as ofpportmanager import vlcp.service.sdn.ovsdbportmanager as ovsdbportmanager import vlcp.service.kvdb.objectdb as ob...
apache-2.0
3,838,357,203,293,463,600
69.016319
180
0.406601
false
5.435147
false
false
false
postlund/home-assistant
homeassistant/components/amcrest/camera.py
1
19430
"""Support for Amcrest IP cameras.""" import asyncio from datetime import timedelta from functools import partial import logging from amcrest import AmcrestError from haffmpeg.camera import CameraMjpeg import voluptuous as vol from homeassistant.components.camera import ( CAMERA_SERVICE_SCHEMA, SUPPORT_ON_OFF...
apache-2.0
-767,744,544,592,012,000
34.263158
86
0.584457
false
4.035306
false
false
false
alexforencich/python-ivi
ivi/rigol/rigolDS2072A.py
1
1667
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2017 Alex Forencich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the righ...
mit
4,356,496,467,592,193,000
36.886364
86
0.744451
false
4.03632
false
false
false
interactiveaudiolab/nussl
nussl/core/audio_signal.py
1
66286
import copy import numbers import os.path import warnings from collections import namedtuple import audioread import librosa import numpy as np import scipy.io.wavfile as wav import scipy from scipy.signal import check_COLA import soundfile as sf from . import constants from . import utils from . import masks __all_...
mit
-3,678,452,288,421,490,000
38.338872
106
0.585991
false
4.146244
false
false
false
opennode/nodeconductor-saltstack
src/nodeconductor_saltstack/exchange/migrations/0012_more_members_models.py
1
1452
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('exchange', '0011_conferenceroom'), ] operations = [ migrations.AddField( model_name='group', name='d...
mit
-2,407,152,448,340,314,600
32
127
0.57438
false
4.467692
false
false
false
shimpe/frescobaldi
frescobaldi_app/variables.py
1
6536
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # 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 ...
gpl-2.0
2,572,797,856,602,407,000
33.582011
111
0.615667
false
4.325612
false
false
false
low-sky/chempca
chempca.py
1
1340
import numpy as np from scipy import linalg as LA import astropy.io.fits as fits import matplotlib.pyplot as p def PCA(data, dims_rescaled_data=2): """ returns: data transformed in 2 dims/columns + regenerated original data pass in: data as 2D NumPy array """ mn = np.mean(data, axis=0) # mean c...
bsd-3-clause
9,199,619,318,298,297,000
30.904762
153
0.678358
false
3.205742
false
false
false
Mariaanisimova/pythonintask
PINp/2014/TsivunchikDVnew/task_7_25.py
1
1988
# Задание 7. Вариант 25. # Разработайте систему начисления очков для задачи 6, в соответствии с # которой игрок получал бы большее количество баллов за меньшее количество # попыток. # Цивунчик Денис Владимирович # 27.05.2016 import random guessesTaken = 0 print("Привет, отгадай один из четрыех океанов Земли.") x = r...
apache-2.0
5,398,708,426,895,249,000
27.807692
80
0.605474
false
1.955614
false
false
false
john-tornblom/llvm-p86
llvm_p86/symtab.py
1
14287
# encoding: utf-8 # Copyright (C) 2013 John Törnblom # # This file is part of LLVM-P86. # # LLVM-P86 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 l...
gpl-3.0
5,204,515,369,522,514,000
20.744292
73
0.539549
false
3.621293
false
false
false
quom/google-cloud-python
dns/google/cloud/dns/client.py
1
4983
# 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,358,123,713,847,823,000
37.627907
77
0.628738
false
4.35958
false
false
false
sh-ft/mudwyrm_users
mudwyrm_users/admin/achaea/scripts/gmcp.py
1
5479
from mudwyrm_users.admin.achaea import ScriptState from mudwyrm_users.admin.achaea.common import AttrDict from mudwyrm_users.admin.achaea.trigger import Trigger, Alias, OnEvent from mudwyrm_users.admin.achaea.scripts import char import re p = None s = ScriptState() def init(processor): assert processor is not N...
mit
4,818,264,491,026,690,000
27.097436
118
0.57182
false
2.920576
false
false
false
dls-controls/pymalcolm
malcolm/modules/scanning/parts/unrollingpart.py
1
1818
from annotypes import add_call_types from scanpointgenerator import CompoundGenerator, SquashingExcluder from malcolm.core import Part, PartRegistrar from ..hooks import AAxesToMove, AGenerator, UParameterTweakInfos, ValidateHook from ..infos import ParameterTweakInfo class UnrollingPart(Part): """Unroll the di...
apache-2.0
385,315,478,255,259,300
40.318182
85
0.683718
false
3.978118
false
false
false
joehandzik/libstoragemgmt-1
python_binding/lsm/_data.py
1
36835
# Copyright (C) 2011-2016 Red Hat, Inc. # (C) Copyright 2016 Hewlett Packard Enterprise Development LP # 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,...
lgpl-2.1
2,991,822,636,371,551,000
33.012004
79
0.588272
false
3.584217
false
false
false
mattliston/sentiment
train_rel.py
1
5406
# THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python train_rel.py from six.moves import cPickle import numpy as np import theano import theano.tensor as T import lasagne as L import random import time import string import argparse # parse command line arguments parser = argparse.ArgumentParser(formatter_class...
mit
-5,686,277,558,314,880,000
33.21519
149
0.671846
false
2.863347
true
false
false
google-research/google-research
correct_batch_effects_wdn/distance.py
1
4016
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
-8,645,224,372,105,230,000
35.509091
76
0.708167
false
3.618018
false
false
false
jonemo/microscan-driver
setup.py
1
1439
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='microscan', version=...
mit
1,431,536,182,747,373,000
30.977778
65
0.62335
false
3.920981
false
true
false
celliern/triflow
triflow/core/routines.py
1
3124
#!/usr/bin/env python # coding=utf8 import numpy as np import sympy as sp class ModelRoutine: def __init__(self, matrix, args, pars, ufunc, reduced=False): self.pars = list(pars) + ['periodic'] self.matrix = matrix self.args = args self._ufunc = ufunc def __r...
gpl-3.0
-7,043,435,094,576,743,000
33.32967
169
0.566261
false
4.067708
false
false
false
elbeardmorez/quodlibet
quodlibet/quodlibet/plugins/events.py
1
5845
# -*- coding: utf-8 -*- # Copyright 2005 Michael Urman, Joe Wreschnig # 2014, 2017 Nick Boultbee # 2017 Pete Beardmore # # 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; eithe...
gpl-2.0
5,648,647,886,682,548,000
31.115385
74
0.599658
false
4.028256
false
false
false