repo_name
stringlengths
6
61
path
stringlengths
4
230
copies
stringlengths
1
3
size
stringlengths
4
6
text
stringlengths
1.01k
850k
license
stringclasses
15 values
hash
int64
-9,220,477,234,079,998,000
9,219,060,020B
line_mean
float64
11.6
96.6
line_max
int64
32
939
alpha_frac
float64
0.26
0.9
autogenerated
bool
1 class
ratio
float64
1.62
6.1
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
tpeek/bike_safety
imagersite/imager_profile/migrations/0005_auto_20150802_0303.py
2
1491
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('imager_profile', '0004_auto_20150802_0153'), ] operations = [ migrations.RemoveField( model_name='imagerprofile'...
mit
-5,988,474,420,307,295,000
33.674419
241
0.570758
false
3.965426
false
false
false
iandennismiller/nexus-root
fabfile.py
1
5893
# -*- coding: utf-8 -*- # nexus5-root (c) Ian Dennis Miller from fabric.api import task, env import shutil import requests import os.path import time import glob from subprocess import call adb_cmd = os.path.join(os.path.expanduser(env.sdk_path), "platform-tools", "adb") fastboot_cmd = os.path.join(os.path.expanduser...
mit
-1,053,682,374,143,985,400
26.92891
107
0.633294
false
3.230811
false
false
false
hzruandd/AutobahnPython
examples/twisted/websocket/broadcast/server.py
2
4216
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
mit
7,782,896,050,432,775,000
32.19685
94
0.656309
false
4.428571
false
false
false
rdmorganiser/rdmo
rdmo/domain/migrations/0030_permissions.py
2
1257
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-02-28 12:34 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('domain', '0029_meta'), ] operations = [ migrations.AlterModelOptions( name...
apache-2.0
-2,316,072,209,223,785,000
39.548387
197
0.601432
false
4.364583
false
false
false
mpvillafranca/barestapas
tango_with_django_project/rango/views.py
1
3802
from django.shortcuts import render from django.http import HttpResponse from django.template import RequestContext from rango.models import Bar, Tapa from rango.forms import TapaForm from django.contrib.auth.decorators import login_required from django.http import JsonResponse # Pagina inicio def index(request): ...
gpl-3.0
4,444,577,186,692,221,400
32.350877
96
0.627827
false
3.702045
false
false
false
viper7882/PyMT4
PyMT4_example.py
1
3249
""" (C) Copyright 2013 Rob Watson rmawatson [at] hotmail.com and others. All rights reserved. This program and the accompanying materials are made available under the terms of the GNU Lesser General Public License (LGPL) version 2.1 which accompanies this distribution, and is available at http://www.gnu.org/lice...
lgpl-2.1
8,430,288,219,255,540,000
26.533898
106
0.579563
false
4.224967
false
false
false
openstack/manila
manila/share/drivers/netapp/dataontap/cluster_mode/data_motion.py
1
34061
# Copyright (c) 2016 Alex Meade. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
-8,708,134,808,909,844,000
45.341497
79
0.566836
false
4.481711
true
false
false
LuanZhanKuangGe/personal-terrible-crawler
ui/crawler_sisid.py
1
2300
from urllib import request from html.parser import HTMLParser NAME = "HD-Jiggly" COOKIE = 'cookie.txt' class parseLinks(HTMLParser): def __init__(self): HTMLParser.__init__(self) self.data = [] self.flag_tbody = False self.flag_span = False self.flag_a = False self...
gpl-2.0
-539,299,934,032,095,500
31.394366
78
0.515652
false
3.745928
false
false
false
lowinger42/ergotime
client/logger.py
1
4506
#!/usr/bin/env python3 """ Handle logging All logging is done througt QT signal/slots, so they can be used from other threads. Copyright (C) 2020 Anders Lowinger, anders@abundo.se This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published b...
mit
17,119,645,099,116,064
30.291667
97
0.607634
false
3.805743
false
false
false
acislab/HuMaIN_Microservices
call_seg.py
1
6925
# -*- coding: utf-8 -*- ########################################################################################## # Developer: Luan,Jingchao Project: HuMaIN (http://humain.acis.ufl.edu) # Description: # Script to invoke the OCRopus Segmentation microservice. Given the binarized images' # directory or an imag...
apache-2.0
6,504,962,605,139,420,000
39.502924
144
0.702238
false
3.584369
false
false
false
adamrvfisher/TechnicalAnalysisLibrary
RMultipleTracker55DayOneUnit.py
1
31417
# -*- coding: utf-8 -*- """ Created on Wed Jul 11 09:04:55 2018 @author: AmatVictoriaCuramIII """ #Developed in Python 3.5 #R Multiple Finder; Trade Tracking import numpy as np import random as rand import pandas as pd import time as t from DatabaseGrabber import DatabaseGrabber from YahooGrabber import...
apache-2.0
-5,094,780,257,082,969,000
42.565957
145
0.646752
false
3.01131
false
false
false
PeterSurda/PyBitmessage
src/bitmessageqt/messageview.py
3
6476
""" Custom message viewer with support for switching between HTML and plain text rendering, HTML sanitization, lazy rendering (as you scroll down), zoom and URL click warning popup """ from PyQt4 import QtCore, QtGui from safehtmlparser import SafeHTMLParser from tr import _translate class MessageView(QtGui.QTextB...
mit
4,740,693,595,252,166,000
38.730061
116
0.601452
false
4.30299
false
false
false
pombredanne/SourceForge-Allura
ForgeBlog/forgeblog/tests/functional/test_root.py
2
7471
import datetime from ming.orm.ormsession import ThreadLocalORMSession from mock import patch from alluratest.controller import TestController from allura import model as M #---------x---------x---------x---------x---------x---------x---------x # RootController methods exposed: # index, new_page, search # PageCon...
apache-2.0
8,516,946,714,885,063,000
37.510309
82
0.566725
false
3.578065
true
false
false
greyfenrir/taurus
bzt/utils.py
1
79242
# coding=utf-8 """ Every project needs its trash heap of miscellaneous functions and classes Copyright 2015 BlazeMeter 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...
apache-2.0
8,118,429,725,673,698,000
32.776641
118
0.573624
false
4.07781
true
false
false
zelros/bunt
tools/comparator.py
1
1525
# -*- coding: utf-8 -*- from api_managers import api_builder from tools import loader import logging logger = logging.getLogger(__name__) class Comparator: def __init__(self, criteria, apis, scorer, fallback_name): self.criteria = criteria self.apis = apis self.scorer = scorer s...
mit
-6,137,808,317,277,305,000
35.309524
105
0.518689
false
4.593373
false
false
false
edwardsnj/rmidb2
rmidb2/secpwhash.py
1
1268
import os from hashlib import sha256 from hmac import HMAC import random # def random_bytes(num_bytes): # return "".join(chr(random.randrange(256)) for i in xrange(num_bytes)) def random_bytes(num_bytes): return os.urandom(num_bytes) def pbkdf_sha256(password, salt, iterations): result = password for i in ...
mit
-1,856,692,794,521,895,200
32.368421
107
0.731861
false
3.276486
false
false
false
jjgoings/nfl-colley-method
getdata.py
1
1594
import sys import urllib from numpy import genfromtxt import numpy as np def get_teams(): f = urllib.urlopen("http://www.masseyratings.com/scores.php?s=199229&sub=199229&all=1&mode=3&exhib=on&format=2") s = f.read().split() my_teamnames = {} for i in range(0,len(s)/2): my_teamnames.update({i :...
gpl-3.0
306,782,854,921,786,430
34.422222
124
0.605395
false
2.924771
false
false
false
Azure/azure-sdk-for-python
sdk/aks/azure-mgmt-devspaces/azure/mgmt/devspaces/operations/_controllers_operations.py
1
32241
# 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 may ...
mit
6,755,182,040,412,394,000
48.75463
203
0.63931
false
4.269766
true
false
false
camillemonchicourt/Geotrek
geotrek/common/factories.py
1
1280
import factory from django.contrib.contenttypes.models import ContentType from paperclip.models import Attachment from geotrek.authent.factories import UserFactory from geotrek.common.utils.testdata import get_dummy_uploaded_file from . import models class OrganismFactory(factory.Factory): FACTORY_FOR = model...
bsd-2-clause
-1,162,122,698,969,685,800
26.826087
71
0.717188
false
3.710145
false
false
false
ginogervasio/pytolab-trends
trends/db.py
1
9714
#!/usr/bin/python # -*- coding: utf-8 -*- import json import logging import time import redis import redis.exceptions import MySQLdb import config import data import exceptions import log class Db(object): db_mem = None db_mem_posts = None db_disk_posts = None db_cursor = None retries = 360 ...
mit
-2,490,943,459,274,629,000
32.965035
94
0.525736
false
3.717566
true
false
false
hechi/rooftop
rooftop/forms.py
1
1043
# -*- coding: utf-8 -*- from django import forms class UserprofileForm(forms.Form): oldPassword = forms.CharField(label='Old Password',widget=forms.PasswordInput()) newPassword = forms.CharField(label='New Password',widget=forms.PasswordInput()) confirmPassword = forms.CharField(label='Confirm Password',wi...
mit
-7,918,245,075,627,724,000
42.458333
92
0.741131
false
4.042636
false
false
false
eneldoserrata/marcos_openerp
marcos_addons/hotel-7.0/hotel_reservation/report/hotel_reservation_report.py
1
5382
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-Today Serpent Consulting Services Pvt. Ltd. (<http://www.serpentcs.com>) # Copyright (C) 2004 OpenERP SA (<http://www.openerp.com>) # # T...
agpl-3.0
1,520,401,525,855,404,500
48.842593
154
0.605909
false
3.604823
false
false
false
tensorflow/lingvo
lingvo/tasks/car/input_preprocessors.py
1
137776
# Lint as: python3 # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
apache-2.0
-1,775,499,709,604,169,200
37.10177
80
0.652196
false
3.658709
false
false
false
ZeekWang/YoudaoDictAlfredWorkflow
alfred.py
1
3295
# -*- coding: utf-8 -*- # Copyright 2013 Dr. Jan Müller # 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 ...
apache-2.0
3,484,946,271,677,520,000
29.794393
92
0.651488
false
3.790564
false
false
false
gleydsonm/pynet_ex
class4/exercise7.py
1
1048
#!/usr/bin/env python ''' Exercise 5 - Class 4 Gleydson Mazioli <gleydsonmazioli@gmail.com ''' import netmiko def remote_connect(host): ''' Connect to a remote host ''' return netmiko.ConnectHandler(**host) def send_command(conn, cmd): ''' Send a command ''' return conn.send_command(c...
apache-2.0
-5,268,592,781,599,579,000
18.773585
68
0.567748
false
3.275
true
false
false
rnicoll/dogecoin
test/functional/feature_signet.py
1
3282
#!/usr/bin/env python3 # Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test basic signet functionality""" from decimal import Decimal from test_framework.test_framework imp...
mit
-3,319,875,437,481,084,000
51.095238
686
0.742535
false
3.192607
true
false
false
jimpick/jaikuengine
common/test/util.py
1
4946
# Copyright 2009 Google 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 writing, ...
apache-2.0
-2,671,414,803,026,199,000
24.106599
74
0.6296
false
3.310576
false
false
false
tfadgreef/Automated-DNA-Design
src/randomizer.py
1
13561
# randomizer class # This program is part of the TUPack software package and makes use of NuPack 3.0. NuPack can be found on <www.nupack.org>g> # This class creates an object performing random sequence mutations to outline the spread of the free energy predictions. # For more info about the program, please read the use...
gpl-3.0
-4,341,163,803,710,181,400
29.068736
164
0.622594
false
3.582827
false
false
false
kevin-intel/scikit-learn
sklearn/impute/_base.py
2
32946
# Authors: Nicolas Tresegnie <nicolas.tresegnie@gmail.com> # Sergey Feldman <sergeyfeldman@gmail.com> # License: BSD 3 clause import numbers import warnings from collections import Counter import numpy as np import numpy.ma as ma from scipy import sparse as sp from scipy import stats from ..base import Base...
bsd-3-clause
1,939,547,547,607,645,400
37.264808
79
0.556031
false
4.374718
false
false
false
btrent/knave
pychess/ic/__init__.py
1
7376
from pychess import Variants from pychess.Utils.const import * # RatingType TYPE_BLITZ, TYPE_STANDARD, TYPE_LIGHTNING, TYPE_WILD, \ TYPE_BUGHOUSE, TYPE_CRAZYHOUSE, TYPE_SUICIDE, TYPE_LOSERS, TYPE_ATOMIC, \ TYPE_UNTIMED, TYPE_EXAMINED, TYPE_OTHER = range(12) class GameType (object): def __init__ (self, fic...
gpl-3.0
7,960,760,588,244,372,000
38.655914
87
0.627847
false
2.953945
false
false
false
harej/wikiproject_scripts
unported/project_category_audit.py
2
3608
# -*- coding: utf-8 -*- """ Audits WikiProjects for inconsistencies between their project pages and their categories Copyright (C) 2015 James Hare Licensed under MIT License: http://mitlicense.org """ import pywikibot from project_index import WikiProjectTools class ProjectCategoryAudit: def go(self): w...
mit
8,073,987,688,695,981,000
49
367
0.617222
false
3.801478
false
false
false
ykoga-kyutech/Brain_Hacker
handlers/group_handler.py
2
2801
import tornado.web from handlers.base_handler import BaseHandler from models.group import Group from models.user import User from .util import check_group_permission from forms.forms import GroupForm class GroupsHandler(BaseHandler): @tornado.web.authenticated def get(self): group_name = self.get_arg...
mit
6,915,205,663,668,687,000
29.217391
79
0.643397
false
3.666227
false
false
false
noba3/KoTos
addons/plugin.video.movie25/resources/libs/sports/tsn.py
1
4564
import urllib,urllib2,re,cookielib,string, urlparse,sys,os import xbmc, xbmcgui, xbmcaddon, xbmcplugin,urlresolver from resources.libs import main #Mash Up - by Mash2k3 2012. from t0mm0.common.addon import Addon from resources.universal import playbackengine, watchhistory addon_id = 'plugin.video.movie25' selfAddon =...
gpl-2.0
-3,551,755,663,308,800,500
70.3125
349
0.643734
false
2.734572
false
false
false
xinghalo/DMInAction
src/spider/BrandSpider/brand2.py
1
8020
#!/usr/bin/env python # -*- coding: utf-8 -*- import urllib import urllib2 import re import json class Spider: def __init__(self): self.url = 'https://www.paizi.com/' self.user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36' self.hea...
apache-2.0
-4,018,235,135,387,909,600
30.118852
166
0.626581
false
2.594668
false
false
false
dpaiton/OpenPV
projects/HyPerRetina/tuning/tune_main_gar.py
2
31500
#!/usr/bin/env python #For tuning retina on DARPA Heli #Created by Dylan Paiton from tune_functions import * ################### ### ### ### Global vars ### ### ### ################### run_PetaVision = 0 #Will just create params file if set to 0 pipe_output_to_file = 1 mpi_np ...
epl-1.0
-96,675,837,093,836,750
54.360281
189
0.576444
false
3.400259
false
false
false
haodongchen/BSseeker2-tools
Step1.py
1
2096
#!/usr/bin/env python # Copyright (c) 2014 UCLA # Authors: Haodong Chen and Thomas M. Vondriska # # This software is distributable under the terms of the GNU General # Public License (GPL) v2, the text of which can be found at # http://www.gnu.org/copyleft/gpl.html. Installing, importing or # otherwise using this modul...
gpl-2.0
7,939,004,548,819,058,000
39.307692
110
0.621183
false
3.369775
false
false
false
cernbox/smashbox
lib/test_concurrentDirMove.py
1
4328
__doc__ = """ This test moves concurrently a directory ('mover' worker) while files are added to it ('adder' worker) . The expected outcome is that all added files are kept on the server and are found in the final directory. """ from smashbox.utilities import * if platform.system().lower() == "darwin": do_not_re...
agpl-3.0
4,133,240,066,960,746,000
28.04698
167
0.690619
false
3.45411
false
false
false
ganga-devs/ganga
doc/manuals/src/dev_survival/makegraph.py
1
1662
# generate job status transition graph # usage: # 1) run ganga and this file as a script # or 2) cd ganga/python, run python interactively and execfile(this_file) ARC_LABELS = True STYLED_EDGES = True DEBUG = False from Ganga.GPIDev.Lib.Job import Job import os g = Job.status_graph initial_states = Job.initial_s...
gpl-2.0
-2,071,245,197,494,378,500
25.806452
152
0.607702
false
2.807432
false
false
false
rwl/godot
godot/component/text.py
1
5703
#------------------------------------------------------------------------------ # Copyright (C) 2007 Richard W. Lincoln # # 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; version 2 dated June, 19...
mit
1,190,239,686,013,754,000
32.745562
79
0.473786
false
4.171909
false
false
false
ybogdanov/history-timeline
scripts/txt_to_json.py
1
1460
#!/usr/bin/python import sys import json import re from operator import itemgetter comment_line = re.compile(r"^\s*(?:#.*)?$") re_line = re.compile( r''' ^\s* (?P<name>[^:]+) # Person name (?: \s*:\s* (?P<properties>.+)? # Properties )? ''', re.VERBOSE ) regex = re.compil...
gpl-2.0
2,532,537,697,041,589,000
22.548387
105
0.555479
false
3.258929
false
false
false
metabrainz/picard
picard/__init__.py
2
5028
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2006-2008, 2011-2014 Lukáš Lalinský # Copyright (C) 2009, 2018-2021 Philipp Wolfer # Copyright (C) 2012 Chad Wilson # Copyright (C) 2012-2013 Michael Wiencek # Copyright (C) 2013-2020 Laurent Monin # Copyright (C) 2015 Ohm Pate...
gpl-2.0
-5,324,598,364,417,041,000
34.380282
128
0.689291
false
3.450549
false
false
false
retrogradeorbit/Pigo
pigo/lib/ModulePygame.py
1
3307
# -*- coding: utf-8 -*- import pygame from PigoFont import PigoFont class Font(pygame.font.Font, PigoFont): def __init__(self, filename, size): pygame.font.Font.__init__(self,filename,size) def GetHeight(self): return pygame.font.Font.get_height(self) def GetAscent(self):...
gpl-3.0
2,711,493,912,700,501,500
24.060606
183
0.640157
false
3.017336
false
false
false
tmsbrg/clump
clump_test.py
1
2581
#!/usr/bin/python3 # clumping factor test. Creates a forest with certain size and terrain regularity based on settings # Copyright Thomas van der Berg 2016, released under GNU GPLv3(see LICENSE) import random # settings w = 25 # width of world h = 21 # height of world trees = 75 # number of trees in forest. If more ...
gpl-3.0
64,574,869,053,653,050
29.72619
118
0.596668
false
3.279543
false
false
false
person142/scipy
scipy/spatial/_spherical_voronoi.py
1
13865
""" Spherical Voronoi Code .. versionadded:: 0.18.0 """ # # Copyright (C) Tyler Reddy, Ross Hemsley, Edd Edmondson, # Nikolai Nowaczyk, Joe Pitt-Francis, 2015. # # Distributed under the same BSD license as SciPy. # import warnings import numpy as np import scipy from . import _voronoi from scipy.spat...
bsd-3-clause
-8,462,916,385,199,716,000
38.501425
79
0.601442
false
3.891384
false
false
false
orcmkit/ORCmKit
Python27/ORCSim/LineSet.py
1
3486
from __future__ import division from CoolProp.CoolProp import PropsSI from Correlations import f_h_1phase_Tube,TrhoPhase_ph,Tsat from math import log,pi,exp class LineSetClass(): def __init__(self,**kwargs): #Load the parameters passed in # using the dictionary self.__dict__.update(kwargs) ...
mit
-4,930,696,320,973,330,000
39.546512
115
0.564831
false
3.063269
false
false
false
erwin00776/copy_ml_implements
decision_tree/decision_tree_id3.py
1
5458
#!/usr/bin/env python # -*- encoding: utf-8 -*- import math import operator def calculateShannonEntropy(dataset): # [[0, 0, 0, 0, 'N'], [0, 0, 1, 1, 'Y']] instance_number = len(dataset) # {'Y': 1, 'N': 1} label_number_map = {} for instance in dataset: label = instance[-1] if label not in label_nu...
mit
-430,658,863,282,517,300
28.031915
79
0.621107
false
3.17695
true
false
false
jonmsawyer/maio
maio/forms/LoginForm.py
1
2601
'''File: JurorForm.py Module: ``portal.forms.JurorForm`` Contains the JurorForm class used on the front page of the OQ portal. ''' from datetime import datetime import re from django import forms from django.utils.safestring import mark_safe from django.core.exceptions import ValidationError class LoginForm(forms...
mit
-5,810,386,756,428,455,000
31.111111
83
0.579777
false
4.772477
false
false
false
vi/enki
enki/plugins/workspace_commands.py
1
9151
""" workspace_commands --- Open, SaveAs, GotoLine commands ====================================================== """ import os.path import glob from enki.core.core import core from enki.lib.pathcompleter import makeSuitableCompleter, PathCompleter from enki.core.locator import AbstractCommand class CommandGotoLin...
gpl-2.0
-8,741,756,029,742,064,000
28.614887
131
0.561359
false
4.536936
false
false
false
zzvv/shadowsocks_admin
master_node/master_node/views.py
2
8577
#!/usr/bin/python # -*- coding: utf-8 -*- # utf-8 中文编码 import random import string from datetime import datetime,timedelta from django import http from django import forms from django.db.models import Q from django.conf import settings from master_node.models import * from django.template import RequestContext from dja...
gpl-2.0
-636,366,153,785,334,000
34.340517
151
0.555434
false
4.0995
false
false
false
Delosari/dazer
bin/user_conf/Helium_EmissivityComparison.py
1
3138
from numpy import array, linspace, zeros, pi from CodeTools.PlottingManager import myPickle import pyneb as pn S4 = pn.RecAtom('He',1) He1_Emis_pyneb = S4.getEmissivity(tem=10000.0, den=100.0, label = '3889.0') He_Emis_article = 1.4005 * 1e-25 #Unit...
mit
-3,833,703,524,354,702,300
35.08046
160
0.633206
false
2.540891
false
false
false
RedFantom/GSF-Parser
frames/file.py
1
14998
""" Author: RedFantom Contributors: Daethyra (Naiii) and Sprigellania (Zarainia) License: GNU GPLv3 as in LICENSE.md Copyright (C) 2016-2018 RedFantom """ # UI Libraries import tkinter as tk from tkinter import ttk from tkinter import messagebox from tkinter import filedialog # Standard Library from datetime import dat...
gpl-3.0
6,754,647,611,967,693,000
47.85342
116
0.627484
false
3.717898
false
false
false
satnet-project/propagators
predict_sims.py
1
4156
################################################################################ # Copyright 2015 Samuel Gongora Garcia (s.gongoragarcia@gmail.com) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundat...
apache-2.0
1,737,409,023,068,610,600
30.255639
129
0.55462
false
3.785064
false
false
false
City-of-Bloomington/green-rental
scripts/columbia-lookup_electricity_data.py
2
24413
#!/usr/bin/env python """ # # By: Charles Brandt [code at charlesbrandt dot com] # On: *2015.05.16 11:38:01 # License: GPLv3 # Requires: # Description: This script assumes buildings and units have been created in the database It should be possible to use the original CSV *or* the database as the main source for the...
agpl-3.0
-6,013,896,442,082,118,000
39.824415
225
0.48593
false
4.36414
false
false
false
czhuang/ChordRipple
app/resource.py
1
56047
import os from copy import deepcopy import cPickle as pickle import numpy as np from music21 import pitch from socketio.namespace import BaseNamespace from socketio.mixins import BroadcastMixin from dynamic_programming_tools import shortest_path, simple_foward_backward_gap_dist from retrieve_model_tools import r...
mit
7,431,477,055,743,939,000
35.752131
149
0.532678
false
3.830702
false
false
false
hanul93/kicomav
Engine/plugins/ishield.py
1
7201
# -*- coding:utf-8 -*- # Author: Kei Choi(hanul93@gmail.com) import struct import zlib import os import py7zlib import zipfile import kernel import kavutil # --------------------------------------------------------------------- # InstallShield 클래스 # -----------------------------------------------------------------...
gpl-2.0
7,359,592,932,144,410,000
30.199029
75
0.391318
false
2.751284
false
false
false
proneetv/catalyst
setup.py
1
3989
#!/usr/bin/python2 -OO # Copyright (C) 2013 W. Trevor King <wking@tremily.us> # # 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,040,213,861,178,809,300
31.430894
120
0.69817
false
3.227346
false
false
false
glemaitre/UnbalancedDataset
imblearn/combine/smote_tomek.py
2
6650
"""Class to perform over-sampling using SMOTE and cleaning using Tomek links.""" # Authors: Guillaume Lemaitre <g.lemaitre58@gmail.com> # Christos Aridas # License: MIT from __future__ import division import logging import warnings from sklearn.utils import check_X_y from ..base import SamplerMixin from ....
mit
-1,936,412,790,816,934,100
34.561497
79
0.606015
false
3.859547
false
false
false
rpiotti/glances
glances/plugins/glances_plugin.py
11
24382
# -*- coding: utf-8 -*- # # This file is part of Glances. # # Copyright (C) 2015 Nicolargo <nicolas@nicolargo.com> # # Glances is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
lgpl-3.0
6,693,510,422,843,767,000
35.886536
127
0.536748
false
4.272297
false
false
false
Noah1989/FlowSID
wire.py
1
3951
import pygame, graphics, palette segment_width = 8 class Wire(): def __init__(self): segment = Segment() self.segments = [segment] def set_start(self, (x, y)): old_stop = self.segments[-1].rect.topright self.segments[0].rect.left = x ...
bsd-2-clause
808,133,483,931,288,800
32.201681
81
0.489749
false
4.007099
false
false
false
ulif/pulp
server/test/unit/server/managers/content/test_upload.py
4
12095
import errno import os import shutil import unittest import mock from .... import base from pulp.common import dateutils from pulp.devel import mock_plugins from pulp.plugins.conduits.upload import UploadConduit from pulp.server.controllers import importer as importer_controller from pulp.server.db import model from ...
gpl-2.0
-4,129,315,307,559,645,700
40.706897
100
0.651013
false
3.75388
true
false
false
threemeninaboat3247/kuchinawa
kuchinawa/File.py
1
2267
# -*- coding: utf-8 -*- """ --- Description --- Module: File.py Abstract: A module for file output. Modified: threemeninaboat3247 2018/04/30 --- End --- """ # Standard library imports import sys # Third party library imports import pandas as pd class File(): ''' ...
mit
6,346,658,029,452,516,000
24.2
85
0.505514
false
4.561368
false
false
false
pdroalves/mongodb-secure
src/mongodb-secure/cipher/modules/orelewi/crypto_bkp/test.py
1
2199
#!/usr/bin/env python ########################################################################## ########################################################################## # # mongodb-secure # Copyright (C) 2016, Pedro Alves and Diego Aranha # {pedro.alves, dfaranha}@ic.unicamp.br # This program is free software: you ...
gpl-3.0
6,545,534,527,663,450,000
34.483871
120
0.637563
false
3.671119
false
false
false
datawire/quark
quarkc/test/ffi/expected/py/signatures/generics/__init__.py
1
3475
from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from builtins import str as unicode from quark_runtime import * _lazyImport.plug("generics") import quark.reflect import generics.constructors import generics.pkg import ...
apache-2.0
-2,453,293,335,003,595,000
22.013245
83
0.566906
false
3.427022
false
false
false
Mozzo1000/InstPakg
source/menu.py
1
1678
import os, sys, curses, atexit, time import sys reload(sys) sys.setdefaultencoding("utf-8") class cmenu(object): datum = {} ordered = [] pos = 0 def __init__(self, options, title="Menu"): curses.initscr() curses.start_color() curses.use_default_colors() curses.init_pair(1, curses.COLOR_RED, curses.COLOR_...
mit
4,464,027,325,138,235,400
18.97619
67
0.606079
false
2.60559
false
false
false
eset/malware-research
glupteba/decrypt_str.py
1
5383
# -*- encoding: utf-8 -*- # # This IDA script decrypts the strings inside *unpacked* samples of # Glupteba.AY samples For details about Glupteba.AY, see: # https://www.welivesecurity.com/2018/03/22/glupteba-no-longer-windigo/ # # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware...
bsd-2-clause
5,605,664,482,483,673,000
33.273885
78
0.623676
false
3.346393
false
false
false
anomaly/vishnu
tests/middleware/__init__.py
1
2199
import falcon import pytest import vishnu class BaseHandler(object): @property def session(self): """ :return: the current vishnu session :rtype: vishnu.session.Session """ return vishnu.get_session() class PrivateHandler(BaseHandler): def on_get(self, req, resp...
apache-2.0
8,724,134,717,482,691,000
21.90625
62
0.630741
false
3.446708
false
false
false
envhyf/wrftools
wrftools/extract.py
2
6064
"""extract.py provides a thin wrapper around an ncl script to extract WRF variables and diagnostics at specified locations and heights above ground level Usage: extract.py <file>... [--config=<file>] [--out-dir=<dir>] [--ncl-script=<file>] [--heigh...
gpl-3.0
2,212,893,001,227,477,800
32.541899
182
0.531992
false
3.319102
true
false
false
jaumebonet/pynion
pynion/__main__.py
2
1819
import argparse import datetime import re from . import Manager m = Manager() # User Options def options(*args, **kwds): ''' User options. @return: {Namespace} ''' parser = argparse.ArgumentParser(prog = 'pynion', formatter_class = argparse.Argumen...
mit
1,292,990,639,282,312,700
30.362069
94
0.503573
false
4.25
false
false
false
jna29/SymGP
symgp/superexpressions/supermatmul.py
1
5884
from sympy import MatMul, MatAdd, ZeroMatrix, MatrixBase, Identity, ShapeError, MatrixExpr, S, Number from sympy.core.decorators import call_highest_priority from sympy.strategies import (rm_id, unpack, typed, flatten, sort, condition, exhaust, do_one, new, glom) from .supermatbase import SuperMatBase class S...
mit
5,642,404,034,762,698,000
29.335052
101
0.579538
false
3.498216
false
false
false
Vodak/SINS
src/Game.py
1
15067
""" Classe Game qui gère le jeu """ from Map import * from Animation import * class Game: # Constructeur: def __init__(self): self.Map = Map() self.clock = sf.Clock() self.tour = 0 self.window = sf.RenderWindow(sf.VideoMode(960, 640), "SINS - An amazing not simulator by Vodak") self.ke...
gpl-3.0
4,866,727,451,411,234,000
37.129114
174
0.607171
false
2.543919
false
false
false
atumanov/ray
examples/streaming/streaming.py
1
3685
import argparse from collections import Counter, defaultdict import heapq import numpy as np import os import ray import wikipedia parser = argparse.ArgumentParser() parser.add_argument("--num-mappers", help="number of mapper actors used", default=3) parser.add_argument("--num-reducers", ...
apache-2.0
2,850,757,399,885,752,300
34.432692
77
0.609769
false
3.830561
false
false
false
alexlee-gk/visual_dynamics
visual_dynamics/spaces/concatenation_space.py
1
1401
from __future__ import division, print_function import numpy as np from visual_dynamics.spaces import Space class ConcatenationSpace(Space): def __init__(self, spaces): self.spaces = spaces sizes = [] for space in self.spaces: size, = space.shape sizes.append(size...
mit
-2,616,647,832,349,943,000
30.840909
100
0.604568
false
3.870166
false
false
false
franchenstein/master_project
probabilisticstate.py
1
2966
import state import random as rnd ''' Probabilistic version of state class. The outedges include a third parameter, which reflects the probability of that outgoing edge being taken. Methods regarding this new parameter are added. ''' class ProbabilisticState(state.State): def __init__(self, name, outedges): ...
mit
7,243,784,253,227,526,000
31.23913
87
0.556305
false
3.965241
false
false
false
DrigerG/IIITB-ML
project/ChatBot/seq2seq_wrapper.py
1
7968
import sys import numpy as np import tensorflow as tf class Seq2Seq(object): def __init__(self, xseq_len, yseq_len, xvocab_size, yvocab_size, emb_dim, num_layers, ckpt_path, lr=0.0001, epochs=100000, model_name='seq2seq_model'): # attach...
apache-2.0
4,645,855,633,055,719,000
40.5
78
0.527359
false
4.03443
true
false
false
nick-youngblut/SIPSim
SIPSim/rtnorm.py
1
203109
# -*- coding: utf-8 -*- """ This is a Python implementation of the fast algorithm developed by Vincent Mazet and Nicolas Chopin (see http://miv.u-strasbg.fr/mazet/rtnorm/). The version this code is based on is the Matlab implementation from 2012. Created on Mon Aug 12 13:48:22 2013 Update on 11/27/2014: Added `erf` f...
mit
-588,227,687,337,240,200
74.253057
125
0.691327
false
2.051741
false
false
false
Shrobs/climulon
climulon/handlers/provision.py
1
9907
import boto3 import botocore import time from handlers import utils import dependency_engine as engine import taskDefs import services from handlers.exceptions import (StackExistsError, TaskDefExistsError, StackUnresolvedDependency, ...
gpl-3.0
-8,367,918,283,107,603,000
38.47012
96
0.556576
false
5.154527
true
false
false
twisted/quotient
xquotient/test/test_scrubber.py
1
4268
from twisted.trial.unittest import TestCase from twisted.web.microdom import parseString, getElementsByTagName from twisted.web.domhelpers import gatherTextNodes from xquotient.scrubber import scrub, scrubCIDLinks class ScrubberTestCase(TestCase): def test_scrubCIDLinksWithLinks(self): """ Test L...
mit
7,923,884,959,483,736,000
29.269504
85
0.545923
false
3.598651
true
false
false
simpeg/discretize
discretize/utils/mesh_utils.py
1
36741
import numpy as np import scipy.ndimage as ndi import scipy.sparse as sp from discretize.utils.matrix_utils import ndgrid from discretize.utils.code_utils import as_array_n_by_dim, is_scalar from scipy.spatial import cKDTree, Delaunay from scipy import interpolate import discretize from discretize.utils.code_utils imp...
mit
-6,004,870,361,446,141,000
33.145911
96
0.544269
false
3.540619
false
false
false
saseumn/website
migrations/versions/e7410a32fd81_.py
1
1218
"""Add resumes. Revision ID: e7410a32fd81 Revises: 4453e9c3a9be Create Date: 2018-01-17 11:49:53.974612 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'e7410a32fd81' down_revision = '4453e9c3a9be' branch_labels = None depends_on = None def upgrade(): # #...
mit
9,013,851,385,332,065,000
28
65
0.666667
false
3.327869
false
false
false
fedhere/fedsastroutils
myastrotools.py
1
8101
#!/usr/bin/env python # myastrotools # some useful astro functions # not really "MY" astro toold either. mostly inheritade, as they propagate through generations of astronomers. couldnt tell who was the author of which function.... import datetime # chomp #################### def absmag(appmag,d,dunits='pc'): fr...
mit
-8,112,262,724,564,647,000
24.080495
164
0.504876
false
2.846451
false
false
false
VanceKingSaxbeA/GoldSVM
GoldSaxSVM.py
1
16983
/*Owner & Copyrights: Vance King Saxbe. A.*/""" Copyright (c) <2014> Author Vance King Saxbe. A, and contributors Power Dominion Enterprise, Precieux Consulting and other contributors. Modelled, Architected and designed by Vance King Saxbe. A. with the geeks from GoldSax Consulting and GoldSax Technologies email @vsaxb...
mit
-3,275,144,992,903,995,000
47.945245
497
0.58217
false
2.913536
true
false
false
danzek/nlhbi-malware-extractor
fileurl.py
1
4765
#!/usr/bin/env python # ---------------------------------------------------------------------- # This file is part of PEframe. # # PEframe 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 t...
gpl-2.0
2,750,757,777,264,042,000
25.325967
159
0.556558
false
2.944994
false
false
false
commoncrawl/cc-crawl-statistics
plot/mimetype_detected.py
1
1073
import sys from plot.mimetype import MimeTypeStats from crawlstats import CST, MonthlyCrawl class MimeTypeDetectedStats(MimeTypeStats): def __init__(self): super().__init__() self.MAX_TYPE_VALUES = MimeTypeStats.MAX_MIME_TYPES def norm_value(self, mimetype): return mimetype def...
apache-2.0
-2,455,439,897,108,466,700
29.657143
89
0.634669
false
3.291411
false
false
false
shixiaobo8/yjy_django_omsa
Myapp/learn/admin.py
1
3110
#! /usr/bin/env python # -*- coding:utf-8 -*- from django.contrib import admin from .models import Nav, MyUser from .forms import NewForm, LoginForm from django import forms from django.contrib.auth.models import Group from django.contrib.auth.admin import UserAdmin from django.contrib.auth.forms import ReadOnlyPasswor...
apache-2.0
4,027,522,227,069,869,600
34.747126
90
0.663987
false
4.180108
false
false
false
rwhite226/Graphalyzer
graphalyzer-server/src/websocketserver/handlers/GetGraphChunkHandler.py
1
5345
from itertools import chain from websocketserver.handlers.ErrorHandler import * from py2neo import Graph import math import logging import concurrent class GetGraphChunkHandler(HandleInterface): """Class to handle sending whole graph to client.""" _payload = "" _request = "" def __init__(self, reque...
apache-2.0
2,174,785,616,006,924,500
38.014599
96
0.481946
false
4.338474
false
false
false
pabigot/coapy
coapy/util.py
1
12842
# -*- coding: utf-8 -*- # Copyright 2013, Peter A. Bigot # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain a # copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
apache-2.0
248,601,265,982,407,840
34.573407
85
0.611276
false
3.773729
false
false
false
flavio-casacurta/Nat2Py
Adabas/demo/ticker.py
1
4117
""" ticker.py -- Store Timestamp into Ticker File every 60 seconds The Ticker file has the following field 01,TI,20,A,DE,NU Each minute will have a separate record with ISN=minute of day. At most there will be 1440 ISNs. If the interval is other than 60 the number of records changes by factor i/60. Usage: py...
mit
5,492,103,608,900,403,000
25.56129
87
0.560117
false
3.341721
false
false
false
MapofLife/MOL
earthengine/google-api-python-client/samples/searchforshopping/crowding.py
1
1667
#!/usr/bin/python2.4 # -*- coding: utf-8 -*- # # Copyright 2010 Google Inc. All Rights Reserved. """Query with grouping against the shopping search API""" import pprint from apiclient.discovery import build SHOPPING_API_VERSION = 'v1' DEVELOPER_KEY = 'AIzaSyACZJW4JwcWwz5taR2gjIMNQrtgDLfILPc' def main(): """Get...
bsd-3-clause
7,437,159,467,282,523,000
33.729167
78
0.718056
false
3.402041
false
false
false
OpenCode/l10n-italy
__unported__/l10n_it_base_crm/crm/crm.py
15
2181
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>) # Author: Nicola Malcontenti <nicola.malcontenti@agilebg.com> # Copyright (C) 2013 Associazione OpenERP Italia # (<h...
agpl-3.0
3,865,640,962,493,148,000
40.150943
78
0.574049
false
4.001835
false
false
false
davidljung/rl-glue-ext
projects/codecs/Python/src/tests/test_speed_environment.py
8
1962
# # Copyright (C) 2008, Brian Tanner # #http://rl-glue-ext.googlecode.com/ # # 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 requ...
apache-2.0
4,876,467,533,458,294,000
23.525
74
0.733435
false
3.1392
false
false
false
eman/iotrelay-influxdb
setup.py
1
1249
#!/usr/bin/env python import os from setuptools import setup project_dir = os.path.abspath(os.path.dirname(__file__)) long_descriptions = [] for rst in ('README.rst', 'LICENSE.rst'): with open(os.path.join(project_dir, rst), 'r') as f: long_descriptions.append(f.read()) setup(name='iotrelay-influxdb', ...
bsd-2-clause
-43,143,843,708,971,230
33.694444
60
0.603683
false
3.459834
false
false
false
jaety/image-river
indexer/inspector.py
1
2144
import subprocess import logutil as log import itertools import re import csv def group(iterable, n, fillvalue=None): args = [iter(iterable)] * n return itertools.izip_longest(fillvalue=fillvalue, *args) @log.timed() def list_images(subdir): cmd = [ "/bin/sh", "-c", "mdfind -onlyin %s 'kMD...
apache-2.0
-1,579,843,456,569,222,400
29.628571
101
0.583022
false
3.190476
false
false
false
williamd1k0/shiori
shiori/plugins/cafeteria/products.py
1
3774
""" MIT License Copyright (c) 2016 William Tumeo 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...
mit
-4,556,619,460,703,059,000
26.698529
98
0.594107
false
3.871531
false
false
false
makism/dyfunconn
dyconnmap/chronnectomics/dwell_time.py
1
1964
# -*- coding: utf-8 -*- """ Dwell Time Dwell time measures the time (when used in the context of functional connectivity microstates) a which a state is active consecutive temporal segments (Dimitriadis2019_). | .. [Dimitriadis2019] Dimitriadis, S. I., López, M. E., Maestu, F., & Pereda, E. (2019). Modeling the Swi...
bsd-3-clause
6,350,344,845,959,433,000
24.480519
253
0.576453
false
3.060842
false
false
false
levibostian/myBlanky
googleAppEngine/google/appengine/ext/endpoints/__init__.py
6
1954
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
mit
-6,254,910,070,703,599,000
26.138889
78
0.682702
false
3.955466
false
false
false
lmanzurv/sassy_coffee
sassy_coffee/__init__.py
1
1688
from django.conf import settings DJANGO_PATH = None if hasattr(settings, 'PROJECT_PATH') and settings.PROJECT_PATH: DJANGO_PATH = settings.PROJECT_PATH else: DJANGO_PATH = settings.BASE_DIR from django.utils import autoreload from sassy_coffee import utils, compilers import sys, os formats_to_compile = [form...
apache-2.0
-4,550,573,180,800,013,000
29.142857
108
0.562204
false
3.953162
false
false
false
nitesh1989/tools-iuc
tools/ngsutils/ngsutils/support/stats.py
4
2967
''' various statistical tests and methods... ''' import math from ngsutils.support import memoize def median(vals): ''' >>> median([1,2,3]) 2 >>> median([1,2,3,4]) 2.5 ''' vals.sort() if len(vals) % 2 == 1: return vals[len(vals) / 2] else: a = vals[(len(vals) / 2)...
mit
5,921,527,001,767,970,000
16.981818
67
0.470509
false
2.961078
false
false
false
abinit/abinit
abimkdocs_tests/tools.py
1
2845
from __future__ import division, print_function, unicode_literals, absolute_import import sys import os from unittest import TestCase _PATCH_DONE = False def patch_syspath(): global _PATCH_DONE if _PATCH_DONE: return # We don't install with setup.py hence we have to add the directory [...]/abinit/tests ...
gpl-3.0
812,320,049,273,765,500
36.434211
105
0.564148
false
3.675711
true
false
false
MadsJensen/RP_scripts
graph_path-strength_ada_post.py
1
2045
import numpy as np import bct from sklearn.externals import joblib from my_settings import (bands, source_folder) from sklearn.ensemble import AdaBoostClassifier from sklearn.cross_validation import (StratifiedKFold, cross_val_score) from sklearn.grid_search import GridSearchCV subjects = [ "0008", "0009", "0010"...
bsd-3-clause
-2,531,493,747,815,670,300
27.013699
76
0.599022
false
2.97671
false
false
false
nlucent/flansible
Flansible/flansible/ansible_task_output.py
1
1661
from flask_restful import Resource, Api from flask_restful_swagger import swagger from flask import render_template, make_response, Response from flansible import app from flansible import api, app, celery, auth from ModelClasses import AnsibleCommandModel, AnsiblePlaybookModel, AnsibleRequestResultModel, AnsibleExtraA...
mit
-7,640,351,620,178,015,000
33.604167
116
0.63817
false
4.071078
false
false
false