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
capsci/chrome
practice/python/resta.py
1
2221
# https://www.hackerrank.com/challenges/restaurant import sys import math """ def gcd(a, b): if b>a: t = a a = b b = t while b!=0: t = b b = a % b a = t return a """ """ t = int(raw_input()) while t>0: l, b = [int(x) for x in raw_input().split()] print l * b / gcd(l, b)**2 t -= 1 """ """ t = int(raw...
mit
-7,180,469,378,858,910,000
14.538462
67
0.481765
false
2.10322
false
false
false
Ecogenomics/GTDBNCBI
scripts_dev/silva_identify_bad_seqs.py
1
16327
#!/usr/bin/env python ############################################################################### # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License...
gpl-3.0
907,361,491,436,062,200
50.342767
144
0.409567
false
4.51521
true
false
false
ElvisLouis/code
work/ML/tensorflow/separa/convolutional_version_3.py
1
11359
import tensorflow as tf import cv2 as cv import numpy as np import time as te from parse import * ABS_PATH="/home/visualization/work/ML/tensorflow/separa/" SIZE = 828 LABEL = 6 TRAIN_SIZE = 768 BATCH_SIZE = 128 GLOBAL_STEP = 200000 DECAY_STEPS = 10 EVAL_SIZE = SIZE - TRAIN_SIZE IMAGE_SIZE = 128 NUM_CHANNEL = 1 TRAI...
gpl-2.0
1,569,597,825,549,813,800
35.175159
117
0.54415
false
3.500462
false
false
false
coco19/salud-api
app/__init__.py
1
3873
# -*- coding: latin-1 -*- import os import sys reload(sys) sys.setdefaultencoding('utf-8') from flask import Flask from flask_restful import Api from flask_restful_swagger import swagger from flask.ext.restful.representations.json import output_json from flask.ext.cors import CORS from flask.ext.script import Manager...
gpl-2.0
-1,541,489,066,722,055,400
35.537736
96
0.725794
false
3.161633
true
false
false
SCP-028/UGA
protein_pka/mcce/pka_database_crawler.py
1
3390
#!python3 """ http://pka.engr.ccny.cuny.edu/index.php Crawler for the pKa Database, retrieving all the pKa values for the calculated PDB proteins. """ import re from io import StringIO import requests import pandas as pd import numpy as np from bs4 import BeautifulSoup def ParseTable(soup, id): """F...
apache-2.0
4,377,971,517,837,859,300
30.596154
135
0.578761
false
2.860759
false
false
false
nachiketkarmarkar/PyXtrem
xtremXmsLib.py
1
4064
import requests, json, sys import requests.packages.urllib3 requests.packages.urllib3.disable_warnings() def getXms(ip,user,pwd): try: response = requests.get('https://%s/api/json/v2/types/xms/?name=xms' %(ip),auth=(user,pwd),verify=False) return json.loads(response.text) except requests.excep...
mit
-6,834,947,560,333,711,000
38.852941
120
0.658711
false
3.403685
false
false
false
mjirik/lisa
tests/lesions_test.py
1
4386
#! /usr/bin/python # -*- coding: utf-8 -*- # import funkcí z jiného adresáře import sys import os.path import copy path_to_script = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(path_to_script, "../extern/pyseg_base/src/")) sys.path.append(os.path.join(path_to_script, ...
bsd-3-clause
3,562,224,997,027,736,000
24.664634
115
0.5674
false
2.898339
true
false
false
pombredanne/product-definition-center
pdc/apps/component/views.py
1
41123
# # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # import json import types from django.contrib.contenttypes.models import ContentType from django.shortcuts import get_object_or_404 from django.http import Http404 from mptt.exceptions import InvalidMove from ...
mit
-5,103,904,451,836,339,000
30.657429
131
0.516888
false
4.528466
false
false
false
jendap/tensorflow
tensorflow/python/keras/integration_test.py
1
10325
# Copyright 2016 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
8,766,601,696,139,803,000
40.971545
80
0.637385
false
3.629174
true
false
false
JackED42/calibre-web
cps/helper.py
1
17187
#!/usr/bin/env python # -*- coding: utf-8 -*- import db import ub from flask import current_app as app import logging import smtplib from tempfile import gettempdir import socket import sys import os import traceback import re import unicodedata try: from StringIO import StringIO from email.MIMEBase import MIM...
gpl-3.0
5,724,481,867,177,607,000
35.56383
119
0.578877
false
3.674364
false
false
false
Dreae/Distill
distill/response.py
1
3682
from distill import PY3 class Response(object): def __init__(self, status="200 OK", headers=None): """Initializes an empty response""" self.status = status if headers is None: headers = {} self.headers = headers self.body = None self.file = None ...
mit
-3,931,430,088,714,019,300
35.455446
116
0.544813
false
4.468447
false
false
false
greencase/haproxy-python
haproxy/client.py
1
5034
__author__ = 'kevinschoon@gmail.com' import subprocess import uuid import os import time import jinja2 from haproxy.models import GlobalSection, DefaultsSection, StatsSection from haproxy.exceptions import BadConfiguration, HaProxyProcessException class HAProxyConfig: """ HAProxyConfig represents an HAProxy...
apache-2.0
1,932,183,532,135,872,300
30.4625
119
0.579857
false
4.049879
true
false
false
flugel-it/elastic-mongodb
file_root/_states/mongodbext.py
1
2806
import socket from pymongo.errors import OperationFailure def _build_member_list(members): ret = [] members.append(socket.getfqdn()) members = list(enumerate(members)) for member in members: ret.append(dict(_id=member[0], host=member[1])) return ret def repl_managed(name, repls...
gpl-3.0
-2,096,314,200,817,746,200
30.52809
77
0.548824
false
3.902643
true
false
false
echinopsii/net.echinopsii.ariane.community.cli.python3
tests/acceptance/directory/nic_at.py
1
5270
# Ariane CLI Python 3 # NICard acceptance tests # # Copyright (C) 2015 echinopsii # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) ...
agpl-3.0
4,705,573,776,659,777,000
38.328358
114
0.514801
false
3.86931
true
false
false
Sayan-Paul/Chain_Reaction_Game
Chain reaction.py
1
3171
################################################################# ### Chain Reactor Game Demo For Technites # ### # ################################################################# grid=[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]...
gpl-3.0
-437,580,398,405,900,100
28.635514
77
0.377483
false
2.81117
false
false
false
ZoomerAnalytics/jsondiff
tests/generate_readme.py
1
1027
# this is used for generating the repo front page from __future__ import print_function def do(cmd, comment=None): if comment: print("# " + comment) print(">>> " + cmd) c = compile(cmd, filename="<string>", mode='single') eval(c, globals()) print() do('from jsondiff import diff') do("dif...
mit
-1,447,132,188,727,960,300
31.09375
111
0.481013
false
2.681462
false
false
false
kastnerkyle/pachet_experiments
minimize.py
1
9174
#This program is distributed WITHOUT ANY WARRANTY; without even the implied #warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # #This file contains a Python version of Carl Rasmussen's Matlab-function #minimize.m # #minimize.m is copyright (C) 1999 - 2006, Carl Edward Rasmussen. #Python adaptation by ...
bsd-3-clause
-8,865,476,535,456,483,000
48.058824
102
0.485284
false
3.633267
false
false
false
MicrosoftGenomics/FaST-LMM
fastlmm/pyplink/snpreader/Bed.py
1
12209
import numpy as SP import subprocess, sys, os.path from itertools import * from fastlmm.pyplink.snpset import * from fastlmm.pyplink.altset_list import * import pandas as pd import fastlmm.util.preprocess as util import logging WRAPPED_PLINK_PARSER_PRESENT = None def decide_once_on_plink_reader(): #This is now do...
apache-2.0
-3,415,060,358,164,699,600
43.721612
163
0.584569
false
3.249667
true
false
false
Smashman/UKNetrunnerRankings
app/scripts/scripts.py
1
3821
import requests from .. import db from ..netrunner.models import Cycle, Pack, Identity, Faction, Side from requests.exceptions import HTTPError cycle_api_url = '' pack_api_url = 'http://netrunnerdb.com/api/sets/' cards_api_url = 'http://netrunnerdb.com/api/cards/' def get_api_data(url): try: data = reque...
gpl-2.0
-5,158,681,603,156,608,000
36.470588
103
0.563203
false
3.19749
false
false
false
bigr/map1
generate_metatile_gridinfo.py
1
10996
#!/usr/bin/env python import mapnik import sys import math import json import os import time import codecs import re import regions import Utfgrid import gzip from PIL import Image, ImageMath import color_to_alpha try: from osgeo import gdal from osgeo import osr except ImportError: import gdal import...
agpl-3.0
2,261,654,085,468,557,800
51.113744
510
0.571753
false
3.187246
false
false
false
habibieeddien/Car-Searcher
module/searcher.py
1
2350
# import the necessary packages import numpy as np import math import csv class Searcher: def __init__(self, indexPath): # store our index path self.indexPath = indexPath def search_info(self, results, infoCar): # Get best ID image best_id = [] for (score,image) in results: best_id.append(int(image[:...
mit
9,099,452,623,009,797,000
26.658824
61
0.657872
false
3.272981
false
false
false
hosiet/apue-example
.ycm_extra_conf.py
1
6768
## THIS FILE IS FOR C LANGUAGE ## BASED ON YCM FILE PROVIDED ON DEC. 2014 # This file is NOT licensed under the GPLv3, which is the license for the rest # of YouCompleteMe. # # Here's the license text for this file: # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy,...
gpl-3.0
-5,953,432,017,935,220,000
32.176471
107
0.703457
false
3.525
true
false
false
stuntgoat/metl
sinks/local.py
1
1930
#!/usr/bin/python import errno import os import sys import uuid from collections import defaultdict from datetime import datetime DATA_DIR = './data' DATETIME_METRICS = defaultdict(list) def mkdir(path): try: os.makedirs(path) except OSError as exception: if exception.errno != errno.EEXIST: ...
epl-1.0
-2,532,762,732,744,144,000
25.438356
80
0.626943
false
3.541284
false
false
false
genodeftest/exaile
xl/devices.py
1
5673
# Copyright (C) 2008-2010 Adam Olsen # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that...
gpl-2.0
-3,781,722,584,890,060,300
27.223881
81
0.610964
false
4.520319
false
false
false
CitrineInformatics/python-citrination-client
citrination_client/search/pif/result/pif_search_hit.py
1
3889
from pypif import pif from pypif.obj.common.pio import Pio from pypif.util.serializable import Serializable from six import string_types class PifSearchHit(Serializable): """ Class to store a single PIF search hit. """ def __init__(self, id=None, dataset=None, dataset_version=None, score=None, update...
apache-2.0
5,228,386,657,741,258,000
25.636986
114
0.615325
false
4.190733
false
false
false
dtnaylor/web-profiler
tools/timer_http2_proxy.py
1
15265
#!/usr/bin/env python import os import sys import string import logging import argparse import urlparse import random import pprint import cPickle import time import signal import subprocess import glob import numpy from collections import defaultdict from datetime import datetime sys.path.append('..') from webloader....
mit
-126,417,918,414,904,980
33.851598
137
0.654569
false
3.193515
false
false
false
adambreznicky/javascript
RoadRunner/Data/newServiceMerger.py
1
2780
__file__ = 'newServiceMerger' __date__ = '2/17/2016' __author__ = 'ABREZNIC' """ The MIT License (MIT) Copyright (c) 2016 Texas Department of Transportation Author: Adam Breznicky Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Sof...
mit
5,792,791,383,742,575,000
34.653846
96
0.705755
false
3.496855
false
false
false
xantage/code
vilya/models/git/diff/hunk.py
1
6495
# -*- coding: utf-8 -*- from __future__ import absolute_import from ellen.utils.mdiff import hunk2 from vilya.models.consts import LINECOMMENT_INDEX_EMPTY from vilya.models.git.diff.line import Line class Hunk(object): # FIXME: old_lines/new_lines 不包含 'No newline at end of file',导致行号对不上,也导致review评论显示不出来 def...
bsd-3-clause
-8,563,088,591,586,188,000
33.596774
89
0.514064
false
3.489696
false
false
false
WalrusRPG/WalrusRPG
.ycm_extra_conf.py
1
5178
# This file is NOT licensed under the GPLv3, which is the license for the rest # of YouCompleteMe. # # Here's the license text for this file: # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either...
mit
2,155,663,217,569,609,000
35.20979
80
0.708188
false
3.796188
false
false
false
google/clusterfuzz
src/python/bot/untrusted_runner/untrusted.py
1
7861
# Copyright 2019 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 agreed to in writing, ...
apache-2.0
9,134,147,088,328,780,000
29.587549
100
0.717339
false
3.71152
true
false
false
RedHenLab/Audio
GSoC2015/Speaker_Dia_RedHen/scripts/tpt2rttm.py
1
2171
#!/usr/bin/python ''' This scripts converts tpt file format to RTTM format so that it can be converted by NIST evaluation script ''' import os,commands,sys inp = open(sys.argv[1],'r') # inpit tpt file FLAG = 0 # initiation mark UMF = 0 # UNIDENTIFIED Male/Female def remove_zeros(string): # extracts time stamp for...
gpl-2.0
-4,759,104,265,485,211,000
39.962264
114
0.457393
false
3.775652
false
false
false
brayden2544/Mystuff-final
mobile/api.py
1
1532
#mobile/api.py #For rest calls to mobile app through TastyPie from tastypie.resources import ModelResource from manage import models as mmod from account import models as amod from catalog import models as cmod from tastypie import fields #Class to give Repair Statuses to mobile app class Repair_StatusResourc...
apache-2.0
-7,866,509,645,253,469,000
30.285714
63
0.699739
false
4.031579
false
false
false
cs-au-dk/Artemis
WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py
1
4454
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
gpl-3.0
-124,977,418,228,552,320
37.068376
130
0.696004
false
4.075023
false
false
false
ngugi/geonode
geonode/documents/forms.py
1
8696
import json import os import taggit import re from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.contenttypes.models import ContentType from django.conf import settings from django.forms import HiddenInput, TextInput from modeltranslation.forms import TranslationModelF...
gpl-3.0
8,744,941,576,816,133,000
31.207407
79
0.570607
false
4.244021
false
false
false
immo/pyTOM
df/df_gens.py
1
4047
# coding: utf-8 # # drums-backend a simple interactive audio sampler that plays vorbis samples # Copyright (C) 2009 C.D. Immanuel Albrecht # # 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 Fou...
gpl-3.0
-706,265,233,936,136,600
38.291262
102
0.615765
false
3.503896
false
false
false
serhatbolsu/robotframework-appiumlibrary
AppiumLibrary/keywords/_logging.py
1
1923
# -*- coding: utf-8 -*- import os from robot.libraries.BuiltIn import BuiltIn from robot.libraries.BuiltIn import RobotNotRunningError from robot.api import logger from .keywordgroup import KeywordGroup class _LoggingKeywords(KeywordGroup): LOG_LEVEL_DEBUG = ['DEBUG'] LOG_LEVEL_INFO = ['DEBUG', 'I...
apache-2.0
961,380,448,438,970,800
29.016129
88
0.551222
false
3.777996
false
false
false
zen4ever/django-authorizenet
authorizenet/migrations/0004_auto__add_field_response_created__add_field_cimresponse_created__chg_f.py
1
6671
# encoding: 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 field 'Response.created' db.add_column('authorizenet_response', 'created', self.gf('django.db.mo...
mit
-1,258,509,222,711,794,200
71.51087
172
0.566332
false
3.47629
false
false
false
pabelanger/stackalytics
dashboard/vault.py
1
6474
# Copyright (c) 2013 Mirantis 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 writi...
apache-2.0
-4,102,322,497,278,216,700
32.2
74
0.628205
false
3.895307
false
false
false
pa2515-group2/server
server/patient.py
1
4659
import json from server.models import database, PatientModel, LoginModel from server.hmsexceptions import UserNotExistException from server.utils import logger def register_patient(post_data): """ Register a patient in the system. The post data is in json format. :param post_data: dict :returns: a st...
mit
-3,165,942,623,125,275,600
36.878049
79
0.613222
false
4.006019
false
false
false
LeiDai/meep_metamaterials
model_SapphireBars.py
1
4150
#!/usr/bin/env python #-*- coding: utf-8 -*- import meep_utils, meep_materials import numpy as np from meep_utils import in_sphere, in_xslab, in_yslab, in_zslab import meep_utils """ """ class SapphireBars(meep_utils.AbstractMeepModel): #{{{ """ Array of sapphire bars along the E-field """ def cell_cente...
mit
5,920,473,283,089,459,000
50.875
109
0.611084
false
2.943262
false
false
false
Southpaw-TACTIC/Team
src/python/Lib/site-packages/PySide/examples/draganddrop/puzzle/puzzle.py
1
11569
#!/usr/bin/env python ############################################################################ # # Copyright (C) 2004-2005 Trolltech AS. All rights reserved. # # This file is part of the example classes of the Qt Toolkit. # # This file may be used under the terms of the GNU General Public # License version 2.0...
epl-1.0
75,107,947,772,024,910
32.340058
143
0.611116
false
3.869231
false
false
false
usc-isi/nova
nova/volume/storwize_svc.py
1
54421
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 IBM, Inc. # Copyright (c) 2012 OpenStack LLC. # 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...
apache-2.0
1,051,327,838,958,677,900
43.137064
79
0.509105
false
4.246995
false
false
false
eclipsebeat/latdj
myblog/migrations/0001_initial.py
1
1049
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-08-18 15:27 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True depend...
gpl-3.0
-3,626,776,573,136,664,000
32.83871
120
0.624404
false
4.246964
false
false
false
drayside/kodkod
libs/.waf-1.6.6-c57dd0fa119e23d36c23d598487c6880/waflib/Tools/glib2.py
1
8301
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/svn/docs/wafbook/single.html#_obtaining_the_waf_file import os from waflib import Task,Utils,Options,Errors,Logs from waflib.TaskGen import taskgen_method,before_method,after_method,feature def add_marshal_file(self,filename,pre...
mit
2,504,423,353,258,335,700
46.712644
257
0.720757
false
2.862414
false
false
false
pombredanne/djangorestframework-composed-permissions
restfw_composed_permissions/generic/components.py
1
2263
# -*- coding: utf-8 -*- from rest_framework import permissions from ..base import (BasePermissionComponent, BaseComposedPermision, And, Or) class AllowAll(BasePermissionComponent): """ Always allow all requests without any constraints. """ def has_permissi...
bsd-3-clause
-6,891,508,545,626,868,000
28.776316
97
0.647813
false
4.402724
false
false
false
kalkin/qubes-core-admin
qubes/tools/qubes_create.py
1
1490
# # The Qubes OS Project, https://www.qubes-os.org/ # # Copyright (C) 2015 Joanna Rutkowska <joanna@invisiblethingslab.com> # Copyright (C) 2015 Wojtek Porczyk <woju@invisiblethingslab.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
gpl-2.0
-2,944,278,479,467,221,000
30.702128
75
0.722148
false
3.522459
false
false
false
krux/python-krux-stdlib
krux/parser.py
1
12888
# -*- coding: utf-8 -*- # # © 2013-2017 Salesforce.com, inc. # # # Standard libraries # from __future__ import absolute_import from os import environ # # Third party libraries # from builtins import next, str from argparse import ArgumentParser, _ArgumentGroup # # Internal libraries # from krux.logging import LEVELS...
mit
5,324,020,608,714,366,000
36.571429
120
0.622022
false
4.14373
false
false
false
talbrecht/pism_pik
doc/sphinx/list_diagnostics.py
1
2271
#!/usr/bin/env python import json, argparse parser = argparse.ArgumentParser() parser.description = '''Generate an RST list documenting PISM's diagnostics.''' parser.add_argument("FILE", nargs=1) options = parser.parse_args() def print_heading(title, label, decoration): heading = """ .. _{label}: {title} {under...
gpl-3.0
1,215,315,744,638,983,000
27.746835
86
0.545134
false
3.984211
false
false
false
jeanfeydy/lddmm-ot
LDDMM_Python/lddmm_python/modules/io/interactive_riemannian_geometry.py
1
30519
from pylab import * from pprint import pprint import json from IPython.display import HTML, display import traitlets from ipywidgets import * from .show_code import show_code from ..manifolds.torus import Torus from ..manifolds.landmarks import Landmarks from ..manifolds.curves import Curve, Curves from ..models.fr...
mit
-2,655,298,710,509,661,000
35.76988
235
0.599463
false
2.697216
false
false
false
hujingguang/OpsSystem
tools/master.py
1
4483
#!/usr/bin/env python import optparse import os import socket import select import MySQLdb import sys import time import simplejson import SocketServer db_info={'db_name':'deploy', 'host':'10.117.74.247', 'user':'root', 'password':'helloworld', } class MainMaster(object): def __init__(self): global db_info s...
mit
-3,807,447,149,170,441,700
22.227979
165
0.630828
false
2.851781
false
false
false
cwhypt/cifar10
cifar10_multi_gpu_train.py
1
10922
# 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
-7,079,393,992,900,142,000
37.188811
80
0.649332
false
3.792361
false
false
false
lquirosd/TFM
ILA/code/imgPage_float.py
1
11263
from __future__ import division import numpy as np #--- To handle math processing import scipy.ndimage as ndi #--- To handle image processing from scipy import misc import os #--- To handle OS callbacks import xml.etree.ElementTree as et #--- To handle XML data import gc #--- To handle garbage collection import time t...
apache-2.0
-1,644,754,882,074,571,300
37.837931
144
0.533872
false
3.405806
false
false
false
google-research/episodic-curiosity
third_party/baselines/common/vec_env/threaded_vec_env.py
1
3857
# coding=utf-8 """VecEnv implementation using python threads instead of subprocesses.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import threading from third_party.baselines.common.vec_env import VecEnv import numpy as np from six.moves imp...
apache-2.0
-3,698,694,626,980,837,000
33.132743
79
0.5958
false
3.822597
false
false
false
jordens/redpid
gateware/cordic.py
1
12578
# Copyright 2014-2015 Robert Jordens <jordens@gmail.com> # # This file is part of redpid. # # redpid is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any l...
gpl-3.0
7,003,709,673,134,365,000
34.134078
76
0.516537
false
3.554111
false
false
false
kriswehage/greenscreen_framework
greenscreen_framework/prop65.py
1
8154
#!/usr/bin/env python3 import time import openpyxl import json import os import re import sys from urllib.request import urlopen ''' prop65.py This module contains a Python class, 'Prop65Data', that is used to import data from the Proposition 65 website and translate the hazards from their native representation to G...
bsd-2-clause
332,814,794,405,962,750
35.079646
77
0.54599
false
3.849858
false
false
false
BenceDD/TDAgent
Environment.py
1
7243
import random class Forest: def __init__(self): self.money = 100 # just for fun (debug) self.tree_age = 0 def wait_one_more_year(self): if random.randint(0, 20) is 2: self.tree_age = 0 self.money -= 50 return -50 else: ...
gpl-3.0
-1,668,325,491,356,613,000
52.458647
107
0.323623
false
2.026581
false
false
false
skyoo/jumpserver
apps/ops/ansible/runner.py
1
8470
# ~*~ coding: utf-8 ~*~ import os import shutil from collections import namedtuple from ansible import context from ansible.module_utils.common.collections import ImmutableDict from ansible.executor.task_queue_manager import TaskQueueManager from ansible.vars.manager import VariableManager from ansible.parsing.datal...
gpl-2.0
-7,990,650,689,204,821,000
32.351779
100
0.605475
false
4.114091
false
false
false
Yukarumya/Yukarum-Redfoxes
testing/mochitest/mochitest_options.py
1
42088
# 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/. from abc import ABCMeta, abstractmethod, abstractproperty from argparse import ArgumentParser, SUPPRESS from distutils.u...
mpl-2.0
-1,312,226,008,916,829,000
37.05425
99
0.534547
false
4.270292
true
false
false
michellemorales/OpenMM
kaldi/egs/fisher_callhome_spanish/s5/local/callhome_get_1_best.py
1
2379
#!/usr/bin/env python # Copyright 2014 Gaurav Kumar. Apache 2.0 # Extracts one best output for a set of files # The list of files in the conversations for which 1 best output has to be extracted # words.txt import os import sys def findTranscription(timeDetail): file1 = open('exp/tri5a/decode_callhome_dev/scori...
gpl-2.0
388,991,198,453,080,060
30.72
97
0.714166
false
2.947955
false
false
false
matematik7/CSSQC
cssqc/__init__.py
1
3639
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ---------------------------------------------------------------- # cssqc/__init__.py # # css quality control # ---------------------------------------------------------------- # copyright (c) 2014 - Domen Ipavec # Distributed under The MIT License, see LICENSE # -------...
mit
4,544,366,455,429,113,000
40.827586
130
0.543831
false
4.034368
true
false
false
invliD/lana-dashboard
lana_dashboard/lana_data/models/ipv4_subnet.py
1
1221
from django.db import models from django.db.models import Q from django.utils.translation import ugettext_lazy as _, ungettext_lazy import netfields from lana_dashboard.lana_data.models.institution import Institution class IPv4Subnet(models.Model): network = netfields.CidrAddressField(unique=True, verbose_name=_("N...
agpl-3.0
-6,543,751,508,332,216,000
37.15625
131
0.751843
false
3.345205
false
false
false
Godley/Music-Library
implementation/primaries/GUI/thread_classes.py
1
1399
import threading class Async_Handler(object): def __init__(self, data, method, callback, callback_data): self.data = data self.method = method self.callback = callback self.callback_data = callback_data def execute(self): self.execute_without_callback() self.c...
gpl-2.0
6,953,857,749,449,090,000
29.413043
77
0.606147
false
3.896936
false
false
false
luca-conterio/PortScanner.py
saveData.py
1
4663
''' PortScanner.py (c) 2017 Luca Conterio This file is part of PortScanner.py. PortScanner.py 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
-1,851,588,950,957,142,000
42.990566
162
0.445636
false
3.562261
false
false
false
clearcare/servant
servant/transport/local.py
2
2255
import importlib from .base import BaseTransport from ..service import Service class LocalTransport(BaseTransport): def __init__(self): super(LocalTransport, self).__init__() self.__service = None def __repr__(self): return self.__class__.__name__ def configure(self, service_na...
lgpl-3.0
-4,037,572,255,636,039,000
31.214286
94
0.591131
false
4.697917
false
false
false
ikalnytskyi/holocron
tests/_core/test_items.py
1
17425
"""Core items test suite.""" import pathlib import pytest import holocron @pytest.fixture( scope="function", params=[ pytest.param(42, id="int-value"), pytest.param("key", id="str-value"), pytest.param(42.42, id="float-value"), pytest.param(True, id="bool-value"), py...
bsd-3-clause
-3,732,268,710,406,344,000
26.269171
79
0.555179
false
3.71456
true
false
false
mas2tg/cs3240-f16-team07
users/models.py
1
3938
from django.db import models from django import forms from django.contrib.auth.models import User, Group from inbox.models import Message from django.core.exceptions import ValidationError # # Allow multiple Groups with the same name # Group._meta.get_field('name')._unique = False def get_received_messages(self): re...
mit
-5,182,002,987,819,787,000
40.893617
119
0.743779
false
3.676937
false
false
false
joymachinegames/joymachine-public
scripts/python/vector_field_generator/VFGenerator.py
1
5585
import math import random import sys import os ### CONFIG ### ### EDIT THIS PART BELOW ### ### GUI UPDATE: Encapsulated Main Script to function, to be called from GUI interface. """ For lack of UI, just set your desired parameters here. This obviously needs to be improved for the sake of a better workflow. Edit: UI Ad...
mit
-2,905,311,500,562,846,700
33.481481
213
0.682543
false
2.951903
false
false
false
Purg/SMQTK
python/smqtk/iqr/iqr_session.py
1
12045
import logging import threading import uuid from smqtk.algorithms.relevancy_index import get_relevancy_index_impls from smqtk.representation.descriptor_index.memory import MemoryDescriptorIndex from smqtk.utils import SmqtkObject from smqtk.utils import plugin DFLT_REL_INDEX_CONFIG = { "type": "LibSvmHikRelevanc...
bsd-3-clause
3,562,941,246,439,769,000
38.107143
89
0.620091
false
4.472707
true
false
false
thomaslima/PySpice
PySpice/Spice/NgSpice/Shared.py
1
20951
#################################################################################################### # # PySpice - A Spice Package for Python # Copyright (C) 2014 Fabrice Salvaire # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published...
gpl-3.0
5,691,860,416,486,316,000
36.081416
112
0.490764
false
4.295879
false
false
false
richardmin97/RiotSkinScraper
Back End/SkinScraper.py
1
3372
''' Author: Richard Min (richardmin97@gmail.com) Uses httplib2 and BeautifulSoup to prase the riot skins sales webpage, reading what it has already found from a text file and comparing that to what is new on the page, printing that out and updating the text file This code is licensed under MIT creative license. ''' #!...
mit
-49,633,911,439,183,160
28.068966
140
0.683274
false
3.051584
false
false
false
darcyliu/storyboard
boto/swf/layer1_decisions.py
1
12332
""" helper class for creating decision responses """ class Layer1Decisions: """ Use this object to build a list of decisions for a decision response. Each method call will add append a new decision. Retrieve the list of decisions from the _data attribute. """ def __init__(self): self....
mit
8,009,274,971,551,355,000
38.025316
84
0.538761
false
4.972581
false
false
false
Spferical/The-RNG
TheRNG.py
1
35771
#!/usr/bin/python3 import sys import random import math import os import getopt import pygame import shelve import time from pygame.locals import * if not pygame.font: print('Warning, fonts disabled') if not pygame.mixer: print('Warning, sound disabled') # setting up constants WINDOW_WIDTH = 640 WINDOW_HEIGH...
mit
751,992,798,681,478,700
35.953512
79
0.516116
false
4.007506
false
false
false
kayhayen/Nuitka
nuitka/codegen/ErrorCodes.py
1
9274
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
apache-2.0
3,410,828,676,267,240,000
29.913333
88
0.621307
false
4.16061
false
false
false
pythonkr/pyconkr-2014
pyconkr/migrations/0010_auto__add_field_speaker_email.py
1
6783
# -*- 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 'Speaker.email' db.add_column(u'pyconkr_speaker', 'email',...
mit
-2,250,705,445,169,900,000
63.609524
166
0.532655
false
3.51087
false
false
false
denniskline/garage-door
gdmod/email.py
1
3463
import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.mime.application import MIMEApplication import logging import time import os.path from os.path import basename class Email: def __init__(self, gmailUsername, gmailPassword, cssStyle=None): self.gm...
apache-2.0
8,396,705,045,081,889,000
35.840426
160
0.522379
false
4.730874
false
false
false
dwu/nvpy
nvpy/nvpy.py
1
30384
#!/usr/bin/env python # nvPY: cross-platform note-taking app with simplenote syncing # copyright 2012 by Charl P. Botha <cpbotha@vxlabs.com> # new BSD license # inspired by notational velocity and nvALT, neither of which I've used, # and ResophNotes, which I have used. # full width horizontal bar at top to search # ...
bsd-3-clause
7,364,990,989,781,962,000
38.614081
174
0.592845
false
3.74003
true
false
false
HiSPARC/publicdb
doc/conf.py
1
9423
# -*- coding: utf-8 -*- # # Public Database documentation build configuration file # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys import os import mock MOCK...
gpl-3.0
-7,572,361,978,195,583,000
30.41
80
0.695638
false
3.724506
true
false
false
evernote/pootle
pootle/core/utils.py
1
6228
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2013 Evernote Corporation # # This file is part of Pootle. # # 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 ...
gpl-2.0
8,990,334,933,694,563,000
31.432292
90
0.595311
false
3.162519
false
false
false
pprivulet/insight
util.py
1
5621
# Copied from django with some modifications import copy class MultiValueDict(dict): """ A subclass of dictionary customized to handle multiple values for the same key. >>> d = MultiValueDict({'name': ['Adrian', 'Simon'], 'position': ['Developer']}) >>> d['name'] 'Simon' >>> d.getlist('n...
mit
1,381,838,844,277,131,500
30.9375
94
0.53905
false
4.300689
false
false
false
device42/nix_bsd_mac_inventory
module_solaris.py
1
14898
import paramiko class GetSolarisData: def __init__(self, ip, ssh_port, timeout, usr, pwd, use_key_file, key_file, get_serial_info, get_hardware_info, get_os_details, add_hdd_as_parts, get_cpu_info, get_memory_info, ignore_domain, upload_ipv6, debug): self.machine_n...
mit
987,378,641,774,536,800
43.282675
140
0.433951
false
4.453812
false
false
false
mtils/ems
ems/qt/tool_widgets/one_of_a_list_slider.py
1
1417
from ems.qt import QtWidgets, QtGui, QtCore QSlider = QtWidgets.QSlider pyqtSignal = QtCore.pyqtSignal pyqtProperty = QtCore.pyqtProperty pyqtSlot = QtCore.pyqtSlot class OneOfAListSlider(QSlider): listValueChanged = pyqtSignal(int) valueListChanged = pyqtSignal(tuple) def __init__(self, parent=None):...
mit
1,776,833,713,403,233,800
27.36
63
0.66055
false
3.661499
false
false
false
fujy/ROS-Project
src/rbx2/rbx2_tasks/nodes/parallel_tree.py
1
3555
#!/usr/bin/env python """ parallel_tree.py - Version 1.0 2013-09-22 Run two tasks in parallel using the pi_trees library. Created for the Pi Robot Project: http://www.pirobot.org Copyright (c) 2014 Patrick Goebel. All rights reserved. This program is free software; you can redistribute ...
mit
-6,586,301,573,095,818,000
28.625
72
0.582841
false
4.335366
false
false
false
boxu0001/practice
py3/S106_BTFromInorderPostOrder.py
1
2050
# 106. Construct Binary Tree from Inorder and Postorder Traversal # Medium # Given inorder and postorder traversal of a tree, construct the binary tree. # Note: # You may assume that duplicates do not exist in the tree. # For example, given # inorder = [9,3,15,20,7] # postorder = [9,15,7,20,3] # Return the followi...
gpl-3.0
2,300,334,787,492,916,700
25.623377
78
0.530244
false
3.405316
false
false
false
Floobits/floobits-vim
plugin/floo/common/api.py
1
7051
import sys import base64 import json import subprocess import traceback from functools import wraps try: import ssl except ImportError: ssl = False PY2 = sys.version_info < (3, 0) try: import __builtin__ str_instances = (str, __builtin__.basestring) except Exception: str_instances = (str, ) try...
apache-2.0
-172,470,862,179,528,640
27.897541
128
0.582329
false
3.566515
false
false
false
papousek/spiderpig
spiderpig/commands/__init__.py
1
2466
import inspect import pkgutil from spiderpig import msg def register_submodule_command(subparsers, submodule, namespace=None): if 'command_name' in dir(submodule): command_name = submodule.command_name() else: command_name = submodule.__name__.split('.')[-1].replace('_', '-') command_name ...
mit
-6,623,176,681,507,010,000
43.836364
179
0.643147
false
4.11
false
false
false
PanDAWMS/panda-bigmon-core
core/iDDS/rawsqlquery.py
1
2227
from django.db import connection from core.libs.exlib import dictfetchall from core.iDDS.useconstants import SubstitleValue subtitleValue = SubstitleValue() def getTransforms(requestid): sqlpar = {"requestid": requestid} sql = """ select r.request_id, wt.transform_id from atlas_idds.requests r fu...
apache-2.0
-6,102,226,997,978,173,000
38.767857
203
0.700045
false
3.299259
false
false
false
rlindner81/pyload
module/plugins/hoster/UloziskoSk.py
1
2792
# -*- coding: utf-8 -*- import re import urlparse from module.plugins.internal.SimpleHoster import SimpleHoster class UloziskoSk(SimpleHoster): __name__ = "UloziskoSk" __type__ = "hoster" __version__ = "0.29" __status__ = "testing" __pattern__ = r'http://(?:www\.)?ulozisko\.sk/.+' __config_...
gpl-3.0
-8,195,883,641,328,275,000
37.611111
111
0.541727
false
3.180778
false
false
false
odoousers2014/odoo_addons-2
clv_batch/history/clv_batch_history.py
1
4497
# -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # ...
agpl-3.0
-5,816,356,412,459,246,000
43.97
119
0.50189
false
4.110603
false
false
false
UBOdin/jitd-synthesis
treetoaster_scripts/generate_supplements_1_2.py
1
24620
import gzip import json import sys import os import io import copy import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import matplotlib.patches as mpatches import math ''' name_dict = {0:"DeleteElemFromSingleton", 1:"DeleteKeyFromSingleton", 2:"DeleteSingletonFromArray", \ 3:"DeleteElemFrom...
apache-2.0
-1,083,448,114,857,438,200
29.583851
191
0.623842
false
2.767847
false
false
false
PinkInk/upylib
usnmp/usnmp_codec.py
1
4624
try: const(1) except: def const(v): return v SNMP_VER1 = const(0x00) ASN1_INT = const(0x02) ASN1_OCTSTR = const(0x04) ASN1_OID = const(0x06) ASN1_NULL = const(0x05) ASN1_SEQ = const(0x30) SNMP_GETREQUEST = const(0xa0) SNMP_GETNEXTREQUEST = const(0xa1) SNMP_GETRESPONSE = const(0xa2) SNMP_...
mit
-861,080,068,654,140,400
27.081761
76
0.481401
false
2.98708
false
false
false
dcramer/django-indexer
indexer/models.py
1
2134
from django.db import models from indexer.manager import IndexManager, BaseIndexManager __all__ = ('BaseIndex', 'Index') class BaseIndex(models.Model): object_id = models.PositiveIntegerField() column = models.CharField(max_length=32) value = models.CharField(max_length=128) objects...
bsd-3-clause
-5,385,190,340,513,325,000
31.846154
124
0.623243
false
3.88
false
false
false
peckpeck/ncf
tools/ncf.py
1
14597
# -*- coding: utf-8 -*- # This is a Python module containing functions to parse and analyze ncf components # This module is designed to run on the latest major versions of the most popular # server OSes (Debian, Red Hat/CentOS, Ubuntu, SLES, ...) # At the time of writing (November 2013) these are Debian 7, Red Hat/Cen...
gpl-3.0
2,263,840,300,145,619,700
34.515815
150
0.66267
false
3.572442
false
false
false
ponyorm/pony
pony/orm/tests/test_attribute_options.py
1
4415
import unittest from decimal import Decimal from datetime import datetime, time from random import randint from pony import orm from pony.orm.core import * from pony.orm.tests import setup_database, teardown_database from pony.orm.tests.testutils import raises_exception db = Database() class Person(db.Entity): i...
apache-2.0
-4,907,627,401,272,921,000
38.419643
116
0.644394
false
3.512331
true
false
false
deepmind/trfl
trfl/pixel_control_ops.py
1
9944
# Copyright 2018 The trfl 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 law...
apache-2.0
2,726,235,130,957,411,000
46.352381
80
0.686444
false
3.406646
false
false
false
apple/swift-lldb
packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/TestWatchpointCommands.py
1
14700
""" Test watchpoint list, enable, disable, and delete commands. """ from __future__ import print_function import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class WatchpointCommandsTestCase(TestBase): mydir = TestBase.compute_mydir(__f...
apache-2.0
-2,251,475,823,277,398,500
38.2
98
0.588571
false
4.228999
true
false
false
uclouvain/osis_louvain
base/migrations/0271_auto_20180518_1316.py
1
1578
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2018-05-18 11:16 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('base', '0270_auto_20180514_11...
agpl-3.0
4,740,987,942,569,407,000
45.411765
197
0.637516
false
3.964824
false
false
false
Doveps/mono
bassist/bassist/flavor/name.py
1
1154
# Copyright (c) 2015 Kurt Yoder # See the file LICENSE for copying permission. import logging import uuid import persistent import transaction module_logger = logging.getLogger(__name__) class FlavorNameException(Exception): pass class Name(persistent.Persistent): def __init__(self, name): self.name...
mit
-4,409,313,693,555,876,400
28.589744
77
0.610052
false
3.833887
false
false
false
scanny/python-pptx
tests/opc/test_packuri.py
1
3208
# encoding: utf-8 """ Test suite for the pptx.opc.packuri module """ import pytest from pptx.opc.packuri import PackURI class DescribePackURI(object): def cases(self, expected_values): """ Return list of tuples zipped from uri_str cases and *expected_values*. Raise if lengths don't matc...
mit
2,284,366,493,995,235,000
36.741176
80
0.600062
false
3.580357
false
false
false
skosukhin/spack
var/spack/repos/builtin/packages/hunspell/package.py
1
1705
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
8,032,308,674,784,042,000
42.717949
78
0.666276
false
3.901602
false
false
false
melmothx/jsonbot
jsb/plugs/core/grep.py
1
2039
# jsb/plugs/grep.py # # """ grep the output of bot comamnds. """ ## jsb imports from jsb.lib.commands import cmnds from jsb.utils.generic import waitforqueue from jsb.lib.examples import examples ## basic imports import getopt import re ## grep command def handle_grep(bot, ievent): """ grep the result list. ...
mit
3,966,035,338,071,662,000
27.319444
72
0.553703
false
3.404007
false
false
false