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
jurismarches/pyrome
pyrome/parser.py
1
8818
import collections import xml.etree.ElementTree as ET import zipfile from itertools import islice from . import schema as s class Loader: BATCH_SIZE = 1000 ogr_fname = collections.OrderedDict([ (s.Activite, "unix_referentiel_activite_v330_iso8859-15.xml"), (s.Appellation, "unix_referentiel...
gpl-3.0
1,411,900,232,633,194,000
36.523404
90
0.542867
false
3.456684
false
false
false
miyakogi/wdom
wdom/themes/ink.py
1
3034
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # flake8: noqa from wdom.tag import NewTagClass as NewTag from wdom.themes import * name = 'INK' project_url = 'http://ink.sapo.pt/' project_repository = 'https://github.com/sapo/Ink/' license = 'MIT License' license_url = 'https://github.com/sapo/Ink/blob/develop/LICENS...
mit
408,799,574,985,196,800
31.623656
96
0.647001
false
2.965787
false
false
false
nvazquez/Turtlebots
plugins/butia/monitor_elem.py
1
2499
# MONITOR BUTIA # FING # GRUPO 9 # 2015 from __future__ import division from monitor import ERROR_BOARD_DISCONECTED from monitor import ERROR_MODULE_NOT_PRESENT from monitor import ERROR_EXCEPTION from monitor import ERROR from monitor import MONITOR_COLOR_NO_ERR from monitor import MONITOR_RETURN_TYPE_LOW from monitor...
mit
8,895,041,652,075,542,000
31.038462
128
0.584634
false
3.707715
false
false
false
PhilHarnish/forge
spec/data/convert/repr_format_spec.py
1
1513
import numpy as np from spec.mamba import * with description('as_args'): with it('returns nothing for empty input'): expect(repr_format.as_args()).to(equal('')) with it('returns comma separated variable args'): expect(repr_format.as_args(1, True, 'string', {'set'})).to( equal("1, True, 'string', ...
mit
3,374,981,073,165,050,000
29.877551
79
0.594845
false
2.870968
false
false
false
reimandlab/Visualistion-Framework-for-Genome-Mutations
website/stats/plots/__init__.py
1
2607
from collections import defaultdict from warnings import warn from tqdm import tqdm from helpers.plots import bar_plot from models import Plot, Site, Protein, DataError from stats.plots import ( ptm_variability, proteins_variability, most_mutated_sites, active_driver, ptm_mutations, gene_ontology, motifs, mim...
lgpl-2.1
-8,237,463,512,038,709,000
26.442105
93
0.616417
false
3.740316
false
false
false
nanoporetech/scrappie
misc/parse_events.py
1
4351
#!/usr/bin/env python3 import pickle import math import numpy as np import re import sys model_file = sys.argv[1] trim_trailing_zeros = re.compile('0+p') def small_hex(f): hf = float(f).hex() return trim_trailing_zeros.sub('p', hf) def process_column(v, pad): """ process and pad """ return [small_...
mpl-2.0
-1,376,108,319,598,887,400
34.958678
188
0.631119
false
2.458192
false
false
false
DataReplyUK/datareplyuk
Company_Neighbourhood/data_collector/module_company.py
1
11017
# - COMPANY MODULE --------------------------------------------------------------------------------# # - LIBRARIES -------------------------------------------------------------------------------------# from array import array from requests.auth import HTTPBasicAuth import requests import time # CLASS ----------------...
apache-2.0
-6,404,463,679,649,630,000
53.539604
107
0.362894
false
5.696484
false
false
false
lukevp/CandLPy0514
main.py
1
1667
#imports import pygame, math, json from pygame.locals import * from config import * #setup code pygame.init() screen = pygame.display.set_mode((WIDTH, HEIGHT)) #world object class World(object): def __init__(self, screen, bgcolor): self.screen = screen self.bgcolor = bgcolor def render(self):...
mit
2,331,358,365,367,675,000
23.15942
75
0.577085
false
3.600432
false
false
false
eharney/nova
nova/conductor/api.py
1
18178
# Copyright 2012 IBM Corp. # # 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 agree...
apache-2.0
-7,242,547,577,164,909,000
45.491049
79
0.587963
false
4.519642
false
false
false
cpatulea/masterlock
bench.py
1
1668
#!/usr/bin/python import math, random, time, subprocess, re, os, sys def unlink_f(n): try: os.unlink(n) except OSError: pass random.seed(1) dt = float('nan') factors = sys.maxint while not (20.0 <= dt <= 30.0 and factors < 20): # Fewer factors = easier prime factorization but more difficult to brute fo...
apache-2.0
4,022,404,689,049,146,400
25.47619
80
0.609113
false
3.117757
false
false
false
CLOUGH/info3180-lab5
main/model.py
1
2326
# -*- coding: utf-8 -*- import os from google.appengine.api import app_identity from google.appengine.ext import ndb import modelx import util # The timestamp of the currently deployed version TIMESTAMP = long(os.environ.get('CURRENT_VERSION_ID').split('.')[1]) >> 28 class Base(ndb.Model, modelx.BaseX): create...
mit
5,826,773,456,119,514,000
27.365854
76
0.677988
false
3.733547
false
false
false
aagusti/e-gaji
egaji/models/__init__.py
1
7773
import sys from datetime import datetime from sqlalchemy import ( Column, Integer, Text, DateTime, ) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm.exc import NoResultFound from sqlalchemy.orm import ( scoped_session, sessionmaker, ) from zope.sqlalchemy impo...
gpl-2.0
5,659,690,726,158,826,000
30.342742
88
0.607616
false
3.882617
false
false
false
BigDataforYou/movie_recommendation_workshop_1
big_data_4_you_demo_1/venv/lib/python2.7/site-packages/pandas/computation/ops.py
1
15314
"""Operator classes for eval. """ import operator as op from functools import partial from datetime import datetime import numpy as np import pandas as pd from pandas.compat import PY3, string_types, text_type import pandas.core.common as com from pandas.formats.printing import pprint_thing, pprint_thing_encoded imp...
mit
4,609,859,854,473,350,700
27.731707
79
0.544926
false
3.877944
false
false
false
becomejapan/yahooads-python-lib
examples/CampaignExportService/CampaignExportService_get.py
1
3763
# Copyright 2017 Become Corp. 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 applicable law or...
apache-2.0
7,790,580,326,563,570,000
30.358333
409
0.633006
false
3.170177
false
false
false
NksSai/webapp2sai
models.py
1
4087
#!/usr/bin/python #coding=utf-8 #FILENAME : __models.py__ #DESCRIBE: #这里之所以不用controller的方法, #我不喜欢模型很复杂 #文件长不要紧 逻辑在一起就好 #我也知道controller那样效率以及习惯不好 import google_models as gdb from google.appengine.ext import db from tools import mail import logging import conf #从gdb中获得模型,从db中获取处理工具 #好吧 这样的设计肯定有问题 =。= class CheckUse...
bsd-3-clause
-7,520,742,029,166,618,000
28.75969
108
0.540505
false
3.185892
false
false
false
JohnLunzer/flexx
flexx/ui/examples/send_data.py
1
2237
# doc-export: SendData """ Example that demonstrates sending binray data from Python to JS. The ``Model.send_data()`` mechanism can be a powerful tool to send (scientific) data, especially for large amounts of data. The method accepts bytes or a URL ("http://" or "https://") where the data can be retrieved. At his poin...
bsd-2-clause
-1,982,344,372,445,787,000
30.507042
77
0.635673
false
3.810903
false
false
false
MissionCriticalCloud/marvin
marvin/cloudstackAPI/upgradeRouterTemplate.py
1
1409
"""Upgrades router to use newer template""" from baseCmd import * from baseResponse import * class upgradeRouterTemplateCmd (baseCmd): typeInfo = {} def __init__(self): self.isAsync = "false" """upgrades all routers owned by the specified account""" self.account = None self.ty...
apache-2.0
-7,228,942,747,155,239,000
32.547619
78
0.608943
false
4.144118
false
false
false
hamish2014/FreeCAD_assembly2
assembly2/solvers/dof_reduction_solver/variableManager.py
1
5897
''' In Freecad properties of surfaces and edges are expressed in absolute co-ordinates when acess object.shape . Therefore when altering a objects placement variables as to get two surface aligned (or the like), its recommended to the feature variables are converted into a relative co-ordinate system. This relative co-...
lgpl-2.1
2,691,413,565,340,199,400
42.043796
162
0.631508
false
3.185845
false
false
false
emersonp/nb-name-stripper
name-strip.py
1
1472
# Copyright (c) 2014 Parker Harris Emerson # Subject to the MIT License; please see file LICENSE. # Replaces all instances of a user's name with [REDACTED], or vis a versa. import sys, fileinput, getopt def main(argv): NAME = "Parker Harris Emerson" REDACT = "[REDACTED]" redact_file = "" redact_option = Tru...
mit
8,182,529,652,417,723,000
29.666667
94
0.624321
false
3.138593
false
false
false
aronsky/home-assistant
homeassistant/components/geo_location/nsw_rural_fire_service_feed.py
1
10290
""" NSW Rural Fire Service Feed platform. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/geo_location/nsw_rural_fire_service_feed/ """ from datetime import timedelta import logging from typing import Optional import voluptuous as vol from homeassistant...
apache-2.0
8,072,552,090,014,508,000
35.232394
79
0.631293
false
4.032132
true
false
false
ARCCN/elt
server/ext/debugger/elt/database/query_creator.py
1
7390
from .database_utility import get_action_params, insert_table class QueryCreator(object): """ We put here complex queries. """ def __init__(self): pass @staticmethod def substitute(query, args, arg_list): if arg_list is not None: arg_list.extend(args) else...
bsd-3-clause
6,220,031,361,439,717,000
39.382514
79
0.523004
false
3.861024
false
false
false
imthomasking/MATLAB-files
Python/Forgetting.Curve/forgetting_curve.py
1
2720
# -*- coding: utf-8 -*- ''' forgetting_curve.py This program aims at generating a plan for memorizing vocabularies according to the Forgetting Curve. Copyright (c) 2015 Libao Jin Licence: unknown ''' import math import itertools __author__ = 'Libao Jin' __date__ = 'July 03, 2015' def listGroup(lists, numberOfNewLi...
mit
-4,849,238,029,403,209,000
25.407767
89
0.60625
false
3.404255
false
false
false
ballouche/navitia
source/jormungandr/jormungandr/planner.py
1
3247
# LICENCE: This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will...
agpl-3.0
-2,077,691,474,150,299,600
41.723684
100
0.685556
false
3.727899
false
false
false
Tunous/StringSheet
stringsheet/cli.py
1
2198
import argparse import stringsheet.main as ss from . import __version__ def create(args): ss.create(args.project_name, args.source_dir, args.multi_sheet) def upload(args): ss.upload(args.spreadsheet_id, args.source_dir) def download(args): ss.download(args.spreadsheet_id, args.target_dir) def parse...
mit
1,250,606,217,416,009,000
27.179487
76
0.650136
false
4.040441
false
false
false
Kriegbaum/X1-Sync
X1_playlist_module.py
1
8607
import plistlib import os import datetime def spacer(): #For readability in the console for i in range(5): print('.') def spacer_small(): print('') def setup(): #Asks ne...
gpl-3.0
6,151,818,449,115,468,000
58.358621
206
0.509818
false
4.422919
false
false
false
Nyto035/Konza_backend
common/urls.py
1
3912
from django.conf.urls import url, patterns from django.views.decorators.cache import cache_page from .views import ( ContactView, ContactDetailView, CountyView, CountyDetailView, CountySlimDetailView, ConstituencyView, ConstituencyDetailView, ConstituencySlimDetailView, WardView, ...
mit
-4,453,592,152,066,164,700
32.152542
77
0.619632
false
3.43761
false
true
false
apihackers/wagtail-sendinblue
setup.py
1
4951
#!/usr/bin/env python # -*- coding: utf-8 -*- # flake8: noqa import io import re import sys from os.path import join, dirname from setuptools import setup, find_packages ROOT = dirname(__file__) RE_REQUIREMENT = re.compile(r'^\s*-r\s*(?P<filename>.*)$') RE_MD_CODE_BLOCK = re.compile(r'```(?P<language>[\w+]+)?\n(...
mit
3,720,074,495,685,433,300
31.572368
94
0.558877
false
3.416839
false
false
false
coelias/WeBreak
webreak.py
1
2697
# webreak.py: Web vulnerability scanner software # Copyright (C) 2011 Carlos del Ojo Elias # # 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, or (at your option) # ...
gpl-2.0
-8,725,175,068,023,833,000
31.107143
97
0.691509
false
2.921993
false
false
false
deepmind/open_spiel
open_spiel/python/observation.py
1
4769
# Copyright 2019 DeepMind Technologies Ltd. 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 appl...
apache-2.0
-4,925,379,521,791,257,000
36.849206
80
0.730132
false
3.984127
false
false
false
khrapovs/mygmm
examples/usage_example.py
1
2900
#!/usr/bin/env python # -*- coding: utf-8 -*- """Examples of using GMM class. """ import numpy as np import pandas as pd from mygmm import GMM class Model(object): """Model moment restrictions and Jacobian. """ def __init__(self, data): self.data = data def momcond(self, theta, **kwargs)...
mit
1,910,434,543,719,680,300
21.834646
78
0.54
false
3.436019
false
false
false
arm-hpc/allinea_json_analysis
MAP_JSON_Scripts/show_metric_names.py
1
3884
#!/usr/bin/env python # Copyright 2015-2017 ARM Limited # # 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
4,099,420,704,399,193,600
34.633028
94
0.681514
false
4.240175
false
false
false
TexasLAN/texaslan.org
config/settings/production.py
1
4656
# -*- coding: utf-8 -*- """ Production Configurations - Use djangosecure - Use Amazon's S3 for storing static files and uploaded media - Use mailgun to send emails - Use Redis on Heroku """ from __future__ import absolute_import, unicode_literals from .common import * # noqa # SECRET CONFIGURATION # -------------...
mit
977,061,008,736,989,000
32.257143
106
0.57238
false
4.017256
true
false
false
amentis/Rexi
UI/Login.py
1
1033
__author__ = 'amentis' from RxAPI.RxGUI import * class Login(Screen): """ Login form for users to enter REXI """ def __init__(self): Screen.__init__(self, "REXI Login") self.window = Window(self, "Login window") self.window.set_size('800px', '600px') self.title = Labe...
apache-2.0
1,189,695,408,965,744,400
40.36
105
0.63698
false
3.513605
false
false
false
jougs/nest-simulator
pynest/examples/csa_example.py
1
4431
# -*- coding: utf-8 -*- # # csa_example.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or...
gpl-2.0
-1,091,853,593,066,657,800
35.925
79
0.59851
false
4.068871
false
false
false
mmccollow/threatlevel
app.py
1
1336
from flask import Flask, render_template, url_for from twitter import Twitter, OAuth from re import findall from dateutil import parser from datetime import datetime import pytz CONSUMER_KEY = 'redacted' CONSUMER_SECRET = 'redacted' oauth_token = 'redacted' oauth_secret = 'redacted' app = Flask(__name__) t = Twitter...
gpl-3.0
762,935,272,618,846,500
30.809524
82
0.703593
false
2.942731
false
false
false
apihackers/wapps
wapps/social.py
1
2334
from urllib.parse import quote_plus NETWORKS = { 'twitter': { 'name': 'Twitter', 'icon': 'fa-twitter', 'url': 'https://twitter.com/{user}', 'share': 'https://twitter.com/share?url={url}&text={title}', }, 'linkedin': { 'name': 'LinkedIn', 'icon': 'fa-linkedin...
mit
7,289,486,658,688,946,000
28.175
81
0.53599
false
3.39738
false
false
false
limodou/uliweb
uliweb/lib/weto/backends/database_storage.py
1
2523
from .base import BaseStorage, KeyError import time import sqlalchemy as sa from sqlalchemy import types class Storage(BaseStorage): def __init__(self, cache_manager, options): BaseStorage.__init__(self, cache_manager, options) self.url = options.get('url', 'sqlite:///') self.tablename = ...
bsd-2-clause
-1,703,101,524,253,391,400
39.709677
97
0.558066
false
3.960754
false
false
false
ctrlaltdel/neutrinator
vendor/keystoneauth1/loading/_plugins/identity/v2.py
2
1575
# 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 t...
gpl-3.0
-2,032,756,126,439,599,600
28.716981
75
0.625397
false
4.512894
false
false
false
merantix/picasso
picasso/visualizations/saliency_maps.py
1
6221
############################################################################### # Copyright (c) 2017 Merantix GmbH # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at # http:...
epl-1.0
-6,190,658,827,414,356,000
41.033784
79
0.524192
false
4.48522
false
false
false
aldarionsevero/busine.meAPI
busineme/core/models.py
1
4441
""" Busine-me API Universidade de Brasilia - FGA Tecnicas de Programacao, 2/2015 @file models.py Busline Company and Terminal models. """ from django.db import models from authentication.models import BusinemeUser class Busline(models.Model): """Busline Model.""" line_number = models.CharField(max_length=5,...
agpl-3.0
1,726,599,836,409,122,800
28.026144
79
0.57397
false
4.282546
false
false
false
ralphbean/sieve
sieve/tests/test_operators.py
1
1593
import lxml.etree import sieve.operators as ops from nose.tools import raises @raises(AssertionError) def test_assert_eq_xml(): ops.assert_eq_xml("<foo></foo>", "<bar></bar>") def test_eq_xml(): b = "<foo><bar>Value</bar></foo>" c = """ <foo> <bar> Value </bar> </foo> """ assert ops....
mit
6,401,587,708,356,183,000
19.423077
77
0.450722
false
3.224696
true
false
false
cstipkovic/spidermonkey-research
testing/talos/talos/talos_process.py
1
5218
# 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/. import time import psutil import mozcrash from mozprocess import ProcessHandler from threading import Event from mozlog...
mpl-2.0
6,852,834,630,906,729,000
34.256757
79
0.610195
false
4.225101
false
false
false
mayeut/pybase64
pybase64/__main__.py
1
7910
import argparse import base64 import sys from base64 import b64decode as b64decodeValidate from base64 import encodebytes as b64encodebytes from timeit import default_timer as timer import pybase64 def bench_one(duration, data, enc, dec, encbytes, altchars=None, validate=False): duration = duration / 2.0 if...
bsd-2-clause
7,839,756,332,721,140,000
26.754386
87
0.528192
false
4.037774
false
false
false
kenxwagner/PythonPlay
Project/webscrap/websc/Lib/site-packages/setuptools/__init__.py
1
7273
"""Extensions to the 'distutils' for large or complex distributions""" import os import functools import distutils.core import distutils.filelist import re from distutils.errors import DistutilsOptionError from distutils.util import convert_path from fnmatch import fnmatchcase from ._deprecation_warning import Setupt...
mit
-4,735,959,985,156,225,000
30.899123
79
0.619827
false
4.102087
false
false
false
jithinbp/SEELablet-apps
seel_res/GUI/B_ELECTRONICS/B_Oscillators/L_WIEN_BRIDGE.py
1
4836
#!/usr/bin/python """ :: This experiment is used to study Half wave rectifiers """ from __future__ import print_function from SEEL_Apps.utilitiesClass import utilitiesClass from SEEL_Apps.templates import ui_template_graph_nofft as template_graph_nofft import numpy as np from PyQt4 import QtGui,QtCore impor...
gpl-3.0
-6,275,621,767,142,481,000
26.953757
107
0.686311
false
2.593029
false
false
false
stanbellcom/webapp_politik
sites/all/modules/annotator/lib/store-plugin/annotator/annotation.py
1
3785
from datetime import datetime import iso8601 from annotator import es, authz from flask import current_app TYPE = 'annotation' MAPPING = { 'annotator_schema_version': {'type': 'string'}, 'created': {'type': 'date'}, 'updated': {'type': 'date'}, 'quote': {'type': 'string'}, 'tags': {'type': 'string...
gpl-2.0
-4,392,808,908,972,679,700
34.373832
91
0.545839
false
3.703523
false
false
false
jfinkels/flask-restless
flask_restless/search/drivers.py
1
6012
# drivers.py - high-level functions for filtering SQLAlchemy queries # # Copyright 2011 Lincoln de Sousa <lincoln@comum.org>. # Copyright 2012, 2013, 2014, 2015, 2016 Jeffrey Finkelstein # <jeffrey.finkelstein@gmail.com> and contributors. # # This file is part of Flask-Restless. # # Flask-Restless is distribu...
agpl-3.0
-7,874,783,524,465,434,000
39.621622
78
0.66517
false
4.210084
false
false
false
progrium/skypipe
skypipe/client.py
1
4701
"""Skypipe client This contains the client implementation for skypipe, which operates in two modes: 1. Input mode: STDIN -> Skypipe satellite 2. Output mode: Skypipe satellite -> STDOUT The satellite is a server managed by the cloud module. They use ZeroMQ to message with each other. They use a simple protocol on to...
mit
-7,228,190,361,170,644,000
29.134615
76
0.629015
false
3.71327
false
false
false
PrimeAnalytics/syncalot
SyncAlot/migrations/0005_auto_20160522_1310.py
1
1234
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-05-22 13:10 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('SyncAlot', '0004_auto_20160522_1300'), ] operations = [ migrations.RemoveFie...
gpl-3.0
-5,421,741,338,871,767,000
27.045455
86
0.540519
false
4.284722
false
false
false
RicterZ/nhentai
nhentai/utils.py
1
11306
# coding: utf-8 import sys import re import os import zipfile import shutil import requests import sqlite3 from nhentai import constant from nhentai.logger import logger from nhentai.serializer import serialize_json, serialize_comic_xml, set_js_database def request(method, url, **kwargs): session = requests.Ses...
mit
-4,644,958,333,400,546,000
31.67052
126
0.59041
false
3.400722
false
false
false
andmatand/midi-to-pico8
pico8/sfx/sfx.py
1
8371
"""The sound effects section of a Pico-8 cart. The sound effects region consists of 4352 bytes. The .p8 representation is 64 lines of 168 hexadecimal digits (84 bytes). Each line represents one sound effect/music pattern. The values are as follows: 0 The editor mode: 0 for pitch mode, 1 for note entry mode. 1 ...
mit
-6,128,159,437,836,185,000
32.618474
79
0.532433
false
3.557586
false
false
false
justasabc/python_tutorials
tutorial/gui/pyqt4/drawing/drawpoint.py
1
1147
#!/usr/bin/python # -*- coding: utf-8 -*- """ ZetCode PyQt4 tutorial In the example, we draw randomly 1000 red points on the window. author: Jan Bodnar website: zetcode.com last edited: September 2011 """ import sys, random from PyQt4 import QtGui, QtCore class Example(QtGui.QWidget): def __init__(self...
gpl-3.0
-7,090,352,245,058,670,000
18.440678
50
0.540541
false
3.444444
false
false
false
babyliynfg/cross
tools/project-creator/Python2.6.6/Lib/ctypes/test/test_values.py
1
3307
""" A testcase which accesses *values* in a dll. """ import unittest from ctypes import * import _ctypes_test class ValuesTestCase(unittest.TestCase): def test_an_integer(self): ctdll = CDLL(_ctypes_test.__file__) an_integer = c_int.in_dll(ctdll, "an_integer") x = an_intege...
mit
2,757,082,656,837,123,000
38.329268
95
0.537043
false
4.212739
true
false
false
Koodauskerho/titefuksisimulaattori
game.py
1
2056
from kali import Kali import util class Game(): def __init__(self, nodes): self.__kali = None self.__nodes = nodes # Variables & funcions exposed to scripts self.__vars = { # Functions 'askchoice': self.__askchoice, 'next': self.__next...
gpl-3.0
-1,306,547,294,239,580,700
27.943662
92
0.469586
false
4.093625
false
false
false
cl4u2/chirp
chirp/detect.py
1
3149
# Copyright 2010 Dan Smith <dsmith@danplanet.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is ...
gpl-3.0
-5,881,616,998,452,765,000
28.990476
71
0.603049
false
3.479558
false
false
false
Canpio/Paddle
python/paddle/fluid/tests/unittests/test_simple_dist_transpiler.py
1
2849
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
apache-2.0
-451,444,501,512,462,900
34.6125
79
0.628993
false
3.620076
true
false
false
obulpathi/poppy
poppy/cmd/server.py
1
2094
# Copyright (c) 2014 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
apache-2.0
2,715,519,274,609,784,000
32.238095
75
0.65425
false
3.759425
false
false
false
wrh3c/Maslow-GroundControl
UIElements/viewMenu.py
1
4578
from kivy.uix.gridlayout import GridLayout from UIElements.loadDialog import LoadDialog from UIElements.pageableTextPopup import PageableTextPopup from kivy.uix.popup import Popup import re from DataStructures.makesmithIni...
gpl-3.0
4,661,457,425,967,614,000
30.791667
179
0.510266
false
4.327032
false
false
false
wf4ever/ro-manager
src/rocommand/test/TestEvoCommands.py
1
17057
__author__ = "piotrhol" __copyright__ = "PNSC (@@check)" __license__ = "MIT (http://opensource.org/licenses/MIT)" import sys if __name__ == "__main__": # Add main project directory and ro manager directories at start of python path sys.path.insert(0, "../..") sys.path.insert(0, "..") #interna...
mit
1,144,361,136,377,017,100
43.189119
158
0.577769
false
3.554282
true
false
false
refinery29/chassis
chassis/test/util/validators_test.py
1
9213
"""Test Utility Encoders.""" # pylint: disable=missing-docstring from chassis import test from chassis.util import validators class TestBaseValidator(test.TestCase): def test_failure(self): validator = validators.BaseValidator() self.assertRaisesWithMessage(validators.ValidationError, ...
mit
7,151,324,124,458,013,000
34.571429
79
0.563009
false
4.705312
true
false
false
pcolmant/repanier
repanier_v2/packages/openpyxl/writer/theme.py
1
10214
# -*- coding: utf-8 -*- # Copyright (c) 2010-2014 openpyxl # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modif...
gpl-3.0
1,065,865,178,275,893,500
50.502538
79
0.580721
false
2.838042
false
false
false
ThayaFluss/fde-ipn
random_matrices.py
1
1394
from numpy.random import randn import numpy as np import scipy as sp from matrix_util import * def Ginibre(M, N, COMPLEX=False): if COMPLEX==True: out=(randn(M,N) + 1j*randn(M,N) )/ sp.sqrt(2*N) else: out=randn(M,N)/ sp.sqrt(N) return np.matrix(out) def haar_unitary(M, COMPLE...
mit
-339,976,013,318,133,800
24.807692
73
0.564562
false
2.630189
false
false
false
mr555ru/orbotor
orbotor/gcd.py
1
2827
# Orbotor - arcade with orbit mechanics # Copyright (C) 2014 mr555ru # # 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) an...
gpl-3.0
-8,778,542,357,863,241,000
38.816901
93
0.544747
false
3.671429
false
false
false
twdb/sdi
test/test_read.py
1
2276
import os import unittest import numpy as np from sdi.binary import Dataset class TestRead(unittest.TestCase): """ Test basic reading of binary files """ def setUp(self): self.test_dir = os.path.dirname(__file__) def test_read(self): """ Test that all test files can be read without...
bsd-3-clause
5,187,794,775,023,356,000
33.484848
79
0.557996
false
3.985989
true
false
false
JessMcintosh/SonoGestures
GraphConfusionMatrix.py
1
4948
import time import datetime import sys from sys import argv import getopt import os import subprocess import csv import numpy as np import matplotlib import matplotlib.pyplot as plt from scipy import stats from numpy import genfromtxt #from sklearn import svm, datasets def conv(s): try: s=int(s) excep...
gpl-3.0
8,252,523,960,564,829,000
31.552632
148
0.562045
false
2.885131
false
false
false
KDahlgren/orik
src/derivation/RuleNode.py
1
14963
#!/usr/bin/env python # **************************************** # ############# # IMPORTS # ############# # standard python packages import ConfigParser, copy, inspect, logging, os, string, sys from Node import Node if not os.path.abspath( __file__ + "/../../../lib/iapyx/src" ) in sys.path : sys.path.append( os...
mit
8,258,270,600,803,377,000
30.567511
144
0.491278
false
3.560923
false
false
false
jakesyl/BitTornado
BitTornado/Network/ServerPortHandler.py
2
7436
from .BTcrypto import Crypto from .Encrypter import protocol_name class SingleRawServer(object): def __init__(self, info_hash, multihandler, doneflag, protocol): self.info_hash = info_hash self.doneflag = doneflag self.protocol = protocol self.multihandler = multihandler s...
mit
7,953,028,613,035,468,000
30.914163
76
0.566165
false
4.050109
false
false
false
buddyli/android_intership
controller/restaurant_oper.py
1
2323
#!/usr/bin/env python #-*- encoding:utf-8 -*- import json from datetime import datetime from bottle import route, mako_template as template, redirect, request, response, get, post from bottle import static_file, view #为了不经过controller直接返回诸如html,css等静态文件引入 from model.documents import * from setting import * DATE_FORM...
apache-2.0
1,622,798,191,479,370,200
29.27027
162
0.680661
false
2.694344
false
false
false
CELMA-project/CELMA
MES/boundaries/2-uEParSheath/driverNoYDepInProf.py
1
2138
#!/usr/bin/env python """Method of exact solution driver""" from bout_runners.bout_runners import basic_runner import numpy as np import sys, os # If we add to sys.path, then it must be an absolute path common_dir = os.path.abspath('./../../../common') # Sys path is a list of system paths sys.path.append(common_dir) ...
lgpl-3.0
-7,239,093,112,184,576,000
34.633333
79
0.38681
false
5.066351
false
false
false
BorgERP/borg-erp-6of3
base/base_base/ir/TODO/trp_encrypted_backup_rsync/trp_encrypted_backup_rsync.py
1
2904
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2011-2012 Therp BV (<http://therp.nl>) # All Rights Reserved # # This program is free software: you can redistribute it and/or mod...
agpl-3.0
8,412,091,884,342,621,000
41.705882
84
0.53168
false
4.55887
false
false
false
AlexStarov/Shop
compat/bigint_path.save/bigint.py
1
2607
"""module mydjangolib.bigint_patch A fix for the rather well-known ticket #399 in the django project. Create and link to auto-incrementing primary keys of type bigint without having to reload the model instance after saving it to get the ID set in the instance. """ from django.core import exceptions from django.conf...
apache-2.0
5,805,980,221,281,596,000
32
72
0.631377
false
4.510381
false
false
false
ludmilamarian/invenio-oauthclient
setup.py
1
4450
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015 CERN. # # Invenio 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...
gpl-2.0
4,912,983,462,754,230,000
30.785714
78
0.63191
false
3.872933
true
false
false
celiagg/celiagg
examples/svg.py
1
14437
# The MIT License (MIT) # # Copyright (c) 2016-2021 Celiagg Contributors # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to us...
mit
3,413,177,533,538,911,700
35.273869
79
0.577405
false
3.397741
false
false
false
jamesbdunlop/defaultMayaLibrary
interface/progressBarUI.py
1
1661
import maya.OpenMayaUI as apiUI from PySide2.QtGui import * from PySide2.QtCore import * from PySide2.QtWidgets import * import shiboken2 as shiboken def getMayaWin(): ptr = apiUI.MQtUtil.mainWindow() if ptr is not None: return shiboken.wrapInstance(long(ptr), QWidget) class ProgressBarUI(QWidget): ...
apache-2.0
-8,841,848,260,298,918,000
34.340426
88
0.657435
false
3.749436
false
false
false
aitatanit/filterpy
filterpy/kalman/kalman_filter.py
1
55033
# -*- coding: utf-8 -*- # pylint: disable=invalid-name, too-many-arguments, too-many-branches, # pylint: disable=too-many-locals, too-many-instance-attributes, too-many-lines """ This module implements the linear Kalman filter in both an object oriented and procedural form. The KalmanFilter class implements the filter...
mit
5,997,568,457,814,456,000
30.374572
93
0.572532
false
3.681742
false
false
false
azverkan/scons
test/MSVC/batch-longlines.py
1
2124
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, pu...
mit
5,695,561,258,113,018,000
31.1875
95
0.691149
false
3.470588
true
false
false
commercehub-oss/kerb-sts
kerb_sts/auth.py
1
5687
# Copyright 2016 Commerce Technologies, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
apache-2.0
-7,428,673,700,238,879,000
33.053892
101
0.653596
false
4.364543
false
false
false
skodapetr/lbvs-environment
methods/ecfp/ecfp2_2048_tanimoto.py
1
1396
#!/usr/bin/env python # -*- coding: utf-8 -*- import rdkit from rdkit.Chem import AllChem from rdkit import DataStructs __license__ = "X11" METADATA = { "id": "method_rdkit_ecfp2_2048_tanimoto", "representation": "ecfp2_2048", "similarity": "tanimoto" } def _compute_fingerprint(molecule): return Al...
mit
-4,055,602,963,215,496,700
25.339623
73
0.643266
false
3.65445
false
false
false
asher/chronos-python
itests/itest_utils.py
1
1317
#!/usr/bin/env python from __future__ import print_function import errno import os import signal import time from functools import wraps import requests class TimeoutError(Exception): pass def timeout(seconds=10, error_message=os.strerror(errno.ETIME)): def decorator(func): def _handle_timeout(sig...
mit
-7,887,038,286,989,665,000
23.849057
82
0.59757
false
4.167722
false
false
false
muLAn-project/muLAn
muLAn/models/ESPL.py
1
5180
# -*-coding:Utf-8 -* # ---------------------------------------------------------------------- # ---------------------------------------------------------------------- # External libraries # ---------------------------------------------------------------------- import sys import os # Full path of this file full_path_...
mit
-3,082,795,307,876,250,600
30.204819
95
0.427606
false
3.215394
false
false
false
namilkim/streamLDA
streamlda.py
1
17395
# onlineldavb.py: Package of functions for fitting Latent Dirichlet # Allocation (LDA) with online variational Bayes (VB). # # Copyright (C) 2010 Matthew D. Hoffman # # 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...
gpl-3.0
1,471,104,108,276,897,500
42.4875
95
0.608451
false
3.976909
false
false
false
south-coast-science/scs_core
src/scs_core/aws/client/client_auth.py
1
5069
""" Created on 2 Apr 2018 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) WARNING: Path methods require that the __HOST field must be instantiated. example document: {"endpoint": "endpoint.iot.us-west-2.amazonaws.com", "client-id": "bruno", "cert-id": "9f08402232"} """ import os from collections import ...
mit
-9,201,383,937,656,106,000
27.005525
118
0.444664
false
4.724138
false
false
false
Kjwon15/autotweet
autotweet/daemons.py
1
9648
""":mod:`autotweet.daemons` --- Learning, Answering your tweets ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module learns your tweets and answering it automatically. """ from __future__ import unicode_literals import re import time import tweepy from .logger_factory import get_logger from .learning impor...
mit
3,552,446,686,205,274,600
30.122581
79
0.587065
false
3.848424
false
false
false
udbhav/kishore
kishore/utils.py
1
3040
import json from django import forms from django.http import HttpResponse from django.db.models.query import QuerySet from django.core.paginator import Paginator, Page from taggit.forms import TagWidget def load_class(name): name = str(name) mod = __import__(name.rsplit(".",1)[0], fromlist=[name.rsplit(".",1)...
mit
-3,943,294,392,682,513,400
28.514563
98
0.601645
false
3.72093
false
false
false
devnone/dope
dope/registry.py
1
2303
# -*- coding: utf-8 -*- # # Copyright 2015 Simone Campagna # # 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,189,107,607,452,575,000
27.432099
74
0.621363
false
3.97069
false
false
false
ayang/diding
vendor/libs/session.py
1
35518
# -*- coding: utf-8 -*- """ Sessions module for the Tornado framework. Milan Cermak <milan.cermak@gmail.com> This module implements sessions for Tornado. It can store session data in files or MySQL databse, Memcached, Redis and MongoDB. USAGE: ====== Every session object can be handled as a dictionary...
mit
657,258,167,278,857,600
39.638921
128
0.564052
false
4.691322
false
false
false
snazy/cassandra-dtest
system_keyspaces_test.py
1
5361
from cassandra import Unauthorized from dtest import Tester from tools.assertions import assert_all, assert_exception, assert_none from tools.decorators import since class TestSystemKeyspaces(Tester): @since('3.0') def test_local_system_keyspaces(self): cluster = self.cluster cluster.populate...
apache-2.0
-78,674,562,190,844,720
44.05042
107
0.618541
false
4.882514
true
false
false
jumc/img_parallax_gif
testes/plot_label.py
1
1546
""" =================== Label image regions =================== This example shows how to segment an image with image labelling. The following steps are applied: 1. Thresholding with automatic Otsu method 2. Close small holes with binary closing 3. Remove artifacts touching image border 4. Measure image regions to fi...
gpl-3.0
-5,523,872,359,304,327,000
27.62963
78
0.719922
false
3.61215
false
false
false
HiSPARC/topaz
160116_kascade_density/kascade_density.py
1
29519
"""Compare predicted detector density to the detected number of particles Errors on data: - Scintillator transmission and PMT gain errors (relative error of ~70%). - Error due to non linearity of the PMT curve. - Poisson error on both in and output. Bias: - There may be a bias in the data, at low particle densities d...
gpl-3.0
-2,327,265,521,921,744,000
44.695046
118
0.610624
false
3.060232
false
false
false
mikeireland/veloce
veloce/client/client_zmq_socket.py
1
2831
#!/usr/bin/env python from __future__ import print_function, division import sys import string import select import socket import numpy as np import zlib import pdb import time import zmq import json import struct SECRET_CODE = 314159 class ClientSocket: """This is copied to macquarie-observatory-automation/common...
gpl-3.0
-3,070,216,179,134,888,000
36.76
122
0.581067
false
4.151026
false
false
false
uber/pyro
examples/dmm.py
1
24439
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 """ An implementation of a Deep Markov Model in Pyro based on reference [1]. This is essentially the DKS variant outlined in the paper. The primary difference between this implementation and theirs is that in our version any KL div...
apache-2.0
-4,760,988,730,093,858,000
49.389691
119
0.622284
false
3.565135
true
false
false
sbobovyc/LabNotes
serialGrapher/plotVSPdata.py
1
3018
import csv import datetime import matplotlib.pyplot as plt import matplotlib import itertools import numpy import argparse import sys YMIN = 0 YMAX = 35000 """ colors = ['b', 'g', 'r', 'c', 'm', 'y', 'k' ] """ def read_datafile(file_name, norm_time): time = [] capacitance = [] ...
gpl-3.0
-7,957,351,172,331,784,000
30.768421
127
0.554341
false
3.571598
false
false
false
pyshop/pyjobs
src/adverts/migrations/0002_auto_20150809_2147.py
1
1881
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('adverts', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name=...
mit
-9,039,980,319,744,579,000
34
140
0.58484
false
3.423154
false
false
false
quantmind/pulsar
pulsar/apps/wsgi/handlers.py
1
4245
from pulsar.api import Http404 from pulsar.utils.log import LocalMixin, local_method from .utils import handle_wsgi_error class WsgiHandler: '''An handler for applications conforming to python WSGI_. .. attribute:: middleware List of :ref:`asynchronous WSGI middleware <wsgi-middleware>` callables ...
bsd-3-clause
-2,383,630,093,344,431,000
34.375
79
0.598822
false
4.982394
false
false
false
opencord/voltha
voltha/extensions/alarms/onu/onu_laser_bias_current_alarm.py
1
1758
# Copyright 2017-present Adtran, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
-603,487,869,371,377,700
45.263158
96
0.651308
false
3.932886
false
false
false
jim-easterbrook/pyctools-pal
src/pyctools/components/pal/common.py
1
5059
#!/usr/bin/env python # Pyctools-pal - PAL coding and decoding with Pyctools. # http://github.com/jim-easterbrook/pyctools-pal # Copyright (C) 2014-20 Jim Easterbrook jim@jim-easterbrook.me.uk # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public L...
gpl-3.0
-4,753,665,424,983,452,000
40.467213
90
0.626408
false
3.577793
true
false
false
swift-nav/piksi_tools
piksi_tools/recover_ftdi.py
1
2765
#!/usr/bin/env python # Copyright (C) 2011-2014 Swift Navigation Inc. # Contact: Niels Joubert <njoubert@gmail.com> # # This source is subject to the license found in the file 'LICENSE' which must # be be distributed together with this source. All other rights reserved. # # THIS CODE AND INFORMATION IS PROVIDED "AS IS"...
lgpl-3.0
-821,035,709,131,887,500
29.722222
78
0.616637
false
3.567742
false
false
false
ehthiede/EMUS
src/emus/usutils.py
1
13668
# -*- coding: utf-8 -*- """Module containing methods useful for analyzing umbrella sampling calculations that do not rely directly on the EMUS estimator. """ from __future__ import absolute_import import numpy as np from ._defaults import DEFAULT_KT, DEFAULT_T, DEFAULT_K_B import numbers def neighbors_harmonic(cent...
mit
-4,217,371,113,554,664,000
36.141304
274
0.635206
false
3.847973
false
false
false
google/certificate-transparency
cpp/client/get_issuers.py
1
3066
#!/usr/bin/env python # Get the issuers for the supplied certificates from the AIA # extension. Note that this is not very clever and may supply # intermediates that are not needed and fail to supply intermediates # that are needed. # Based on pyasn1 example code. from __future__ import print_function from base64 im...
apache-2.0
458,881,214,761,866,500
26.375
75
0.675473
false
3.520092
false
false
false
Vierkantor/Traiectum
Filefunc.py
1
15865
import codecs; import re; import sys; import Data; import Parser; import Service; import Station; # fix Python2's bad range() function try: range = xrange; except NameError: pass; def tryint(s): try: return int(s) except: return s def alphanum_key(s): """ Turn a string into a list of...
gpl-2.0
6,001,467,546,080,931,000
28.598881
143
0.600252
false
3.288083
false
false
false