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
pgierz/semic
netcdf_interface/echam6_calculate_air_density.py
1
1919
#!/usr/bin/env python """ Calculates the density of air baed upon the Ideal Gas Law and the Magnus Equation """ import argparse import numpy as np from scipy.io import netcdf import math import os def calculate_density(pressure, temperature, relative_humidity): Rl = 287.058 # R for luft (dry air), ...
mit
2,043,884,311,162,926,800
40.717391
137
0.655029
false
3.193012
false
false
false
TD22057/T-Home
python/tHome/broker/connect.py
1
1264
#=========================================================================== # # Broker connection # #=========================================================================== from . import config import paho.mqtt.client as mqtt #=========================================================================== class Clien...
bsd-2-clause
-1,453,303,299,164,701,700
27.727273
76
0.432753
false
4.630037
false
false
false
notconfusing/ddc_graph
ddc_graph.py
1
8813
# In[165]: import xml.etree.ElementTree as ET from collections import defaultdict import networkx as nx import matplotlib.pyplot as plt import pyddc import operator import math get_ipython().magic(u'pylab inline') # Out[165]: # Populating the interactive namespace from numpy and matplotlib # # We will be loo...
mit
6,523,096,059,266,003,000
25.229167
167
0.52275
false
2.947492
false
false
false
zz1217/exchange_rate_scraper
exchange_rate_scraper/pipelines.py
1
7332
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html from datetime import datetime from exchange_rate_scraper import settings from scrapy.exceptions import DropItem from twisted.en...
mit
8,735,536,536,062,566,000
38.9
152
0.546784
false
3.496592
false
false
false
ktmrmshk/Dresp
dresp/imgen.py
1
1692
from PIL import Image, ImageDraw, ImageFont import os def imgen(size, fmt='jpg', outdir='./'): outfile='{}x{}.{}'.format(size[0], size[1], fmt) img = Image.new('RGB', size, (210,210,210)) d=ImageDraw.Draw(img) d.text((0,0), outfile, (0,0,0)) img.save(os.path.join(outdir,outfile)) def imgen_echo(tx...
apache-2.0
-2,803,733,037,499,778,000
53.580645
810
0.648345
false
2.525373
false
false
false
Yobretaw/ChromeCacheExtractor
src/manager.py
1
2438
import sys import os import urllib import uuid import hashlib from Util import * from addr import * from index import * from block import * from entrystore import * from dump_cache import * class CacheManager(object): def __init__(self, fromDir=None, toDir=None): self.fromDir = fromDir self.toDir...
mit
-5,627,600,396,760,570,000
32.39726
93
0.604184
false
3.569546
false
false
false
katajakasa/utuputki2-client
utuclient/player.py
1
3016
# -*- coding: utf-8 -*- from gi.repository import GObject as gobject, Gst as gst, Gtk as gtk, GdkX11, GstVideo import platform import logging log = logging.getLogger(__name__) class Player(object): VIDEO = 0 IMAGE = 1 def __init__(self, window, url, cb_finish, cb_error, mode=VIDEO): self.window...
mit
-3,054,547,162,323,551,000
29.77551
91
0.587865
false
3.638118
false
false
false
bartsidee/bartsidee-boxee
repo/hulu/hulu.py
1
6855
from default import * from library import * import tools sys.path.append(os.path.join(CWD, 'external')) from BeautifulSoup import BeautifulSoup from urllib import quote_plus try: import simplejson as json except: import json import math class Module(BARTSIDEE_MODULE): def __init__(self, app): self.ap...
gpl-3.0
6,666,448,503,530,564,000
49.036496
405
0.566302
false
3.48855
false
false
false
cmacmackin/isoft
plotting/layers.py
1
1656
# # layers.py # This file is part of ISOFT. # # Copyright 2018 Chris MacMackin <cmacmackin@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,...
gpl-3.0
8,813,709,389,383,055,000
35
79
0.689614
false
3.298805
false
false
false
OCA/account-analytic
analytic_tag_dimension_enhanced/models/analytic.py
1
6808
# Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html) from odoo import models, api, fields, _ from odoo.exceptions import ValidationError class AccountAnalyticDimension(models.Model): _inherit = 'account.analytic.dimension' ref_model_i...
agpl-3.0
-2,963,247,440,782,647,300
42.641026
79
0.594301
false
4.093806
false
false
false
digwanderlust/pants
src/python/pants/backend/jvm/tasks/scalastyle.py
1
6152
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import re ...
apache-2.0
5,968,127,118,785,450,000
36.975309
98
0.677503
false
3.852223
true
false
false
wernwa/lwfa-las-cli-log
PV_CONN.py
1
1648
import sys sys.path.insert(0, './') import epics import time #from epics_device import PowerSupply #from physics_device import Magnet #import json import thread class PV_CONN(epics.PV): def __init__(self, *args, **kwargs): super(PV_CONN, self).__init__(*args, **kwargs) self.conn=False self...
gpl-3.0
6,725,211,146,869,991,000
24.75
90
0.546117
false
3.256917
false
false
false
MilkywayPwns/infprj2
infprj2/mainmenu.py
1
2308
# Main menu python file import pygame import translate import database import options import packetevent # Import button lib import button def update(game): pass def init(game): pass def loadgame(game): game.players.clear() res = database.execute_query("SELECT * FROM savegames ORDER BY id DESC") ...
mit
8,542,439,063,819,060,000
53.97619
193
0.623917
false
2.728132
false
false
false
kubeflow/kfp-tekton-backend
components/aws/sagemaker/workteam/src/workteam.py
1
2275
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
apache-2.0
-4,135,020,320,136,825,300
46.395833
191
0.736703
false
3.836425
false
false
false
spaceninja/mltshp
models/conversation.py
1
2988
from lib.flyingcow import Model, Property from datetime import datetime from tornado.options import options import comment import sharedfile class Conversation(Model): user_id = Property() sharedfile_id= Property() muted = Property(default=0) created_at = Property() updated_at = P...
mpl-2.0
5,072,496,939,587,368,000
34.152941
94
0.583668
false
3.94716
false
false
false
n-west/gnuradio
gr-uhd/apps/uhd_app.py
1
15414
#!/usr/bin/env python # # Copyright 2015-2016 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your optio...
gpl-3.0
-5,175,482,330,298,451,000
42.91453
161
0.557675
false
3.69729
false
false
false
Sumith1896/sympy
sympy/solvers/pde.py
1
35549
""" This module contains pdsolve() and different helper functions that it uses. It is heavily inspired by the ode module and hence the basic infrastructure remains the same. **Functions in this module** These are the user functions in this module: - pdsolve() - Solves PDE's - classify_pde() - Classif...
bsd-3-clause
-8,731,429,320,929,213,000
34.62024
133
0.541703
false
3.634495
false
false
false
jupyterhub/oauthenticator
oauthenticator/globus.py
1
10431
""" Custom Authenticator to use Globus OAuth2 with JupyterHub """ import base64 import os import pickle import urllib from jupyterhub.auth import LocalAuthenticator from tornado.httpclient import HTTPRequest from tornado.web import HTTPError from traitlets import Bool from traitlets import default from traitlets impor...
bsd-3-clause
4,859,216,885,162,764,000
38.214286
103
0.627936
false
4.132726
false
false
false
aisthesis/opttrack
opttrack/lib/quoteextractor.py
1
2198
""" .. Copyright (c) 2016 Marshall Farrier license http://opensource.org/licenses/MIT Extract specific quotes from a comprehensive DataFrame Example entry: { 'Underlying': 'NFLX', 'Strike': 100.0, 'Expiry': datetime.datetime(2016, 3, 18, 23, 0, tzinfo=<bson.tz_util.FixedOffset object at 0x10c4860b8...
mit
-8,155,537,419,479,421,000
31.80597
112
0.575523
false
3.505582
false
false
false
CIRCL/bgpranking-redis-api
example/export/day_ips/consumer.py
1
1090
#!/usr/bin/python # -*- coding: utf-8 -*- import redis import bgpranking import argparse if __name__ == '__main__': parser = argparse.ArgumentParser(description='Prepare the information to dump.') parser.add_argument('-f', '--full', action="store_true", default=False, help='Do a full dump (asn, b...
bsd-2-clause
404,525,801,695,069,440
31.058824
84
0.547706
false
3.538961
false
false
false
ndexbio/ndex-enrich
network_gene_analyzer.py
1
4628
__author__ = 'dexter' import requests from bson.json_util import dumps class NetworkGeneAnalyzer: def __init__(self, network_id, ndex): self.ndex = ndex self.network = self.ndex.get_complete_network(network_id) self.identifiers = [] self.node_map = self.network.get("nodes") ...
bsd-2-clause
-3,326,323,250,897,176,000
38.896552
95
0.536949
false
4
false
false
false
crashfrog/Dispatch
spades_careful_assembler.py
1
4808
#!/usr/bin/env python import subprocess import tempfile import shutil import os import re import fasta_statter """ Assembly Dispatch bindings for SPAdes Single-Cell assembler (Bankevitch et al, J Comput Biol, 2012), a de Brujin graph assembler for paired-end single-cell sequencing. Trying something new here...
unlicense
-3,152,752,227,748,538,000
29.436709
161
0.677829
false
2.905136
false
false
false
LeBarbouze/tunacell
tunacell/base/cell.py
1
15188
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ This module defines how cells are stored as tunacell's objects """ from __future__ import print_function import numpy as np import warnings import treelib as tlib from tunacell.base.observable import Observable, FunctionalObservable from tunacell.base.datatools impo...
mit
1,801,948,970,167,984,400
36.046341
97
0.55906
false
4.379469
false
false
false
vjousse/viserlalune
blogebook/templatetags/blog_epub.py
1
1532
from django import template from ebooklib import epub register = template.Library() def posts_epub_link(posts): book = epub.EpubBook() # add metadata book.set_title('Articles de Vincent Jousse') book.set_language('fr') book.add_author('Vincent Jousse') for post in posts: print pos...
mit
8,783,613,191,321,780,000
19.426667
118
0.619452
false
2.901515
false
false
false
springload/madewithwagtail
core/migrations/0006_wagtail_1_6_upgrade.py
1
1067
# -*- coding: utf-8 -*- from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0005_auto_20161004_1431'), ] operations = [ migrations.AlterField( model_name='submitformfield', name='choices', field=...
mit
5,708,785,225,295,185,000
35.793103
205
0.626054
false
4.268
false
false
false
fablab-ka/labtags
blot-gateway/tagscanner.py
1
2414
import threading, time, traceback from bluepy import btle from tag import Tag from messages import DiscoverTagMessage, GWStartupMessage, GWShutdownMessage from utils import ANSI_RED, ANSI_OFF class TagScanner: def __init__(self): #btle.Debugging = True self.timeout = 4 self.hci = 0 ...
mit
-2,211,310,556,143,237,000
30.763158
127
0.584093
false
3.652042
false
false
false
AEDA-Solutions/matweb
backend/Models/Curso/PedidoEditar.py
1
1688
from Framework.Pedido import Pedido from Framework.ErroNoHTTP import ErroNoHTTP class PedidoEditar(Pedido): def __init__(self,variaveis_do_ambiente): super(PedidoEditar, self).__init__(variaveis_do_ambiente) try: self.id = self.corpo['id'] self.nome = self.corpo['nome'] self.codigo = self.corpo['...
mit
2,563,948,748,711,751,700
23.114286
87
0.709716
false
2.486009
false
false
false
Mihai925/EduCoding
LandingPage/migrations/0001_initial.py
1
1234
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Feature', fields=[ ('id', models.AutoField(verb...
mit
7,593,169,094,580,280,000
33.277778
114
0.546191
false
4.553506
false
false
false
EricssonResearch/calvin-base
calvin/actorstore/systemactors/sensor/Accelerometer.py
1
1566
# -*- coding: utf-8 -*- # Copyright (c) 2015 Ericsson AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
apache-2.0
3,497,507,540,760,737,300
31.625
90
0.666667
false
3.693396
false
false
false
SylvainTakerkart/vobi_one
examples/scripts_ui_reproducibility/script1_lm_tbin1_sbin2_estimatedtaufh02_alldata_script.py
1
5108
# Author: Flavien Garcia <flavien.garcia@free.fr> # Sylvain Takerkart <Sylvain.Takerkart@incm.cnrs-mrs.fr> # License: BSD Style. """ Description ----------- This script processes the oidata functions on some selected raw files. The process is decomposed in 2 steps : 1. Model construction from a parameter file...
gpl-3.0
7,174,634,605,701,501,000
39.539683
148
0.618637
false
3.846386
false
false
false
peterjanes/dosage
dosagelib/plugins/v.py
1
3147
# -*- coding: utf-8 -*- # Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012-2014 Bastian Kleineidam # Copyright (C) 2015-2020 Tobias Gruetzmacher # Copyright (C) 2019-2020 Daniel Ring from __future__ import absolute_import, division, print_function from re import compile from ..scrape...
mit
-6,427,210,326,709,256,000
32.478723
74
0.616142
false
2.927442
false
false
false
robwarm/gpaw-symm
doc/install/Linux/Niflheim/el6-x3455-tm-gfortran-openmpi-1.6.3-openblaso-0.2.8.1-sl-hdf5-1.8.10.py
1
1993
nodetype = 'x3455' scalapack = True compiler = 'gcc' libraries =[ 'gfortran', 'scalapack', 'mpiblacs', 'mpiblacsCinit', 'openblaso', 'hdf5', 'xc', 'mpi', 'mpi_f77', ] library_dirs =[ '/home/opt/el6/' + nodetype + '/openmpi-1.6.3-' + nodetype + '-tm-gfortran-1/lib', '/home...
gpl-3.0
-1,347,084,126,252,147,700
46.452381
120
0.594581
false
2.322844
false
true
false
emillynge/python-remoteexecution
remoteexecution/ClientSide.py
1
16737
from __future__ import (absolute_import, print_function, unicode_literals, division) __author__ = 'emil' from .ServerSide import (Manager) from .Utils import (InvalidUserInput, DummyLogger, RemoteExecutionLogger, WrappedProxy, Commandline) from .Environments import (communication_environment, execution_environment, E...
gpl-3.0
26,321,684,994,956,988
40.12285
119
0.602378
false
4.039826
false
false
false
googleapis/python-error-reporting
noxfile.py
1
7022
# -*- coding: utf-8 -*- # # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
7,949,801,994,964,826,000
29.137339
87
0.615494
false
3.562659
true
false
false
fishroot/nemoa
nemoa/core/log.py
1
10996
# -*- coding: utf-8 -*- """Logging. This module implements application global logging as a singleton, using the standard library module :py:mod:`logging`. """ __author__ = 'Patrick Michl' __email__ = 'frootlab@gmail.com' __license__ = 'GPLv3' __docformat__ = 'google' import contextlib import importlib import logging...
gpl-3.0
3,190,552,447,722,214,400
34.934641
80
0.613405
false
4.195345
false
false
false
asphalt-framework/asphalt-serialization
asphalt/serialization/serializers/pickle.py
1
1051
import pickle from typeguard import check_argument_types from asphalt.serialization.api import Serializer class PickleSerializer(Serializer): """ Serializes objects using the standard library :mod:`pickle` module. .. warning:: This serializer is insecure because it allows execution of arbitrary code wh...
apache-2.0
4,584,835,908,628,564,500
29.028571
95
0.686013
false
4.530172
false
false
false
birocorneliu/conference
lib/models.py
1
4402
#!/usr/bin/env python import httplib import endpoints from protorpc import messages, message_types class ConflictException(endpoints.ServiceException): """ConflictException -- exception mapped to HTTP 409 response""" http_status = httplib.CONFLICT class ProfileMiniForm(messages.Message): """ProfileMini...
apache-2.0
3,235,851,515,250,221,600
29.150685
83
0.738528
false
3.841187
false
false
false
delvelabs/htcap
core/lib/utils.py
1
4855
# -*- coding: utf-8 -*- """ HTCAP - beta 1 Author: filippo.cavallarin@wearesegment.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 2 of the License, or (at your option) any lat...
gpl-2.0
4,454,553,416,637,650,000
25.102151
114
0.584552
false
3.175278
false
false
false
alsrgv/tensorflow
tensorflow/api_template_v1.__init__.py
1
5523
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
596,411,541,189,452,400
37.354167
96
0.713924
false
3.731757
false
false
false
ricargoes/JobsManager
src/jobs_manager_app/views/comment.py
1
2655
from django.shortcuts import get_object_or_404 from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.contrib import messages from django.contrib.auth.decorators import login_required from django.utils.translation import ugettext as _ from jobs_manager_app.models import As...
gpl-3.0
-4,712,337,298,761,757,000
32.607595
68
0.613183
false
4.538462
false
false
false
opencord/maas
library/maas_cluster.py
1
6176
#!/usr/bin/python # Copyright 2017-present Open Networking Foundation # # 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 ap...
apache-2.0
4,946,366,303,136,578,000
29.574257
111
0.64022
false
3.698204
false
false
false
eidonfiloi/SparseRecurrentNetwork
utils/Loss.py
1
1144
import numpy as np from math import sqrt from Activations import * __author__ = 'ptoth' class Loss(object): @staticmethod def delta(pred, target, loss_function="MSE"): if loss_function == "MSE": return pred - target elif loss_function == "CROSS_ENTROPY": return -1.0 *...
mit
-7,122,047,285,950,316,000
30.777778
110
0.609266
false
3.738562
false
false
false
vmendez/DIRAC
ResourceStatusSystem/Command/DowntimeCommand.py
1
13233
''' DowntimeCommand module ''' import urllib2 from datetime import datetime, timedelta from operator import itemgetter from DIRAC import S_OK, S_ERROR from DIRAC.Core.LCG.GOCDBClient import GOCDBClient from DIRAC.Core.Utilities.Site...
gpl-3.0
-503,473,693,373,577,900
33.823684
133
0.591022
false
3.890914
false
false
false
emcrispim/ZenPacks.community.IBMV7000
ZenPacks/community/IBMV7000/modeler/plugins/community/cmd/IBMV7000.py
1
5460
########################################################################## # Author: Eduardo Crispim, emcrispim@gmail.com # Date: September, 2015 # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 or (a...
gpl-2.0
-9,215,083,200,464,568,000
34
140
0.561905
false
3.568627
false
false
false
riramar/agentoo
src/scripts/metalib.py
1
4445
import sys,getopt,re sys.path.insert(0, "/usr/lib/portage/pym") import portage,portage_const,portage_dep # TODO: use new names from trunk isvalidatom = portage.isvalidatom catpkgsplit = portage.catpkgsplit catsplit = portage.catsplit dep_getcpv = portage.dep_getcpv dep_getkey = portage.dep_getkey EXIT_SUCCESS = 0 EXI...
gpl-2.0
6,939,227,778,235,233,000
31.683824
180
0.655793
false
2.854849
false
false
false
hehewa/pytorchStudy
methods_exist/GAN/DC_GAN.py
1
10158
from __future__ import print_function import argparse import os import random import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim import torch.utils.data import torchvision.datasets as dset import torchvision.transforms as transforms import torchv...
apache-2.0
7,907,634,458,206,274,000
37.048689
113
0.569896
false
3.257858
false
false
false
pdiefend/LuxClock
PythonTesting/WU.py
1
1820
import urllib.request import json from datetime import date, timedelta import passwords class WU: #data = {} key = passwords.WU_KEY #city = 'Lewisburg' def __init__(self, city): self.city = city #self.refresh() def refresh(self): f = urllib.request.urlopen('http://api.wund...
mit
7,859,343,986,422,154,000
31.5
143
0.560989
false
3.632735
false
false
false
AutorestCI/azure-sdk-for-python
azure-mgmt-batchai/azure/mgmt/batchai/models/key_vault_key_reference.py
1
1234
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-8,678,763,981,094,782,000
32.351351
76
0.573744
false
4.14094
false
false
false
rfyiamcool/ProcessHandler
ProcessHandler/lib/workers/coroutine_worker.py
1
3649
#coding=utf-8 """ # Simple leader/follower implemention base on gevent """ import os import errno import select import socket import traceback import threading import gevent from gevent import getcurrent from gevent.pool import Pool from ProcessHandler.lib.workers.base import Worker from ProcessHandler.lib.utils impo...
mit
4,055,702,269,246,563,300
32.787037
170
0.514113
false
4.184633
false
false
false
emembrives/votes-assemblee
votes/votes_14e/votes_14e/settings.py
1
3012
# -*- coding: utf-8 -*- # Scrapy settings for votes_14e project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/topics/settings.html # http://scrapy.readthedocs.org/en/late...
apache-2.0
2,318,894,013,516,658,000
34.435294
109
0.771912
false
3.270358
true
false
false
auto-mat/klub
apps/events/migrations/0001_initial.py
1
5741
# Generated by Django 2.2.18 on 2021-02-11 12:07 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('aklub', "0094_auto_20210211_1251") ] operations = [ migrations.CreateModel( n...
gpl-3.0
391,248,698,138,074,700
70.7625
310
0.624281
false
4.166183
false
false
false
VoigtLab/dnaplotlib
gallery/xnor_truthtable/xnor_truthtable.py
1
10195
#!/usr/bin/env python """ Annotation of standard bar chart with genetic constructs """ import dnaplotlib as dpl from pylab import * import matplotlib.pyplot as plt __author__ = 'Bryan Der <bder@mit.edu>, Voigt Lab, MIT\n\ Thomas Gorochowski <tom@chofski.co.uk>, Voigt Lab, MIT' __license__ = 'MIT'...
mit
-53,522,502,569,169,220
55.016484
253
0.606081
false
2.338303
false
false
false
mgracer48/panda3d
direct/src/gui/DirectButton.py
1
5382
"""Undocumented Module""" __all__ = ['DirectButton'] from panda3d.core import * import DirectGuiGlobals as DGG from DirectFrame import * class DirectButton(DirectFrame): """ DirectButton(parent) - Create a DirectGuiWidget which responds to mouse clicks and execute a callback function if defined """ ...
bsd-3-clause
-7,762,228,566,845,184,000
41.714286
84
0.602007
false
4.016418
false
false
false
schriftgestalt/Mekka-Scripts
Masters/Insert Brace Layers for Movement along Background Path.py
1
4232
#MenuTitle: Insert Brace Layers for Movement along Background Path # -*- coding: utf-8 -*- __doc__=""" Add a single path in the background and it will be used to create intermediate brace layers for OTVar animation. """ import math thisFont = Glyphs.font # frontmost font selectedLayers = thisFont.selectedLayers # acti...
apache-2.0
7,462,917,319,631,616,000
31.305344
112
0.712193
false
2.947075
false
false
false
bovee/Ochre
ochre/SeqList.py
1
8140
import os import io import itertools import types from ochre.Sequence import Seq class SeqList(object): """ A Python object that represents a collection of sequences. The underlying storage can be in a file (through the subclass FileSeqList) or in a list of Seq objects. """ def __new__(cls, sq...
gpl-3.0
1,595,786,868,389,928,000
35.017699
87
0.527641
false
3.988241
false
false
false
leonard-wei/hashcalclib
examples/cli/fileinfo.py
1
8012
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # python version: 2.7.5 final, serial: 0 import argparse import os import signal import sys import traceback import warnings from hashcalclib import __version__, __author__, __date__ from hashcalclib.hashcalclib import FileInfo, Error from hashcalclib....
gpl-2.0
-6,471,931,450,748,137,000
41.617021
79
0.562656
false
4.155602
false
false
false
svohara/pyvision3
examples/image_tools.py
1
2565
""" Demonstration of using some of the pyvision tools to draw polygons on an image and record the shapes, to crop tiles around the polygons, and use a tile selector to "QA" the tiles. """ import pyvision3 as pv3 import random def demo(): print("=================================================================") ...
mit
-4,142,060,338,626,541,600
40.370968
82
0.516179
false
4.384615
false
false
false
screwgoth/JugheadBot
hotels/views.py
1
7332
import os from time import sleep from django.shortcuts import render from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework import status import requests import json from hotels.zomat import Zomat from hotels.fb import FB from hotels.models import Postbacks @api...
mit
732,772,553,251,269,400
46
172
0.606519
false
3.514861
false
false
false
feliposz/project-euler-solutions
python/euler49.py
1
1801
"""Problem 49 01 August 2003 The arithmetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330, is unusual in two ways: (i) each of the three terms are prime, and, (ii) each of the 4-digit numbers are permutations of one another. There are no arithmetic sequences made up of three 1-, 2-, or 3-di...
mit
-201,685,581,383,253,950
35.755102
80
0.616324
false
4.102506
false
false
false
Warbo/pubsubclient
simplexml.py
1
18166
## simplexml.py based on Mattew Allum's xmlstream.py ## ## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, or (...
agpl-3.0
-8,664,092,125,188,591,000
41.643192
140
0.689145
false
3.279653
false
false
false
shtrix/onecloud
setup.py
1
1299
import os from setuptools import setup, find_packages README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='onecloud', version=__import__('onecloud').__ve...
apache-2.0
-3,422,867,163,080,515,600
34.108108
78
0.634334
false
4.15016
false
false
false
pattisdr/osf.io
api/wb/views.py
1
3327
from rest_framework import status from rest_framework.exceptions import ValidationError, NotFound from rest_framework.response import Response from osf.models import Guid from rest_framework.views import APIView from addons.osfstorage.models import OsfStorageFileNode, OsfStorageFolder from api.base.parsers import HMAC...
apache-2.0
6,883,124,269,113,158,000
35.163043
100
0.672678
false
4.238217
false
false
false
ryanvolz/echolect
setup.py
1
5069
#!/usr/bin/env python #----------------------------------------------------------------------------- # Copyright (c) 2014, Ryan Volz # All rights reserved. # # Distributed under the terms of the BSD 3-Clause ("BSD New") license. # # The full license is in the LICENSE file, distributed with this software. #------------...
bsd-3-clause
1,452,184,833,308,918,000
31.082278
93
0.58118
false
4.259664
false
false
false
segfaulthunter/asynchia
asynchia/__init__.py
1
26749
# -*- coding: us-ascii -*- # asynchia - asynchronous networking library # Copyright (C) 2009 Florian Mayer <florian.mayer@bitsrc.org> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, eit...
gpl-3.0
-4,548,244,529,212,517,000
32.688917
80
0.579984
false
4.430843
false
false
false
collinstocks/eventlet
tests/zmq_test.py
1
17237
try: from eventlet.green import zmq except ImportError: zmq = {} # for systems lacking zmq, skips tests instead of barfing else: RECV_ON_CLOSED_SOCKET_ERRNOS = (zmq.ENOTSUP, zmq.ENOTSOCK) import eventlet from eventlet import event, spawn, sleep, semaphore import tests def zmq_supported(_): try: ...
mit
-5,292,373,531,252,481,000
29.293497
89
0.531183
false
3.617419
true
false
false
dmytroKarataiev/MachineLearning
learning/algorithms/perceptron/sigmoid.py
1
2049
# # As with the perceptron exercise, you will modify the # last functions of this sigmoid unit class # # There are two functions for you to finish: # First, in activate(), write the sigmoid activation function # # Second, in train(), write the gradient descent update rule # # NOTE: the following exercises c...
mit
6,311,634,060,408,027,000
31.539683
72
0.661786
false
4.065476
false
false
false
mauzeh/formation-flight
runs/breguet_q_widebodies/plot.py
1
1696
import math import matplotlib import matplotlib.pyplot as plt import numpy as np from scipy.interpolate import spline from lib.geo.util import get_range from lib.geo.util import get_weight_ratio from lib.geo.util import project_segment from lib.geo.util import get_hookoff def run(): alpha = .13 # Fo...
mit
2,085,372,571,075,468,300
24.712121
75
0.489387
false
3.18797
false
false
false
avigad/reference
conf.py
1
6271
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Lean Reference Manual documentation build configuration file, created by # sphinx-quickstart on Mon Jul 17 21:46:05 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are presen...
apache-2.0
5,472,806,240,608,976,000
29.595122
79
0.672461
false
3.678006
true
false
false
roboogle/gtkmvc3
gtkmvco/examples/uimanager/subviews/models.py
1
2392
# Author: Roberto Cavada <roboogle@gmail.com> # # Copyright (C) 2012-2015 by Roberto Cavada # # gtkmvc3 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 2 of the License, or (at yo...
lgpl-2.1
1,013,482,397,647,691,400
26.494253
79
0.560619
false
3.980033
false
false
false
bmun/huxley
huxley/core/migrations/0038_auto_20200302_0046.py
1
10294
# Generated by Django 2.2.6 on 2020-03-02 00:46 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0037_positionpaper_graded_file'), ] operations = [ migrations.AddField( model_name='com...
bsd-3-clause
-1,868,311,957,626,594,000
37.267658
146
0.554886
false
4.414237
false
false
false
tysonholub/twilio-python
twilio/rest/preview/hosted_numbers/hosted_number_order.py
1
27627
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import serialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import...
mit
-2,631,183,947,984,794,600
37.531381
125
0.636044
false
4.442354
false
false
false
CodeCatz/litterbox
Alja/ex39.py
1
2224
# create a mapping of state to abbreviation states = { 'Oregon': 'OR', 'Florida': 'FL', 'California': 'CA', 'New York': 'NY', 'Michigan': 'MI' } # create a basic set of states and some cities in them cities = { 'CA': 'San Francisco', 'MI': 'Detroit', 'FL': 'Jacksonville' } # add some more cities cities['NY'] ...
mit
-7,007,271,633,094,404,000
26.121951
75
0.672212
false
2.977242
false
false
false
zjuchenyuan/BioWeb
Lib/Bio/Blast/NCBIWWW.py
1
10801
# Copyright 1999 by Jeffrey Chang. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # Patched by Brad Chapman. # Chris Wroe added modifications for work in myGrid """Code to inv...
mit
8,507,436,875,831,092,000
40.383142
105
0.591242
false
3.507957
false
false
false
sgnannan/DDA
DDAToolbars.py
1
6507
#*************************************************************************** #* * #* Copyright (c) 2009, 2010 * #* Xiaolong Cheng <lainegates@163.com> * #* ...
lgpl-2.1
-5,558,323,667,017,577,000
38.682927
85
0.530352
false
4.456849
false
false
false
uts-magic-lab/pyride_pr2
scripts/pr2actions.py
1
9187
import PyPR2 import math class Actionlet( object ): def __init__( self, name ): self.name = name def play( self ): pass def finishsHeadAction( self ): pass def finishsNavigateBodyAction( self ): pass def finishsMoveBodyAction( self ): pass def finishsGripperAction( self ): ...
mit
-6,353,124,132,379,360,000
25.552023
81
0.645586
false
3.619779
false
false
false
nixingyang/Kaggle-Face-Verification
Customer Analytics/XGBoost.py
1
6082
from copy import deepcopy from sklearn.cross_validation import StratifiedKFold, StratifiedShuffleSplit from xgboost.sklearn import XGBClassifier import numpy as np N_FOLDS = 5 CV_NUM = 1 EVAL_METRIC = "auc" EARLY_STOPPING_ROUNDS = 100 N_ESTIMATORS = 1000000 OBJECTIVE = "binary:logistic" GET_BEST_SCORE_INDEX = np.argma...
mit
1,866,310,314,821,000,700
54.290909
130
0.670832
false
3.327133
false
false
false
depassp/sb6141_timeout
sb6141_timeout/pipelines.py
1
1590
# -*- coding: utf-8 -*- from scrapy.exceptions import DropItem from peewee import * db = SqliteDatabase('timeouts.sqlite') class Item(Model): date = DateTimeField() message = CharField() class Meta: database = db # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM...
gpl-2.0
-2,748,145,025,985,016,300
26.413793
65
0.578616
false
3.646789
false
false
false
baloo/shinken
shinken/misc/datamanager.py
1
7463
#!/usr/bin/env python # Copyright (C) 2009-2012 : # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you can redistribute it and/or mod...
agpl-3.0
-8,259,124,682,986,624,000
35.05314
190
0.601501
false
3.536967
false
false
false
Onirik79/aaritmud
data/proto_items/torreelementi/torreelementi_item_spore-faura.py
1
2821
# -*- coding: utf-8 -*- #= DESCRIZIONE ================================================================= # Quando si droppano le spore, se finiscono in un terreno fertile, # allora danno corpo ad un nuovo mob fungoso #= IMPORT ====================================================================== import random ...
gpl-2.0
5,765,904,553,057,332,000
36.413333
124
0.647541
false
3.007503
false
false
false
Programmica/python-gtk3-tutorial
_examples/scrolledwindow.py
1
1070
#!/usr/bin/env python3 import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk class ScrolledWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self) self.set_title("ScrolledWindow") self.set_default_size(200, 200) self.connect("destroy", Gtk.main_quit) ...
cc0-1.0
8,952,783,731,060,403,000
27.157895
51
0.633645
false
3.496732
false
false
false
datawire/ambassador
python/ambassador/ir/irhttpmapping.py
1
19697
from ambassador.utils import RichStatus from ambassador.utils import ParsedService as Service from typing import Any, ClassVar, Dict, List, Optional, Type, Union, TYPE_CHECKING from ..config import Config from .irbasemapping import IRBaseMapping, normalize_service_name from .irbasemappinggroup import IRBaseMappingGr...
apache-2.0
-8,357,506,405,732,653,000
38.953347
140
0.582678
false
4.124162
false
false
false
marrow/web.security
web/security/predicate.py
1
7341
"""A _predicate_ is any callable object that optionally accepts a context as its first positional parameter. One might look like: ```python def always(context=None): return True ``` That's it, really. The provided built-in ones are class-based, but the process is the same even if the method has a strange name like ...
mit
2,271,158,387,123,699,700
27.343629
116
0.700858
false
3.665002
false
false
false
UKTradeInvestment/export-wins-data
core/commands/base.py
1
3041
import codecs import csv from contextlib import closing from logging import getLogger from django.core.management.base import BaseCommand from core.utils import get_s3_client_for_bucket logger = getLogger(__name__) class CSVBaseCommand(BaseCommand): """ Base class for db maintenance related commands. I...
gpl-3.0
-7,313,232,395,535,588,000
31.010526
99
0.594212
false
4.432945
false
false
false
jbassen/edx-platform
common/djangoapps/edxmako/shortcuts.py
1
5386
# Copyright (c) 2008 Mikeal Rogers # # 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 agre...
agpl-3.0
-4,989,962,544,900,726,000
34.906667
107
0.681953
false
4.11145
false
false
false
mpenning/shellsnmp
shellsnmp/Poller.py
1
3035
from subprocess import Popen, PIPE import re import arrow class SNMP(object): def __init__(self, host='', community='public'): assert host self.host = host self.community = community def _cast(self, text): if re.search(r'^\s*\d+\s*$', text): # Integer r...
mit
-2,972,397,781,672,435,000
38.415584
124
0.502142
false
3.733087
false
false
false
spacy-io/thinc
thinc/describe.py
1
2984
# coding: utf8 from __future__ import unicode_literals class AttributeDescription(object): def __init__(self, text, value=None, *args, **kwargs): self.name = None self.text = text self.value = value def __call__(self, attr, model): self.name = attr def __get__(self, obj, ...
mit
-3,009,380,776,301,780,500
21.953846
64
0.57004
false
3.720698
false
false
false
coleifer/peewee
tests/sqlite_udf.py
1
16304
import datetime import json import random from peewee import * from peewee import sqlite3 from playhouse.sqlite_ext import SqliteExtDatabase from playhouse.sqlite_udf import register_all from .base import IS_SQLITE_9 from .base import ModelTestCase from .base import TestModel from .base import db_loader from .base im...
mit
7,106,210,427,253,607,000
32.273469
81
0.525883
false
3.63118
true
false
false
cidadania/e-cidadania
src/apps/ecidadania/staticpages/views.py
1
2928
# -*- coding: utf-8 -*- # # Copyright (c) 2013 Clione Software # Copyright (c) 2010-2013 Cidadania S. Coop. Galega # # 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.or...
apache-2.0
2,234,462,553,438,784,800
31.898876
87
0.721653
false
3.827451
false
false
false
foursquare/pants
tests/python/pants_test/backend/jvm/targets/test_unpacked_jars.py
1
1661
# coding=utf-8 # Copyright 2014 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 from pants.backend.jvm.targets.import_jars_mixin import ImportJarsMixin from pants.backen...
apache-2.0
-1,756,126,361,744,049,400
45.138889
97
0.752559
false
3.642544
true
false
false
davidvidmar/plugin.image.zenfolio
resources/lib/zenfolio_common.py
1
5161
#------------------------------------------------------------------------------- # Name: module1 # Purpose: # # Author: David # # Created: 09.01.2011 # Copyright: (c) David 2011 # Licence: <your licence> #------------------------------------------------------------------------------- #!/usr/bin/en...
gpl-2.0
1,413,837,946,099,243,800
25.885417
139
0.540205
false
3.614146
false
false
false
masterkeywikz/seq2graph
src/downhill-0.2.2/downhill/__init__.py
1
4164
from .adaptive import * from .base import build, Optimizer from .dataset import Dataset from .first_order import * __version__ = '0.2.2' def minimize(loss, train, valid=None, params=None, inputs=None, algo='rmsprop', updates=(), monitors=(), monitor_gradients=False, batch_size=32, train_bat...
mit
2,468,348,571,300,702,000
44.758242
87
0.676993
false
4.875878
false
false
false
appcove/AppStruct
Python/AppStruct/UI/HTML5.py
1
6202
# vim:fileencoding=utf-8:ts=2:sw=2:expandtab from . import CSSList as CSSList_Class from . import JSList as JSList_Class def BaseLayout(*, JSList = None, # AppStruct.UI.JSList instance CSSList = None, # AppStruct.UI.CSSList instance Title = None, # Page ...
apache-2.0
527,039,483,882,166,900
35.269006
141
0.595776
false
3.016537
false
false
false
SeaCloudsEU/sla-dashboard
slagui/urls.py
1
2200
from django.conf.urls import patterns, url from slagui import views from slagui import rest urlpatterns = patterns( '', # eg: /$slaroot/ #url(r'^$', views.index, name='index'), #url(r'^(?P<is_provider>provider/)?agreements[/]$', # views.agreements_summary, name='agreements_summary'), url( ...
apache-2.0
817,489,982,439,499,100
29.136986
100
0.566818
false
3.405573
false
true
false
gurkirt/actNet-inAct
processing/saveCLFs.py
1
4517
''' Autor: Gurkirt Singh Start data: 15th May 2016 purpose: of this file is read frame level predictions and process them to produce a label per video ''' from sklearn.svm import LinearSVC from sklearn.ensemble import RandomForestClassifier import numpy as np import pickle import os,h5py import time,json #import pylab...
mit
-476,092,041,908,383,500
30.151724
113
0.599734
false
3.432371
false
false
false
ganwell/hexgame
setup.py
1
2216
"""Setuptools package definition""" # PLEASE REMOVE UNUSED CODE like CustomInstallCommand if you don't use it from setuptools import setup from setuptools import find_packages import os __version__ = None version_file = "hexgame/version.py" with open(version_file) as f: code = compile(f.read(), version_file, '...
agpl-3.0
183,347,979,865,946,850
28.157895
73
0.548736
false
4.294574
false
false
false
MehtapIsik/assaytools
scripts/xml2png.py
1
17004
# A somewhat ugly, utilitarian script takes xml data file output from the Tecan Infinite m1000 Pro # plate reader and allows for the quick visual inspection of raw data. # # Usage: python xml2png.py *.xml # import math, xml, and dataframe libraries import numpy as np from lxml import etree import pandas as pd import s...
lgpl-2.1
1,254,406,806,142,172,400
34.059794
276
0.554517
false
3.538814
false
false
false
jeremyosborne/python
general/noise/noise2d.py
1
2235
"""Figuring out noise. This code is lifted from: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm See also: http://mrl.nyu.edu/~perlin/doc/oscar.html http://www.noisemachine.com/talk1 http://webstaff.itn.liu.se/~stegu/TNM022-2005/perlinnoiselinks/perlin-noise-math-faq.html """ import math...
mit
6,684,183,174,259,201,000
28.038961
93
0.578523
false
2.49442
false
false
false
pchmieli/h2o-3
h2o-py/tests/testdir_algos/deeplearning/pyunit_checkpoint_new_category_in_response.py
1
1153
import sys, os sys.path.insert(1, os.path.join("..","..","..")) import h2o from tests import pyunit_utils def checkpoint_new_category_in_response(): from h2o.estimators.deeplearning import H2ODeepLearningEstimator sv = h2o.upload_file(pyunit_utils.locate("smalldata/iris/setosa_versicolor.csv")) iris = h2o.uplo...
apache-2.0
-4,630,808,971,562,032,000
36.225806
104
0.735473
false
3.116216
false
false
false
sayon/ignoreme
tokenizers/general/dummylex.py
1
1584
__author__ = 'novokonst' import ply.lex as lex def check_comment(fn): def wrapped(self, t): if self.nested_comment: t.type = 'COMMENT' return t else: return fn(self, t) wrapped.__doc__ = fn.__doc__ return wrapped class DummyLexer: """ Need to ...
mit
244,395,386,006,162,000
24.564516
87
0.544192
false
3.443478
false
false
false
albatrossandco/brubeck_cms
brubeck/blogs/search_indexes.py
1
2892
import datetime from haystack import indexes from haystack.sites import site from brubeck.blogs.models import Entry, Blog class EntryIndex(indexes.SearchIndex): text = indexes.CharField(document=True, use_template=True) # title = indexes.CharField(model_attr='title') pub_date = indexes.DateTimeField(model_...
bsd-3-clause
2,232,701,556,572,329,200
33.843373
74
0.683264
false
3.795276
false
false
false