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
Route49/521_FinalProject
lateralflowtest.py
1
4725
#! /usr/bin/python #Team: Route49 #Names: Cindy Wong, Sonia Parra #Date Modified: 11-12-2015 #Description: import time import picamera import numpy as np import cv2 import matplotlib.pyplot as plt #------------Take picture with pi camera-------------- cap = cv2.VideoCapture(0) ret, frame = cap.read() gray = cv2.cv...
gpl-2.0
2,927,265,058,397,611,500
25.544944
87
0.707725
false
2.556818
false
false
false
hgijeon/the_PLAY
Structure/Middle/MIDI/MidiToText.py
1
4142
# -*- coding: ISO-8859-1 -*- from MidiOutStream import MidiOutStream class MidiToText(MidiOutStream): """ This class renders a midi file as text. It is mostly used for debugging """ ############################# # channel events def channel_message(self, message_type, channel, data...
mit
5,641,182,937,361,831,000
22.139665
110
0.580155
false
3.53413
false
false
false
kylef/KFData.py
kfdata/tests/test_parser.py
1
1682
import os import unittest from kfdata.parser import ModelParser from kfdata.model import Model from kfdata.entity import Entity from kfdata.attributes import * from kfdata.relationship import Relationship class ModelParserTests(unittest.TestCase): def fixture_model(self): model = Model() model.en...
bsd-3-clause
-5,127,756,902,484,776,000
36.377778
94
0.604043
false
4.380208
false
false
false
pemami4911/POMDPy
pomdpy/agent.py
1
12581
from __future__ import print_function, division import time import logging import os from pomdpy.pomdp import Statistic from pomdpy.pomdp.history import Histories, HistoryEntry from pomdpy.util import console, print_divider from experiments.scripts.pickle_wrapper import save_pkl module = "agent" class Agent: """...
mit
7,957,404,430,153,100,000
39.066879
119
0.582466
false
3.966267
false
false
false
rmcauley/rainwave
api_requests/admin_web/producers.py
1
5863
from libs import config import api.web from api import fieldtypes from api.urls import handle_url from api_requests.admin import producers from rainwave.events import event from api_requests.admin_web import index from api_requests.admin_web.power_hours import get_ph_formatted_time # this makes sure all the event modu...
gpl-2.0
-3,632,912,456,515,194,400
38.884354
311
0.600205
false
3.373418
false
false
false
AISpace2/AISpace2
aipython/rlSimpleGameFeatures.py
1
4667
# rlSimpleGameFeatures.py - Feature-based Reinforcement Learner # AIFCA Python3 code Version 0.7.1 Documentation at http://aipython.org # Artificial Intelligence: Foundations of Computational Agents # http://artint.info # Copyright David L Poole and Alan K Mackworth 2017. # This work is licensed under a Creative Commo...
gpl-3.0
7,651,743,182,352,769,000
31.186207
107
0.562888
false
3.190021
false
false
false
mscuthbert/abjad
abjad/tools/quantizationtools/QGrid.py
1
11464
# -*- encoding: utf-8 -*- import bisect import copy from abjad.tools import durationtools from abjad.tools import indicatortools from abjad.tools import scoretools from abjad.tools.abctools import AbjadObject from abjad.tools.topleveltools import attach class QGrid(AbjadObject): r'''A rhythm-tree-based model for ...
gpl-3.0
-7,511,138,263,131,820,000
33.223881
78
0.579641
false
3.984706
false
false
false
anish/buildbot
master/buildbot/test/fake/fakestats.py
1
2590
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
1,058,037,912,600,986,900
26.849462
81
0.664865
false
4.280992
true
false
false
PMitura/smiles-neural-network
baselines/db.py
1
5945
import sys sys.path.append('..') from config import config as cc import psycopg2 import mysql.connector import pandas as pd import numpy def getCon(): dbcfg = { 'user': cc.cfg['db']['user'], 'password': cc.cfg['db']['pass'], 'host': cc.cfg['db']['host'], 'database': cc.cfg['db']['...
bsd-3-clause
4,820,198,627,859,965,000
58.45
774
0.673003
false
2.458644
false
false
false
TheAmbitiousInc/com.theambitious.qrtrace.web
web/campaign/models.py
1
3777
from django.db import models from django.contrib.auth.models import User CAMPAIGN_TYPE = ( ('S', 'Standard'), ('P', 'Mini-Site'), ) STATUS = ( ('A', 'Active'), ('I', 'Inactive'), ) PCAMPAIGN_LINK = ( ('FB', 'Facebook Page'), ('TW', 'Twitter Page'), ('NOTE', 'Send us a Note'), ('WEB', ...
mit
3,409,947,177,340,206,600
30.214876
92
0.619804
false
3.345438
false
false
false
niksbiks/InfoBox
Utils.py
1
3358
# -*- coding: utf-8 *-* # InfoBox - Generate data for a display screen # Copyright 2013 by Nikolaj Brandt Jensen # # 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 th...
gpl-3.0
-6,643,979,572,607,037,000
27.2
156
0.688803
false
3.231954
false
false
false
jgresula/jagpdf
code/test/apitest/py/sun_patterns.py
1
2776
# Copyright (c) 2005-2009 Jaroslav Gresula # # Distributed under the MIT license (See accompanying file # LICENSE.txt or copy at http://jagpdf.org/LICENSE.txt) # import jagpdf import jag.testlib as testlib import os import string import math media = 400, 400 def function(doc, spot): def spot_transform(fn): ...
mit
-547,718,701,240,104,960
36.513514
91
0.54647
false
2.751239
true
false
false
alduxvm/DronePilot
pix-hover-controller.py
1
8724
#!/usr/bin/env python """ Drone Pilot - Control of MRUAV """ """ pix-hover-controller.py: Script that calculates pitch and roll movements for a vehicle with a pixhawk flight controller and a MoCap system in order to keep a specified position. """ __author__ = "Aldo Vargas" __copyright__ = "Copyright 2016 Altax.ne...
gpl-3.0
-7,655,237,959,411,565,000
43.065657
177
0.574507
false
3.352806
false
false
false
kenlimmj/fightin-words
setup.py
1
1777
#!/usr/bin/env python # coding=utf-8 from setuptools import setup import codecs # Patch distutils if it can't cope with the # `classifiers` or `download_url` keywords from sys import version if version < '2.2.3': from distutils.dist import DistributionMetadata DistributionMetadata.classifiers = None Distr...
mit
242,618,452,321,788,900
32.528302
118
0.648284
false
3.748945
false
false
false
examachine/pisi
scripts/missing-binary.py
1
1745
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2005, TUBITAK/UEKAE # # 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 l...
gpl-3.0
-6,591,456,595,958,606,000
26.265625
92
0.614327
false
3.375242
false
false
false
BoPeng/simuPOP
docs/SelfMating.py
1
1433
#!/usr/bin/env python # # $File: SelfMating.py $ # # This file is part of simuPOP, a forward-time population genetics # simulation environment. Please visit http://simupop.sourceforge.net # for details. # # Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org) # # This program is free software: you can redistribute...
gpl-2.0
-6,239,534,337,496,042,000
32.325581
73
0.736916
false
3.420048
false
false
false
MakersF/cassiopeia
cassiopeia/dto/teamapi.py
1
1846
import cassiopeia.dto.requests import cassiopeia.type.dto.team def get_teams_by_summoner_id(summoner_ids): """https://developer.riotgames.com/api/methods#!/986/3358 summoner_ids int | list<int> the summoner ID(s) to look up teams for return dict<str, list<Team>> the requested sum...
mit
-2,783,021,503,271,844,400
35.92
124
0.668472
false
3.25
false
false
false
dduan/django-sophie
sophie/views.py
1
2292
from django.template import RequestContext from django.template.loader import select_template from django.shortcuts import get_object_or_404, render_to_response from django.utils.functional import curry from sophie.models import Blog, Category, Entry from sophie.utils import LaidbackPaginator, multiblog_enabled, rout...
bsd-3-clause
-1,624,271,421,957,478,100
37.847458
77
0.684991
false
3.575663
false
false
false
BrunoJJE/SublimeLinter-contrib-checkpatch
linter.py
1
2080
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Bruno JJE # Copyright (c) 2015 Bruno JJE # # License: MIT # """This module exports the Checkpatch plugin class.""" from SublimeLinter.lint import Linter class Checkpatch(Linter): """Provides an interface to l...
mit
2,641,217,235,862,661,600
28.714286
84
0.522596
false
3.301587
false
false
false
jmbeuken/abinit
abichecks/scripts/check-binaries-conf.py
1
4005
#!/usr/bin/env python "Check binaries configuration" # # Copyright (C) 2012-2017 ABINIT Group (Yann Pouillon) # # This file is part of the ABINIT software package. For license information, # please see the COPYING file in the top-level directory of the ABINIT source # distribution. # from __future__ import unicode_lite...
gpl-3.0
448,727,408,283,199,360
25.348684
96
0.581024
false
3.102246
true
false
false
AnthonyBriggs/Python-101
hello_python_source_py3/chapter 10/mud-2/monster.py
1
1417
import player import random class Monster(player.Player): def __init__(self, game, location, name, description): player.Player.__init__(self, game, location) self.name = name self.description = description # print self.actions def get_input(self): # print "I am in...
mit
-871,573,894,423,073,300
28.520833
72
0.550459
false
3.840108
false
false
false
MotherNatureNetwork/django-dynamic-forms
dynamic_forms/models.py
1
7179
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json from collections import OrderedDict from django.core.urlresolvers import reverse from django.db import models from django.db.transaction import atomic from django.template.defaultfilters import slugify from django.utils.crypto import get_rand...
bsd-3-clause
7,746,223,024,691,429,000
35.92268
88
0.607846
false
4.065267
false
false
false
twitter/pants
src/python/pants/backend/jvm/tasks/jvm_dependency_analyzer.py
1
8014
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import os from builtins import object from collections import defaultdict from twitter.c...
apache-2.0
1,199,296,062,473,222,700
40.958115
96
0.703768
false
4.033216
false
false
false
david-cattermole/assetQC
python/assetQC/api/assetInstance.py
1
4307
""" AssetInstance - Defines nodes of an asset. - Used to store data needed in the Validator. - Stores an asset type to be used for look up of the validation plugin to use. """ import assetQC.api.logger import assetQC.api.baseDataObject as baseDataObject class AssetInstance(baseDataObject.BaseDataObject): """ ...
lgpl-3.0
5,200,356,256,193,020,000
27.150327
78
0.563966
false
3.976916
false
false
false
xmvlad/stock_trade_datamine
src/research/cubic_poly_filter.py
1
1768
#! /usr/bin/python import pandas as pd import numpy as np import matplotlib.pyplot as plt sber_df = pd.read_csv("../../import/candle/sber_2006_2015_candles.txt") def compute_wnd0(m): wnd = np.zeros(m) k = 0 for i in range((1 - m)/2, (m - 1)/2 + 1): wnd[k] = ((3.0*m*m - 7.0 - 20.0*i*i)/4.0)/(m*(m...
mit
8,184,671,864,760,643,000
22.586667
79
0.501697
false
2.004535
false
false
false
cdumay/json-sort
src/json_sort/scripts.py
1
1299
#!/usr/bin/env python # -*- coding: utf-8 -*- """ .. codeauthor:: Cédric Dumay <cedric.dumay@gmail.com> """ import logging import argparse from .lib import from_local, from_remote class CommonParser(argparse.ArgumentParser): """CommonParser""" def __init__(self, **kwargs): argparse.ArgumentParser....
apache-2.0
-3,102,209,748,362,732,000
25.489796
78
0.620955
false
3.762319
false
false
false
vollov/sm
django/account/forms.py
1
1248
from django import forms from django.contrib.auth.models import User from captcha.fields import CaptchaField from models import UserProfile class UserForm(forms.ModelForm): password = forms.CharField(required=True, widget=forms.PasswordInput( attrs={'class':'form-control', ...
mit
-6,995,950,275,800,767,000
33.694444
73
0.530449
false
5.032258
false
false
false
TheRealBanana/bLyrics
src/dialogs/generic_progress_bar.py
1
4443
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'generic_progress_bar.ui' # # Created by: PyQt4 UI code generator 4.11.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _f...
gpl-2.0
-8,423,211,161,132,863,000
52.53012
110
0.750844
false
4.321984
false
false
false
jorgemf/kaggle_redefining_cancer_treatment
src/tf_dataset_generator.py
1
8509
import multiprocessing import tensorflow as tf from tensorflow.contrib.data import Dataset # from TensorFlow 1.4 import collections import threading from tensorflow.python.ops import script_ops from tensorflow.python.util import nest from tensorflow.python.framework import tensor_shape # from TensorFlow 1.4 class _G...
mit
-7,689,821,307,343,144,000
43.784211
100
0.58585
false
4.422557
false
false
false
PnEcrins/GeoNature-atlas
atlas/modeles/repositories/tCommunesRepository.py
1
1184
# -*- coding:utf-8 -*- import ast from sqlalchemy.sql import text def getCommuneFromInsee(connection, insee): sql = """ SELECT l.commune_maj, l.insee, st_asgeojson(st_transform(l.the_geom, 4326)) as commune_geojson FROM layers.l_communes l WHERE l.insee ...
gpl-3.0
4,113,103,118,938,689,000
29.157895
75
0.601351
false
3.288889
false
false
false
weixsong/algorithm
leetcode/126.py
1
3652
#!/usr/bin/env python """ Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformation sequence(s) from beginWord to endWord, such that: Only one letter can be changed at a time Each intermediate word must exist in the word list For example, Given: beginWord = "hit" endWord ...
mit
3,761,983,855,808,859,600
29.433333
153
0.516156
false
4.261377
false
false
false
botswana-harvard/edc-call-manager
edc_call_manager/admin.py
1
6751
from django.apps import apps as django_apps from django.contrib import admin from django_revision.modeladmin_mixin import ModelAdminRevisionMixin from edc_model_admin import ModelAdminBasicMixin from edc_base.sites.admin import ModelAdminSiteMixin from edc_model_admin import ( ModelAdminNextUrlRedirectMixin, Mode...
gpl-2.0
-3,334,070,029,436,143,000
30.546729
101
0.621093
false
3.927283
false
false
false
leedoowon/MTraceCheck
src_main/dump_to_sig.py
1
6162
#!/usr/bin/python ########################################################################## # # MTraceCheck # Copyright 2017 The Regents of the University of Michigan # Doowon Lee and Valeria Bertacco # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance ...
apache-2.0
-3,237,354,244,322,637,300
44.308824
128
0.596073
false
3.234646
false
false
false
makhidkarun/traveller_pyroute
PyRoute/SubsectorMap.py
1
18050
""" Created on Aug 7, 2016 @author: tjoneslo """ import os import logging from .Map import GraphicMap from .Galaxy import Galaxy from .AllyGen import AllyGen from PIL import Image, ImageDraw, ImageColor, ImageFont class GraphicSubsectorMap(GraphicMap): positions = {'A': (0, 0), 'B': (-8, 0), 'C': (-16, 0), 'D': ...
mit
4,170,946,602,452,627,500
39.653153
113
0.516842
false
3.208319
false
false
false
litrin/QGA-socket-client
upload.py
1
1312
#!/usr/bin/env python import sys import base64 from libs.QGAConnection import QGAConnection def fileEncode(handle): content = handle.readlines() return base64.encodestring(''.join(content)) def uploadFile(socketFile, filename, content): conn = QGAConnection(socketFile) query = {'execute' : 'guest-fil...
gpl-2.0
-827,856,266,873,276,500
25.77551
106
0.621189
false
3.398964
false
false
false
gpitfield/django-deployment
deployments/management/commands/stage_dump.py
1
1256
#!/usr/bin/pythonv import sys import subprocess from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.db.models import get_app, get_models class Command(BaseCommand): args = "<restore_db>" help = 'Dump data to staging database. restore_db should be either "st...
bsd-3-clause
3,318,819,861,196,025,300
40.866667
138
0.680732
false
3.124378
false
false
false
gsi-upm/calista-bot
FE-Controller/gsibot.py
1
10616
#!/usr/bin/python # coding=utf-8 from __future__ import print_function import os, sys from unidecode import unidecode import flask import requests, socket import ast app = flask.Flask(__name__) app.debug = True # Flask settings host='localhost' port=4242 # Solr settings solr = {'host': 'localhost', 'port':8080, ...
apache-2.0
683,144,083,572,559,100
29.695652
97
0.576298
false
3.830018
false
false
false
FrankNagel/qlc
src/webapp/quanthistling/scripts/annotations/annotations_for_hyde2008.py
1
7987
# -*- coding: utf8 -*- import sys, os sys.path.append(os.path.abspath('.')) import re from operator import attrgetter import difflib # Pylons model init sequence import pylons.test import logging from quanthistling.config.environment import load_environment from quanthistling.model.meta import Sessi...
gpl-3.0
7,092,232,098,369,912,000
36.042857
162
0.620884
false
3.594509
false
false
false
kimgea/pypiper
temp/mixin.py
1
4233
""" Experiment to try to split it up in mixin classes """ import abc class BaseNodeAbstract(object): def __init__(self, *args, **kwargs): super(BaseNodeAbstract, self).__init__(*args, **kwargs) self._push_requested = False __metaclass__ = abc.ABCMeta def _process(self): """ ...
mit
-2,236,453,095,852,766,000
19.350962
83
0.590361
false
4.09381
false
false
false
leomoon-studios/blender-text-counter
src/leomoon-textcounter.py
1
13849
bl_info = { "name": "LeoMoon TextCounter", "author": "LeoMoon Studios - www.LeoMoon.com and Marcin Zielinski - www.marcin-zielinski.tk/en/", "version": (1, 3, 4), "blender": (2, 80, 0), "location": "Font Object Data > LeoMoon TextCounter", "description": "Text counter for displays, HUDs etc.", ...
gpl-3.0
955,982,968,969,524,400
35.930667
199
0.581053
false
3.766386
false
false
false
chimkentec/KodiMODo_rep
plugin.video.KinoPoisk.ru/krasfs.py
1
9802
#!/usr/bin/python # -*- coding: utf-8 -*- import httplib #import re #import sys import os import Cookie import string, xbmc, xbmcgui, xbmcplugin, urllib, cookielib, xbmcaddon #------------------------------- import urllib, urllib2, time, random #from time import gmtime, strftime #from urlparse import urlparse impo...
gpl-3.0
3,124,504,618,511,309,000
30.761438
262
0.568738
false
2.428893
false
false
false
TakakiNishio/grasp_planning
rgb/random_planning/random_planning_v3.py
1
8102
# -*- coding: utf-8 -*- #python library import matplotlib.pyplot as plt import numpy as np from numpy.random import * import sys from scipy import misc from PIL import Image, ImageDraw, ImageFont import shutil import os import random import time #chainer library import chainer import chainer.functions as F import ch...
gpl-3.0
3,179,218,211,740,629,500
27.034602
114
0.572945
false
2.830887
false
false
false
anselmobd/fo2
src/geral/models.py
1
8484
import os from django.db import models from django.contrib.auth.models import User from django.template.defaultfilters import slugify class RecordTracking(models.Model): user = models.CharField( null=True, blank=True, max_length=64, verbose_name='Usuário') time = models.DateTimeField( ...
mit
4,495,185,306,844,906,500
28.538462
79
0.626184
false
3.327294
false
false
false
itdxer/neupy
neupy/algorithms/signals.py
1
3901
# -*- coding: utf-8 -*- from __future__ import unicode_literals import time import progressbar from neupy.utils import iters __all__ = ('ProgressbarSignal', 'PrintLastErrorSignal', 'EpochEndSignal', 'ErrorCollector') def format_time(time): """ Format seconds into human readable format. Pa...
mit
5,153,067,912,115,536,000
26.083333
79
0.589744
false
3.568161
false
false
false
redcanari/canari3
tests/maltego/test_entities.py
1
6600
from datetime import date, datetime, timedelta from canari.maltego.message import Entity, Field, StringEntityField, IntegerEntityField, FloatEntityField, \ BooleanEntityField, EnumEntityField, LongEntityField, DateTimeEntityField, DateEntityField, TimeSpan, \ TimeSpanEntityField, RegexEntityField, ColorEntityFi...
gpl-3.0
-2,275,130,385,741,940,500
39.243902
108
0.620455
false
3.82387
true
false
false
schinke/solid-fortnight-ba
flask/venv/lib/python2.7/site-packages/jsonpickle/ext/numpy.py
1
2182
# -*- coding: utf-8 -*- from __future__ import absolute_import import numpy as np import ast import jsonpickle from jsonpickle.compat import unicode __all__ = ['register_handlers', 'unregister_handlers'] class NumpyBaseHandler(jsonpickle.handlers.BaseHandler): def restore_dtype(self, data): dtype = d...
mit
-5,394,475,846,161,860,000
26.974359
76
0.651237
false
3.917415
false
false
false
rezoo/twopy
twopy/comment.py
1
2442
#!/usr/bin/env python # -*- coding: utf-8 -*- import re import datetime from xml.sax.saxutils import unescape from user import make_anonymous_user from exeptions import HttpStatusError, RegexError class Comment: __tag_expressions = re.compile(r"<.+?>") __date_id_expressions = re.compile(r" ID:") __trip_e...
mit
-2,067,594,332,515,161,000
29.886076
77
0.57418
false
3.460993
false
false
false
ncw/swift
bin/update-authors.py
1
1152
#!/usr/bin/env python """ Update the README.md file with the authors from the git log """ import re import subprocess AUTHORS = "README.md" IGNORE = [ "nick@raig-wood.com" ] def load(): """ returns a set of emails already in authors """ with open(AUTHORS) as fd: authors = fd.read() emails...
mit
-2,929,919,750,685,135,000
24.043478
92
0.551215
false
3.50152
false
false
false
shakamunyi/nova
nova/tests/unit/api/openstack/compute/plugins/v3/test_servers.py
1
143725
# Copyright 2010-2011 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, Inc. # 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-2.0
1,203,626,438,949,292,300
41.086384
79
0.562679
false
3.951637
true
false
false
alexjlaberge/KeyboardGloves
uartCom.py
1
3444
import serial from evdev import uinput, ecodes as e ser = serial.Serial('/dev/ttyUSB0') while 1: line = ser.readline()#.decode('utf-8')[:-4] line = line[0] if line == 'a': with uinput.UInput() as ui: ui.write(e.EV_KEY, e.KEY_A, 1) ui.syn() elif line == 'b': ...
mit
-7,561,024,227,595,534,000
29.309091
47
0.430894
false
2.992181
false
false
false
Widukind/dlstats
dlstats/tests/fetchers/test_bea.py
1
6159
# -*- coding: utf-8 -*- import io import os from dlstats.fetchers.bea import BEA as Fetcher import httpretty from dlstats.tests.base import RESOURCES_DIR as BASE_RESOURCES_DIR from dlstats.tests.fetchers.base import BaseFetcherTestCase import unittest from unittest import mock RESOURCES_DIR = os.path.abspath(os.p...
agpl-3.0
4,885,945,765,527,769,000
34.396552
117
0.590031
false
3.374795
true
false
false
skoolkid/pyskool
utils/create-images.py
1
1708
#!/usr/bin/env python import sys import os # Use the current development version of Pyskool PYSKOOL_HOME = os.environ.get('PYSKOOL_HOME') if not PYSKOOL_HOME: sys.stderr.write('PYSKOOL_HOME is not set; aborting\n') sys.exit(1) if not os.path.isdir(PYSKOOL_HOME): sys.stderr.write('PYSKOOL_HOME=%s: directory...
gpl-3.0
-1,935,792,928,964,551,700
28.964912
79
0.590749
false
3.039146
false
false
false
mlperf/training_results_v0.6
Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/tvm/tests/python/unittest/test_codegen_bool.py
1
1984
"""codegen related to bool types""" import tvm import numpy as np def test_cmp_load_store(): n = 32 A = tvm.placeholder((n,), name='A') B = tvm.placeholder((n,), name='B') C = tvm.compute(A.shape, lambda *i: A(*i) > B(*i), name='C') D = tvm.compute(C.shape, lambda *i: tvm.all(C(*i), A(*i) > 1), na...
apache-2.0
-3,105,587,601,103,437,300
33.206897
83
0.53629
false
2.867052
false
false
false
KamilWo/bestja
addons/bestja_estimation_reports/models.py
1
6829
# -*- coding: utf-8 -*- from openerp import models, fields, api, exceptions class Project(models.Model): _inherit = 'bestja.project' estimation_reports = fields.One2many('bestja.estimation_report', inverse_name='project') enable_estimation_reports = fields.Boolean(string=u"Raporty szacunkowe do zbiórki ...
agpl-3.0
-5,963,796,252,538,055,000
30.569444
96
0.597302
false
3.752889
false
false
false
tych0/qtile
libqtile/utils.py
1
7239
# Copyright (c) 2008, Aldo Cortesi. All rights reserved. # # 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,...
mit
4,644,517,857,166,543,000
28.189516
79
0.603951
false
3.973106
false
false
false
tperol/ConvNetQuake
bin/preprocess/create_dataset_events.py
1
7025
#!/usr/bin/env python # ------------------------------------------------------------------- # File Name : create_dataset_events.py # Creation Date : 05-12-2016 # Last Modified : Fri Jan 6 15:04:54 2017 # Author: Thibaut Perol <tperol@g.harvard.edu> # ------------------------------------------------------------------- ...
mit
-6,843,205,053,780,347,000
38.914773
87
0.582633
false
3.951069
false
false
false
dparks1134/ExpressBetaDiversity
scripts/convertToEBD.py
1
2858
#!/usr/bin/env python __author__ = 'Donovan Parks' __copyright__ = 'Copyright 2013' __credits__ = ['Donovan Parks'] __license__ = 'GPL3' __version__ = '1.0.0' __maintainer__ = 'Donovan Parks' __email__ = 'donovan.parks@gmail.com' __status__ = 'Development' import argparse def isNumber(s): try: float(s) return T...
gpl-3.0
-43,951,599,076,369,620
24.300885
100
0.636809
false
2.821323
false
false
false
ClaudioNahmad/Servicio-Social
Parametros/CosmoMC/CosmoMC-master/python/runbatch.py
1
4986
#!/usr/bin/env python from __future__ import absolute_import from __future__ import print_function import hashlib import os from paramgrid import batchjob_args, jobqueue Opts = batchjob_args.batchArgs('Submit jobs to run chains or importance sample', notExist=True, notall=True, converge...
gpl-3.0
-1,203,287,462,099,538,200
42.356522
154
0.661051
false
3.82362
false
false
false
bez0r/IP_simple_tools
ip_cidr_generation.py
1
1604
# !/usr/bin/env python # Usage python range_2_ip.py 1.1.1.1/24 # returns all the ip addresses in the range including those provide # only works from /32 to /10 to avoid overrun # coverts and print the ip addresses with the CIRD import sys ip_start = sys.argv[1] print ip_start ip_start_string = str(ip_start) # ...
gpl-2.0
3,748,804,819,050,297,300
27.642857
92
0.592893
false
2.998131
false
false
false
ericdill/asv
test/benchmark/params_examples.py
1
2338
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function) import os class ClassOne(object): pass class ClassTwo(object): pass def track_param(n): return 42 track_param.params = [ClassOne, ClassTwo] def ...
bsd-3-clause
-1,775,601,047,673,091,600
18.163934
70
0.541916
false
3.311615
false
false
false
sabas1080/dsame
defs.py
1
274526
VERSION = '0.1.2.0' PROGRAM = 'dsame' DESCRIPTION = 'dsame is a program to decode EAS/SAME alert messages' COPYRIGHT = 'Copyright (C) 2015 Joseph W. Metcalf' TEST_STRING = 'EAS: ZCZC-WXR-RWT-055027-055039-055047-055117-055131-055137-055139-055015-055071+0030-0771800-KMKX/NWS-' MSG__TEXT={ 'EN' : {'MSG1' :...
isc
148,268,423,539,931,680
33.588132
181
0.56489
false
2.276014
false
false
false
lampwins/netbox
netbox/extras/filters.py
1
7178
import django_filters from django.contrib.contenttypes.models import ContentType from django.db.models import Q from dcim.models import DeviceRole, Platform, Region, Site from tenancy.models import Tenant, TenantGroup from .constants import CF_FILTER_DISABLED, CF_FILTER_EXACT, CF_TYPE_BOOLEAN, CF_TYPE_SELECT from .mod...
apache-2.0
-7,067,669,304,458,799,000
30.621145
110
0.604486
false
4.187865
false
false
false
gitterHQ/ansible
v2/ansible/parsing/splitter.py
1
9971
# (c) 2014 James Cammarata, <jcammarata@ansible.com> # # This file is part of Ansible # # Ansible 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 late...
gpl-3.0
4,528,106,065,428,222,500
40.373444
120
0.60355
false
4.286758
false
false
false
stefanfoulis/django-packageindex
packageindex/decorators.py
1
3390
from django.contrib.auth import login, REDIRECT_FIELD_NAME from django.http import HttpResponseRedirect, HttpResponseForbidden from django.utils.http import urlquote try: from functools import wraps, WRAPPER_ASSIGNMENTS except ImportError: from django.utils.functional import wraps, WRAPPER_ASSIGNMENTS try: ...
bsd-3-clause
-7,879,150,254,332,690,000
38.418605
85
0.668437
false
4.144254
false
false
false
skosukhin/spack
var/spack/repos/builtin/packages/xsbench/package.py
1
2400
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
-8,651,614,620,714,225,000
35.363636
78
0.654583
false
3.827751
false
false
false
ActiveState/code
recipes/Python/579018_PythDetermine_Name_Directory_Top_Level_Running/recipe-579018.py
1
1836
def scriptinfo(): ''' Returns a dictionary with information about the running top level Python script: --------------------------------------------------------------------------- dir: directory containing script or compiled executable name: name of script or executable source: name of s...
mit
7,641,870,790,096,511,000
38.06383
80
0.519608
false
5.142857
false
false
false
abingham/yapga
yapga/app/fetch.py
1
3134
import itertools import json import logging import baker import yapga import yapga.db import yapga.util log = logging.getLogger('yapga') @baker.command def fetch(url, dbname, mongo_host=yapga.db.DEFAULT_MONGO_HOST, mongo_port=yapga.db.DEFAULT_MONGO_PORT, username=None, ...
mit
-1,479,069,689,103,233,500
31.645833
85
0.52074
false
4.129117
false
false
false
Naeka/vosae-app
www/invoicing/models/invoice.py
1
13758
# -*- coding:Utf-8 -*- from django.utils.translation import ugettext_lazy as _, pgettext, ugettext from django.utils.timezone import now as datetime_now from mongoengine import fields from decimal import Decimal import datetime import uuid from vosae_utils import SearchDocumentMixin from pyes import mappings as searc...
agpl-3.0
4,877,406,342,922,103,000
39.346041
187
0.642826
false
4.287317
false
false
false
jledbetter/openhatch
mysite/missions/svn/views.py
1
6392
# 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,109,212,844,886,567,000
42.189189
123
0.680851
false
3.768868
false
false
false
rohangoel96/IRCLogParser
IRCLogParser/lib/deprecated/scripts/In-Out_degree && Nickname-change.py
1
8682
#Plotting nickname-change graph is also implemented in this code. import os.path import re import networkx as nx import numpy as np import matplotlib.pyplot as plt import pylab import pygraphviz as pygraphviz import numpy import datetime import time import pandas as pd #added some new libraries rem_time= None #this va...
mit
5,848,676,376,286,517,000
30.34296
171
0.574752
false
2.848425
false
false
false
mclarkson/obdi-saltconfigserver
scripts/serverlist.py
1
5388
#!/usr/bin/env python # # Obdi - a REST interface and GUI for deploying software # Copyright (C) 2014 Mark Clarkson # # 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 Lic...
gpl-3.0
35,899,799,561,530,680
26.773196
101
0.538233
false
3.741667
false
false
false
takacsg84/Lasagne
lasagne/nonlinearities.py
1
1312
""" Nonlinearities """ # sigmoid from theano.tensor.nnet import sigmoid # softmax (row-wise) from theano.tensor.nnet import softmax # tanh from theano.tensor import tanh # rectify def rectify(x): # The following is faster than T.maximum(0, x), # and it works with nonsymbolic inputs as well. # Thanks to...
mit
8,193,441,875,700,371,000
24.72549
78
0.652439
false
3.184466
false
false
false
leafnode/npp_markdown_script
lib/markdown/extensions/fenced_code.py
1
4727
#!/usr/bin/env python """ Fenced Code Extension for Python Markdown ========================================= This extension adds Fenced Code Blocks to Python-Markdown. >>> import markdown >>> text = ''' ... A paragraph before a fenced code block: ... ... ~~~ ... Fenced code block ... ~~~...
bsd-3-clause
4,073,474,864,419,667,000
29.895425
98
0.551936
false
3.736759
false
false
false
franck-talbart/codelet_tuning_infrastructure
ctr-common/plugins/85224814-81bd-11e3-ab2a-5bb78461e8a9/pre_generate_schema.py
1
4860
#!/usr/bin/env python #************************************************************************ # Codelet Tuning Infrastructure # Copyright (C) 2010-2015 Intel Corporation, CEA, GENCI, and UVSQ # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Licens...
gpl-3.0
-4,906,620,796,638,775,000
45.285714
107
0.62428
false
3.584071
false
false
false
adityahase/frappe
frappe/automation/doctype/assignment_rule/assignment_rule.py
1
8596
# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe.desk.form import assign_to import frappe.cache_manager from frappe import _ ...
mit
-2,918,345,668,919,362,600
28.542955
125
0.698581
false
3.144111
false
false
false
protojas/simple-learnpy
knn.py
1
1162
from simplestats import * def train(Ys, Xs, classes=[], active=[], k=3, dist=euclidean): assert (Xs != []), "no training data" assert (len(Xs) == len(Ys)), "Xs and Ys have differing lengths" if active == []: active = range(len(Xs[0])) if classes == []: classset = {} map(classs...
gpl-2.0
-3,056,442,489,045,123,600
26.023256
67
0.572289
false
2.949239
false
false
false
ExCiteS/geokey-export
geokey_export/migrations/0001_initial.py
1
1065
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('categories', '0013_auto_20150130_1440'), ('projects', '0005_auto_20150202_1041'), migrations...
mit
5,211,833,677,706,360,000
33.354839
114
0.576526
false
4.400826
false
false
false
Tejal011089/med2-app
selling/report/lead_to_installation_creation_flow/lead_to_installation_creation_flow.py
1
1768
#License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import flt sql = webnotes.conn.sql from webnotes import _, msgprint import datetime def execute(filters=None): if not filters: filters = {} columns = get_columns() ...
agpl-3.0
1,219,668,019,327,240,400
64.481481
727
0.71267
false
3.096322
false
false
false
BD2KGenomics/slugflow
src/toil/wdl/wdl_synthesis.py
1
45651
# Copyright (C) 2015-2021 Regents of the University of California # # 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
-375,836,670,790,770,400
44.378728
158
0.543559
false
4.452019
false
false
false
lssfau/walberla
python/mesa_pd/kernel/InitParticlesForHCSITS.py
1
1907
# -*- coding: utf-8 -*- from mesa_pd.accessor import create_access from mesa_pd.utility import generate_file def create_property(name, type, defValue=""): """ Parameters ---------- name : str name of the property type : str type of the property defValue : str default valu...
gpl-3.0
-3,507,247,863,777,388,000
44.404762
114
0.642895
false
3.564486
false
false
false
shuhaowu/projecto
tests/test_files_api.py
1
23425
from __future__ import absolute_import from cStringIO import StringIO import os from kvkit import NotFoundError import ujson as json from werkzeug.datastructures import FileStorage from projecto.apiv1.files.models import File from .utils import ProjectTestCase, new_file, new_directory test_file = lambda filename: (...
apache-2.0
2,193,090,470,574,699,000
34.067365
126
0.668858
false
3.259357
true
false
false
winnerineast/Origae-6
origae/model/images/forms.py
1
4627
# Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. from __future__ import absolute_import from wtforms import validators from ..forms import ModelForm from origae import utils class ImageModelForm(ModelForm): """ Defines the form used to create a new ImageModelJob """ crop_size = ...
gpl-3.0
3,812,878,330,505,125,400
32.05
110
0.572509
false
4.237179
false
false
false
joaormatos/anaconda
mmfparser/player/extensions/KcBoxA.py
1
45827
# Copyright (c) Mathias Kaerlev 2012. # This file is part of Anaconda. # Anaconda 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
2,920,933,596,437,168,600
21.053417
111
0.590111
false
3.782354
false
false
false
ultrabug/py3status
py3status/modules/zypper_updates.py
1
1800
""" Display number of pending updates for OpenSUSE Linux. Configuration parameters: cache_timeout: How often we refresh this module in seconds (default 600) format: Display format to use (default 'zypper: [\?color=update {update}]') thresholds: specify color thresholds to use (defau...
bsd-3-clause
2,772,708,186,276,651,500
25.865672
76
0.611667
false
3.422053
false
false
false
our-city-app/oca-backend
src/rogerthat/exceptions/news.py
1
3868
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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
-2,478,217,043,037,130,000
41.505495
118
0.710186
false
3.85259
false
false
false
cria/microSICol
py/modules/i18n.py
1
2546
#!/usr/bin/env python #-*- coding: utf-8 -*- #project imports from general import General #fill in the dictionary bellow if your posix locale language code #differs from the iso code used in the database: code_dict = { 'ptbr': 'pt_BR', } class I18n(object): g = General() def __init...
gpl-2.0
6,057,766,002,696,724,000
33.405405
95
0.541634
false
3.941176
false
false
false
asieira/smart_open
smart_open/smart_open_lib.py
1
26368
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 Radim Rehurek <me@radimrehurek.com> # # This code is distributed under the terms and conditions # from the MIT License (MIT). """ Utilities for streaming from several file-like data storages: S3 / HDFS / standard filesystem / compressed files..., us...
mit
1,200,361,162,607,890,000
35.878322
132
0.59394
false
3.843732
false
false
false
r-barnes/EMFlow
hgt_merge.py
1
2811
#!/usr/bin/env python #Creates a seamless, rectangular, square, 2-byte signed integer representation #of the HGT input files. import sys import re if len(sys.argv)==1: print("Syntax: {0} <OUTPUT FILE> <DIMENSION> <SRTM1 FILE> [SRTM1 FILE] [SRTM1 FILE]".format(sys.argv[0])) print("SRTM1 files have dimensions 3601...
bsd-2-clause
-5,767,709,974,292,658,000
31.321839
107
0.657773
false
2.928125
false
false
false
ArteliaTelemac/PostTelemac
tests/test_posttelemac_standalone.py
1
3570
# -*- coding: utf-8 -*- import os import sys import qgis import qgis.gui import qgis.utils from qgis.PyQt import uic, QtCore try: from qgis.PyQt.QtGui import (QWidget,QDialog,QMainWindow) except ImportError: from qgis.PyQt.QtWidgets import (QWidget,QDialog,QMainWindow) from PostTelemac.meshlayer.post_telema...
gpl-3.0
7,414,951,596,616,395,000
27.11811
119
0.59888
false
3.67284
true
false
false
markmuetz/commandify
tests/doc/test_documentation_example_commands.py
1
1205
import inspect import subprocess import os import commandify as cmdify def parse_doc_for_commands(doc): if not doc: return [] cmds = [] lines = doc.split('\n') usage_found = False for line in lines: if line[:10] == ' usage:': usage_found = True if usage_foun...
mit
-258,905,297,493,242,340
24.638298
71
0.565975
false
3.862179
false
false
false
cossatot/py_thermochron
detrital_ui/simple_model_nonworking.py
1
2661
import sys; sys.path[0:0] = './' # Puts current directory at the start of path import settings import pymc as pm import numpy as np import scipy as sp import detrital_ui.common as ba from detrital_ui.data_types import * BIN = True err = pm.Uniform('RelErr',settings.error_prior[0],settings.error_prior[1],plot=Tr...
mit
-5,539,181,756,881,353,000
29.586207
84
0.533258
false
3.420308
false
false
false
obulpathi/poppy
tests/unit/storage/cassandra/test_flavors.py
1
5092
# 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
-5,452,753,099,060,066,000
35.113475
74
0.680283
false
3.854656
true
false
false
ross-g/io_pdx_mesh
__init__.py
1
4148
""" IO PDX Mesh Python module. Supports Maya 2018 and up, supports Blender 2.83 and up. author : ross-g """ from __future__ import unicode_literals import sys import site import json import inspect import logging import zipfile import traceback import os.path as path from imp import reload from collectio...
gpl-3.0
-4,635,317,174,983,986,000
30.664122
120
0.589441
false
3.690391
false
false
false
tnwhitwell/lexicon
tests/providers/integration_tests.py
1
21955
import contextlib from builtins import object import lexicon.client from lexicon.common.options_handler import SafeOptions, env_auth_options import pytest import vcr import os # Configure VCR provider_vcr = vcr.VCR( cassette_library_dir='tests/fixtures/cassettes', record_mode='new_episodes', ...
mit
5,364,490,583,355,641,000
60.847887
143
0.652517
false
4.038072
true
false
false
codelv/enaml-native
src/enamlnative/widgets/calendar_view.py
1
1902
""" Copyright (c) 2017, Jairus Martin. Distributed under the terms of the MIT License. The full license is in the file LICENSE, distributed with this software. Created on May 20, 2017 @author: jrm """ from atom.api import ( Typed, ForwardTyped, Range, Instance, observe, set_default ) from datetime import dateti...
mit
3,470,067,894,890,073,600
26.171429
79
0.626183
false
4.342466
false
false
false
shlomif/PySolFC
pysollib/games/ultra/matrix.py
1
7979
#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- # ---------------------------------------------------------------------------## # # Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer # Copyright (C) 2003 Mt. Hood Playing Card Co. # Copyright (C) 2005-2009 Skomoroh # # This program is free softwa...
gpl-3.0
6,651,040,396,593,169,000
27.90942
79
0.505452
false
3.740741
false
false
false
Kefkius/electrum-frc
lib/paymentrequest.py
1
11343
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2014 Thomas Voegtlin # # 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 y...
gpl-3.0
5,989,413,336,848,569,000
31.224432
145
0.596227
false
3.919489
true
false
false
timeu/PyGWAS
pygwas/pygwas.py
1
24923
#!/usr/bin/env python # coding: utf-8 """ pygwas ~~~~~~~~~~~~~ The main module for running Genome Wide Association studies :copyright: year by my name, see AUTHORS for more details :license: license_name, see LICENSE for more details """ from __init__ import __version__,__updated__,__date__ impor...
mit
-5,678,828,776,154,447,000
45.670412
300
0.664353
false
3.353788
false
false
false
macarthur-lab/xbrowse
seqr/views/utils/file_utils.py
1
3324
import csv import gzip import hashlib import json import logging import os import tempfile import xlrd from django.contrib.auth.decorators import login_required from django.views.decorators.csrf import csrf_exempt from settings import API_LOGIN_REQUIRED_URL from seqr.views.utils.json_utils import create_json_respons...
agpl-3.0
-6,620,917,764,469,647,000
31.271845
124
0.689531
false
3.585761
false
false
false
satanas/ngine
topview_scene.py
1
4420
# -*- coding: utf-8 -*- #================================================ # # Dummy Scene for the Top-View Example (please execute topview_example.py) # # Copyright (C) 2010 Wil Alvarez <wil.alejandro@gmail.com> # #=================================================== import pygame import random from ngine import sce...
gpl-3.0
-4,782,106,624,467,538,000
37.103448
93
0.533258
false
3.472113
false
false
false