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
Impavidity/SearchEngine
Data Cleaning/booleanQuery.py
1
3845
#!/usr/bin/python #import time import json import os import myTokenize from porter import PorterStemmer import utils def inverseList(termDict): """NOT 1 posting list--> return a list""" return { # 'term':'', 'docFreq':wholeLen - termDict['docFreq'], 'docIDs':[x for x in wholeList if x not in termDict['docIDs'...
mit
-527,455,152,555,988,860
23.335443
96
0.668921
false
2.692577
false
false
false
NexusIS/tempest
tempest/api/compute/security_groups/test_security_group_rules.py
1
8053
# Copyright 2012 OpenStack Foundation # 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 requ...
apache-2.0
8,510,567,626,372,952,000
41.162304
78
0.560785
false
4.227297
true
false
false
sahlinet/fastapp
fastapp/api_views.py
1
13365
# -*- coding: utf-8 -*- import zipfile import requests import json from threading import Thread from rest_framework.renderers import JSONRenderer, JSONPRenderer from rest_framework import permissions, viewsets, views from rest_framework import status from django.utils.decorators import method_decorator from django.vie...
mit
7,445,271,498,546,006,000
34.171053
157
0.645267
false
4.11484
false
false
false
coldfix/udiskie
udiskie/notify.py
1
9790
""" Notification utility. """ import logging from gi.repository import GLib from .async_ import run_bg from .common import exc_message, DaemonBase, format_exc from .mount import DeviceActions from .locale import _ __all__ = ['Notify'] class Notify(DaemonBase): """ Notification tool. Can be connecte...
mit
-5,972,058,546,821,684,000
37.543307
84
0.58141
false
4.587629
true
false
false
deepmind/acme
acme/agents/tf/dmpo/agent.py
1
7916
# python3 # Copyright 2018 DeepMind Technologies Limited. 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 re...
apache-2.0
7,290,326,386,658,015,000
40.883598
80
0.69429
false
4.135841
false
false
false
dag/stutuz
stutuz/utils/tex.py
1
1947
#-*- coding:utf-8 -*- from __future__ import division from __future__ import absolute_import from __future__ import with_statement from __future__ import print_function from __future__ import unicode_literals import re class Tex(object): """Wraps a string of TeX such that wrapping it in :class:`~flask.Marku...
bsd-2-clause
-4,395,342,104,824,818,000
24.946667
73
0.533916
false
2.998459
false
false
false
druce/safewithdrawal_tensorflow
lifetable.py
1
8359
import numpy as np import pandas as pd from pandas import DataFrame ############################################################ # Life tables # https://www.ssa.gov/oact/STATS/table4c6.html ############################################################ ############################################################ # Male...
mit
-3,262,550,219,942,964,700
60.463235
118
0.554731
false
2.325174
false
false
false
jwlin/web-crawler-tutorial
ch8/twse.py
1
1294
# source: https://github.com/yotsuba1022/web-crawler-practice/blob/master/ch4/tw_stock_exchange.py import requests import time TWSE_URL = 'http://www.twse.com.tw/exchangeReport/STOCK_DAY?response=json' def get_web_content(stock_id, current_date): resp = requests.get(TWSE_URL + '&date=' + current_date + '&stock...
mit
-6,256,593,204,803,681,000
25.479167
98
0.553543
false
3.298701
false
false
false
tomekwojcik/osxnotify-python-cffi
setup.py
1
2466
# -*- coding: utf-8 -*- # Copyright (c) 2015 Tomek Wójcik <tomek@bthlabs.pl> # # 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 # t...
mit
-6,282,183,155,031,331,000
39.409836
79
0.685193
false
3.82764
false
false
false
omry/omegaconf
setup.py
1
2119
# type: ignore """ OmegaConf setup Instructions: # Build: rm -rf dist/ omegaconf.egg-info/ python setup.py sdist bdist_wheel # Upload: twine upload dist/* """ import pathlib import pkg_resources import setuptools from build_helpers.build_helpers import ( ANTLRCommand, BuildPyCommand, ...
bsd-3-clause
1,910,150,043,323,618,600
28.027397
77
0.580934
false
4.163065
false
false
false
dknlght/dkodi
src/plugin.video.india4movie/resources/lib/api.py
1
4287
import resources.lib.util as util import re from BeautifulSoup import BeautifulSoup from BeautifulSoup import BeautifulStoneSoup from BeautifulSoup import SoupStrainer class SiteApi(): MAIN_URL = 'http://www.india4movie.com/' LONG_NAME = 'India 4 Movie' def get_menu_category(self): ...
gpl-2.0
2,470,000,861,598,209,000
27.979021
86
0.478656
false
4.361139
false
false
false
opendatadurban/scoda
scoda/public.py
1
54121
import itertools import operator from sqlalchemy_searchable import search from scoda.app import app from flask import request, url_for, redirect, flash, make_response, session, render_template, jsonify, Response, \ send_file from flask_security import current_user from itertools import zip_longest from sqlalchemy...
apache-2.0
9,212,944,357,246,466,000
40.921766
170
0.4892
false
3.816714
false
false
false
yangalex/Otomata-python
Oto.py
1
12557
import pygame # initialize sounds pygame.mixer.init(buffer=200) # This can be increased for better sound quality, but causes latency (incorrect tempo) pygame.mixer.set_num_channels(100) # Set variables used to represent the arrows in each cell LEFT = ((10, 37.5), (65, 10), (65, 65)) RIGHT = ((10, 10), (10, 65), (65...
mit
-1,022,732,445,109,660,400
41.279461
130
0.516047
false
3.706316
false
false
false
tulip-control/tulip-control
tulip/spec/gr1_fragment.py
1
12733
# Copyright (c) 2014, 2015 by California Institute of Technology # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice...
bsd-3-clause
5,294,373,099,274,297,000
25.75
74
0.515432
false
3.302983
false
false
false
prheenan/appm_project_2
util.py
1
2469
from collections import Counter import numpy as np def getKmers(string,kV): return [ string[i:i+kV] for i in range(0,len(string)-kV+1)] def getCounters(seqs,kmer,goodIdx): working = seqs[goodIdx] # transform the dna into their kmers. Use a counter structure, # which is much faster. it stored the uniq...
gpl-2.0
-73,361,183,659,191,330
49.387755
80
0.701499
false
3.391484
false
false
false
Ale-/civics
apps/models/migrations/0034_auto_20180110_1120.py
1
1405
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2018-01-10 11:20 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('models', '0033_auto_20170927_1158'), ] operations = [ migrations.AlterField...
gpl-3.0
3,779,511,904,885,897,700
55.2
451
0.641281
false
3.115299
false
false
false
pseudo-cluster/pseudo-cluster
scripts/pseudo_cluster/statistics_analyzer.py
1
3861
# -*- coding: utf-8 -*- import imp import sys import gettext import tasks_list import metrics import statistics_plotter def metric_module_import(metric_name): """ импортирует модуль, который обеспечивает работу с метрикой. """ try: #module=importlib("metrics.metric_"+metric_name) ...
lgpl-2.1
-5,190,198,796,681,979,000
24.875969
90
0.561714
false
2.777038
false
false
false
poldracklab/mriqc
mriqc/bin/labeler.py
1
2466
#!/usr/bin/env python # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: # @Author: dbirman # @Date: 2017-06-14 16:51:24 import sys import csv import random import webbrowser import os import numpy as np # other functions def n...
bsd-3-clause
-8,241,332,631,539,309,000
28.357143
73
0.505677
false
3.396694
false
false
false
AnhellO/DAS_Sistemas
Ago-Dic-2018/Max/Proyecto Final/Proyect/SqlCrudApi.py
1
1826
import sqlite3 from ApiClientes import * from AbstractClassBuilders import * import sys #Autor y programador - "Maximiliano García De Santiago" class SqlCRUDCliente(AbstractProyectClient): def __init__(self): self.conexion = sqlite3.connect('ProyectTaco.db') self.cursor = self.conexion.cursor() ...
mit
-7,079,638,936,153,485,000
35.5
113
0.640548
false
2.883096
false
false
false
sivaprakashniet/push_pull
p2p/lib/python2.7/site-packages/compressor/js.py
1
2297
from compressor.conf import settings from compressor.base import Compressor, SOURCE_HUNK, SOURCE_FILE class JsCompressor(Compressor): def __init__(self, content=None, output_prefix="js", context=None): filters = list(settings.COMPRESS_JS_FILTERS) super(JsCompressor, self).__init__(content, output...
bsd-3-clause
1,391,676,831,852,386,600
43.173077
84
0.554201
false
4.277467
false
false
false
SanketDG/networkx
networkx/generators/classic.py
1
20233
# Copyright (C) 2004-2016 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. """ Generators for some classic graphs. The typical graph generator is called as follows: >>> G=nx.complete_graph(100) returning th...
bsd-3-clause
-8,570,287,125,214,788,000
30.762951
103
0.605348
false
3.334927
false
false
false
geminy/aidear
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/build/android/pylib/junit/test_runner.py
1
2459
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import os import tempfile from devil.utils import cmd_helper from pylib import constants from pylib.results import json_results class JavaTestR...
gpl-3.0
6,777,020,698,719,416,000
34.128571
77
0.631151
false
3.621502
true
false
false
mwindau/praktikum
v351/dreieck.py
1
1188
import numpy as np import matplotlib.pyplot as plt from scipy.stats import linregress from scipy.optimize import curve_fit oberwelle3, amplitude3 = np.genfromtxt('Rohdaten/dreieckspannung.txt',unpack=True) plt.plot(oberwelle3, amplitude3,'k.',label="Messdaten") #plt.legend(loc='best') plt.grid() #plt.xlim(0,1.5) plt.x...
mit
-2,929,432,997,929,991,700
28.7
84
0.644781
false
2.651786
false
false
false
gajim/python-nbxmpp
nbxmpp/dispatcher.py
1
19414
# Copyright (C) 2019 Philipp Hörist <philipp AT hoerist.com> # # This file is part of nbxmpp. # # 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 opt...
gpl-3.0
-1,560,585,998,823,393,800
35.836812
80
0.617164
false
4.105964
false
false
false
jrief/django-angular
examples/server/tests/settings.py
1
3584
# -*- coding: utf-8 -*- from __future__ import unicode_literals """Django settings for unit test project.""" import os DEBUG = True BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ...
mit
7,245,757,469,556,678,000
26.358779
95
0.618583
false
3.694845
false
false
false
clearcode/Apache2Piwik
src/daemons.py
1
2900
#-*- coding: utf-8 -*- #!/usr/bin/env python import sys, os, time, atexit from signal import SIGTERM from datetime import datetime class Daemon: """ A generic daemon class. Usage: subclass the Daemon class and override the run() method """ def __init__(self, pidfile, stdin='/dev/null', stdout='/dev/null', std...
gpl-3.0
9,008,050,430,314,006,000
21.65625
104
0.627586
false
2.871287
false
false
false
imatge-upc/saliency-2016-cvpr
shallow/train.py
2
3064
# add to kfkd.py from lasagne import layers from lasagne.updates import nesterov_momentum from nolearn.lasagne import NeuralNet,BatchIterator import os import numpy as np from sklearn.utils import shuffle import cPickle as pickle import matplotlib.pyplot as plt import Image import ImageOps from scipy import misc import...
mit
8,471,191,426,663,251,000
29.65
75
0.618146
false
2.983447
false
false
false
shakhat/act
act/engine/core.py
1
7144
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the ...
apache-2.0
2,786,492,634,673,216,500
31.035874
79
0.601204
false
4.212264
false
false
false
LTD-Beget/sprutio-rpc
lib/FileManager/workers/sftp/newFile.py
1
1671
import traceback from lib.FileManager.workers.baseWorkerCustomer import BaseWorkerCustomer class NewFile(BaseWorkerCustomer): def __init__(self, path, session, *args, **kwargs): super(NewFile, self).__init__(*args, **kwargs) self.path = path self.session = session def run(self): ...
gpl-3.0
-242,218,982,691,148,300
27.810345
82
0.453022
false
4.760684
false
false
false
puruckertom/poptox
poptox/yulefurry/yulefurry_qaqc.py
1
1396
import os os.environ['DJANGO_SETTINGS_MODULE']='settings' import webapp2 as webapp from google.appengine.ext.webapp.util import run_wsgi_app from google.appengine.ext.webapp import template import numpy as np import cgi import cgitb cgitb.enable() class yulefurryQaqcPage(webapp.RequestHandler): de...
unlicense
-3,085,296,245,817,376,000
41.30303
130
0.644699
false
3.481297
false
false
false
chankeypathak/pandas-matplotlib-examples
Lesson 9/export.py
1
1179
import pandas as pd from sqlalchemy import create_engine, MetaData, Table, select # Parameters TableName = "data" DB = { 'drivername': 'mssql+pyodbc', 'servername': 'DAVID-THINK', #'port': '5432', #'username': 'lynn', #'password': '', 'database': 'BizIntel', 'driver': 'SQL Server Native Cl...
mit
-935,512,419,466,732,800
24.630435
233
0.667515
false
3.152406
false
false
false
yasoob/PythonRSSReader
venv/lib/python2.7/dist-packages/reportlab/platypus/tableofcontents.py
1
20681
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/platypus/tableofcontents.py __version__=''' $Id$ ''' __doc__="""Experimental class to generate Tables of Contents easily This module defines a single...
mit
9,047,814,194,291,099,000
36.263063
123
0.612301
false
4.020412
false
false
false
clems71/pogle
pogle/pogle_scene.py
1
3346
from pogle_math import Vector, Matrix4x4, Transform __author__ = 'Clement JACOB' __copyright__ = "Copyright 2013, The Python OpenGL Engine" __license__ = "Closed Source" __version__ = "0.0.1" __email__ = "clems71@gmail.com" __status__ = "Prototype" class Light(object): def __init__(self, pos=Vector(0.0, 0....
mit
-1,040,859,930,358,757,000
23.348485
70
0.646742
false
3.095282
false
false
false
simvisage/oricreate
docs/howtos/ex04_cp_operators/cp_F_L_bases.py
1
1043
r''' This example demonstrates the crease pattern factory usage for Yoshimura crease pattern. ''' def create_cp(): # begin from oricreate.api import CreasePatternState import numpy as np x = np.array([[0, 0, 0], [1, 0, 0], [1, 1, 0], [2, 1, 0] ...
gpl-3.0
4,943,180,609,816,301,000
20.285714
83
0.442953
false
3.332268
false
false
false
jiumutazhao/Flask-web-Development
app/models.py
1
1264
from werkzeug.security import generate_password_hash, check_password_hash from flask_login import UserMixin from . import db, login_manager class Role(db.Model): __tablename__ = 'roles' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(64), unique=True) users = db.relationship('U...
mit
-3,055,430,380,938,680,300
29.829268
73
0.670886
false
3.501385
false
false
false
messagebird/python-rest-api
examples/voice_recording_view.py
1
1148
#!/usr/bin/env python import messagebird import argparse parser = argparse.ArgumentParser() parser.add_argument('--accessKey', help='access key for MessageBird API', type=str, required=True) parser.add_argument('--callID', help='identifier for the call', type=str, required=True) parser.add_argument('--legID', help='id...
bsd-2-clause
-3,881,190,602,902,138,400
41.518519
129
0.711672
false
3.852349
false
false
false
mooniak/animager
src/genImages.py
1
1174
### generate temporary images using GIT commits ### dependencies : imagemagick import os def genTempImage( gitImage, options, outputName, outputExt, outputDir ): os.system( 'convert ' + gitImage + ' ' + options + ' ' + outputDir + outputName ...
gpl-3.0
5,966,616,931,851,195,000
23.458333
58
0.540034
false
4.284672
false
false
false
hlerebours/lambda-calculus
lambdax/builtins_as_lambdas.py
1
2296
""" Expose most of the built-in functions and classes but suffixed with '_λ' and to be only used in λ-abstractions. See module `lambdax.builtins_overridden` to keep built-in names and have a mixed behavior, working as expected both inside and outside λ-abstractions. """ import builtins from lambdax.lambda_calculus im...
mit
-7,297,818,430,264,190,000
23.885057
90
0.68545
false
2.505787
false
false
false
nico202/pyNeMo
WorkerInit.py
1
3502
#!/usr/bin/env python2 # A worker. Waits for incoming connection on port 10666 # When data are received, process them, and sends back to host (using requests), port 10665 import web #Listen for requests from libs.web import ip_port, get_self_ip web.config.debug = False import requests #Answer to requests when data ...
gpl-2.0
8,055,584,451,425,202,000
27.942149
91
0.603941
false
3.852585
false
false
false
lowrie/pyRouterJig
doc.py
1
6098
########################################################################### # # Copyright 2015-2018 Robert B. Lowrie (http://github.com/lowrie) # # This file is part of pyRouterJig. # # pyRouterJig is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as publishe...
gpl-3.0
-1,898,152,790,131,745,800
38.597403
99
0.599213
false
3.891512
false
false
false
tadashi-aikawa/gemini
jumeaux/addons/judgement/same.py
1
1698
# -*- coding:utf-8 -*- from owlmixin import OwlMixin, TList, TOption from jumeaux.addons.judgement import JudgementExecutor from jumeaux.addons.utils import when_filter from jumeaux.logger import Logger from jumeaux.models import JudgementAddOnPayload, JudgementAddOnReference logger: Logger = Logger(__name__) LOG_PR...
mit
-295,817,957,404,683,650
31.037736
112
0.616019
false
3.574737
true
false
false
lisael/pg-django
django/test/simple.py
1
16207
import unittest as real_unittest from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.models import get_app, get_apps from django.db.models.loading import unregister_app from django.test import _doctest as doctest from django.test.utils import setup_test_environment, ...
bsd-3-clause
1,539,561,326,131,842,300
37.405213
85
0.58302
false
4.623966
true
false
false
thunderhoser/GewitterGefahr
gewittergefahr/scripts/run_bwo_for_swirlnet.py
1
11719
"""Runs backwards optimization on Swirlnet model.""" import os os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import argparse import numpy from keras import backend as K from keras.models import load_model as load_keras_model from gewittergefahr.deep_learning import model_interpretation from gewittergefahr.deep_learning im...
mit
1,711,039,602,653,496,800
35.736677
80
0.689564
false
3.414627
false
false
false
caterzy/JackPlayer
TFTest/TFSaver_Meta.py
1
1116
# This Python file uses the following encoding: utf-8 __author__ = 'JackRao' import tensorflow as tf import os from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("MNIST_data", one_hot=True) x = tf.placeholder(tf.float32, [None, 784]) W = tf.Variable(tf.zeros([784, 10])) b =...
gpl-2.0
-7,533,435,100,495,418,000
19.290909
85
0.689068
false
2.682692
false
false
false
smurfix/HomEvenT
irrigation/rainman/models/__init__.py
1
2120
# -*- coding: utf-8 -*- ## Copyright © 2012, Matthias Urlichs <matthias@urlichs.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 3 of the License, or ## (at your op...
gpl-3.0
-4,067,155,495,434,519,000
32.046875
76
0.738534
false
3.405797
false
false
false
khosrow/metpx
sarracenia/sarra/plugins/msg_sundew_pxroute.py
1
2902
#!/usr/bin/env python3 """ Implement message filtering based on a routing table from MetPX-Sundew. Make it easier to feed clients exactly the same products with sarracenia, that they are used to with sundew. the pxrouting option must be set in the configuration before the on_message plugin is configured, ...
gpl-2.0
3,273,675,148,913,927,000
30.204301
140
0.55858
false
3.879679
false
false
false
jonlooney/jxmlease
jxmlease/_parsehandler.py
1
8605
#!/usr/bin/env python # Copyright (c) 2015-2016, Juniper Networks, Inc. # All rights reserved. # # Copyright (C) 2012 Martin Blech and individual contributors. # # See the LICENSE file for further information. """Internal module that provides a common parsing handler.""" from __future__ import absolute_import from . i...
mit
2,954,703,883,913,370,600
36.907489
103
0.554794
false
4.350354
true
false
false
klahnakoski/TestFailures
pyLibrary/queries/containers/list_usingSQLite.py
1
85283
# encoding: utf-8 # # # 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/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import from _...
mpl-2.0
4,033,195,535,351,466,000
40.784909
176
0.464723
false
4.118758
false
false
false
ThomasZh/legend-club-wxpub
foo/wx/xml_parser.py
1
5757
#!/usr/bin/env python # _*_ coding: utf-8_*_ # # Copyright 2016 planc2c.com # thomas@time2box.com # # 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/LICENS...
apache-2.0
1,821,320,544,877,225,200
30.201087
77
0.62463
false
2.895108
false
false
false
edx/django-oauth2-provider
provider/oauth2/views.py
1
6130
from datetime import timedelta import json from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponseBadRequest, HttpResponse from django.urls import reverse from django.views.generic import View from provider import constants from provider.oauth2.backends import BasicClientBackend, Re...
mit
-625,130,853,008,770,000
32.135135
119
0.648613
false
4.31083
false
false
false
myarjunar/QGIS
python/plugins/processing/gui/ExtentSelectionPanel.py
1
5956
# -*- coding: utf-8 -*- """ *************************************************************************** ExtentSelectionPanel.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ******************...
gpl-2.0
-4,447,152,058,114,931,000
36.696203
183
0.55591
false
4.353801
false
false
false
sileht/deb-openstack-keystone
keystone/service.py
1
21260
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack 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 requ...
apache-2.0
5,537,444,960,676,364,000
35.973913
79
0.522531
false
4.718154
false
false
false
iagcl/data_pipeline
tests/stream/test_json_oracle.py
1
3105
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
586,250,750,368,489,200
31.34375
62
0.625765
false
3.772783
false
false
false
tpbarron/rlflow
rlflow/memories/experience_replay.py
1
1772
import collections import random import numpy as np class ExperienceReplay(object): SARS = collections.namedtuple('SARS', ['S1', 'A', 'R', 'S2', 'T']) def __init__(self, state_shape=(1,), max_size=1000000): self.max_size = max_size self.cur_size = 0 self.next_ind = 0 self.S1 ...
mit
386,739,578,009,887,200
26.6875
88
0.538375
false
3.210145
false
false
false
hoogamaphone/chromathicity
chromathicity/rgbspec.py
1
3461
import numpy as np import chromathicity.defaults from chromathicity.illuminant import D from chromathicity.interfaces import RgbSpecification, Compander from chromathicity.observer import Standard from chromathicity.util import SetGet class Custom(RgbSpecification, SetGet): def __init__(self, **kwargs): ...
bsd-3-clause
-7,693,280,348,599,285,000
24.448529
80
0.568044
false
3.293054
false
false
false
monkut/deso
deso/deso/layers/vector/management/commands/load_geojson_layers.py
1
1694
""" Load GEOJSON text files from a given directory to individua vector.GeoJsonLayer models """ import os from django.core.management.base import BaseCommand, CommandError from ...models import GeoJsonLayer WGS84_SRID = 4326 def load_geojson_layer(geojson_filepath): with open(geojson_filepath, "rt", encoding="u...
mit
-3,164,741,114,438,295,000
35.042553
125
0.625148
false
4.172414
false
false
false
hgarrereyn/Th3g3ntl3man-CTF-Writeups
2017/picoCTF_2017/problems/cryptography/weirderRSA/solution.py
1
1411
import binascii import string e = 65537 N = 2117672903243982543718682316871526252711806457547609454030889520203949724574698058235821747613875519920176501328068871432817438393885435762043247829203062605160245553645158838861106558077244590404583160688904474995478819140425202290013963177624041695727533599660346969550...
gpl-3.0
-4,545,911,141,888,952,300
37.194444
313
0.742027
false
2.462478
false
false
false
hanak/artshow-keeper
artshowkeeper/model/currency.py
1
4797
# Artshow Keeper: A support tool for keeping an Artshow running. # Copyright (C) 2014 Ivo Hanak # # 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...
gpl-3.0
8,395,901,954,743,408,000
40
144
0.65124
false
4.504225
false
false
false
SRabbelier/Melange
app/soc/logic/helper/notifications.py
1
13100
#!/usr/bin/env python2.5 # # Copyright 2008 the Melange 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 applic...
apache-2.0
-5,322,021,036,280,647,000
29.536131
81
0.694351
false
3.704751
false
false
false
walty8/trac
trac/wiki/web_ui.py
1
35037
# -*- coding: utf-8 -*- # # Copyright (C) 2003-2009 Edgewall Software # Copyright (C) 2003-2005 Jonas Borgström <jonas@edgewall.com> # Copyright (C) 2004-2005 Christopher Lenz <cmlenz@gmx.de> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part ...
bsd-3-clause
-1,836,611,348,143,104,500
40.857826
79
0.524104
false
4.135875
true
false
false
spiiph/owls-hep
owls_hep/counting.py
1
2022
"""Provides method for efficiently counting events in a region. """ # System imports from uuid import uuid4 # owls-cache imports from owls_cache.persistent import cached as persistently_cached # owls-parallel imports from owls_parallel import parallelized # owls-hep imports from owls_hep.calculation import Calculat...
mit
-8,299,642,645,994,815,000
29.636364
77
0.692878
false
4.221294
false
false
false
bioh4x/NeatFreq
lib/genometools-1.4.1/gtpython/gt/extended/feature_node.py
1
8909
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2008-2009 Sascha Steinbiss <steinbiss@zbh.uni-hamburg.de> # Copyright (c) 2008-2009 Center for Bioinformatics, University of Hamburg # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, prov...
gpl-2.0
-4,252,604,974,979,989,000
33.937255
115
0.635649
false
3.418649
false
false
false
hansonrobotics/chatbot
src/chatbot/stats.py
1
3618
import os import logging import pandas as pd import glob import re import datetime as dt from collections import Counter logger = logging.getLogger('hr.chatbot.stats') trace_pattern = re.compile( r'../(?P<fname>.*), (?P<tloc>\(.*\)), (?P<pname>.*), (?P<ploc>\(.*\))') def collect_history_data(history_dir, days): ...
mit
-1,255,561,237,755,532,300
34.470588
83
0.588723
false
3.533203
false
false
false
TravisDart/tictactoe
tictactoe.py
1
1378
import os from pymongo import MongoClient from TicTacToeBoard import TicTacToeBoard from ProgressCounter import ProgressCounter client = MongoClient(os.environ["MONGOLABURL"]) collection = client['test1']['one'] _ = TicTacToeBoard._ blankBoard = TicTacToeBoard([ _, _, _, _, _, _, _, _, _ ]) collection.r...
mit
-5,079,004,841,275,323,000
28.956522
77
0.629898
false
3.892655
false
false
false
onlinepcwizard/dms
dms/zone_data_util.py
1
29679
#!/usr/bin/env python3.2 # # Copyright (c) Net24 Limited, Christchurch, New Zealand 2011-2012 # and Voyager Internet Ltd, New Zealand, 2012-2013 # # This file is part of py-magcode-core. # # Py-magcode-core is free software: you can redistribute it and/or modify # it under the terms of the GNU Gener...
gpl-3.0
-692,131,004,546,629,900
40.801408
81
0.552714
false
3.916469
false
false
false
tboyce021/home-assistant
homeassistant/components/meteo_france/const.py
1
6603
"""Meteo-France component constants.""" from homeassistant.components.weather import ( ATTR_CONDITION_CLEAR_NIGHT, ATTR_CONDITION_CLOUDY, ATTR_CONDITION_EXCEPTIONAL, ATTR_CONDITION_FOG, ATTR_CONDITION_HAIL, ATTR_CONDITION_LIGHTNING, ATTR_CONDITION_LIGHTNING_RAINY, ATTR_CONDITION_PARTLYC...
apache-2.0
-6,364,485,210,408,952,000
29.086758
72
0.609045
false
3.036406
false
false
false
barometz/shirk
plugs/Auth/auth.py
1
3986
# Copyright (c) 2012 Dominic van Berkel # See LICENSE for details. from plugs import plugbase from util import Event class AuthPlug(plugbase.Plug): """Auth plug. Handles auth stuffs.""" name = 'Auth' # manual_auths is a dict of source:target that are created after !auth requests so they can be # re...
mit
3,471,746,846,731,021,300
41.414894
120
0.611139
false
3.900196
false
false
false
pbsds/hatena-server
database/__init__.py
1
5487
from twisted.internet import reactor import atexit, os from Hatenatools import TMB #The database handling flipnote files and info #this one stores them in plaintext, only works with one server worker class Database: def __init__(self): #read database stuff into memory: if os.path.exists("database/new_flipnotes.da...
agpl-3.0
696,415,683,384,713,700
33.509434
185
0.677237
false
2.934225
false
false
false
travisgoldie/Signal_iQ
python/test/scripts/hw_minigun.py
1
2516
#!/usr/bin/env python ############################################################################### # vim: tabstop=4:shiftwidth=4:expandtab: # Copyright (c) 2017 SIOS Technology Corp. All rights reserved. ############################################################################## """ This script will spray events ...
mit
4,482,989,901,775,739,400
27.269663
103
0.507154
false
4.138158
false
false
false
vlegoff/tsunami
src/secondaires/auberge/editeurs/aubedit/edt_chambres.py
1
5517
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # ...
bsd-3-clause
-1,597,203,890,525,881,600
38.496403
79
0.615483
false
3.401487
false
false
false
EricssonResearch/calvin-base
calvin/actorstore/systemactors/web/LocationWeather.py
1
2182
# -*- coding: utf-8 -*- # Copyright (c) 2016 Ericsson AB # # 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,400,427,946,568,921,000
28.093333
105
0.644821
false
3.896429
false
false
false
chiamingyen/PythonCAD_py3
Interface/cadwindow.py
1
39067
############################################################################ # # Copyright (C) 2004-2005 Trolltech AS. All rights reserved. # # This file is part of the example classes of the Qt Toolkit. # # This file may be used under the terms of the GNU General Public # License version 2.0 as published by the Fr...
gpl-2.0
-5,641,877,045,083,981,000
42.75
165
0.588392
false
4.029427
false
false
false
BackupTheBerlios/pixies-svn
pixies/reportlab/lib/logger.py
1
1712
#!/bin/env python #Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/lib/logger.py __version__=''' $Id$ ''' from sys import stderr class Logger: ''' An extended file type thing initially equiva...
gpl-2.0
5,800,793,264,633,907,000
27.081967
102
0.57535
false
3.544513
false
false
false
sobodash/libpirate
lib/pirromvboy.py
1
9822
''' Virtual Boy ROM Object A part of the libPirate (Python) library Version: 0.2 Author: Derrick Sobodash <derrick@sobodash.com> Copyright: (c) 2008, 2012 Derrick Sobodash Web site: https://github.com/sobodash/libpirate/ License: BSD License <http://opensource.org/licenses/bsd-license.php> ''' try: import r...
bsd-2-clause
-4,857,034,011,556,433,000
39.586777
92
0.478518
false
3.180699
false
false
false
EdDev/vdsm
lib/vdsm/network/netlink/addr.py
1
2889
# Copyright 2014-2017 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in...
gpl-2.0
-5,943,161,942,741,774,000
32.988235
79
0.676705
false
3.638539
false
false
false
walterdejong/synctool
src/synctool/overlay.py
1
12401
# # synctool.overlay.py WJ111 # # synctool Copyright 2015 Walter de Jong <walter@heiho.net> # # synctool COMES WITH NO WARRANTY. synctool IS FREE SOFTWARE. # synctool is distributed under terms described in the GNU General Public # License. # '''synctool.overlay maps the repository onto the root directory...
gpl-2.0
5,453,835,366,179,226,000
30.797436
128
0.586162
false
3.825108
false
false
false
opencivicdata/scrapers-ca
ca_ab_wood_buffalo/people.py
1
2201
from utils import CanadianScraper, CanadianPerson as Person from collections import defaultdict COUNCIL_PAGE = 'http://www.woodbuffalo.ab.ca/Municipal-Government/Mayor-and-Council/Councillor-Profiles.htm' class WoodBuffaloPersonScraper(CanadianScraper): def scrape(self): seat_numbers = defaultdict(int) ...
mit
-7,673,551,670,735,821,000
36.948276
108
0.562472
false
3.309774
false
false
false
pydanny/django-admin2
example/blog/actions.py
1
2110
# -*- coding: utf-8 -*- from __future__ import division, absolute_import, unicode_literals from django.contrib import messages from django.utils.translation import ugettext_lazy, pgettext_lazy from djadmin2 import permissions from djadmin2.actions import BaseListAction class CustomPublishAction(BaseListAction): ...
bsd-3-clause
7,824,903,097,759,814,000
27.513514
71
0.69763
false
4.16996
false
false
false
honnibal/spaCy
examples/information_extraction/parse_subtrees.py
1
2585
#!/usr/bin/env python # coding: utf8 """This example shows how to navigate the parse tree including subtrees attached to a word. Based on issue #252: "In the documents and tutorials the main thing I haven't found is examples on how to break sentences down into small sub thoughts/chunks. The noun_chunks is handy, but h...
mit
2,849,168,478,364,642,000
37.58209
80
0.690135
false
3.677098
false
false
false
bsmedberg/socorro
socorro/processor/processed_transform_rules.py
1
9719
# 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/. """" these are the rules that transform a raw crash into a processed crash """ from socorro.lib.ver_tools import normal...
mpl-2.0
-8,909,996,283,343,238,000
43.788018
80
0.529478
false
5.49096
true
false
false
horazont/aioxmpp
aioxmpp/roster/xso.py
1
4970
######################################################################## # File name: xso.py # This file is part of: aioxmpp # # LICENSE # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, ...
lgpl-3.0
-7,759,817,304,836,727,000
24.228426
79
0.590543
false
4.060458
false
false
false
rlworkgroup/metaworld
metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_sweep_into_goal_v2.py
1
7416
import numpy as np from gym.spaces import Box from scipy.spatial.transform import Rotation from metaworld.envs import reward_utils from metaworld.envs.asset_path_utils import full_v2_path_for from metaworld.envs.mujoco.sawyer_xyz.sawyer_xyz_env import SawyerXYZEnv, _assert_task_is_set class SawyerSweepIntoGoalEnvV2(...
mit
6,507,953,561,700,752,000
36.836735
101
0.557713
false
3.19931
false
false
false
aguirreeng/libeng
math/rotations.py
1
2992
import numpy def obtain_matrix_from_quaternion(q: numpy.ndarray) -> numpy.ndarray: if q.size != 4: raise ValueError('Wrong number of elements on the array (q.size != 4)!') m = numpy.zeros((3, 3), dtype=numpy.float64) m[0, 0] = 1.0 - 2.0 * q[2] * q[2] - 2.0 * q[3] * q[3] m[0, 1] = 2.0...
mit
1,305,943,808,670,423,800
28.222222
86
0.501337
false
2.277017
false
false
false
florianfesti/boxes
boxes/generators/openbox.py
1
1741
#!/usr/bin/env python3 # Copyright (C) 2013-2014 Florian Festi # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
gpl-3.0
3,273,110,670,569,019,000
32.480769
82
0.629523
false
3.200368
false
false
false
alexbruy/QGIS
python/plugins/processing/algs/qgis/Gridify.py
1
7375
# -*- coding: utf-8 -*- """ *************************************************************************** Gridify.py --------------------- Date : May 2010 Copyright : (C) 2010 by Michael Minn Email : pyqgis at michaelminn dot com *****************************...
gpl-2.0
1,905,059,925,790,437,000
40.666667
101
0.511864
false
4.558096
false
false
false
yencarnacion/jaikuengine
.google_appengine/lib/endpoints-1.0/endpoints/users_id_token.py
2
17916
#!/usr/bin/env python # # Copyright 2007 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 o...
apache-2.0
-6,423,077,392,534,796,000
27.483307
79
0.676881
false
3.68642
false
false
false
whatsbcn/shellforge4
shellforge/shellforge/cpu_i386.py
1
12307
############################################################################# ## ## ## cpu_i386.py --- Classes for i386 CPUs ## ## see http://www.secdev.org/projects/shellforge/ ## ## ...
gpl-2.0
-5,131,167,534,963,059,000
33.473389
295
0.387097
false
3.527372
false
false
false
yunli2004/OpenClos
jnpr/openclos/tests/unit/test_l3Clos.py
1
20266
''' Created on Jul 22, 2014 @author: moloyc ''' import os import sys sys.path.insert(0,os.path.abspath(os.path.dirname(__file__) + '/' + '../..')) #trick to make it run from CLI import unittest import shutil from flexmock import flexmock from jnpr.openclos.l3Clos import L3ClosMediation from jnpr.openclos.model import...
apache-2.0
2,320,511,484,765,418,500
51.778646
192
0.6316
false
3.317401
true
false
false
NicolasLM/sauna
sauna/scheduler.py
1
3161
import time import fractions from functools import reduce from logging import getLogger logger = getLogger(__name__) class Scheduler: def __init__(self, jobs): """ Create a new Scheduler. >>> s = Scheduler([Job(1, max, 100, 200)]) >>> for jobs in s: ... time.sleep(s.t...
bsd-2-clause
5,694,586,911,880,972,000
30.929293
74
0.540335
false
4.283198
false
false
false
vitorio/pygrow
grow/deployments/stats/stats.py
1
1214
import collections import os from protorpc import protojson from . import messages class Stats(object): def __init__(self, pod, paths_to_contents=None): self.pod = pod if paths_to_contents is None: paths_to_contents = pod.export() self.paths_to_contents = paths_to_contents def get_num_files_pe...
mit
-1,421,544,671,774,906,400
28.609756
73
0.681219
false
3.47851
false
false
false
m4ll0k/Infoga
recon/google.py
1
1041
#!/usr/bin/env python # -*- coding:utf-8 -*- # # @name : Infoga - Email Information Gathering # @url : http://github.com/m4ll0k # @author : Momo Outaadi (m4ll0k) from lib.output import * from lib.request import * from lib.parser import * class Google(Request): def __init__(self,target): Request....
gpl-3.0
628,666,349,473,185,200
24.025
86
0.614793
false
2.915966
false
false
false
synth3tk/the-blue-alliance
controllers/api/api_district_controller.py
1
7325
import json import webapp2 from controllers.api.api_base_controller import ApiBaseController from consts.district_type import DistrictType from consts.event_type import EventType from datetime import datetime from database.event_query import DistrictEventsQuery from google.appengine.ext import ndb from database.tea...
mit
9,133,785,129,898,404,000
38.594595
156
0.658294
false
3.606598
false
false
false
PostCenter/botlang
botlang/parser/s_expressions.py
1
8935
import ast as python_ast from botlang.ast.ast import * class SExpression(object): """ https://en.wikipedia.org/wiki/S-expression """ OPENING_PARENS = ['(', '[', '{'] CLOSING_PARENS = [')', ']', '}'] def to_ast(self): raise NotImplementedError def accept(self, visitor): ra...
mit
-6,733,622,686,020,938,000
22.637566
76
0.545943
false
3.958795
false
false
false
Flamacue/pretix
src/tests/presale/test_organizer_page.py
2
2634
from datetime import timedelta import pytest from django.utils.timezone import now from pretix.base.models import Event, Organizer @pytest.fixture def env(): o = Organizer.objects.create(name='MRMCD e.V.', slug='mrmcd') event = Event.objects.create( organizer=o, name='MRMCD2015', slug='2015', ...
apache-2.0
-9,136,829,961,403,215,000
26.154639
66
0.649962
false
2.900881
true
false
false
myyyy/wiki
learn/selenium/test_sensorcmd.py
1
1183
# -*- coding:utf-8 -*- from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.action_chains import ActionChains import time import sys reload(sys) sys.setdefaultencoding('utf-8') driver = webdriver.Chrome() driver.get("http://bk47.thunics.org:8888/login?next=/plat"...
mit
-7,917,124,765,778,914,000
29.783784
69
0.755048
false
2.764563
false
true
false
drulang/foxleaf
server/server/settings.py
1
2308
""" Django settings for server 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
-5,230,758,876,941,882,000
22.313131
71
0.717071
false
3.148704
false
false
false
BRiAl/BRiAl
sage-brial/brial/simplebb.py
1
2128
from .PyPolyBoRi import * from .interred import interred def buchberger(l): "calculates a (non minimal) Groebner basis" l = interred(l) #for making sure, that every polynomial has a different leading term #needed for add_generator if not l: return [] g = GroebnerStrategy(l[0].ring()) ...
gpl-2.0
5,377,038,491,770,049,000
28.555556
74
0.593045
false
3.204819
false
false
false
robcarver17/pysystemtrade
sysproduction/reporting/trades_report.py
1
16443
from copy import copy from collections import namedtuple import datetime import numpy as np import pandas as pd from syscore.genutils import transfer_object_attributes from syscore.pdutils import make_df_from_list_of_named_tuple from syscore.objects import header, table, body_text, arg_not_supplied, missing_data fro...
gpl-3.0
-6,562,554,001,399,663,000
26.775338
92
0.593018
false
3.459499
false
false
false
globocom/database-as-a-service
dbaas/maintenance/async_jobs/base.py
1
5453
from copy import copy from notification.models import TaskHistory from util import get_worker_name from workflow.workflow import steps_for_instances, rollback_for_instances_full __all__ = ('BaseJob',) class BaseJob(object): step_manger_class = None get_steps_method = None success_msg = '' error_msg...
bsd-3-clause
-4,363,220,306,400,859,000
35.844595
79
0.585366
false
4.17215
false
false
false
hovo1990/deviser
generator/bindings_files/DowncastPackagesFile.py
1
16916
#!/usr/bin/env python # # @file DowncastPackagesFile.py # @brief class for generating downcast packages file # @author Frank Bergmann # @author Sarah Keating # # <!-------------------------------------------------------------------------- # # Copyright (c) 2013-2015 by the California Institute of Technology # (C...
lgpl-2.1
-2,038,758,559,390,291,500
42.937662
81
0.539135
false
4.003787
false
false
false