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
maltsev/LatexWebOffice
app/common/util.py
1
32375
# -*- coding: utf-8 -*- """ * Purpose : allgemeine Hilfsfunktionen * Creation Date : 23-11-2014 * Last Modified : Do 05 Mär 2015 13:03:04 CET * Author : christian * Coauthors : mattis, ingo, Kirill * Sprintnumber : - * Backlog entry : - """ import simplejson as json import zipfile import os import mimetypes i...
gpl-3.0
-6,981,696,296,394,415,000
38.288156
140
0.683802
false
3.228901
false
false
false
lisael/pg-django
django/db/models/fields/__init__.py
1
53910
import copy import datetime import decimal import math import warnings from itertools import tee from django.db import connection from django.db.models.query_utils import QueryWrapper from django.conf import settings from django import forms from django.core import exceptions, validators from django.utils.datastructur...
bsd-3-clause
2,700,387,876,959,823,000
36.307958
115
0.601503
false
4.263345
false
false
false
philip-schrodt/CIVET-Flask
CIV_template.py
1
11470
## CIVET.templates.py ## ## Code for handling the CIVET template files ## ## Error handling: ## Errors are reported in the 'output' string: they are prefixed with '~Error~' and terminate with '\n'. ## These are reported to the user via the template_error.html page, which is rendered by read_template() ## ## PROVENANC...
mit
-3,337,768,312,298,944,000
36.003226
182
0.568963
false
3.520565
false
false
false
matachi/subdownloader
modules/utils.py
1
1186
#!/usr/bin/env python # Copyright (c) 2010 SubDownloader Developers - See COPYING - GPLv3 def compVer(ver1,ver2): #Checks to see if ver1 >= ver2 vl1 = ver1.split('.') vl2 = ver2.split('.') while 1: if int(vl1[0]) > int(vl2[0]): return 1 elif int(vl1[0]) == int(vl2[0]): ...
gpl-3.0
-9,138,544,313,916,714,000
29.410256
68
0.439292
false
3.572289
false
false
false
a-lost-shadow/shadowcon
contact/forms.py
1
1092
from django.forms import Form, CharField, EmailField, ModelChoiceField, Textarea from django.utils.html import strip_tags from .models import ContactReason from .utils import mail_list class ContactForm(Form): name = CharField(label="Name", max_length=128,) email = EmailField(label="E-mail", max_length=128) ...
gpl-3.0
1,344,768,222,388,563,700
44.5
100
0.671245
false
3.676768
false
false
false
ammgws/juanoffcodes
batbaby/batbaby.py
1
1282
from collections import namedtuple from time import sleep import click import requests from bs4 import BeautifulSoup @click.command() @click.option('--key', '-k', type=click.STRING, help='Goodreads dev API key', ) def main(key): url = "https://en.wikipedia.org/wiki/List_of...
mit
-4,639,655,621,074,131,000
31.871795
96
0.600624
false
3.581006
false
false
false
schlamar/sitforc
sitforc/fitting.py
1
5607
# coding: utf-8 ''' This module provides classes for curve fitting. There are a polynomial fitter (L{PolyFitter}) and a fitter for regression models (L{ModelFitter}). ''' from abc import ABCMeta, abstractmethod import numpy import sympy from sitforc import numlib, symlib class Fitter(object): '...
mit
-3,877,096,695,659,881,500
30.04
71
0.523274
false
3.806517
false
false
false
iulian787/spack
lib/spack/spack/compilers/intel.py
2
3400
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.compiler import Compiler, UnsupportedCompilerFlag from spack.version import ver class Intel(Compiler): # ...
lgpl-2.1
174,967,811,920,295,970
27.333333
73
0.478235
false
4.096386
false
false
false
puiterwijk/product-definition-center
pdc/apps/common/handlers.py
1
2752
# # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # from django import db from django.db.models.deletion import ProtectedError from django.core import exceptions from django.conf import settings from rest_framework import views, status from rest_framework.respons...
mit
1,683,106,787,732,280,800
42.68254
80
0.630087
false
4.769497
false
false
false
kentwait/pgeg
pgeg/raxml.py
1
6523
import os from collections import namedtuple from random import randint RAXML_PATH = 'raxmlHPC-PTHREADS-AVX' MODELS = ['GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI'] RAXML_INFO_PREFIX = 'RAxML_info' RAXML_LOG_PREFIX = 'RAxML_log' RAXML_RESULT_PREFIX = 'RAxML_result' RAXML_BESTTREE_PREFIX = 'RAxML_bestTree' RAXML_PARSTR...
apache-2.0
-6,305,331,723,565,098,000
52.03252
120
0.637897
false
3.629939
false
false
false
jjengo/cql-builder
tests/test_assignment.py
1
2114
import unittest from unittest import TestCase from cql_builder.base import ValidationError from cql_builder.condition import eq from cql_builder.assignment import Set, SetAt, Add, Subtract, Assignments class TestSet(TestCase): def test_value_single(self): op = Set(name='foo') self.assertEquals(op.cql, 'name=%s')...
mit
323,897,233,069,775,100
26.454545
73
0.669347
false
2.880109
true
false
false
edu1910/simplews
books/migrations/0003_auto_20150711_0131.py
1
1112
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('books', '0002_auto_20150710_0324'), ] operations = [ migrations.AddFie...
apache-2.0
1,606,694,040,661,478,100
31.705882
125
0.602518
false
4.01444
false
false
false
simransachar/commentAPIcode
NytApiCall_ComputeVocab.py
1
11977
# -*- coding: utf-8 -*- # This code scrap the data from NYT API via the API keys and stored in vocab_comments table # Frequency of each word is calculated from stored data and output in a JSON # Count the number of comments and store in a text file __author__ = 'simranjitsingh' import urllib import time import datet...
gpl-2.0
-1,000,000,655,648,333,200
37.025397
119
0.55999
false
3.825295
true
false
false
brunetto/MasterThesisCode
master_code/otherMiscCode/CF_CCF-code-template/kd3.py
1
25480
#!/usr/bin/env python import f_dist import numpy as np import sys import time import logging klogger = logging.getLogger("Main_log.modules.kd3") # Global variables for patching the tree. n_traverse = 0 n_leaves = 0 n_nodes = 0 nodetag = 0 sort_times = 0 dist_times = 0 leaves = 0 ####################################...
mit
1,293,364,550,638,686,700
45.15942
151
0.533281
false
4.010704
false
false
false
athena-project/Artemis
src/Monitor.py
1
17751
from .network.TcpClient import TcpClient from .network.Msg import Msg, MsgType from .network.TcpServer import P_TcpServer, T_TcpServer, TcpServer from .network.Reports import NetareaReport, MonitorReport from .AVL import * from time import sleep from threading import Thread, RLock, Event from multiprocessing import P...
gpl-2.0
-1,171,876,533,953,011,500
28.189145
152
0.652336
false
2.852757
false
false
false
mongrol/pylove2d
love/timer.py
1
1495
import time import sdl #Frame delta vars. currTime = 0 prevTime = 0 prevFpsUpdate = 0 #Updated with a certain frequency. fps = 0 averageDelta = 0 #The frequency by which to update the FPS. fpsUpdateFrequency = 1 #Frames since last FPS update. frames = 0 #The current timestep. dt = 0 #The timer period (reciproca...
gpl-3.0
7,482,493,959,276,895,000
16.797619
61
0.665552
false
3.542654
false
false
false
s390guy/SATK
tools/ipl/ci.py
1
67713
#!/usr/bin/python3 # Copyright (C) 2017 Harold Grovesteen # # This file is part of SATK. # # SATK is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your ...
gpl-3.0
-4,312,698,479,492,627,500
38.436808
89
0.580849
false
3.737952
false
false
false
dynamikdev/txredisTools
txredistools/redisClient.py
1
5965
from twisted.internet import defer,task,reactor from txredis.client import Redis,RedisSubscriber,RedisSubscriberFactory from twisted.internet.error import ConnectionLost,ConnectionDone,ConnectionRefusedError from twisted.internet.protocol import ClientCreator __HOST__ = '127.0.0.1' __PORT__ = 6379 import sys class clie...
gpl-2.0
5,586,235,087,143,086,000
34.094118
112
0.584577
false
4.425074
false
false
false
jjdmol/LOFAR
SAS/ResourceAssignment/SystemStatusService/SSDBrpc.py
1
2363
#!/usr/bin/python from lofar.messaging.RPC import RPC, RPCException, RPCWrapper import logging import sys logger = logging.getLogger(__name__) from lofar.sas.systemstatus.service.config import DEFAULT_SSDB_BUSNAME from lofar.sas.systemstatus.service.config import DEFAULT_SSDB_SERVICENAME class SSDBRPC(RPCWrapper): ...
gpl-3.0
2,806,550,697,478,635,000
28.911392
89
0.599661
false
3.912252
false
false
false
levilucio/SyVOLT
ECore_Copier_MM/transformation-Large/HEDataType.py
1
6468
from core.himesis import Himesis class HEDataType(Himesis): def __init__(self): """ Creates the himesis graph representing the AToM3 model HEDataType. """ # Flag this instance as compiled now self.is_compiled = True super(HEDataType, self).__init__(name='H...
mit
2,983,648,590,356,477,000
46.558824
438
0.486858
false
2.8875
false
false
false
glebysg/GC_server
vif_analysis.py
1
2441
from statsmodels.stats.outliers_influence import variance_inflation_factor as vif import numpy as np import sys ## Apply vif on every column of the matrix M def vif_coeffs(M): ''' Description: Compute VIF on every column of the matrix M Input arugments: * M: 2D np.ndarray Return: * A list of VIF for each col...
mit
8,250,602,766,050,074,000
26.122222
108
0.606719
false
3.157827
false
false
false
WernerLDev/python3-websocketserver
main.py
1
1280
""" Copyright 2014 Werner Langenhuisen Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to...
apache-2.0
7,293,425,791,287,956,000
30.243902
75
0.664844
false
4.444444
false
false
false
hal112358/clark_aerospace
skynet/src/log/sys_log.py
1
2051
""" =============================================================================== System Logging =============================================================================== author=hal112358 ------------------------------------------------------------------------------- """ from __future__ import print_function im...
mit
-9,223,277,421,539,062,000
31.0625
79
0.375914
false
6.122388
false
false
false
TheBigW/ParametricEQ
ParametricEQ_rb3compat.py
1
28758
# -*- Mode: python; coding: utf-8; tab-width: 4; indent-tabs-mode: nil; -*- # # IMPORTANT - WHILST THIS MODULE IS USED BY SEVERAL OTHER PLUGINS # THE MASTER AND MOST UP-TO-DATE IS FOUND IN THE COVERART BROWSER # PLUGIN - https://github.com/fossfreedom/coverart-browser # PLEASE SUBMIT CHANGES BACK TO HELP EXPAND THIS AP...
gpl-3.0
2,238,349,992,351,895,800
33.033136
106
0.544544
false
4.22974
false
false
false
rickerc/cinder_audit
cinder/api/contrib/services.py
1
5694
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licen...
apache-2.0
8,139,349,770,973,335,000
32.892857
79
0.600808
false
4.383372
false
false
false
malancas/CUNY-CoLAG-Sims-2016-17
Fodor-Sakas-model/runSimulation.py
1
6170
from Child import Child from convergencePatterns import convergencePatterns from time import clock from random import choice import csv from datetime import datetime import os class runSimulation(object): def __init__(self, si, lc): self.totalSentenceCount = 0.0 self.totalConvergentChildren = 0.0 ...
gpl-3.0
2,514,360,053,411,172,000
44.703704
183
0.646677
false
4.105123
false
false
false
VHarisop/PyMP
pymp/algorithms/mcmc_diffusion.py
1
8591
# -*- coding: utf-8 -*- """ mcmc_difussion.py: Provides facilities for Markov-Chain Monte Carlo integration to convolute an arbitrary function with an isotropic gaussian kernel of varying width (σ), to implement a technique called coarse to fine smoothing[1]. [1]: J. Mobahi and J. W. Fished: On the Link Between Gauss...
gpl-3.0
5,372,460,605,180,076,000
33.352
74
0.650908
false
3.766667
false
false
false
anasazy/gw2api-python
src/models/color.py
1
1854
# ... # ============================================================================ # class ColorDetails(object): def __init__(self, data): self.brightness = data.get('id') # (number) – The brightness. self.contrast = data.get('id') # (number) – The contrast. self.hue = data.get('id') # (number) – The hue in...
mit
3,900,405,365,360,248,000
37.978723
114
0.640284
false
3.063545
false
false
false
davidbrazdil/nacl
build/build_nexe.py
1
36813
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """NEXE building script This module will take a set of source files, include paths, library paths, and additional arguments, and ...
bsd-3-clause
8,416,596,322,624,047,000
34.706111
80
0.61462
false
3.556812
true
false
false
Phoenix1708/Robotics_Imperial
prac-files_backup/prac-files/BrickPi.py
4
23591
# Jaikrishna # Karan Nayan # John Cole # Initial Date: June 24, 2013 # Last Updated: Nov 4, 2013 # http://www.dexterindustries.com/ # # These files have been made available online through a Creative Commons Attribution-ShareAlike 3.0 license. # (http://creativecommons.org/licenses/by-sa/3.0/) # # Ported from Matthew R...
apache-2.0
1,813,126,061,063,396,600
38.318333
472
0.569412
false
3.210097
false
false
false
mdelpozobanos/eeglcf
tests/test_eeglcf.py
1
15392
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_eeglcf ---------------------------------- Tests for `eeglcf` module. """ import pytest import numpy as np from eeglcf import eeglcf # ============================================================================= # VARIABLES @pytest.fixture(scope='module') def ...
mit
-8,902,375,195,037,108,000
34.962617
79
0.566723
false
3.600468
true
false
false
tylert/chirp.hg
chirp/drivers/baofeng_uv3r.py
1
21620
# Copyright 2011 Dan Smith <dsmith@danplanet.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is ...
gpl-3.0
-2,980,156,118,219,530,000
32.108729
79
0.529325
false
3.45754
false
false
false
alphagov/notifications-api
migrations/versions/0022_add_pending_status.py
1
2181
"""empty message Revision ID: a726fff4ed59 Revises: 0022_add_pending_status Create Date: 2016-05-25 15:47:32.568097 """ # revision identifiers, used by Alembic. revision = '0022_add_pending_status' down_revision = '0021_add_delivered_failed_counts' from alembic import op import sqlalchemy as sa def upgrade(): ...
mit
2,160,480,068,606,171,600
41.764706
110
0.671252
false
3.766839
false
false
false
juan-cardelino/matlab_demos
ipol_demo-light-1025b85/lib/misc.py
1
1981
""" various help tools for the IPOL demo environment """ import os import time from datetime import datetime import gzip as _gzip # # TINY STUFF # prod = lambda l : reduce(lambda a, b : a * b, l, 1) # # BASE_APP REUSE # def app_expose(function): """ shortcut to expose app actions from the base class ""...
gpl-2.0
3,715,973,284,241,039,400
19.852632
62
0.599192
false
3.236928
false
false
false
pepetreshere/odoo
addons/google_calendar/models/google_sync.py
1
10059
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from contextlib import contextmanager from functools import wraps import requests import pytz from dateutil.parser import parse from odoo import api, fields, models, registry, _ from odoo.tools import orm...
agpl-3.0
9,134,230,025,741,526,000
40.057143
114
0.63058
false
4.212312
false
false
false
mhielscher/wasabiscripts
twitterpic.py
1
1695
# Twitter profile image updater # http://twitter.com/account/update_profile_image.json # image = [imagefile] import sys import os import random import re import urllib import json import urllib2 import oauth2 as oauth import time import wcommon def encode_file_data(image): boundary = hex(int(time.time()))[2:] he...
bsd-2-clause
-957,361,848,229,395,500
28.736842
92
0.701475
false
2.907376
false
false
false
ariakerstein/twitterFlaskClone
project/lib/python2.7/site-packages/wtfpeewee/orm.py
1
7573
""" Tools for generating forms based on Peewee models (cribbed from wtforms.ext.django) """ from collections import namedtuple from wtforms import Form from wtforms import fields as f from wtforms import validators from wtfpeewee.fields import ModelSelectField from wtfpeewee.fields import SelectChoicesField from wtfpe...
mit
-3,020,752,440,008,056,000
34.223256
86
0.621418
false
4.369879
false
false
false
Centre-Alt-Rendiment-Esportiu/att
src/python/test/Training_Verification_jserres.py
1
20521
# -*- coding: utf-8 -*- """ obtenir els coeficients de train i calcular l'error vull veure com funciona el mètode @author: Jordi """ import re from math import fabs import random as python_random from numpy import * from scipy import linalg DEBUG = True DEBUG_INPUT = 'C:/Users/Jordi/Documents/CARTT-Jordi/point_clean...
gpl-3.0
-8,195,198,929,061,212,000
41.75
178
0.510867
false
2.726548
false
false
false
huran2014/huran.github.io
wot_gateway/gateway/bin/gateway/gateway.py
1
6812
#-*-coding:utf-8-*- import random import time import sys import re import restful import init import common import mythread class WrtGateway: # class varaiable s_hwid = '' s_mwid = '' s_first_time_add_dev = False def __init__(self,mail): self.hwid = '' self.mwid = '' self.mail = mail def reg_hwid(self...
gpl-2.0
3,446,158,165,427,095,000
30.572093
122
0.63848
false
2.792267
false
false
false
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/pyshared/keyring/cli.py
1
2392
#!/usr/bin/env python """Simple command line interface to get/set password from a keyring""" import getpass import optparse import sys import keyring import keyring.core def input_password(prompt): """Ask for a password to the user. This mostly exists to ease the testing process. """ return getpas...
gpl-3.0
-8,315,162,981,642,521,000
26.813953
88
0.5949
false
4.233628
false
false
false
dunkhong/grr
grr/core/grr_response_core/lib/util/context.py
1
2023
#!/usr/bin/env python """A module with utilities for dealing with context managers.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from typing import ContextManager from typing import Generic from typing import Sequence from typing import TypeVar _T ...
apache-2.0
7,084,760,182,312,022,000
30.609375
80
0.716263
false
4.232218
false
false
false
scarrazza/smpdf
src/smpdflib/loggingutils.py
1
2349
# -*- coding: utf-8 -*- """ Created on Wed Jul 8 13:43:35 2015 @author: zah """ import sys import os import multiprocessing import logging import atexit from logging.handlers import QueueHandler, QueueListener from contextlib import contextmanager, redirect_stdout import applwrap @contextmanager def _supress_stdou...
gpl-2.0
1,656,225,750,654,368,000
28.012346
79
0.639421
false
3.740446
false
false
false
zapion/mygoclient
robot.py
1
1747
#!/usr/bin/python import threading import time import logging logging.basicConfig( level=logging.DEBUG, format='%(asctime)s %(levelname)s |%(name)s| %(message)s', filename='/tmp/mygoclient.log', filemode='a', ) logger = logging.getLogger(__name__) class InputThread(threading.Thread): ''' Basi...
mit
6,125,193,592,086,675,000
25.074627
66
0.60561
false
3.756989
false
false
false
KnyazSh/Mycodo
3.5/cgi-bin/mycodo_pid.py
1
3517
#!/usr/bin/python # -*- coding: utf-8 -*- # # mycodoPID.py - Discrete PID Controller for Mycodo # # Copyright (c) 2010 cnr437@gmail.com # # Licensed under the MIT License <http://opensource.org/licenses/MIT> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associat...
gpl-3.0
-3,810,183,568,684,155,000
40.869048
93
0.674723
false
3.581466
false
false
false
clicumu/uspto-tools
uspto_tools/parse/aps.py
1
9517
""" This module contains chunker and parser for USPTO APS full-text used for patents granted 1976-2001. """ import re import itertools from uspto_tools.parse.patent import PatentClassification, USPatent,\ USReference, Inventor from uspto_tools.parse.exceptions import ParseError class Tag: """ A single APS-ta...
mit
3,017,751,463,796,992,000
25.292818
82
0.541557
false
3.921302
false
false
false
Silmathoron/nest-simulator
pynest/nest/lib/hl_api_types.py
1
32816
# -*- coding: utf-8 -*- # # hl_api_types.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, o...
gpl-2.0
-6,717,445,462,179,469,000
32.971014
117
0.558295
false
4.477555
false
false
false
terrencepreilly/darglint
tests/test_returns_visitor.py
1
2820
import ast from unittest import ( TestCase, ) from darglint.analysis.return_visitor import ( ReturnVisitor, ) from .utils import ( reindent, ) class ReturnsVisitorTests(TestCase): def assertFound(self, program): """Assert that the return was found. Args: program: The prog...
mit
5,894,636,573,427,527,000
23.102564
62
0.490071
false
4.638158
true
false
false
zhantyzgz/polaris
plugins/weather.py
1
3598
from core.utils import * commands = [ ('/weather', ['location']), ('/forecast', ['location']) ] description = 'Returns the current temperature and weather conditions for a specified location using WeatherUnderground API.' shortcut = ['/w ', '/f '] def get_icon(icon): weather_emoji = {} if i...
gpl-2.0
-6,653,059,550,445,450,000
36.206522
125
0.522048
false
3.163816
false
false
false
mlperf/training_results_v0.6
Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/tvm/topi/python/topi/nn/dense.py
1
1688
"""TVM operator fully connected compute.""" from __future__ import absolute_import import tvm from .. import tag def dense_default(data, weight, bias=None): """The default implementation of dense in topi. Parameters ---------- data : tvm.Tensor 2-D with shape [batch, in_dim] weight : tvm....
apache-2.0
3,100,119,032,045,310,500
26.225806
83
0.547393
false
3.538784
false
false
false
chemlab/chemlab
chemlab/graphics/camera.py
1
10823
'''Module to provide a nice camera for 3d applications''' from .transformations import rotation_matrix, translation_matrix from .transformations import simple_clip_matrix, clip_matrix from .transformations import vector_product, angle_between_vectors, normalized from ..utils import fequal import numpy as np import nu...
gpl-3.0
-6,941,301,855,006,790,000
31.404192
95
0.56343
false
3.821681
false
false
false
UrsusSalificus/SignatureOrigene
scripts/sampling_chromosomes.py
1
1452
#!/usr/bin/env python3 """ Extract the sample chromosome out of H. sapiens or M. musculus genome """ from Bio import SeqIO import sys __author__ = "Titouan Laessle" __copyright__ = "Copyright 2017 Titouan Laessle" __license__ = "MIT" # Species genome path: species_genome = str(sys.argv[1]) # Here we will take H. s...
mit
3,394,799,249,193,109,000
30.565217
101
0.71281
false
3.361111
false
false
false
BackupTheBerlios/cuon-svn
cuon_client/cuon/DMS/documentTools.py
1
14339
# -*- coding: utf-8 -*- ##Copyright (C) [2003-2005] [Jürgen Hamel, D-32584 Löhne] ##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 v...
gpl-3.0
3,698,759,601,823,871,500
37.436997
126
0.472972
false
4.344545
false
false
false
Screenly/screenly-ose
websocket_server_layer.py
1
1611
from gevent import pywsgi from geventwebsocket import WebSocketError from geventwebsocket.handler import WebSocketHandler from threading import Thread import zmq.green as zmq from settings import settings, LISTEN class WebSocketTranslator(object): def __init__(self, context): self.context = context ...
gpl-2.0
-6,095,516,911,952,873,000
28.833333
72
0.624457
false
4.25066
false
false
false
tiandizhiguai/test
src/main/java/com/test/python/data_test8.py
1
2239
#!/usr/bin/env python # -*- coding:utf-8 -*- import os import xlrd import xlwt import datetime import openpyxl def request(): sheet = xlrd.open_workbook(os.path.join('E:/数据分析/20180819', '丽水市活动保障工单结果.xlsx')).sheet_by_index(0) nRow = sheet.nrows nCol = sheet.ncols title = [] rowDatas = {} ...
apache-2.0
3,030,680,474,625,848,000
30.231884
106
0.502088
false
3.240602
false
false
false
ric2b/confidential-debt-simplification
client/client_backend.py
1
13336
import logging import utils.messages.message_formats as msg import uome from utils.crypto import rsa from utils.messages.connection import connect, ConflictError, ForbiddenError, \ UnauthorizedError, NotFoundError class ProtocolError(Exception): """ Raised when an error anticipated in the protocol """ d...
gpl-3.0
515,822,902,073,258,200
33.194872
83
0.580984
false
4.742532
false
false
false
AltSchool/dynamic-rest
tests/migrations/0005_auto_20170712_0759.py
1
1690
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-12 07:59 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('tests', '0004_user_is_dead'), ] operations = [ ...
mit
-1,821,987,714,861,181,200
36.555556
122
0.556213
false
4.132029
false
false
false
andreymal/mini_fiction
mini_fiction/utils/misc.py
1
30809
import re import sys import json import math import time from datetime import timedelta from urllib.request import Request, urlopen from urllib.parse import quote, urljoin from typing import Optional, List from werkzeug.urls import url_parse from flask import current_app, g, escape, render_template, abort, url_for, re...
gpl-3.0
-8,973,897,914,742,403,000
34.803235
138
0.593164
false
2.55762
true
false
false
cwhypt/cifar10
cifar10_train.py
1
5091
# 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
6,977,256,036,829,341,000
35.106383
80
0.627775
false
3.842264
false
false
false
escattone/kuma
kuma/users/providers/github/views.py
1
2724
from urllib.parse import urlparse from allauth.account.utils import get_next_redirect_url from allauth.socialaccount.providers.github.views import GitHubOAuth2Adapter from allauth.socialaccount.providers.oauth2.views import ( OAuth2CallbackView, OAuth2LoginView, ) from kuma.core.decorators import redirect_in_...
mpl-2.0
8,119,366,118,122,336,000
40.907692
88
0.711821
false
3.752066
false
false
false
Drvanon/Game
venv/lib/python3.3/site-packages/sqlalchemy/dialects/mysql/oursql.py
1
8694
# mysql/oursql.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mysql+oursql :name: OurSQL :dbapi: oursql :connectstring...
apache-2.0
-7,509,204,042,080,281,000
32.057034
97
0.615137
false
3.879518
false
false
false
germanovm/vdsm
vdsm/network/configurators/dhclient.py
1
5268
# Copyright (C) 2013, IBM Corporation # Copyright (C) 2013-2014, Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later ...
gpl-2.0
-4,228,952,355,089,323,000
34.836735
79
0.60839
false
3.765547
false
false
false
drewlevin/chemokine
sensitivity/testing/run_cycells.py
1
5299
# gen_deffile.py # Drew Levin # September 2 2015 # # Automates the evaluation of many CyCells models on a machine. # Requires in the same directory: # 1) The CyCells executable # 2) gen_deffile.py # 3) hypercube text files # 4) immune.init # # Takes 5 command line arguments in this order: # 1: strain letter (a,...
gpl-3.0
-7,315,427,394,035,640,000
26.455959
79
0.640309
false
3.297449
false
false
false
kanhua/pypvcell
pypvcell/transfer_matrix_optics.py
1
7531
""" This module calculates transfer matrix optics. Basic usages look like this: :: # Setup the layers layers = ['Air', 'SiO2_2', 'TiO2_2', 'GaAs_2'] # Assign the thickness to each layer. # Assuimg the first and the last layers are infinite. thicknesses = [0, 170, 135, 300] tm_layer = TM...
apache-2.0
4,049,097,003,224,051,700
26.282609
142
0.566534
false
3.018036
false
false
false
daevaorn/kombu
kombu/pools.py
1
3665
""" kombu.pools =========== Public resource pools. """ from __future__ import absolute_import import os from itertools import chain from .connection import Resource from .five import range, values from .messaging import Producer from .utils import EqualityDict, register_after_fork from .utils.functional import laz...
bsd-3-clause
8,250,539,735,541,959,000
24.275862
75
0.617735
false
3.928189
false
false
false
ns-phennessy/Arcbot
bolt/discord/cache.py
1
5795
from bolt.discord.models.base import SearchableList, SearchableDict from bolt.discord.events import Subscription from bolt.utils import snakecase_to_camelcase class Cache(): def __init__(self, api): self.api = api self.guilds = SearchableDict() self.private_channels = SearchableDict() ...
mit
1,173,953,667,941,236,000
35.21875
88
0.626747
false
3.606098
false
false
false
akrherz/iem
scripts/outgoing/talltowers.py
1
3010
"""answer any requests for talltowers data Run from RUN_1MIN.sh """ # pylint: disable=abstract-class-instantiated import smtplib import time from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart import pandas as pd from pandas.io.sql import read_sql from pyiem.util import get_dbconn TOW...
mit
6,504,950,015,913,025,000
25.637168
76
0.563455
false
3.219251
false
false
false
all-of-us/raw-data-repository
rdr_service/alembic/versions/03bdb0a44083_remove_history_constraints.py
1
2019
"""remove history constraints Revision ID: 03bdb0a44083 Revises: 534d805d5dcf Create Date: 2019-03-21 15:32:02.572675 """ from alembic import op from rdr_service.dao.alembic_utils import ReplaceableObject # revision identifiers, used by Alembic. revision = "03bdb0a44083" down_revision = "534d805d5dcf" branch_labels...
bsd-3-clause
7,004,993,209,100,632,000
23.621951
105
0.645369
false
3.245981
false
false
false
azweb76/x-cloud
xcloud/cloudoptions.py
1
4907
import getpass import yaml import os import logging import getpass #from xcrypto import xcrypto from xcloud import utils log = logging.getLogger(__name__) class YamlLoader(yaml.Loader): def __init__(self, stream): self._root = os.path.split(stream.name)[0] super(YamlLoader, self).__init__(stream...
mit
6,045,559,713,299,463,000
31.496689
128
0.569187
false
3.879051
false
false
false
PhyloStar/PyBayes
tree_helper.py
1
16817
"""The data structures for this are based on adjaceny list or a graph data structure so that iterative computing is possible. Refer: Valiente, Gabriel. Algorithms on trees and graphs. Springer Science & Business Media, 2013. for further algorithms. The tree datastructure also looks like "phylo" class in ape package of...
gpl-2.0
2,735,148,801,229,870,600
31.216475
121
0.598799
false
3.278807
false
false
false
ianjuma/usiu-app-dir
flask-serve.py
1
1566
#!/usr/bin/env python # -*- coding: utf-8 - # remove UI segemnts # fix grids # layouts # files from flask import Flask from flask import render_template from flask.ext.assets import Environment, Bundle from flask import redirect app = Flask(__name__) # app.config.from_pyfile(flask-config.cfg) -- import Config ass...
gpl-2.0
-7,820,408,348,953,944,000
22.373134
69
0.607918
false
3.534989
false
false
false
skyostil/tracy
src/analyzer/tools/extract_vg_frames.py
1
1758
# Copyright (c) 2011 Nokia # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, s...
mit
8,693,096,612,647,265,000
46.162162
160
0.73322
false
3.898004
false
false
false
ssalka/django-node
django/core/views.py
1
2917
from django.shortcuts import render from django.http import HttpResponse, HttpResponseServerError from django.views.decorators.csrf import csrf_exempt from django.contrib.sessions.models import Session from django.contrib.auth.decorators import login_required from rest_framework import viewsets from rest_framework.resp...
mit
6,657,374,110,109,738,000
31.775281
85
0.686322
false
4.215318
false
false
false
watchdogpolska/petycja-norweskie
docs/decode_sphinx_inventory.py
1
15676
#! /usr/bin/python #! coding: utf-8 # decode_sphinx_inventory, mb, 2013, 2014-07-26, 2015-12-17 # ÄÖÜäöüß # ================================================== # The following __doc__ string is displayed on --info # -------------------------------------------------- """\ decode_sphinx_inventory - Decode an objects.inv...
mit
-2,067,896,546,127,404,300
35.103687
175
0.596783
false
3.515593
false
false
false
joshuajonah/python-googleanalytics
src/googleanalytics/data.py
1
3871
import datetime import time from xml.etree import ElementTree data_converters = { 'integer': int, } class DataSet(list): """docstring for DataSet""" def __init__(self, raw_xml): list.__init__(self) self.raw_xml = raw_xml xml_tree = ElementTree.fromstring(self.raw_xml) self....
bsd-3-clause
-8,219,439,302,315,114,000
42.011111
108
0.63782
false
3.732883
false
false
false
correctiv/django-yolodex
yolodex/importer.py
1
9134
import shutil import logging import os import io try: from urllib.request import urlopen except ImportError: from urllib import urlopen from django.template.defaultfilters import slugify from django.db import transaction import networkx as nx import unicodecsv from .models import Entity, EntityType, Relatio...
mit
5,651,185,325,552,419,000
32.704797
116
0.585614
false
3.801082
false
false
false
akunze3/pytrajectory
.pre-commit.py
1
2385
#!/usr/bin/python ''' Git pre commit hook: write latest commit's datetime This script writes the date and time of the pending commit into the source file `doc/index.rst` for the documentation and the file `__init__.py` of pytrajectory such that it is obvious to which current code version they belong. If changed, th...
bsd-3-clause
-421,665,606,823,337,800
33.071429
111
0.592453
false
4.056122
false
false
false
igurrutxaga/tvalacarta
python/main-classic/servers/aragontv.py
1
4990
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para aragontv # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core impo...
gpl-3.0
-3,190,599,483,489,724,000
39.504065
122
0.614613
false
2.976105
false
false
false
alexm92/sentry
src/sentry/signals.py
1
1985
from __future__ import absolute_import from django.dispatch import Signal class BetterSignal(Signal): def connect(self, receiver=None, **kwargs): """ Support decorator syntax: >>> @signal.connect(sender=type) >>> def my_receiver(**kwargs): >>> pass """ ...
bsd-3-clause
7,848,506,346,350,754,000
37.921569
91
0.664484
false
3.809981
false
false
false
ipashchenko/uvmod
uvmod/plotting.py
1
6686
import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm from utils import gauss_2d_isotropic, gauss_2d_anisotropic gauss_dict = {2: gauss_2d_isotropic, 4: gauss_2d_anisotropic} def scatter_3d(x1, x2, y, xlabel='u', ylabel='v', zlabel='flux', xlim3d=None, ...
mit
7,177,919,623,467,610,000
26.628099
81
0.543823
false
2.746919
false
false
false
Blairom/trampoline
goil/build/libpm/python-makefiles/x86linux_on_macosx_gcc_tools_64.py
1
2744
#! /usr/bin/env python # -*- coding: UTF-8 -*- #----------------------------------------------------------------------------------------------------------------------* import sys, time, os, json import makefile, default_build_options import generic_galgas_makefile import tool_chain_installation_path import cross_com...
gpl-2.0
-858,635,782,690,378,900
47.140351
120
0.636662
false
3.591623
false
false
false
beeftornado/sentry
src/sentry/models/eventerror.py
1
5640
from __future__ import absolute_import import six class EventError(object): # Generic UNKNOWN_ERROR = "unknown_error" # Schema validation INVALID_DATA = "invalid_data" INVALID_ATTRIBUTE = "invalid_attribute" MISSING_ATTRIBUTE = "missing_attribute" VALUE_TOO_LONG = "value_too_long" FU...
bsd-3-clause
8,443,968,913,484,912,000
46
99
0.691844
false
3.608445
false
false
false
lmazuel/azure-sdk-for-python
azure-mgmt-web/azure/mgmt/web/models/resource_metric_name.py
1
1245
# 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
7,886,873,780,097,727,000
30.125
76
0.571084
false
4.594096
false
false
false
adamfeuer/ArtOfGratitude_app
gratitude/migrations/0005_auto__add_action.py
1
7091
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Action' db.create_table('gratitude_action', ( ('id', self.gf('django.db.models.f...
mit
-4,596,276,747,356,427,000
67.854369
182
0.561416
false
3.7638
false
false
false
sn6uv/rmathics
rmathics/transformations.py
1
2642
""" A collection of functions for transforming expression trees """ from rmathics.expression import BaseExpression, Expression, Symbol from rmathics.rpython_util import all def flatten(expr, depth=-1, head=None): """ flattens an Expression - a negative depth allows for infinite recursion - only f...
bsd-3-clause
-4,223,112,652,664,913,000
28.032967
76
0.613172
false
4.187005
false
false
false
TD22057/T-Home
bin/dbg-msgHub.py
1
1813
#!/usr/bin/env python # dbg-msgHub.py -s "radio" "power/battery" import argparse import sys import pprint import time import StringIO import tHome.util as util import paho.mqtt.client as mqtt p = argparse.ArgumentParser( prog=sys.argv[0], description="Msg Hub debug output" ) p.add_argum...
bsd-2-clause
8,777,117,843,452,847,000
26.892308
72
0.581908
false
3.290381
false
false
false
yesudeep/greatship
app/configuration.py
1
4199
#!/usr/bin/env python # -*- coding: utf-8 -*- # Application configuration. # Copyright (c) 2009 happychickoo. # # The MIT License # # 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 res...
mit
-4,744,872,457,511,794,000
32.325397
114
0.694927
false
3.293333
false
false
false
novapost/django-x509
x509/django/utils.py
1
1071
# -*- coding: utf-8 -*- from uuid import UUID from x509.django.models import Certificate from x509.exceptions import (CertificateInvalid, CertificateMissing, HeaderMissing) def raise_for_certificate(environ): if 'HTTP_SSL_CLIENT_VERIFY' not in environ or \ environ['HTTP_S...
mit
-8,810,453,110,380,488,000
37.25
78
0.578898
false
4.890411
false
false
false
daeseokyoun/youtube-dl
youtube_dl/extractor/common.py
1
87789
from __future__ import unicode_literals import base64 import datetime import hashlib import json import netrc import os import re import socket import sys import time import math from ..compat import ( compat_cookiejar, compat_cookies, compat_etree_fromstring, compat_getpass, compat_http_client, ...
unlicense
-1,092,959,359,451,375,000
45.059286
163
0.533267
false
4.258088
false
false
false
JazzeYoung/VeryDeepAutoEncoder
theano/gof/tests/test_opt.py
1
19625
from __future__ import absolute_import, print_function, division from theano.gof.type import Type from theano.gof.graph import Variable, Apply, Constant from theano.gof.op import Op from theano.gof.opt import * # noqa from theano.gof.fg import FunctionGraph from theano.gof.toolbox import * # noqa from theano import...
bsd-3-clause
1,883,501,207,395,864,300
32.489761
134
0.49228
false
2.873774
true
false
false
planetlabs/datalake
api/tests/test_archive_querier.py
1
18055
# Copyright 2015 Planet Labs, 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
1,953,209,572,657,168,000
34.058252
79
0.616173
false
3.484848
true
false
false
AutorestCI/azure-sdk-for-python
azure-servicefabric/azure/servicefabric/models/load_metric_report.py
1
1294
# 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
1,223,039,489,851,294,500
34.944444
76
0.585781
false
4.160772
false
false
false
bsipocz/ginga
ginga/qtw/GingaQt.py
1
27389
# # GingaQt.py -- Qt display handler for the Ginga FITS tool. # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # # stdlib imports import sys, os import traceback # TEMP: i...
bsd-3-clause
-1,718,906,980,861,889,800
32.038601
92
0.540326
false
3.811439
false
false
false
biointec/omsim
omsim/src/omsim/__init__.py
1
1125
''' Copyright (C) 2016 Giles Miclotte (giles.miclotte@ugent.be) This file is part of OMSim 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 ...
gpl-2.0
1,901,858,930,023,953,200
36.5
76
0.668444
false
3.975265
false
false
false
gileno/curso-citi
catalog/migrations/0001_initial.py
1
1273
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-22 20:13 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Creat...
cc0-1.0
-1,379,254,698,170,004,500
35.314286
142
0.581432
false
4.236667
false
false
false
ujenmr/ansible
lib/ansible/modules/cloud/docker/docker_volume.py
1
11399
#!/usr/bin/python # coding: utf-8 # # Copyright 2017 Red Hat | Ansible, Alex Grönholm <alex.gronholm@nextday.fi> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'meta...
gpl-3.0
-4,883,551,864,279,178,000
33.432024
134
0.60709
false
4.221111
false
false
false
ViDA-NYU/reprozip
reprounzip-qt/reprounzip_qt/gui/run.py
1
17649
# Copyright (C) 2014-2017 New York University # This file is part of ReproZip which is released under the Revised BSD License # See file LICENSE for full license details. from __future__ import division, print_function, unicode_literals from qtpy import QtCore, QtWidgets import yaml import reprounzip_qt.reprounzip_i...
bsd-3-clause
5,595,446,852,806,075,000
38.133038
79
0.592441
false
4.07222
false
false
false
corymintz/mtools
mtools/util/logevent.py
1
23608
from datetime import datetime from dateutil.tz import tzutc import dateutil.parser import re import json from mtools.util.pattern import json2pattern class DateTimeEncoder(json.JSONEncoder): """ custom datetime encoder for json output. """ def default(self, obj): if isinstance(obj, datetime): ...
apache-2.0
-3,931,490,868,838,599,000
33.923077
188
0.560912
false
4.192506
false
false
false
ijzer/cwbot-ndy
cwbot/modules/BaseModule.py
1
7872
import abc import weakref import logging from cwbot.sys.eventSubsystem import EventSubsystem from cwbot.sys.heartbeatSubsystem import HeartbeatSubsystem from cwbot.util.tryRequest import tryRequest class ProcessorException(Exception): pass class ModuleMetaClass(abc.ABCMeta): def __init__(cls, n...
bsd-3-clause
-7,613,909,640,184,344,000
33.459459
79
0.601245
false
4.907731
true
false
false
wiki-ai/revscoring
revscoring/features/wikitext/datasources/tokenized.py
1
13882
import re from deltas import wikitext_split from deltas import wikitext_split_w_cjk from deltas.segmenters import ParagraphsSentencesAndWhitespace from revscoring.datasources import Datasource from revscoring.datasources.meta import filters, frequencies, mappers from . import base class Revision(base.BaseRevision...
mit
-5,460,136,003,285,908
28.411017
132
0.548624
false
4.308504
false
false
false
xinbian/freqPattMin
freqpattmin/freqpattmin.py
1
8856
# -*- coding: utf-8 -*- """Main module.""" import pandas as pd import csv import time import itertools import json #initialization class class Init: def __init__(self, filename): self.filename = filename self.data = [] #read as pandas data frame def DataPD(self): data = pd.read_csv...
mit
9,158,734,457,359,666,000
33.729412
102
0.500678
false
3.635468
false
false
false