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
AndrewWasHere/audiolens
lib/beamformers/beamformer.py
1
2105
""" Copyright 2015 Andrew Lin. All rights reserved. Licensed under the BSD 3-clause License. See LICENSE.txt or <http://opensource.org/licenses/BSD-3-Clause>. """ from abc import ABCMeta, abstractmethod import numpy as np from lib.albatross import log _log = log.get_logger(__name__) class BeamFormerError(Exception...
bsd-3-clause
896,673,129,523,582,500
27.445946
80
0.549644
false
4.606127
false
false
false
sportorg/pysport
sportorg/libs/iof/parser.py
1
10856
import xml.etree.ElementTree as ET class IOFParseResult(object): def __init__(self, name, data): self.name = name self.data = data def parse(file): ns = { 'iof': 'http://www.orienteering.org/datastandard/3.0', 'orgeo': 'http://orgeo.ru/iof-xml-extensions/3.0', } tree ...
gpl-3.0
-5,870,004,246,323,201,000
37.496454
118
0.510041
false
3.652759
false
false
false
mindw/pip
pip/index.py
1
37607
"""Routines related to PyPI, indexes""" from __future__ import absolute_import import logging import cgi from collections import namedtuple import itertools import sys import os import re import mimetypes import posixpath import warnings from pip._vendor.six.moves.urllib import parse as urllib_parse from pip._vendor....
mit
5,830,695,384,401,401,000
34.411488
79
0.551573
false
4.402599
false
false
false
maybelinot/findltr
findltr/utils.py
1
4673
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: maybelinot # @Email: edik.trott@yandex.ru # @Date: 2015-09-12 16:06:18 # @Last Modified by: maybelinot # @Last Modified time: 2015-09-12 20:14:58 from __future__ import unicode_literals, absolute_import import logging import os import subprocess import sys ...
gpl-3.0
-1,912,421,539,951,222,800
39.991228
114
0.598545
false
3.474349
false
false
false
hzlf/openbroadcast
website/djangorestframework/resources.py
1
15477
from django import forms from django.core.urlresolvers import reverse, get_urlconf, get_resolver, NoReverseMatch from django.db import models from django.db.models.query import QuerySet from django.db.models.fields.related import RelatedField from django.utils.encoding import smart_unicode from djangorestframework.res...
gpl-3.0
-5,236,262,275,512,934,000
36.841076
277
0.616528
false
4.368332
false
false
false
asttra/pysces
pysces/PyscesLink.py
1
52634
""" PySCeS - Python Simulator for Cellular Systems (http://pysces.sourceforge.net) Copyright (C) 2004-2015 B.G. Olivier, J.M. Rohwer, J.-H.S Hofmeyr all rights reserved, Brett G. Olivier (bgoli@users.sourceforge.net) Triple-J Group for Molecular Cell Physiology Stellenbosch University, South Africa. Permiss...
bsd-3-clause
621,127,197,163,312,800
36.223675
179
0.522609
false
3.787709
false
false
false
6/jcrawler
mbga_parser.py
1
5359
#-*- encoding:utf-8 -*- """ Parse MBGA data to generate statistics. """ import glob import os import re import csv import numpy from PIL import Image from datetime import datetime DATA_PATH = "data/mbga/{0}/" PERMISSIONS = { "メンバー全員": 1 # all members ,"主催者+副管理": 2 # sponsors and moderators ,"主催者のみ": 3 # sponsors ...
mit
6,223,290,673,111,375,000
30.426036
113
0.604029
false
2.939126
false
false
false
Jajcus/pyxmpp
pyxmpp/expdict.py
1
4727
# # (C) Copyright 2003-2010 Jacek Konieczny <jajcus@jajcus.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License Version # 2.1 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be u...
lgpl-2.1
7,930,685,050,958,011,000
30.939189
80
0.576476
false
4.389044
false
false
false
ucsd-ccbb/Oncolist
src/restLayer/app/TermIdentifier.py
1
36204
__author__ = 'aarongary' import sys import pymongo import requests import MyGeneInfo from itertools import islice from app.util import set_status, create_edges_index from app.status import Status from bson.json_util import dumps from models.TermResolver import TermAnalyzer import ElasticSearch import os from sklearn.l...
mit
2,962,690,134,142,557,700
28.196774
149
0.487626
false
3.239152
false
false
false
robinson96/GRAPE
vine/grapeMenu.py
1
6832
import traceback import addSubproject import bundle import branches import checkout import clone import commit import config import deleteBranch import foreach import grapeConfig import grapeGit as git import hooks import merge import mergeDevelop import mergeRemote import newFlowBranch import newWorkingTree import pu...
bsd-3-clause
-6,110,235,504,380,364,000
38.72093
139
0.584602
false
4.48294
true
false
false
gluke77/rally
rally/common/db/api.py
1
13473
# Copyright 2013: Mirantis 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.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
8,278,875,098,060,252,000
29.620455
79
0.66496
false
4.224835
false
false
false
stackforge/cloudbase-init
cloudbaseinit/plugins/common/userdataplugins/cloudconfig.py
1
4200
# Copyright 2013 Mirantis Inc. # Copyright 2014 Cloudbase Solutions Srl # # 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 # # ...
apache-2.0
6,654,339,422,640,970,000
34.294118
78
0.628095
false
4.472843
true
false
false
ctb/2014-streaming
pipeline/sam-scan-to-coverage-dict.py
1
2919
#! /usr/bin/env python import sys import argparse import screed import cPickle def ignore_at(iter): for item in iter: if item.startswith('@'): continue yield item def main(): parser = argparse.ArgumentParser() parser.add_argument('genome') parser.add_argument('samfile') ...
bsd-3-clause
-6,013,978,973,039,782,000
26.8
95
0.526208
false
3.564103
false
false
false
svanoort/python-client-benchmarks
benchmark.py
1
11059
#!/usr/bin/env python import timeit import time import string import argparse import csv import sys if sys.version_info[0] > 2: import urllib.parse as urlparse else: import urlparse # Import clients, so script fails fast if not available from pycurl import Curl try: from cStringIO import StringIO exce...
apache-2.0
8,804,450,190,701,221,000
41.698842
229
0.607288
false
3.6999
true
false
false
eeucalyptus/eeDA
app/graphics/wirerenderer.py
1
1977
from . import Renderer from data.util import Vector2i, Vector2d from .common import eeDAcolor, pMakeCircleArray, pMakeLineArray class WireRenderer(Renderer): DEPTH = 1.0 def __init__(self, wire, gl): super().__init__(gl) self.wire = wire self.callList = self._genCallList() def _g...
apache-2.0
-317,239,216,122,899,400
34.945455
89
0.654527
false
3.199029
false
false
false
andrewsosa/hackfsu_com
api/api/models/hack.py
1
3160
from django.db import models from api.models import Hackathon from api.models.judging_criteria import JudgingCriteria from api.models.judging_expo import JudgingExpo from django.contrib import admin from hackfsu_com.admin import hackfsu_admin class HackQuerySet(models.QuerySet): from api.models.judge_info import ...
apache-2.0
8,763,194,786,855,953,000
34.111111
117
0.641772
false
3.570621
false
false
false
2B5/ia-3B5
module3/syntax_processing/processing_purenltk.py
1
6358
import nltk from nltk.tokenize import sent_tokenize, word_tokenize _wordnet = nltk.corpus.wordnet from semantic_processing import semantic_processing as semantics from nltk.stem import WordNetLemmatizer class TextProcessor: def __init__(self, initial_text): self.text = initial_text def word_tag(sel...
mit
-7,640,416,701,744,384,000
33.743169
117
0.477351
false
3.907806
false
false
false
edibledinos/pwnypack
docs/conf.py
1
11416
# -*- coding: utf-8 -*- # # pwnypack documentation build configuration file, created by # sphinx-quickstart on Wed Mar 25 15:04:19 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
mit
3,611,730,147,197,216,300
30.191257
80
0.705676
false
3.626429
true
false
false
quantwizard-com/pythonbacktest
pythonbacktest/animation/ipythonchartanimation.py
1
1578
from IPython.display import display from matplotlib import animation, rc import abc class IPythonChartAnimation(object): __metaclass__ = abc.ABCMeta VIDEO_TAG = """<video controls> <source src="data:video/x-m4v;base64,{0}" type="video/mp4"> Your browser does not support the...
apache-2.0
3,753,715,281,970,296,300
26.684211
95
0.586185
false
4.457627
false
false
false
haad/ansible
test/sanity/validate-modules/main.py
1
49902
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 Matt Martz <matt@sivel.net> # Copyright (C) 2015 Rackspace US, 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...
gpl-3.0
8,874,566,115,994,565,000
35.585044
132
0.487936
false
4.688275
false
false
false
sixdub/Minions
scans/models.py
1
1839
from django.db import models from django.contrib.auth.models import User from django.core.exceptions import ValidationError import re # Create your models here. class Scan(models.Model): name=models.CharField(max_length=200,default="") hosts=models.TextField(default="") profile=models.ForeignKey("Scan_Profile", r...
gpl-2.0
-5,329,743,307,292,903,000
35.058824
118
0.703643
false
3.17069
false
false
false
kubevirt/client-python
kubevirt/models/v1_domain_spec.py
1
10040
# coding: utf-8 """ KubeVirt API This is KubeVirt API an add-on for Kubernetes. OpenAPI spec version: 1.0.0 Contact: kubevirt-dev@googlegroups.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class V1Domain...
apache-2.0
-6,167,048,185,573,170,000
25.560847
170
0.566036
false
4.286934
false
false
false
ConnectedSystems/veneer-py
veneer/navigate.py
1
2140
''' Prototype functionality for interacting with the Source model directly, including tab-completion in IPython/Jupyter. Eg v = veneer.Veneer() scenario = Queryable(v) scenario.Name = 'New Scenario Name' ''' class Queryable(object): def __init__(self,v,path='scenario',namespace=None): self._v = v ...
isc
-557,938,653,125,760,300
28.722222
119
0.550935
false
3.548922
false
false
false
pwwang/bioprocs
bioprocs/utils/shell2.py
1
1995
import sys from modkit import Modkit import cmdy DEFAULT_CONFIG = dict( default = dict(_raise = True), bedtools = dict(_prefix = '-'), biobambam = dict(_sep = '=', _prefix = ''), bowtie2 = dict(_dupkey = True), dtoxog = dict(_out = cmdy.DEVERR, _prefix = '-'), sort = dict(_sep = '', _dupkey = True),...
mit
2,583,899,961,950,900,000
28.776119
140
0.606015
false
2.604439
true
false
false
otuncelli/Xpert-Screen-Recorder
src/main.py
1
16935
# -*- coding: utf-8 -*- # ============================================================================= # Xpert Screen Recorder # Copyright (C) 2013 OSMAN TUNCELLI # # 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
-6,111,160,903,389,773,000
42.986979
180
0.584192
false
3.608203
false
false
false
jparal/loopy
loopy/io.py
1
3026
import tables as pt import numpy as np import loopy as lpy import shutil as sh # move import os.path as pth # exists def readhdf5(fname, path='/'): """ .. py:function:: writehdf5(fname, path='/') The function traverse HDF5 files and creates structured dictionary. :param fname: File name to read. ...
gpl-2.0
-3,930,732,108,166,029,000
30.195876
77
0.61236
false
3.466208
false
false
false
PeterHenell/performance-dashboard
performance-collector2/query.py
1
1713
import types class Query: """ Queries are a way for collectors to collect data. They are one way of getting data from the source. query_name - the name of the query key_column - the name of the key column in the result Does not produces anything but are a field of source. Only contain metada...
apache-2.0
7,730,568,456,058,332,000
41.825
117
0.669002
false
4.167883
false
false
false
aamlima/discobot
MPUtils.py
1
4400
import array import os from disco.voice.playable import (AbstractOpus, BasePlayable, BufferedIO, OpusEncoder, YoutubeDLInput) from disco.voice.queue import PlayableQueue from gevent.fileobject import FileObjectThread class YoutubeDLFInput(YoutubeDLInput): def read(self, sz): ...
gpl-3.0
3,910,258,917,146,183,000
33.645669
126
0.560227
false
3.859649
false
false
false
degoldschmidt/fly-analysis
src/experiment_stop.py
1
2820
""" Experiment stop (experiment_stop.py) This script takes a video and calculates the frame number of when the experiment was stopped, based on overall pixel changes. D.Goldschmidt - 09/08/16 """ import warnings warnings.filterwarnings("ignore") import numpy as np import cv2 import os import matplotlib.pyplot a...
gpl-3.0
2,363,480,963,356,214,000
27.21
142
0.63227
false
2.974684
false
false
false
Amarandus/xmppsh
plugins/ipdb.py
1
1331
import socket import sqlite3 class Plugin: def __init__(self, parser, sqlitecur): self._cursor = sqlitecur self._cursor.execute("CREATE TABLE IF NOT EXISTS IPs(Id INT, Name TEXT, IP TEXT, MUC TEXT)") parser.registerCommand([(u"ip", ), (u"list", "List all registered IPs", self._list)]) ...
mit
-3,799,865,405,480,094,000
40.59375
118
0.557476
false
3.646575
false
false
false
jpzk/evopy
evopy/examples/problems/TR/ORIDSESSVC.py
1
2168
''' This file is part of evopy. Copyright 2012, Jendrik Poloczek evopy 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. evopy is distribut...
gpl-3.0
-3,507,452,398,660,205,600
30.42029
79
0.688653
false
3.595357
false
false
false
hyperwd/hwcram
vpc/migrations/0023_auto_20170926_0016.py
1
1677
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-09-25 16:16 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('vpc', '0022_auto_20170926_0005'), ] operations = [ migrations.AlterField( ...
mit
-2,558,818,778,893,020,000
42
230
0.608638
false
2.802607
false
false
false
Lemma1/MAC-POSTS
src/setup.py
1
2581
import os import re import sys import platform import subprocess from setuptools import setup, Extension from setuptools.command.build_ext import build_ext from distutils.version import LooseVersion class CMakeExtension(Extension): def __init__(self, name, sourcedir=''): Extension.__init__(self, name, so...
mit
-3,688,370,340,519,691,000
35.871429
98
0.573809
false
3.863772
false
false
false
mishudark/indie
mongoforms/forms.py
1
4752
from mongoforms.forms import * from .fields import MongoFormFieldGeneratorCustom import types from django import forms from django.utils.datastructures import SortedDict from mongoengine.base import BaseDocument from mongoforms.fields import MongoFormFieldGenerator from mongoforms.utils import mongoengine_validate_wra...
mit
4,198,350,166,523,423,000
40.684211
88
0.616162
false
4.420465
false
false
false
TGDiamond/Diamond
qa/rpc-tests/getblocktemplate.py
1
3681
#!/usr/bin/env python # Copyright (c) 2014 The Diamond Core developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the listtransactions API from test_framework import DiamondTestFramework from diamondrpc.authpr...
mit
-8,546,662,378,669,306,000
38.159574
108
0.652268
false
4.022951
true
false
false
danianr/NINJa
joblist.py
1
1541
from collections import deque class JobList(object): def __init__(self, jobMap=None, initial=None): self.jobs = dict() self.merged= deque() if type(jobMap) is dict: for (user, prev) in jobMap.iteritems(): assert type(prev) is list self.jobs[user] = prev if ...
mit
-6,834,064,029,022,998,000
23.078125
75
0.573005
false
3.550691
false
false
false
jarhill0/ABot
memetext.py
1
6729
spork = 'hi every1 im new!!!!!!! holds up spork my name is katy but u can call me t3h PeNgU1N oF d00m!!!!!!!! lol…as ' \ 'u can see im very random!!!! thats why i came here, 2 meet random ppl like me _… im 13 years old (im mature ' \ '4 my age tho!!) i like 2 watch invader zim w/ my girlfreind (im bi if...
gpl-3.0
1,667,627,879,406,881,800
48.036036
120
0.580669
false
1.762306
false
false
false
hit9/skylark
examples/messageboard/messageboard/views.py
1
1358
# coding=utf8 from datetime import datetime from messageboard import app from messageboard.models import Message from flask import flash, render_template, request, redirect, url_for @app.route('/', methods=['GET']) def index(): query = Message.orderby( Message.create_at, desc=True).select() # sort by ...
bsd-2-clause
4,533,618,793,132,142,000
29.863636
77
0.648012
false
3.891117
false
false
false
rwl/muntjac
muntjac/demo/sampler/features/panels/PanelBasicExample.py
1
1214
from muntjac.api import VerticalLayout, Panel, Label, Button from muntjac.ui.button import IClickListener class PanelBasicExample(VerticalLayout, IClickListener): def __init__(self): super(PanelBasicExample, self).__init__() self.setSpacing(True) # Panel 1 - with caption self._...
apache-2.0
2,618,713,346,185,340,000
31.810811
69
0.625206
false
3.954397
false
false
false
intip/aldryn-bootstrap3
aldryn_bootstrap3/model_fields.py
1
8060
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from six import with_metaclass import django.core.exceptions import django.db.models import django.forms from django.utils.encoding import smart_text from . import fields class SouthMixinBase(object): south_field_class = '' def ...
bsd-3-clause
6,422,208,715,115,952,000
32.443983
166
0.6134
false
3.990099
false
false
false
alubbock/pysb-legacy
pysb/tools/render_species.py
1
4636
#!/usr/bin/env python import sys import os import re import pygraphviz import pysb.bng def run(model): pysb.bng.generate_equations(model) graph = pygraphviz.AGraph(name="%s species" % model.name, rankdir="LR", fontname='Arial') graph.edge_attr.update(fontname='Arial', fontsize=8) for si, cp in enumera...
bsd-2-clause
2,940,613,078,015,021,600
42.735849
153
0.59189
false
3.627543
false
false
false
xiangarpm/arpym_template
arpym_template/estimation/flexible_probabilities.py
1
4668
# -*- coding: utf-8 -*- """ For details, see `Section 3.1 <https://www.arpm.co/lab/redirect.php?permalink=setting-flexible-probabilities>`_. """ from collections import namedtuple import numpy as np class FlexibleProbabilities(object): """Flexible Probabilities """ def __init__(self, data): self.x...
bsd-2-clause
3,235,306,941,653,997,600
32.106383
95
0.592759
false
3.785888
false
false
false
Azulinho/sunflower-file-manager-with-tmsu-tagging-support
application/plugins/tmsu_column/plugin.py
1
1904
import gtk from plugins.file_list.plugin import Column, FileList from plugin_base.column_extension import ColumnExtension from subprocess import check_output def register_plugin(application): """Register plugin class with application""" application.register_column_extension(FileList, TagsColumn) class BaseColumn...
gpl-3.0
-4,224,020,129,806,103,600
25.816901
76
0.707458
false
3.294118
false
false
false
miquelcampos/GEAR_mc
gear/xsi/rig/component/eyelid_01/guide.py
1
7407
''' This file is part of GEAR_mc. GEAR_mc is a fork of Jeremie Passerin's GEAR project. GEAR is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at...
lgpl-3.0
-5,199,398,780,847,984,000
39.26087
164
0.509788
false
3.754181
false
false
false
esrille/replace-with-kanji-by-tutcode
mazegaki/kigou.py
1
1585
#!/usr/bin/python3 # -*- coding: utf-8 -*- # Copyright 2017 Esrille 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 requir...
apache-2.0
5,985,953,077,179,379,000
27.66
79
0.59037
false
2.479239
false
false
false
peastman/cbang
config/rpm/__init__.py
1
4971
import os import shutil from SCons.Script import * from SCons.Action import CommandAction def replace_dash(s): return s.replace('-', '_') def write_spec_text_section(f, env, name, var): if var in env: f.write('%%%s\n%s\n\n' % (name, env.get(var).strip())) def write_spec_script(f, env, name, var):...
lgpl-2.1
-2,002,260,641,959,615,500
32.816327
78
0.554416
false
3.388548
false
false
false
kaos-addict/weborf
python_cgi_weborf/cgi.py
1
8232
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Weborf Copyright (C) 2009 Salvo "LtWorf" Tomaselli Weborf is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any la...
gpl-3.0
-1,482,226,055,591,729,700
32.737705
219
0.58467
false
3.542169
false
false
false
cvsuser-chromium/chromium
chrome/common/extensions/docs/server2/caching_file_system.py
1
4951
# Copyright (c) 2012 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 posixpath import sys from file_system import FileSystem, StatInfo, FileNotFoundError from future import Future from object_store_creator import O...
bsd-3-clause
-7,957,290,888,908,834,000
37.084615
80
0.646738
false
3.861934
false
false
false
zhaochl/python-utils
tar_file_ftp/tar_file.py
1
1991
#!/usr/bin/env python # coding=utf-8 from file_util import * from pdb import * import commands import urllib2 #output = os.popen('ls') #print output.read() #print '----------------------------' #(status, output) = commands.getstatusoutput('ls') #print status, output def execute_cmd(cmd): _result={} (status, ...
apache-2.0
8,161,350,097,538,408,000
24.525641
85
0.530889
false
3.237398
false
false
false
tensorflow/profiler
plugin/tensorboard_plugin_profile/convert/trace_events_json_test.py
1
4311
# -*- coding: utf-8 -*- # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
apache-2.0
1,974,153,693,499,353,600
30.933333
80
0.429135
false
4.453512
true
false
false
dpawlows/MGITM
srcPython/gitm_3d_test.py
1
1981
#!/usr/bin/env python ''' Open a GITM 3D file adn create a plot similar to the example given by Aaron. Note that as pybats.gitm is more developed, a plot like this should be made using syntax like, >>>a=gitm.GitmBin('filename') >>>a.add_alt_slice(0, 'Rho', add_cbar=True) That's how most pybats stuff works right now. '...
mit
-5,919,587,534,596,864,000
32.576271
80
0.67996
false
2.970015
false
false
false
superfluidity/RDCL3D
code/toscaparser/elements/statefulentitytype.py
1
4045
# 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 # d...
apache-2.0
2,767,152,885,875,572,700
43.450549
78
0.616564
false
4.565463
false
false
false
lfloeer/hiprofile
lineprofile/utils.py
1
4109
import numpy as np import itertools as it def sample_prior(n_sampler, fitter, thermal_noise=0.023, thermal_noise_std=0.01): """Given a fitter object and the number of samplers, sample the prior distribution of the fit parameters for use as the initial positions for the walkers. There are two exceptio...
mit
-1,081,512,766,663,581,800
46.77907
104
0.590655
false
3.64273
false
false
false
JPinSPACE/AdventOfCode
day07/02_override_wire/solution.py
1
1717
""" Solution to the second puzzle of Day 7 on adventofcode.com """ import os PARTS = {} CACHE = {} def compute(value): """ Recursion is dumb. """ if value in CACHE: return CACHE[value] if value.isdigit(): return int(value) value = PARTS[value] if 'NOT' in value: val...
mit
4,521,620,091,914,956,300
21.298701
62
0.550379
false
3.660981
false
false
false
onshape-public/onshape-clients
python/onshape_client/oas/models/bt_translation_request_info.py
1
6823
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
mit
-7,788,842,874,007,090,000
36.081522
92
0.556793
false
4.044458
true
false
false
damoxc/ganeti
lib/opcodes.py
1
68014
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google 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...
gpl-2.0
7,356,497,005,016,279,000
30.285189
80
0.657835
false
3.517298
false
false
false
ronggong/jingjuSingingPhraseMatching
phoneticSimilarity/phonemeDurationStat.py
1
5978
''' * Copyright (C) 2017 Music Technology Group - Universitat Pompeu Fabra * * This file is part of jingjuSingingPhraseMatching * * pypYIN 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 (FSF), e...
agpl-3.0
-4,279,212,085,165,763,000
34.583333
145
0.652559
false
3.319267
false
false
false
MatKallada/nbgrader
nbgrader/tests/apps/base.py
1
1462
import os import shutil import pytest import stat from IPython.nbformat import write as write_nb from IPython.nbformat.v4 import new_notebook @pytest.mark.usefixtures("temp_cwd") class BaseTestApp(object): def _empty_notebook(self, path): nb = new_notebook() full_dest = os.path.join(os.getcwd(),...
bsd-3-clause
2,815,919,129,602,504,700
31.488889
63
0.604651
false
3.330296
false
false
false
philgyford/django-ditto
ditto/lastfm/urls.py
1
2255
from django.conf.urls import url from . import views app_name = "lastfm" # The pattern for matching an Album/Artist/Track slug: slug_chars = "[\w.,:;=@&+%()$!°’~-]+" # noqa: W605 urlpatterns = [ url(regex=r"^$", view=views.HomeView.as_view(), name="home"), url( regex=r"^library/$", view=views.Sc...
mit
1,310,448,974,129,350,100
26.802469
88
0.543961
false
3.171831
false
false
false
OpenTechFund/WebApp
opentech/apply/review/migrations/0001_initial.py
1
1068
# Generated by Django 2.0.2 on 2018-03-13 17:23 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('fund...
gpl-2.0
-8,155,020,913,151,318,000
33.451613
153
0.618914
false
4.238095
false
false
false
yinglanma/AI-project
examples/OpenAIGym/run-atari.py
1
3274
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: run-atari.py # Author: Yuxin Wu <ppwwyyxxc@gmail.com> import numpy as np import tensorflow as tf import os, sys, re, time import random import argparse import six from tensorpack import * from tensorpack.RL import * IMAGE_SIZE = (84, 84) FRAME_HISTORY = 4 CHANNEL...
apache-2.0
-3,475,211,309,922,932,000
32.070707
105
0.618815
false
3.320487
false
false
false
pydcs/dcs
dcs/coalition.py
1
13638
import sys from typing import Dict, Union, List, TYPE_CHECKING import dcs.countries as countries import dcs.unitgroup as unitgroup import dcs.planes as planes import dcs.helicopters as helicopters import dcs.ships as ships from dcs.unit import Vehicle, Static, Ship, FARP, SingleHeliPad from dcs.flyingunit import Plane,...
lgpl-3.0
-5,853,055,812,100,301,000
45.546075
122
0.510045
false
4.048085
false
false
false
compsci-hfh/app
project/project/defaults.py
1
8179
import os from django.contrib import messages SETTINGS_DIR = os.path.dirname(os.path.abspath(__file__)) PROJECT_DIR = os.path.dirname(SETTINGS_DIR) BUILDOUT_DIR = os.path.dirname(PROJECT_DIR) VAR_DIR = os.path.join(BUILDOUT_DIR, "var") ########################################################################## # # Se...
mit
8,719,486,345,774,488,000
26.354515
77
0.493948
false
4.511307
false
false
false
rudhir-upretee/Sumo17_With_Netsim
tools/build/checkSvnProps.py
1
6351
#!/usr/bin/env python """ @file checkSvnProps.py @author Michael Behrisch @date 2010 @version $Id: checkSvnProps.py 13811 2013-05-01 20:31:43Z behrisch $ Checks svn property settings for all files. SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ Copyright (C) 2010-2013 DLR (http://www.dlr....
gpl-3.0
-8,763,534,845,186,761,000
44.364286
153
0.551724
false
3.625
false
false
false
frew/simpleproto
scons-local-1.1.0/SCons/Tool/packaging/src_targz.py
1
1623
"""SCons.Tool.Packaging.targz The targz SRC packager. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation # # 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 Soft...
bsd-2-clause
757,621,664,930,149,500
42.864865
99
0.754775
false
3.836879
false
false
false
splotz90/urh
src/urh/ui/ui_signal_frame.py
1
41337
# -*- coding: utf-8 -*- # # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_SignalFrame(object): def setupUi(self, SignalFrame): SignalFrame.setObjectName("SignalFrame") SignalFrame.resize(1057, 509) sizePolicy = QtWidgets.QSizePo...
gpl-3.0
-743,312,303,342,755,300
68.472269
688
0.734614
false
3.828471
false
false
false
appsembler/roles
logstash/templates/remove_old_indices.py
1
1444
#!/usr/bin/env python import logging import sys import curator import elasticsearch import certifi HOSTS = ["{{ logstash_output_elasticsearch_hosts | join('\", \"') }}"] USERNAME = '{{ logstash_output_elasticsearch_user }}' PASSWORD = '{{ logstash_output_elasticsearch_password }}' DELETE_OLDER_THAN = {{ logstash_rem...
mit
-3,186,540,673,562,931,000
33.380952
83
0.580332
false
4.011111
false
false
false
cogitare-ai/cogitare
cogitare/data/dataholder.py
1
15342
import torch import math from abc import ABCMeta, abstractmethod from cogitare import utils from six import add_metaclass import numpy from dask import threaded, delayed, compute, multiprocessing def _identity(x): return x @add_metaclass(ABCMeta) class AbsDataHolder(object): """ An abstract object that ...
mit
-4,970,938,022,273,481,000
32.352174
120
0.584865
false
4.183801
false
false
false
Aeva/voxelpress
old_stuff/old_python_stuff/arduino/acm_firmwares/acm_kind.py
1
1717
from glob import glob from ..reprap_kind import ReprapKind class ReprapACM(ReprapKind): """Repraps which are controlled by an ACM device of some kind (usually an Arduino).""" def __init__(self, connection, firmware="Unknown", *args, **kargs): self.__serial = connection self.__buffer =...
gpl-3.0
1,986,246,930,187,726,600
32.666667
73
0.576005
false
4.25
false
false
false
Tjorriemorrie/trading
07_reinforcement/signals/sarsa.py
1
7351
''' signals by MA and RSI and Ichimoku ''' import pandas as pd import numpy as np from features import FeatureFactory import pickle from random import random, choice from pprint import pprint import time currencies = [ # 'AUDUSD', # 'EURGBP', # 'EURJPY', 'EURUSD', # 'GBPJPY', # 'GBPUSD', ...
mit
1,470,180,100,407,404,800
27.492248
134
0.513264
false
3.628332
false
false
false
TougalooCSC/CSC455Spring15Prototypes
prototype01/migrations/versions/47f6450771a6_.py
1
2742
"""empty message Revision ID: 47f6450771a6 Revises: None Create Date: 2015-04-15 16:44:40.764749 """ # revision identifiers, used by Alembic. revision = '47f6450771a6' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please adjust! ###...
gpl-3.0
7,827,077,548,879,713,000
37.619718
72
0.660832
false
3.43179
false
false
false
gitprouser/appengine-bottle-skeleton
lib/ndb/msgprop_test.py
1
17472
# # Copyright 2008 The ndb 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 applicable l...
apache-2.0
6,636,100,694,403,759,000
36.655172
80
0.651843
false
3.654466
true
false
false
akrause2014/dispel4py
dispel4py/new/mpi_process.py
1
4853
# Copyright (c) The University of Edinburgh 2014 # # 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 agr...
apache-2.0
4,039,095,439,215,027,000
36.620155
127
0.608902
false
4.071309
false
false
false
tim-shea/learnability
network_test.py
1
1160
#!/usr/bin/env python # -*- coding: utf-8 -*- from scipy.stats import binned_statistic as bin_stat from lif import * from syn import * prefs.codegen.target = 'numpy' defaultclock.dt = 1*ms params = LifParams(constant_input=3) params.update(SynParams()) neurons = LifNeurons(1000, params) excitatory_synapses = Excitato...
cc0-1.0
-6,118,570,399,146,441,000
32.142857
91
0.741379
false
2.768496
false
true
false
sumpfgottheit/arps
arps_old/restserver/views/taskresult.py
1
3216
# -*- coding: utf-8 -*- __author__ = 'saf' import logging from flask import render_template, url_for, request from flask.views import View from arps_old.models import CeleryResult from arps_old.restserver import app, redis_conn log = logging.getLogger(__name__) class TaskResultView(View): methods = ['GET', ] ...
mit
5,123,974,780,708,314,000
43.054795
160
0.598881
false
3.443255
false
false
false
twneale/rexlex
rexlex/log_config.py
1
7091
''' Establish custom log levels for rexlexer's verbose output. ''' import logging from rexlex.config import LOG_MSG_MAXWIDTH # --------------------------------------------------------------------------- # Establish custom log levels. # --------------------------------------------------------------------------- # Use...
bsd-3-clause
-7,196,659,918,402,147,000
33.42233
77
0.502468
false
3.736038
false
false
false
supermitch/mech-ai
server/game.py
1
2542
import datetime import json import logging import maps import queue import state import utils import world class GAME_STATUS(object): """ Game status constants. """ lobby = 'lobby' # In matchmaking lobby, waiting for all players playing = 'playing' # In game mode, waiting for turns complete = 'comp...
mit
-3,785,946,842,478,620,700
30.382716
93
0.606609
false
3.934985
false
false
false
rndusr/stig
stig/utils/__init__.py
1
1595
# 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 distributed in the hope that it will be useful # but...
gpl-3.0
4,341,910,219,779,885,600
34.444444
73
0.662696
false
4.346049
false
false
false
mozilla/stoneridge
srcleaner.py
1
1738
#!/usr/bin/env python # 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 logging import os import shutil import sys import time import stoneridge class StoneRidg...
mpl-2.0
-5,283,611,898,606,058,000
27.966667
78
0.581703
false
3.811404
false
false
false
codingneo/CLRPrediction
src/model/ftrl_proximal.py
1
3602
"""Follow The Regularized Leader Proximal Online Learning Author: """ from math import exp, sqrt class model(object): ''' Our main algorithm: Follow the regularized leader - proximal In short, this is an adaptive-learning-rate sparse logistic-regression with efficient L1-L2-regularizati...
apache-2.0
8,417,160,105,458,115,000
25.688889
79
0.493615
false
4.020089
false
false
false
nerdvegas/rez
src/rezgui/widgets/VariantSummaryWidget.py
1
4520
from Qt import QtCompat, QtCore, QtWidgets from rezgui.util import create_pane, get_timestamp_str from rez.packages import Package, Variant from rez.util import find_last_sublist class VariantSummaryWidget(QtWidgets.QWidget): def __init__(self, parent=None): super(VariantSummaryWidget, self).__init__(pare...
lgpl-3.0
-3,228,950,963,447,475,000
37.632479
85
0.589159
false
4.329502
false
false
false
innes213/TradingTools
examples/dashboard.py
1
2782
from pyhoofinance.defs import * from pyhoofinance.quotedata import get_quote from tradingtools.market_metrics.historic_change_and_stdv import s_and_p_historic from tradingtools.market_metrics.market_cap_index_performance import market_cap_index_performance from tradingtools.market_metrics.sector_performance import sec...
bsd-2-clause
7,186,727,864,974,381,000
39.318841
97
0.593817
false
3.269095
false
false
false
googleapis/googleapis-gen
google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/services/types/shared_criterion_service.py
1
5893
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-4,445,974,067,140,955,000
32.674286
128
0.665535
false
4.261027
false
false
false
Winand/pandas
pandas/core/internals.py
1
186942
import copy from warnings import catch_warnings import itertools import re import operator from datetime import datetime, timedelta, date from collections import defaultdict from functools import partial import numpy as np from pandas.core.base import PandasObject from pandas.core.dtypes.dtypes import ( Extensio...
bsd-3-clause
4,438,622,254,422,599,700
32.88472
79
0.539857
false
4.2034
false
false
false
MSLNZ/msl-equipment
msl/examples/equipment/energetiq/eq99.py
1
1074
""" Example showing how to communicate with an EQ-99 Manager from Energetiq. """ import time from msl.equipment import ( EquipmentRecord, ConnectionRecord, Backend, ) record = EquipmentRecord( manufacturer='Energetiq', model='EQ-99', connection=ConnectionRecord( address='COM6', # upda...
mit
-7,131,231,820,671,970,000
21.851064
89
0.676909
false
3.215569
false
false
false
btjhjeon/ConversationalQA
skipthoughts/decoding/train.py
2
7706
""" Main trainer function """ import theano import theano.tensor as tensor import cPickle as pkl import numpy import copy import os import warnings import sys import time import homogeneous_data from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams from collections import defaultdict from utils imp...
mit
-6,543,742,380,335,079,000
31.242678
133
0.536854
false
3.773751
false
false
false
sljrobin/dotfiles
dzen2/.dzen2/scripts/Music.py
1
6137
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Filename: Music.py # Description: Functions for Music # Author: Simon L. J. Robin | https://sljrobin.org # Created: 2016-09-11 22:50:11 # Modified: 2016-09-25 23:50:25 # #################################################################...
gpl-2.0
-8,595,044,930,207,759,000
36.193939
80
0.473032
false
4.053501
false
false
false
migasfree/migasfree
setup.py
1
6056
# -*- coding: UTF-8 -*- # Copyright (c) 2011-2020 Jose Antonio Chavarría <jachavar@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
gpl-3.0
-6,168,221,606,599,370,000
32.076503
81
0.577895
false
3.843175
false
false
false
ganga-devs/ganga
ganga/GangaCore/Utility/execute.py
1
13130
import os import base64 import subprocess import threading import pickle as pickle import signal from copy import deepcopy from GangaCore.Core.exceptions import GangaException from GangaCore.Utility.logging import getLogger logger = getLogger() def bytes2string(obj): if isinstance(obj, bytes): return obj....
gpl-2.0
-4,757,166,225,924,737,000
42.190789
144
0.640823
false
4.168254
false
false
false
valmynd/MediaFetcher
src/plugins/youtube_dl/youtube_dl/extractor/hitbox.py
1
5692
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( clean_html, parse_iso8601, float_or_none, int_or_none, compat_str, determine_ext, ) class HitboxIE(InfoExtractor): IE_NAME = 'hitbox' _VALID_URL = r'https?://(?:www\.)?(?:hitbox|smashcas...
gpl-3.0
-2,053,292,684,659,356,200
25.598131
102
0.608046
false
2.767137
true
false
false
RedFantom/GSF-Parser
frames/strategies.py
1
14275
""" Author: RedFantom Contributors: Daethyra (Naiii) and Sprigellania (Zarainia) License: GNU GPLv3 as in LICENSE Copyright (C) 2016-2018 RedFantom """ # Standard Library from ast import literal_eval import sys # UI Libraries import tkinter as tk from tkinter import ttk from tkinter import messagebox # Project Modules ...
gpl-3.0
-627,416,942,596,403,500
44.31746
120
0.605044
false
4.418137
false
false
false
intip/aldryn-bootstrap3
aldryn_bootstrap3/south_migrations/0022_auto__add_field_boostrap3alertplugin_icon.py
1
25863
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Boostrap3AlertPlugin.icon' db.add_column(u'aldryn_bootstr...
bsd-3-clause
-6,558,731,824,654,015,000
92.710145
196
0.556819
false
3.465032
false
false
false
domanova/highres-cortex
bin/od_column-regionsMain.py
1
18809
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Copyright CEA (2014). # Copyright Université Paris XI (2014). # # Contributor: Olga Domanova <olga.domanova@cea.fr>. # # This file is part of highres-cortex, a collection of software designed # to process high-resolution magnetic resonance images of the cerebral # cort...
gpl-3.0
-1,059,299,137,137,612,500
50.103261
461
0.718281
false
2.953667
false
false
false
demisto/content
Packs/ApiModules/Scripts/MicrosoftApiModule/MicrosoftApiModule.py
1
23628
import traceback import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * import requests import re import base64 from cryptography.hazmat.primitives.ciphers.aead import AESGCM from typing import Dict, Tuple, List, Optional class Scopes: graph = 'https://graph.microsoft...
mit
5,221,532,628,645,901,000
40.163763
119
0.577874
false
4.367468
false
false
false
kopringo/Scarky2
Scarky2/builder/models.py
1
3520
#-*- coding: utf-8 -*- from django.db import models, IntegrityError from django.contrib.auth.models import User #from sphere_engine import ProblemsClientV3 from django.conf import settings from django.utils import timezone import json import uuid import code from logging import Logger logger = Logger(__file__) # ...
mit
6,629,684,123,329,770,000
29.608696
64
0.618466
false
4.0553
false
false
false
krishnatray/data_science_project_portfolio
galvanize/TechnicalExcercise/q1.py
1
2695
# Q1 Technical Challenge # Author: Sushil K Sharma # ----------------------- """ Problem Statement: Create a text content analyzer. This is a tool used by writers to find statistics such as word and sentence count on essays or articles they are writing. Write a Python program that analyzes input from a file and co...
mit
-2,832,477,704,902,959,000
33.460526
239
0.589239
false
4.064857
false
false
false
maltsev/LatexWebOffice
app/views/auth.py
1
8497
# -*- coding: utf-8 -*- """ * Purpose : managing user account registration and login * Creation Date : 22-10-2014 * Last Modified : Mo 02 Mär 2015 15:23:28 CET * Author : maltsev * Coauthors : mattis, christian * Sprintnumber : 1 * Backlog entry : RUA1, RUA4 """ import re import urllib import datetime from d...
gpl-3.0
1,439,265,107,998,456,800
35.286325
163
0.641032
false
3.923752
false
false
false
ContinuumIO/dask
dask/array/random.py
2
19970
import numbers import warnings from itertools import product from numbers import Integral from operator import getitem import numpy as np from .core import ( normalize_chunks, Array, slices_from_chunks, asarray, broadcast_shapes, broadcast_to, ) from .creation import arange from ..base import ...
bsd-3-clause
2,665,391,172,766,181,000
37.330134
92
0.595143
false
3.77077
false
false
false
odahoda/noisicaa
noisicaa/builtin_nodes/sample_track/node_description.py
1
1608
#!/usr/bin/python3 # @begin:license # # Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at y...
gpl-2.0
120,325,731,447,951,020
31.816327
73
0.688433
false
3.893462
false
false
false
SqueezeStudioAnimation/omtk
python/omtk/modules/rigLimb.py
1
14788
import pymel.core as pymel import collections from omtk import constants from omtk.core.classModule import Module from omtk.core.classCtrl import BaseCtrl from omtk.core.utils import decorator_uiexpose from omtk.modules import rigIK from omtk.modules import rigFK from omtk.modules import rigTwistbone from omtk.libs imp...
mit
-8,440,778,741,539,320,000
43.275449
120
0.632675
false
3.383208
false
false
false