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
benhunter/py-stuff
misc/csgo-stats.py
1
12345
# https://old.reddit.com/r/GlobalOffensive/comments/8mjqgc/i_made_a_python_script_that_generates_stats_using/ # https://pastebin.com/LLpym05c import datetime import matplotlib.pyplot as plt def min_to_sec(line): # converts minutes in string format 'XXX:XX' to seconds seconds = 0 seconds += (int(line[-1])) ...
mit
500,048,332,103,682,240
35.202346
119
0.580154
false
2.992727
false
false
false
fusionbox/mezzanine
mezzanine/core/templatetags/mezzanine_tags.py
1
23919
from __future__ import absolute_import, division, unicode_literals from future.builtins import int, open, str from hashlib import md5 import os try: from urllib.parse import quote, unquote except ImportError: from urllib import quote, unquote from django.contrib import admin from django.contrib.auth import RE...
bsd-2-clause
290,233,697,215,057,200
34.435556
79
0.609641
false
3.937932
false
false
false
ActiveState/code
recipes/Python/511508_Binomial_Queues/recipe-511508.py
1
4907
""" BinomialQueue.py Meldable priority queues Written by Gregoire Dooms and Irit Katriel """ class LinkError(Exception): pass class EmptyBinomialQueueError(Exception): pass class BinomialTree: "A single Binomial Tree" def __init__(self, value): "Create a one-node tree. value is the priority of thi...
mit
-1,932,582,368,276,943,000
27.864706
77
0.509069
false
3.857704
false
false
false
1000ideas/sublime_redmine
Redmine.py
1
6831
import re import json import functools import urllib, urllib2 import sublime, sublime_plugin, threading import webbrowser class RedmineError(Exception): pass def main_thread(callback, *args, **kwargs): # sublime.set_timeout gets used to send things onto the main thread # most sublime.[something] calls need to b...
mit
-6,297,098,791,352,698,000
31.528571
128
0.631386
false
3.333821
false
false
false
ekansa/open-context-py
opencontext_py/apps/about/views.py
1
20142
import json from django.conf import settings from django.http import HttpResponse, Http404 from django.template import RequestContext, loader from opencontext_py.libs.general import LastUpdatedOrderedDict from opencontext_py.libs.rootpath import RootPath from opencontext_py.libs.requestnegotiation import RequestNegotia...
gpl-3.0
8,155,570,767,275,034,000
38.887129
84
0.578642
false
4.006763
false
false
false
polyaxon/polyaxon
core/polyaxon/utils/string_utils.py
1
2468
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
apache-2.0
7,351,634,692,586,380,000
29.469136
97
0.651945
false
3.961477
false
false
false
ruddra/django-oscar
oscar/apps/basket/abstract_models.py
1
28617
from decimal import Decimal import zlib from django.db import models from django.db.models import Sum from django.conf import settings from django.utils.timezone import now from django.utils.translation import ugettext_lazy as _ from django.core.exceptions import ObjectDoesNotExist, PermissionDenied from oscar.apps.b...
bsd-3-clause
7,346,142,169,669,723,000
33.067857
89
0.587029
false
4.337881
false
false
false
chrislit/abydos
abydos/distance/_clement.py
1
4649
# Copyright 2018-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
-6,004,276,056,573,090,000
28.238994
78
0.562056
false
3.933164
false
false
false
thethythy/Mnemopwd
mnemopwd/client/corelayer/protocol/StateS33R.py
1
2965
# -*- coding: utf-8 -*- # Copyright (c) 2016, Thierry Lemeunier <thierry at lemeunier dot net> # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain th...
bsd-2-clause
3,113,484,126,458,670,000
40.760563
83
0.651939
false
4.526718
false
false
false
jlane9/selenium_data_attributes
setup.py
1
1363
"""setup.py ..codeauthor:: John Lane <jlane@fanthreesixty.com> """ from setuptools import setup, find_packages from sda import __author__, __email__, __license__, __version__ setup( name='sda', version=__version__, packages=find_packages(), scripts=[], description='A wrapper for Selenium. This ...
mit
7,108,862,239,312,840,000
39.088235
101
0.598679
false
4.589226
false
false
false
AstroPrint/AstroBox
src/octoprint/timelapse.py
1
12285
# coding=utf-8 __author__ = "Gina Häußge <osd@foosel.net>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' import logging import os import threading import urllib import time import subprocess import fnmatch import datetime import sys import shutil import octoprint.util as uti...
agpl-3.0
7,949,570,891,765,914,000
29.403465
180
0.707726
false
3.272848
true
false
false
davidwhogg/HoneyComb
superpgram/code/header_time.py
1
1992
import numpy as np import pyfits import glob import matplotlib.pyplot as plt def real_footprint(t): """ # `real_footprint` Takes real Kepler (BJD) time values for a certain target and returns estimates of the starts, stops and centres """ dt = 0.02043359821692 # interval between observations ...
mit
-7,558,977,120,474,102,000
25.918919
77
0.603916
false
3.083591
false
false
false
LRGH/amoco
amoco/arch/v850/env.py
1
3017
# -*- coding: utf-8 -*- # This code is part of Amoco # Copyright (C) 2018 Axel Tillequin (bdcht3@gmail.com) # published under GPLv2 license # import expressions: from amoco.cas.expressions import * # registers : # ----------- # main reg set: R = [reg("r%d" % r, 32) for r in range(32)] with is_reg_flags: PSW = ...
gpl-2.0
-6,677,247,967,779,939,000
27.462264
87
0.551541
false
2.304813
false
false
false
arthurdk/gk-analysis
GKVisualizer.py
1
7581
import plotly from plotly.graph_objs import Scatter, Layout, Bar, Figure from wordcloud import WordCloud import matplotlib.pyplot as plt import plotly.graph_objs as go ''' class VisualizationStrategy: def __init__(self): pass # Homemade enumeration Plot, CSV, ASCII = range(3) ''' import random c...
mit
-1,554,547,537,877,476,000
28.729412
113
0.460361
false
4.254209
false
false
false
HuStmpHrrr/gjms
clickonce/publish.py
1
3780
from __future__ import print_function import subprocess import os import sys import shutil import datetime import distutils.dir_util if sys.version_info < (3,): input = raw_input str = unicode pwd = os.getcwd() appver_file = r'.\AppVer' target_shares = { 'release': [], 'test' : [], 'dev' : ...
lgpl-2.1
2,146,401,426,755,421,700
34.327103
186
0.589153
false
3.513011
false
false
false
piappl/robrex_mapping
img_tools/scripts/trajectory_capture.py
1
1683
#!/usr/bin/env python ## # @file trajectory_capture.py # @author Artur Wilkowski <ArturWilkowski@piap.pl> # # @section LICENSE # # Copyright (C) 2015, Industrial Research Institute for Automation and Measurements # Security and Defence Systems Division <http://www.piap.pl> import roslib roslib.load_manifest('img_to...
gpl-2.0
3,916,604,659,894,667,000
30.166667
167
0.619727
false
3.236538
false
false
false
dit/dit
dit/inference/counts.py
1
6393
""" Non-cython methods for getting counts and distributions from data. """ import numpy as np __all__ = ( 'counts_from_data', 'distribution_from_data', 'get_counts', ) try: # cython from .pycounts import counts_from_data, distribution_from_data except ImportError: # no cython from boltons....
bsd-3-clause
-8,556,384,628,051,415,000
33.556757
98
0.613796
false
4.582796
false
false
false
alex-am/pyalgo
pyalgo/play/sum.py
1
1135
# Given a list of positive integers S = [s_i] and a positive integer t # find if t can be written as the sum of a subset of elements of S import numpy as np def is_sum(t, S): # is it np hard ? # O(n**2 t) # brute force 2**n S = list(filter(lambda x:x>0, S)) n = len(S) m = np.zeros((n, t), dtyp...
gpl-3.0
438,430,288,067,461,700
22.666667
70
0.414978
false
3.059299
false
false
false
thomas-hori/Repuge-NG
ludicrous/ScrollingInterface.py
1
2538
from ludicrous.SimpleInterface import SimpleInterface __copying__=""" Written by Thomas Hori This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.""" class ScrollingInte...
mpl-2.0
6,258,991,873,130,474,000
34.782609
93
0.520489
false
3.810811
false
false
false
felixsch/mkcrowbar
tests/test_network.py
1
5238
from pytest import raises from mkcrowbar import network from fake import * def test_iface_has_ipv4_addr(capsys, monkeypatch): local = LocalCommands() monkeypatch.setattr('mkcrowbar.network.local', local) args = ['-f', 'inet', 'addr', 'show', 'eth0'] local.has('ip', expect_args(args, load_fixture('i...
apache-2.0
-4,987,254,012,026,377,000
34.391892
109
0.685567
false
3.501337
true
false
false
xhochy/g-octave
g_octave/description_tree.py
1
3391
# -*- coding: utf-8 -*- """ g_octave.description_tree ~~~~~~~~~~~~~~~~~~~~~~~~~ This module implements a Python object with the content of a directory tree with DESCRIPTION files. The object contains *g_octave.Description* objects for each DESCRIPTION file. :copyright: (c) 2009-2010 by Rafael...
gpl-2.0
-2,548,059,103,229,188,600
29.54955
76
0.555883
false
3.706011
true
false
false
alphagov/notifications-api
tests/app/db.py
1
42588
import random import uuid from datetime import date, datetime, timedelta import pytest from app import db from app.dao import fact_processing_time_dao from app.dao.email_branding_dao import dao_create_email_branding from app.dao.inbound_sms_dao import dao_create_inbound_sms from app.dao.invited_org_user_dao import sa...
mit
-4,070,065,704,934,377,500
33.794118
544
0.630483
false
3.6
false
false
false
stephen-hoover/Arignote
arignote/nnets/nets.py
1
40064
"""This module describes fully-functioning networks created from the pieces in `layer`. """ from __future__ import division, print_function import collections import inspect import numpy as np import six import theano import theano.tensor as T from theano.tensor.shared_randomstreams import RandomStreams from ..data ...
mit
-1,436,817,007,690,568,200
42.929825
117
0.592202
false
4.206194
false
false
false
zeffii/BlenderLSystem3D
sverchok_script_node_version/3dlsystem.py
1
6593
import math from math import radians import random from random import randint import ast import bmesh import mathutils from mathutils import Vector, Euler """ lifted from: http://www.4dsolutions.net/ocn/lsystems.html """ class Lturtle: import mathutils from mathutils import Vector, Euler Xvec = Vector...
gpl-3.0
-1,039,659,748,590,810,900
25.162698
83
0.502654
false
3.423157
false
false
false
apple/swift-lldb
packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/TestWatchLocation.py
1
4428
""" Test lldb watchpoint that uses '-s size' to watch a pointed location with size. """ from __future__ import print_function import re import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class HelloWatchLocationTestCase(TestBase): mydi...
apache-2.0
-3,877,249,198,937,931,000
38.185841
98
0.610659
false
3.982014
true
false
false
hoburg/gpkit
docs/source/examples/boundschecking.py
1
1592
"Verifies that bounds are caught through monomials" from gpkit import Model, parse_variables from gpkit.exceptions import UnboundedGP, UnknownInfeasible class BoundsChecking(Model): """Implements a crazy set of unbounded variables. Variables --------- Ap [-] d D [-] e F ...
mit
1,190,010,389,241,384,700
23.492308
75
0.476131
false
3.109375
false
false
false
daniel-noland/MemoryOracle
gdbwatch/gdbtest/mem/DynamicBreak.py
1
3858
#!/usr/bin/env python # -*- encoding UTF-8 -*- # THIS CODE DERIVED FORM cma.py import gdb import signal import re import threading from .Heap import Heap #----------------------------------------------------------------------- #Archs # TODO: Update all arch classes to use gdb.Architecture checks instead of this # ...
lgpl-3.0
-5,980,768,733,821,877,000
24.215686
81
0.550544
false
3.920732
false
false
false
sha-red/django-shared-utils
shared/utils/fields.py
1
1882
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from .text import slugify # TODO Remove deprecated location from .models.slugs import AutoSlugField def uniquify_field_value(instance, field_name, value, max_length=None, queryset=None): """ Makes a char field value unique by append...
mit
-4,836,092,466,750,654,000
33.218182
97
0.644527
false
3.668616
false
false
false
gnarayan/WDmodel
WDmodel/main.py
1
11665
# -*- coding: UTF-8 -*- """ The WDmodel package is designed to infer the SED of DA white dwarfs given spectra and photometry. This main module wraps all the other modules, and their classes and methods to implement the alogrithm. """ from __future__ import absolute_import from __future__ import print_function from __f...
gpl-3.0
8,631,514,802,882,615,000
37.754153
121
0.61123
false
3.733995
true
false
false
drfraser/django-paypal
paypal/standard/forms.py
1
10801
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging from django import forms from django.conf import settings from django.utils.safestring import mark_safe from django.utils import timezone from paypal.standard.widgets import ValueHiddenInput, ReservedValueHiddenInput from paypal.standard.conf import (POSTBACK...
mit
-8,756,174,441,328,358,000
39.912879
103
0.634386
false
3.738664
false
false
false
CaliopeProject/CaliopeServer
src/cid/forms/siim2/Company/models.py
1
1821
# -*- encoding: utf-8 -*- """ @authors: Nelson Daniel Ochoa ndaniel8a@gmail.com Sebastián Ortiz V. neoecos@gmail.com @license: GNU AFFERO GENERAL PUBLIC LICENSE SIIM Models are the data definition of SIIM2 Framework Copyright (C) 2013 Infometrika Ltda. This program is free software: you can redistribu...
agpl-3.0
-4,010,117,498,692,730,000
36.040816
89
0.698456
false
4.085586
false
false
false
jdotjdot/django-apptemplates
apptemplates/__init__.py
1
2709
""" Django template loader that allows you to load a template from a specific Django application. """ from os.path import dirname, join, abspath from django.conf import settings from django.template.base import Origin from django.template.loaders.filesystem import Loader as FilesystemLoader try: from impor...
mit
-5,958,066,998,723,027,000
34.12
107
0.627907
false
4.104545
false
false
false
browseinfo/odoo_saas3_nicolas
addons/website_quote/controllers/main.py
1
8818
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
2,026,008,436,371,959,300
50.567251
129
0.61658
false
3.817316
false
false
false
dgoodwin/rounder
src/rounder/ui/gtk/main.py
1
11733
# encoding=utf-8 # # Rounder - Poker for the GNOME Desktop # # Copyright (C) 2008 Devan Goodwin <dgoodwin@dangerouslyinc.com> # Copyright (C) 2008 James Bowes <jbowes@dangerouslyinc.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public Lic...
gpl-2.0
-6,898,350,797,561,719,000
36.244444
78
0.629304
false
3.733927
false
false
false
rflamary/POT
ot/stochastic.py
1
24589
""" Stochastic solvers for regularized OT. """ # Author: Kilian Fatras <kilian.fatras@gmail.com> # # License: MIT License import numpy as np ############################################################################## # Optimization toolbox for SEMI - DUAL problems ##############################################...
mit
-1,453,941,329,542,792,700
31.568212
126
0.563057
false
2.958609
false
false
false
jmikkola/Lexington
src/lexington/__init__.py
1
3175
import collections from werkzeug.wrappers import Response from lexington.util import di from lexington.util import route from lexington.util import view_map from lexington.util import paths def default_dependencies(settings): dependencies = di.Dependencies() dependencies.register_value('settings', settings) ...
mit
-8,198,006,270,251,723,000
32.421053
79
0.656693
false
4.233333
false
false
false
kevin-intel/scikit-learn
sklearn/feature_extraction/text.py
2
70670
# -*- coding: utf-8 -*- # Authors: Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel <mathieu@mblondel.org> # Lars Buitinck # Robert Layton <robertlayton@gmail.com> # Jochen Wersdörfer <jochen@wersdoerfer.de> # Roman Sinayev <roman.sinayev@gmail.com> # # License: B...
bsd-3-clause
227,654,248,893,633,020
36.609367
79
0.595432
false
4.421171
false
false
false
graik/biskit
archive_biskit2/Biskit/Dock/settings.py
1
3174
## ## Biskit, a toolkit for the manipulation of macromolecular structures ## Copyright (C) 2004-2018 Raik Gruenberg & Johan Leckner ## ## 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 v...
gpl-3.0
-4,584,866,479,027,789,300
29.815534
74
0.694707
false
3.412903
false
false
false
hologram-io/hologram-python
Hologram/Authentication/CSRPSKAuthentication.py
1
2419
# CSRPSKAuthentication.py - Hologram Python SDK CSRPSKAuthentication interface # # Author: Hologram <support@hologram.io> # # Copyright 2016 - Hologram (Konekt, Inc.) # # This CSRPSKAuthentication file implements the CSRPSK authentication interface. # # LICENSE: Distributed under the terms of the MIT License # import j...
mit
5,625,506,043,620,905,000
35.104478
95
0.649442
false
4.192374
false
false
false
dspmeng/code
scripts/GopBitRate.py
1
1764
import csv import itertools import numpy as np import getopt from os import path from os import system from sys import argv try: opts, args = getopt.getopt(argv[1:], 'f:') except getopt.GetoptError: print 'GopBitRate.py -f <frame rate> <stats csv>' print opts print args frameRate = 30 for opt, arg in opts: ...
apache-2.0
3,685,222,563,568,351,000
27
144
0.607143
false
2.935108
false
false
false
iandees/all-the-places
locations/spiders/hihostels.py
1
1934
# -*- coding: utf-8 -*- import scrapy import re from locations.items import GeojsonPointItem class HiHostelsSpider(scrapy.Spider): name = "hihostels" allowed_domains = ['hihostels.com'] start_urls = ( 'https://www.hihostels.com/sitemap.xml', ) def parse(self, response): response....
mit
2,543,737,011,314,564,600
45.047619
146
0.542399
false
3.196694
false
false
false
senttech/Cura
cura/Settings/MachineManager.py
1
50213
# Copyright (c) 2016 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from PyQt5.QtCore import QObject, pyqtSlot, pyqtProperty, pyqtSignal from PyQt5.QtWidgets import QMessageBox from UM.Application import Application from UM.Preferences import Preferences from UM.Logger import Logger from U...
agpl-3.0
-7,270,229,336,275,078,000
49.012948
192
0.669548
false
4.503408
false
false
false
Foggalong/scraps
files/cc/game.py
1
2715
#!/usr/bin/python3 import time from random import randint # Game Vars # Health hvar = 100 svar = 100 # Fight # stats not final # player # weapons weaponls = ['bare hands', 'sword', 'axe', 'staff'] wpninpackls = [1, 1 ,1, 0] wpnhealthls = [100, 20, 30, 50] wpndamagels = [5, 7, 10, 20] wpnchancels = [8, 7, 5, 6] #...
gpl-2.0
-3,856,779,248,668,732,000
22.617391
88
0.624309
false
2.776074
false
false
false
lavish/drs
robot/ev3dev_utils.py
1
3416
import time, ev3dev def run_for(motor, power=75, ever=None, seconds=None, degrees=None): """ Run motor for specified amount of seconds, degrees, or forever Examples: run_for(motor, ever=True) run_for(motor, seconds=0.5) run_for(motor, degrees=270, power=100) Power is specified in percents in ...
mit
-6,067,089,681,917,996,000
34.583333
87
0.657201
false
3.592008
false
false
false
ZeroQI/Hama.bundle
Contents/Code/common.py
1
55275
### common ### # https://www.python.org/dev/peps/pep-0008/ # Usage: "common.GetPosters" = "from common import GetPosters" ### Imports ### ### Functions used ### # Python Modules # import os # path.abspath, join, dirname import time # datetime.datetime.now() import r...
gpl-3.0
8,189,609,514,421,203,000
68.007491
382
0.627191
false
3.468344
false
false
false
flynx/pli
pli/pattern/proxy/_callproxy.py
1
9071
#======================================================================= #======================================================================= __version__ = '''0.1.00''' __sub_version__ = '''20040223152229''' __copyright__ = '''(c) Alex A. Naanou 2003''' #----------------------------------------------------------...
bsd-3-clause
6,048,693,589,287,850,000
27.615142
127
0.578216
false
2.748788
false
false
false
djtotten/workbench
setup.py
1
1964
#!/usr/bin/env python # -*- coding: utf-8 -*- import os, sys from setuptools import setup readme = open('README.rst').read() long_description = readme doclink = ''' Documentation ------------- The full documentation is at http://workbench.rtfd.org. ''' history = open('HISTORY.rst').read().replace('.. :changelog:', ...
mit
-9,168,152,055,158,455,000
37.509804
95
0.611507
false
3.664179
false
false
false
heeraj123/oh-mainline
mysite/missions/svn/views.py
1
7651
# This file is part of OpenHatch. # Copyright (C) 2010 Jack Grigg # Copyright (C) 2010 John Stumpo # Copyright (C) 2011 Krzysztof Tarnowski (krzysztof.tarnowski@ymail.com) # Copyright (C) 2010, 2011 OpenHatch, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
agpl-3.0
-5,017,947,890,406,898,000
39.696809
109
0.665534
false
3.868049
false
false
false
saullocastro/structMan
structmanager/sas.py
2
2784
""" Structural Assemblies - SAs (:mod:`structmanager.sas`) ====================================================== .. currentmodule:: structmanager.sas """ class FrameAssembly(object): """Frame Assembly""" def __init__(self, name, args): args = outerflange, web, innerflange self.name = name ...
bsd-3-clause
789,567,808,038,623,600
27.408163
75
0.510057
false
3.532995
false
false
false
fumitoh/modelx
modelx/tests/testdata/pandas_compat/fastlife/Projection/Policy/__init__.py
1
10940
"""Source module to create ``Policy`` space from. This module is a source module to create ``Policy`` space and its sub spaces from. The formulas of the cells in the ``Policy`` space are created from the functions defined in this module. The ``Policy`` space is the base space of the policy spaces for individual polic...
gpl-3.0
-2,055,454,818,524,421,000
25.300481
111
0.577148
false
3.583361
false
false
false
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/connectivity_parameters_py3.py
1
1429
# 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 ...
mit
-6,371,394,010,488,108,000
34.725
81
0.610917
false
4.669935
false
false
false
projectshift/shift-memory
setup.py
1
2472
#!/usr/bin/env python import os from setuptools import setup, find_packages # ---------------------------------------------------------------------------- # Building # # Create source distribution: # ./setup.py sdist # # # Create binary distribution (non-univeral, python 3 only): # ./setup.py bdist_wheel --python-tag=...
mit
-3,527,569,901,544,307,700
21.472727
78
0.565534
false
3.662222
false
false
false
agdsn/pycroft
tests/frontend/test_fields.py
1
1257
# Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. import string import pytest from wtforms_widgets.fields.core import DateField __author__ = 'shreyder' def te...
apache-2.0
4,335,578,972,140,562,000
38.28125
83
0.692124
false
4.218121
false
false
false
testmana2/test
Helpviewer/VirusTotal/VirusTotalApi.py
1
15389
# -*- coding: utf-8 -*- # Copyright (c) 2011 - 2015 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing the <a href="http://www.virustotal.com">VirusTotal</a> API class. """ from __future__ import unicode_literals try: str = unicode except NameError: pass import json from PyQt5.QtCore imp...
gpl-3.0
-7,896,726,135,286,818,000
36.534146
79
0.576841
false
4.390585
false
false
false
chenzilin/git-repo
subcmds/help.py
1
4832
# # Copyright (C) 2008 The Android Open Source Project # # 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 la...
apache-2.0
-7,711,002,196,199,770,000
28.284848
94
0.617343
false
3.976955
false
false
false
fga-gpp-mds/2017.2-Receituario-Medico
medical_prescription/user/test/test_model_send_invitation.py
1
1112
# Standard library import hashlib import random import datetime # Django imports from django.test import TestCase # Local django imports from user.models import SendInvitationProfile, Patient class TestSendInvitationProfile(TestCase): def setUp(self): self.send_invitation_profile = SendInvitationProfil...
mit
954,918,931,982,965,900
40.037037
111
0.636282
false
4.229008
false
false
false
hzlf/openbroadcast
website/apps/abcast/views/schedulerviews.py
1
11454
from django.views.generic import DetailView, ListView, FormView, UpdateView from django.views.generic.detail import SingleObjectTemplateResponseMixin from django.shortcuts import get_object_or_404, render_to_response from django.db.models import Avg from django import http from django.http import HttpResponse, HttpRe...
gpl-3.0
4,984,770,444,386,933,000
26.868613
114
0.620918
false
3.628128
false
false
false
jonhadfield/acli
lib/acli/output/vpc.py
1
4347
# -*- coding: utf-8 -*- from __future__ import (absolute_import, print_function, unicode_literals) from acli.output import (output_ascii_table, output_ascii_table_list, dash_if_none) from colorclass import Color, Windows Windows.enable(auto_colors=True, reset_atexit=True) def get_tag(name=None, tags=None): if tag...
mit
8,650,758,224,400,534,000
46.769231
116
0.517138
false
3.668354
false
false
false
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/lib/galaxy/model/migrate/versions/0059_sample_dataset_file_path.py
1
1937
""" Migration script to modify the 'file_path' field type in 'sample_dataset' table to 'TEXT' so that it can support large file paths exceeding 255 characters """ from sqlalchemy import * from sqlalchemy.orm import * from migrate import * from migrate.changeset import * from sqlalchemy.exc import * from galaxy.model....
gpl-3.0
8,046,237,435,248,791,000
31.830508
112
0.636551
false
3.858566
false
false
false
vanadium23/catalog-project
catalog/app/models.py
1
2366
from sqlalchemy import Column, Integer, String, ForeignKey from sqlalchemy.orm import relationship from app.database import Base class User(Base): """This is an ORM model for logging users""" __tablename__ = 'users' id = Column(Integer, primary_key=True) name = Column(String(50), nullable=False) ...
mit
-6,516,774,220,803,841,000
31.861111
66
0.592139
false
4.195035
false
false
false
py-in-the-sky/challenges
mine_allocations.py
1
8134
""" Greedy Algorithm https://community.topcoder.com/stat?c=problem_statement&pm=1957&rd=4650 Discussion: https://www.topcoder.com/community/data-science/data-science-tutorials/greedy-is-good/ "[T]he [expected] profit of allocating an extra worker to a mine is always higher or equal with the [expected] profit of alloc...
mit
-5,176,688,691,923,415,000
38.678049
243
0.512294
false
2.432416
false
false
false
Nic30/hwtHls
hwtHls/examples/pid.py
1
1640
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from hwt.code import Add from hwt.synthesizer.param import Param from hwtHls.platform.virtual import VirtualHlsPlatform from hwtHls.hls import Hls from hwtLib.logic.pid import PidController class PidControllerHls(PidController): def _config(self): super(Pid...
mit
-3,685,152,865,492,009,500
29.943396
77
0.570732
false
3.166023
false
false
false
TinkerMill/mms-server
mmsServer/__init__.py
1
5213
#!/usr/bin/env python # __init__.py ### IMPORTS ### import os import sys import os.path import time import json from datetime import datetime from flask import Flask, g, render_template, request from flask.ext.sqlalchemy import SQLAlchemy from sqlalchemy import create_engine from sqlalchemy.orm impo...
apache-2.0
-2,763,381,210,062,170,000
28.48538
114
0.647995
false
3.705046
false
false
false
ColumbiaCMB/kid_readout
apps/data_taking_scripts/old_scripts/highq_power_sweep_140423_0813f4.py
1
5959
import matplotlib from kid_readout.roach import baseband matplotlib.use('agg') import numpy as np import time import sys from kid_readout.utils import data_file,sweeps from kid_readout.analysis.resonator import fit_best_resonator ri = baseband.RoachBasebandWide() ri.initialize() #ri.set_fft_gain(6) #f0s = np.load('/...
bsd-2-clause
-5,829,926,809,568,526,000
32.105556
114
0.606813
false
2.737253
false
false
false
audy/banana
banana.py
1
4205
#!/usr/bin/env python # YAM SPLIT - Austin G. Davis-Richardson # Splits barcoded, 3-paired illumina files based on a .yaml config file import sys import os from glob import glob import string try: import yaml except ImportError: print >> sys.stderr, "could not import yaml\ntry:\n sudo easy_install pyyaml" ...
mit
-1,384,405,166,370,904,000
31.099237
107
0.524614
false
3.82969
true
false
false
barrachri/epcon
assopy/views.py
1
23911
# -*- coding: UTF-8 -*- from django import forms from django import http from django.conf import settings as dsettings from django.contrib import auth from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.admin.util import unquote from django.core.urlresolvers...
bsd-2-clause
-1,515,016,967,348,325,000
34.253687
139
0.602251
false
3.831063
false
false
false
ahjulstad/mathdom-python3
mathml/utils/sax_pmathml.py
1
1682
from mathml.pmathml.element import * from mathml.pmathml.mtoken import MToken import xml.sax.handler class MathMLHandler(xml.sax.handler.ContentHandler): class Elem(object): __slots__ = ('parent', 'name', 'attributes', 'text', 'children') def __init__(self, plotter): self.plotter = plotter self.current ...
mit
2,438,675,304,666,861,600
28
67
0.709275
false
3.209924
false
false
false
linii/ling229-final
metrics/noun_cluster_plot.py
1
2306
#!/usr/bin/python import os import sys # hack to make this able to import topic_modeling. must be run from final_project/ dir lib_path = os.path.abspath(os.path.join('.')) sys.path.append(lib_path) import numpy as np import pylab import pickle from collections import Counter from topic_modeling.topic_mo...
gpl-3.0
5,005,873,616,967,561,000
32.447761
94
0.656548
false
3.030223
false
false
false
zeldin/libsigrokdecode
decoders/lpc/pd.py
1
13089
## ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2012-2013 Uwe Hermann <uwe@hermann-uwe.de> ## ## 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 t...
gpl-3.0
4,092,020,724,565,551,000
34.762295
88
0.53969
false
3.297808
false
false
false
Glottotopia/aagd
moin/local/moin/contrib/googleimport/driver.py
1
7520
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- """ MoinMoin wiki project -> Google Project Hosting converter Full of evil antipatterns, incl. Exception exceptions. @copyright: 2007,2010 MoinMoin:AlexanderSchremmer @license: GNU GPL, see COPYING for details. """ import sys import re import urllib2 f...
mit
5,125,018,128,756,069,000
35.788945
235
0.557181
false
3.796063
false
false
false
dims/heat
heat/tests/test_translation_rule.py
1
26801
# # 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
5,504,096,451,595,284,000
32.543179
78
0.461065
false
5.024559
true
false
false
kpreid/shinysdr
setup.py
1
4716
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2013, 2014, 2015, 2016, 2019 Kevin Reid and the ShinySDR contributors # # This file is part of ShinySDR. # # ShinySDR 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 Soft...
gpl-3.0
5,016,024,157,505,470,000
32.446809
143
0.658185
false
3.840391
false
false
false
valmynd/MediaFetcher
src/plugins/youtube_dl/youtube_dl/extractor/twitch.py
1
20771
# coding: utf-8 from __future__ import unicode_literals import itertools import re import random import json from .common import InfoExtractor from ..compat import ( compat_kwargs, compat_parse_qs, compat_str, compat_urllib_parse_urlencode, compat_urllib_parse_urlparse, ) from ..utils import ( clean_html, Extr...
gpl-3.0
-2,672,165,837,656,433,700
27.610193
108
0.628135
false
2.771684
false
false
false
ronen/Halide
python_bindings/tutorial/lesson_12_using_the_gpu.py
1
11813
#!/usr/bin/python3 # Halide tutorial lesson 12. # This lesson demonstrates how to use Halide to run code on a GPU. # This lesson can be built by invoking the command: # make tutorial_lesson_12_using_the_gpu # in a shell with the current directory at the top of the halide source tree. # Otherwise, see the platform...
mit
7,020,487,303,896,136,000
34.79697
130
0.584018
false
3.794732
true
false
false
pathscale/ninja
platform_helper.py
1
2126
#!/usr/bin/env python # Copyright 2011 Google Inc. # Copyright 2013 Patrick von Reth <vonreth@kde.org> # 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://ww...
apache-2.0
9,217,081,902,934,273,000
29.811594
74
0.629351
false
3.988743
false
false
false
OpenHydrology/OH-Auto-Statistical-REST-API
application.py
1
2633
import flask import flask_restful import flask.ext.cors from celery import Celery from resources.analysis import AnalysisRes, AnalysisStatusRes from resources.catchment import CatchmentListRes, CatchmentRes from resources.dataimport import DataImportRes import floodestimation import floodestimation.loaders import flood...
gpl-3.0
-304,302,401,893,663,360
35.569444
117
0.651348
false
3.708451
false
false
false
eduardoklosowski/ergo-notes
ergonotes/admin.py
1
1098
# -*- coding: utf-8 -*- # # Copyright 2015 Eduardo Augusto Klosowski # # This file is part of Ergo Notes. # # Ergo Notes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, ...
agpl-3.0
-931,401,604,839,511,800
34.419355
100
0.720401
false
3.635762
false
false
false
zork9/pygame-pyMM
maproomdungeon.py
1
4377
# Copyright (c) 2013 Johan Ceuppens. # All rights reserved. # Redistribution and use in source and binary forms are permitted # provided that the above copyright notice and this paragraph are # duplicated in all such forms and that any documentation, # advertising materials, and other materials related to such # dis...
gpl-2.0
2,741,953,282,796,637,700
31.422222
79
0.664839
false
3.343774
false
false
false
gofed/gofed-ng
services/deps/service.py
1
4379
#!/bin/python # -*- coding: utf-8 -*- # #################################################################### # gofed-ng - Golang system # Copyright (C) 2016 Fridolin Pokorny, fpokorny@redhat.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public Lice...
gpl-3.0
6,155,984,285,590,203,000
33.480315
87
0.622745
false
4.081081
false
false
false
lcy-seso/models
fluid/ocr_recognition/_ce.py
1
1463
# this file is only used for continuous evaluation test! import os import sys sys.path.append(os.environ['ceroot']) from kpi import CostKpi, DurationKpi, AccKpi # NOTE kpi.py should shared in models in some way!!!! train_cost_kpi = CostKpi('train_cost', 0.05, 0, actived=True) test_acc_kpi = AccKpi('test_acc', 0.005,...
apache-2.0
-8,328,208,520,477,808,000
22.983607
73
0.608339
false
2.808061
false
false
false
openenglishbible/USFM-Tools
transform/support/asciiRenderer.py
1
5744
# -*- coding: utf-8 -*- # import codecs import io import os import textwrap import abstractRenderer # # Simplest renderer. Ignores everything except ascii text. # class Renderer(abstractRenderer.AbstractRenderer): def __init__(self, inputDir, outputDir, outputName, config): self.identity = 'asci...
mit
-775,057,629,401,138,200
34.8375
121
0.537147
false
3.162714
false
false
false
ophiry/dvc
dvc/logger.py
1
1532
import sys import logging import colorama colorama.init() class Logger(object): DEFAULT_LEVEL = logging.INFO LEVEL_MAP = { 'debug': logging.DEBUG, 'info': logging.INFO, 'warn': logging.WARNING, 'error': logging.ERROR } COLOR_MAP = { 'debug': colorama.Fore.BLU...
apache-2.0
-5,935,070,204,051,028,000
22.569231
85
0.609008
false
3.83
false
false
false
fzimmermann89/pyload
module/plugins/internal/Captcha.py
1
4078
# -*- coding: utf-8 -*- from __future__ import with_statement import os import time from module.plugins.internal.Plugin import Plugin from module.plugins.internal.utils import encode class Captcha(Plugin): __name__ = "Captcha" __type__ = "captcha" __version__ = "0.47" __status__ = "stable" ...
gpl-3.0
4,668,200,575,721,839,000
30.859375
129
0.576018
false
3.836312
false
false
false
Karaage-Cluster/karaage-debian
karaage/plugins/kgapplications/templatetags/applications.py
1
3655
# Copyright 2015 VPAC # # This file is part of Karaage. # # Karaage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Karaage is dist...
gpl-3.0
2,375,639,057,141,617,700
31.061404
79
0.685636
false
4.106742
false
false
false
usc-isi/extra-specs
nova/tests/api/openstack/compute/contrib/test_quotas.py
1
8680
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/...
apache-2.0
7,071,073,384,831,385,000
38.634703
79
0.521429
false
4.135303
true
false
false
googleads/google-ads-python
examples/shopping_ads/add_shopping_product_listing_group_tree.py
1
15958
#!/usr/bin/env python # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
7,351,844,020,958,273,000
35.43379
80
0.665058
false
4.007534
false
false
false
devincornell/networkxtimeseries
NetTS.py
1
13522
 # system imports import multiprocessing import pickle import sys from itertools import * # anaconda imports import networkx as nx import numpy as np import pandas as pd import matplotlib.pyplot as plt class NetTS: ''' Network Time Series ''' ### member vars ### # self.nts - list of networks repres...
mit
-2,272,877,648,505,575,000
33.402036
140
0.564867
false
3.559768
false
false
false
tensorflow/benchmarks
scripts/tf_cnn_benchmarks/cnn_util.py
1
8496
# Copyright 2017 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
2,613,338,284,972,577,300
32.581028
80
0.668432
false
3.828752
false
false
false
simodalla/newage
newage/views.py
1
2723
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.http import Http404 from django.shortcuts import get_object_or_404 from django.core.exceptions import ObjectDoesNotExist from django.views.generic import ListView, DetailView from django.utils.translation import ugettext_lazy ...
bsd-3-clause
3,315,744,594,874,511,000
37.352113
79
0.634594
false
4.294953
false
false
false
kansanmuisti/kamu
Attic/eduskunta/find-mp-twitter.py
1
2082
#!/usr/bin/env python import sys import pickle from twython import Twython from django.core.management import setup_environ sys.path.append('.') import settings setup_environ(settings) from parliament.models import Member, MemberSocialFeed PICKLE_FILE="mp-twitter.pickle" twitter = Twython() def read_twitter_list...
agpl-3.0
-8,833,156,142,159,256,000
26.76
82
0.59318
false
3.154545
false
false
false
JustinTulloss/harmonize.fm
fileprocess/fileprocess/configuration.py
1
2469
# A configuration file for the fileprocess. We could do a .ini, but everybody # knows python here import logging import os from logging import handlers config = { 'port': 48260, 'S3.accesskey': '17G635SNK33G1Y7NZ2R2', 'S3.secret': 'PHDzFig4NYRJoKKW/FerfhojljL+sbNyYB9bEpHs', 'S3.music_bucket': 'music.r...
mit
-6,707,404,347,512,413,000
27.056818
80
0.649656
false
2.84447
true
false
false
wger-project/wger
wger/weight/api/views.py
1
1461
# -*- coding: utf-8 -*- # This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any ...
agpl-3.0
63,408,866,045,461,896
30.76087
78
0.711841
false
4.058333
false
false
false
swingr/meeseeks
meeseeks.py
1
1298
import pebble as p import audio class Meeseeks(): def __init__(self, id="464F", name="Mr. Meeseeks"): self.id = id self.name = name self.pebble = None self.score = [] def connect(self): self.pebble = p.Pebble(self.id) def send(self, msg): self.pebble.notifi...
mit
8,157,238,295,061,237,000
22.178571
82
0.572419
false
3.415789
false
false
false
operasoftware/dragonfly-build-tools
df2/codegen/msgdefs.py
1
3763
import os import sys import time import protoparser import protoobjects import utils INDENT = " " CSS_CLASSES = { protoobjects.NUMBER: "number", protoobjects.BUFFER: "string", protoobjects.BOOLEAN: "boolean", } def indent(count): return count * INDENT def print_doc(file, field, depth):...
apache-2.0
5,219,118,924,902,811,000
40.280899
120
0.594738
false
3.258009
false
false
false
mudragada/util-scripts
PyProblems/CodeSignal/uberShortestDistance.py
1
3276
#Consider a city where the streets are perfectly laid out to form an infinite square grid. #In this city finding the shortest path between two given points (an origin and a destination) is much easier than in other more complex cities. #As a new Uber developer, you are tasked to create an algorithm that does this calc...
mit
2,286,087,225,133,462,500
27.920354
144
0.612607
false
2.87423
false
false
false
kbase/auth_service
python-libs/oauth.py
1
8778
import logging import httplib2 import json import os import hashlib # This module performs authentication based on the tokens # issued by Globus Online's Nexus service, see this URL for # details: # http://globusonline.github.com/nexus-docs/api.html # # Import the Globus Online client libraries, originally # sourced f...
mit
-9,132,790,155,269,310,000
39.451613
127
0.640009
false
4.244681
false
false
false
SecuredByTHEM/ndr-server
ndr_server/recorder.py
1
5041
#!/usr/bin/python3 # Copyright (C) 2017 Secured By THEM # Original Author: Michael Casadevall <mcasadevall@them.com> # # 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...
agpl-3.0
4,874,409,016,993,405,000
38.077519
89
0.620115
false
3.938281
true
false
false
phildini/django-invitations
invitations/models.py
1
2846
import datetime from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils import timezone from django.utils.crypto import get_random_string from django.utils.encoding import python_2_unicode_compatible from django.contrib.sites.models import Site from django.core.urlresolve...
gpl-3.0
-2,722,871,065,632,220,700
31.340909
89
0.625439
false
4.166911
false
false
false
massimo-nocentini/competitive-programming
UVa/1062.py
1
2541
#_________________________________________________________________________ import fileinput from contextlib import contextmanager @contextmanager def line_bind(line, *ctors, splitter=lambda l: l.split(' '), do=None): ''' Split `line` argument producing an iterable of mapped elements, in the sense of `ctors`....
mit
-4,782,286,211,673,975,000
34.291667
92
0.623377
false
4.513321
false
false
false
markvdw/mltools
mltools/optimise_scg.py
1
5939
# Copyright I. Nabney, N.Lawrence and James Hensman (1996 - 2014) # Scaled Conjuagte Gradients, originally in Matlab as part of the Netlab toolbox by I. Nabney, converted to python N. Lawrence and given a pythonic interface by James Hensman # Modified from GPy SCG optimisation from __future__ import print_function i...
mit
-192,725,720,858,400,350
32.937143
228
0.555144
false
3.704928
false
false
false