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
NuAoA/mopidy-alcd
mopidy_AdafruitLCD/Adafruit_LCD_frontend.py
1
3199
#!/usr/bin/env python import logging import traceback import pykka import mopidy import sys import re #todo: remove import threading from time import sleep from mopidy import core from .Adafruit_player import AdafruitPlayer logger = logging.getLogger(__name__) class AdafruitLCD(pykka.ThreadingActor, core.CoreListene...
apache-2.0
-27,827,435,575,448,490
24.388889
87
0.65708
false
2.902904
false
false
false
EdDev/vdsm
tests/virttests/vmstats_test.py
1
18952
# # Copyright 2015 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 version. # # This program is distributed in th...
gpl-2.0
-2,565,157,551,980,856,000
31.067682
79
0.503271
false
3.453353
true
false
false
eniac/faas
factor/linalg.py
1
5126
import sys import os import re import math import utils import logging logger = logging.getLogger('Linalg') cmd_logger = logging.getLogger('cmd') # Exact configuration here will depends on instance/hardware type. def run_rankfile(linalg_params): logger.info("--- Generating rankfile ---") machines = linal...
lgpl-3.0
764,551,282,516,274,000
41.716667
161
0.552282
false
3.532736
false
false
false
fos/fos-legacy
fos/actor/odfslicer.py
1
2054
import numpy as np class ODF_Slice(object): def __init__(self,odfs,vertices,faces,noiso,batch,group=None): J=0 self.odfs_no=J self.vertex_list=(odfs.shape[0]*odfs.shape[1])*[None] for index in np.ndindex(odfs.shape[:2]): values=odfs[index] if noi...
bsd-3-clause
-3,123,293,143,917,437,000
32.672131
75
0.399708
false
4.183299
false
false
false
kkoksvik/FreeCAD
src/Mod/Start/StartPage/StartPage.py
2
26929
#*************************************************************************** #* * #* Copyright (c) 2012 * #* Yorik van Havre <yorik@uncreated.net> * #* ...
lgpl-2.1
-881,293,649,298,753,800
38.252616
368
0.527461
false
3.922651
false
false
false
Nikita1710/ANUFifty50-Online-Mentoring-Platform
project/fifty_fifty/webcore/views.py
1
4115
from django.shortcuts import render, get_object_or_404 from django.core.mail import send_mail, BadHeaderError from django.contrib import messages from django.conf import settings from django.contrib.auth.decorators import login_required from content.models import Mentee, Mentor, Content_Summary from blog.models import ...
apache-2.0
8,039,884,220,214,451,000
33.579832
185
0.687728
false
3.849392
false
false
false
NicoVarg99/daf-recipes
ckan/ckan/ckan/ckan/tests/logic/action/test_delete.py
1
20446
# encoding: utf-8 import nose.tools import ckan.tests.helpers as helpers import ckan.tests.factories as factories import ckan.logic as logic import ckan.model as model import ckan.plugins as p import ckan.lib.search as search assert_equals = nose.tools.assert_equals assert_raises = nose.tools.assert_raises class T...
gpl-3.0
-774,451,038,322,788,900
36.039855
79
0.581923
false
4.063196
true
false
false
arnaldog12/Manual-Pratico-Deep-Learning
utils/samples_generator.py
1
1868
import numpy as np def make_cubic(n_samples, x_min, x_max, a=1, b=0, c=0, d=0, noise=0.0, random_state=None): np.random.seed(random_state) x = np.linspace(x_min, x_max, n_samples) y = a*x**3 + b*x**2 + c*x + d + (2*noise*np.random.random(n_samples) - noise) return x.reshape(-1,1), y.reshape(-1,1) def ...
mit
8,612,343,678,604,408,000
43.47619
90
0.600107
false
2.461133
false
false
false
sthyme/ZFSchizophrenia
BehaviorAnalysis/HSMovieAnalysis/setResolutionWidget.py
1
5960
#----------------------- # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'selectUI.ui' # Created: Thu Feb 26 13:45:32 2015 by: PyQt4 UI code generator 4.11.3 # # Created by Emily Conklin # February 2015 # This program is connected to the main widget (NeuroGUI.py) and is a sub-user interface...
mit
-8,555,149,342,993,067,000
41.571429
114
0.69245
false
4.238976
false
false
false
Detry322/map-creator
app/random.py
1
1453
from app.models import all_models from app.utils import mkdir_p from app import GENERATED_TILES_FOLDER, RANDOM_FOLDER, BACKPROPS_FOLDER from scipy import misc import glob import numpy as np import os from keras.models import load_model, Model from keras.optimizers import Adam, SGD, Adagrad from keras.layers import Lo...
mit
-2,502,770,354,397,162,500
32.022727
133
0.722643
false
3.091489
false
false
false
prefetchnta/questlab
bin/x64bin/python/36/Lib/calendar.py
1
23926
"""Calendar printing functions Note when comparing these calendars to the ones printed by cal(1): By default, these calendars have Monday as the first day of the week, and Sunday as the last (the European convention). Use setfirstweekday() to set the first day of the week (0=Monday, 6=Sunday).""" import sys i...
lgpl-2.1
7,043,734,647,202,540,000
31.556802
124
0.557302
false
3.896743
false
false
false
linsalrob/EdwardsLab
phage_protein_blast_genera/tax_violin_plots.py
1
2239
""" """ import os import sys import argparse import matplotlib #matplotlib.use('Agg') import matplotlib.pyplot as plt if __name__ == '__main__': parser = argparse.ArgumentParser(description="") parser.add_argument('-f', help='Genome average output file (from genera_per_phage_protein.py', default='/home/redw...
mit
952,300,114,054,625,500
28.853333
149
0.571237
false
3.226225
false
false
false
euccas/CodingPuzzles-Python
leet/source/searchDFS/permutations.py
1
1421
class Solution(): def permute(self, nums): if nums is None: return [[]] elif len(nums) <= 1: return [nums] result = [] for i, item in enumerate(nums): #print("i={0}, item={1}".format(i, item)) for p in permute(nums[:i] + nums[i + 1:]):...
mit
405,264,178,974,588,860
26.326923
81
0.474314
false
3.861413
false
false
false
ganeti-github-testing/ganeti-test-1
lib/client/gnt_instance.py
1
62250
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014 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: # # 1. Redistributions of source code must retain the above copyri...
bsd-2-clause
8,941,289,388,210,791,000
35.149826
80
0.618715
false
3.790647
false
false
false
bmazin/ARCONS-pipeline
fluxcal/fluxCal.py
1
29931
#!/bin/python ''' fluxCal.py Created by Seth Meeker on 11-21-2012 Modified on 02-16-2015 to perform absolute fluxCal with point sources Opens ARCONS observation of a spectrophotometric standard star and associated wavelength cal file, reads in all photons and converts to energies. Bins photons to generate a spectru...
gpl-2.0
1,007,656,973,070,526,800
43.016176
240
0.640406
false
3.514678
false
false
false
emc-openstack/storops
storops_test/lib/test_tasks.py
1
3524
# coding=utf-8 # Copyright (c) 2016 EMC Corporation. # 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 # #...
apache-2.0
-1,893,215,132,781,401,000
31.036364
78
0.608116
false
3.186257
true
false
false
rossumai/keras-multi-gpu
keras_tf_multigpu/examples/kuza55/cifar10_cnn_functional_multigpu.py
1
4556
'''Train a simple deep CNN on the CIFAR10 small images dataset. GPU run command with Theano backend (with TensorFlow, the GPU is automatically used): THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatx=float32 python cifar10_cnn.py It gets down to 0.65 test logloss in 25 epochs, and down to 0.55 after 50 epochs. (it's s...
mit
-8,435,183,062,125,755,000
33.778626
111
0.663082
false
3.394933
true
false
false
lumig242/Video-Share-System
video/views.py
1
4497
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render_to_response from django.template import RequestContext from video.form import * from video.models import Video,Comment from django.contrib.auth.decorators import login_required import ...
mit
-4,826,796,093,921,239,000
35.266129
142
0.653769
false
3.893506
false
false
false
scott48074/Restorative-Justice-App
app/facesheet.py
1
4506
''' Takes in a list of values from the database and creates a facesheet. ''' import os from docx import Document from docx.enum.text import WD_ALIGN_PARAGRAPH def assemble_address(street, apartment, city, state, zip_code): address = street.title() if apartment: address += f' APT: {apartment.title()}'...
mit
5,163,028,321,451,028,000
28.644737
99
0.583666
false
3.272331
false
false
false
wtgme/labeldoc2vec
gensim/models/labeldoc2vec.py
1
45979
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2013 Radim Rehurek <me@radimrehurek.com> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Deep learning via the distributed memory and distributed bag of words models from [1]_, using either hierarchical softmax or negative ...
lgpl-2.1
-8,098,908,495,692,754,000
48.760823
167
0.614911
false
3.679792
false
false
false
grahamking/goodenergy
campaign/management/commands/ge_copy_campaign.py
1
4417
"""Copies the contents (indicators and actions) of one campaign into another """ # Copyright 2010,2011 Good Energy Research Inc. <graham@goodenergy.ca>, <jeremy@goodenergy.ca> # # This file is part of Good Energy. # # Good Energy is free software: you can redistribute it and/or modify # it under th...
agpl-3.0
-979,541,411,536,322,800
37.745614
97
0.644329
false
4.128037
false
false
false
dpnishant/appmon
tracer/android_tracer.py
1
12107
#!/usr/bin/python ### # Copyright (c) 2016 Nishant Das Patnaik. # # 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
7,836,066,327,096,006,000
36.255385
416
0.550508
false
3.500145
false
false
false
andrew-lundgren/gwpy
gwpy/cli/spectrum.py
1
5127
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) Joseph Areeda (2015) # # This file is part of GWpy. # # GWpy 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 #...
gpl-3.0
1,358,993,382,451,397,000
35.105634
80
0.561537
false
3.667382
false
false
false
shpakoo/YAP
YAP_MiSeq.py
1
29538
######################################################################################## ## This file is a part of YAP package of scripts. https://github.com/shpakoo/YAP ## Distributed under the MIT license: http://www.opensource.org/licenses/mit-license.php ## Copyright (c) 2011-2013 Sebastian Szpakowski #############...
mit
-7,766,473,033,472,721,000
36.201511
308
0.511138
false
3.61012
false
false
false
varlog00/Sigil
src/Resource_Files/python3lib/xmlprocessor.py
1
16367
#!/usr/bin/env python3 import sys import os from sigil_bs4 import BeautifulSoup from sigil_bs4.builder._lxml import LXMLTreeBuilderForXML import re from urllib.parse import unquote from urllib.parse import urlsplit from lxml import etree from io import BytesIO from opf_newparser import Opf_Parser ASCII_CHARS = set...
gpl-3.0
-1,157,109,961,533,576,400
39.412346
136
0.587646
false
3.627438
false
false
false
rdcrt/pystarling
test/api_objects/test_Account.py
1
1419
import dateutil import pytest from pystarling.api_objects.Account import Account class TestAccount(object): test_data = { 'id': 'ee8152d7-6ff2-4f79-b9de-39861bdec427', 'number': '99999999', 'sortCode': '608371', 'iban': 'GB26SRLG60837199999999', 'bic': 'SRLGGB2L', ...
mit
2,434,672,469,967,569,000
32.785714
86
0.639183
false
3.118681
true
false
false
APMonitor/arduino
2_Regression/2nd_order_MIMO/GEKKO/tclab_2nd_order_linear.py
1
3283
import numpy as np import time import matplotlib.pyplot as plt import random # get gekko package with: # pip install gekko from gekko import GEKKO import pandas as pd # import data data = pd.read_csv('data.txt') tm = data['Time (sec)'].values Q1s = data[' Heater 1'].values Q2s = data[' Heater 2'].values...
apache-2.0
-3,404,360,134,149,806,000
22.318519
70
0.624733
false
2.355093
false
false
false
DistrictDataLabs/yellowbrick
yellowbrick/contrib/scatter.py
1
11862
# yellowbrick.contrib.scatter # Implements a 2d scatter plot for feature analysis. # # Author: Nathan Danielsen # Created: Fri Feb 26 19:40:00 2017 -0400 # # Copyright (C) 2017 The scikit-yb developers # For license information, see LICENSE.txt # # ID: scatter.py [a89633e] benjamin@bengfort.com $ """ Implements a 2D...
apache-2.0
-159,934,294,901,768,700
32.041783
87
0.583966
false
4.587007
false
false
false
dichen001/Go4Jobs
JackChen/hash/18. 4Sum.py
1
1449
""" Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target. Note: The solution set must not contain duplicate quadruplets. For example, given array S = [1, 0, -1, 0, -2, 2], and target = 0. ...
gpl-3.0
125,500,663,320,398,770
34.275
176
0.429952
false
3.331034
false
false
false
santiago-salas-v/walas
node_images.py
1
1746
import matplotlib import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) patch1 = matplotlib.patches.Circle( [0.5,0.5],0.05 ) patch2 = matplotlib.patches.Rectangle( [0.3,0.3],0.4, 0.4, alpha=0.5, fill=False, edgecolor='black', linestyle = '--' ) arrow1 = matplotlib.patches.Arrow( ...
mit
-8,638,347,603,755,213,000
20.567901
42
0.611111
false
2.282353
false
false
false
audiohacked/pyBusPirate
src/buspirate/uart.py
1
5375
# Created by Sean Nelson on 2018-08-19. # Copyright 2018 Sean Nelson <audiohacked@gmail.com> # # This file is part of pyBusPirate. # # pyBusPirate 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...
gpl-2.0
5,007,357,886,985,508,000
27.439153
97
0.599256
false
3.583333
true
false
false
Re4son/Kali-Pi
Menus/menu-9p.py
1
2924
#!/usr/bin/env python import kalipi from kalipi import * ############################# ## Local Functions ## ## Local Functions ## ############################# ############################# ## Buttons ## # define all of the buttons label1 = Button(labelPadding * " " + " ", originX...
gpl-3.0
1,339,044,619,860,689,200
25.107143
202
0.515048
false
3.578947
false
false
false
JKarathiya/Lean
Algorithm.Python/InceptionDateSelectionRegressionAlgorithm.py
1
2432
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # 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 Lice...
apache-2.0
-5,988,067,062,033,275,000
38.209677
132
0.733333
false
3.996711
false
false
false
kret0s/gnuhealth-live
tryton/server/trytond-3.8.3/trytond/ir/property.py
1
5773
# This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. from decimal import Decimal from ..model import ModelView, ModelSQL, fields from ..transaction import Transaction from ..cache import Cache from ..pool import Pool __all__ = [...
gpl-3.0
-8,129,677,329,808,463,000
32.760234
75
0.493677
false
4.327586
false
false
false
larsks/cloud-init
cloudinit/sources/DataSourceBigstep.py
2
1917
# Copyright (C) 2015-2016 Bigstep Cloud Ltd. # # Author: Alexandru Sirbu <alexandru.sirbu@bigstep.com> # # This file is part of cloud-init. See LICENSE file for license information. import errno import json from cloudinit import log as logging from cloudinit import sources from cloudinit import url_helper from cloudi...
gpl-3.0
2,950,398,994,128,199,700
27.61194
79
0.664058
false
3.766208
false
false
false
praphull27/diskBasedLdaBenchmarkingTools
readXmlAndOutputToTxt.py
1
1444
from bs4 import BeautifulSoup import re import os import multiprocessing def read_and_tokenize (file_name): xml_file_handle = open(file_name, 'rb') xml_file_contents = xml_file_handle.read() xml_file_handle.close() xml_file_text = '' full_text_all = BeautifulSoup(xml_file_contents).find_all(class_="full_text") ...
mit
5,477,891,135,625,652,000
28.489796
96
0.687673
false
2.674074
false
false
false
dc3-plaso/dfvfs
dfvfs/credentials/keychain.py
1
2743
# -*- coding: utf-8 -*- """The path specification key chain. The key chain is used to manage credentials for path specifications. E.g. BitLocker Drive Encryption (BDE) encrypted volumes can require a credential (e.g. password) to access the unencrypted data (unlock). """ from dfvfs.credentials import manager class ...
apache-2.0
-8,760,681,104,130,690,000
31.654762
80
0.692308
false
4.265941
false
false
false
hbldh/skboost
skboost/stumps/decision_stump.py
1
17561
#!/usr/bin/env python # -*- coding: utf-8 -*- """ :mod:`decision_stump` ================== .. module:: decision_stump :platform: Unix, Windows :synopsis: .. moduleauthor:: hbldh <henrik.blidh@nedomkull.com> Created on 2014-08-31, 01:52 """ from __future__ import division from __future__ import print_function...
mit
-5,267,852,490,259,074,000
35.509356
115
0.553442
false
3.937444
false
false
false
deepmind/lab2d
dmlab2d/lib/game_scripts/levels/clean_up/play.py
1
3449
# Copyright 2020 The DMLab2D Authors. # # 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...
apache-2.0
7,325,948,526,025,038,000
30.642202
80
0.677298
false
3.548354
false
false
false
cdiener/pyart
asciinator.py
1
1723
#!/usr/bin/env python # asciinator.py # # Copyright 2014 Christian Diener <ch.diener@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # ...
gpl-3.0
-7,175,192,178,625,269,000
32.784314
89
0.702263
false
3.098921
false
false
false
katchengli/tech-interview-prep
interview_cake/ic3.py
1
1451
#constraint: list_of_ints will always have at least 3 integers #can have negative numbers def highest_product_three_ints(list_of_ints): biggest_int = max(list_of_ints) list_of_ints.remove(biggest_int) max_int1 = max(list_of_ints) list_of_ints.remove(max_int1) max_int2 = max(list_of_ints) list_...
apache-2.0
2,525,693,542,367,842,300
30.543478
63
0.671261
false
2.890438
false
false
false
hemidactylus/flaskbiblio
config.py
1
1074
import os # directories and so on basedir = os.path.abspath(os.path.dirname(__file__)) DB_DIRECTORY=os.path.join(basedir,'app/database') DB_NAME='biblio.db' # stuff for Flask WTF_CSRF_ENABLED = True from sensible_config import SECRET_KEY # formats, etc DATETIME_STR_FORMAT = '%Y-%m-%d %H:%M:%S' SHORT_DATETIME_STR_FO...
gpl-3.0
-1,613,392,918,894,984,700
29.685714
74
0.752328
false
3.016854
false
false
false
mharrys/sudoku
sudoku.py
1
7848
import fileinput from dlx import DLX from numpy import array, unique from optparse import OptionParser class SudokuError(Exception): """Raised when any error related to Sudoku is found during construction and validation such as unexpected values or contradictions. """ def __init__(self, value): ...
gpl-3.0
3,664,689,965,295,890,400
28.727273
78
0.507645
false
4.208043
false
false
false
Bekt/tweetement
src/service.py
1
3578
import logging import string import tweepy from credentials import (consumer_key, consumer_secret) from models import Stopword from collections import Counter class Service(object): # Map uppercase to lowercase, and deletes any punctuation. trans = {ord(string.ascii_uppercase[i]): ord(string.ascii_lowercase...
mit
-3,306,388,078,736,274,000
34.425743
82
0.536333
false
3.906114
false
false
false
nbessi/pyhiccup
pyhiccup/page.py
1
3037
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi # Copyright 2014 # Original concept by James Reeves # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Lice...
agpl-3.0
384,448,600,303,087,940
32.01087
93
0.591373
false
3.667874
false
false
false
docusign/docusign-python-client
docusign_esign/models/external_file.py
1
7550
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.gi...
mit
7,504,362,721,954,708,000
23.121406
140
0.513907
false
4.046088
false
false
false
edx/ecommerce
ecommerce/extensions/voucher/migrations/0001_initial.py
1
3161
# -*- coding: utf-8 -*- from decimal import Decimal from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('order', '0001_initial'), ('offer', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER...
agpl-3.0
9,208,904,800,063,817,000
53.5
293
0.598545
false
4.348006
false
false
false
AlfioEmanueleFresta/practical-ecb-lib
cp_ecb/image.py
1
4402
from PIL import Image class InMemoryImage: """ A very simple class to represent an image. """ def __init__(self, w, h, c=3, b=b'', encrypted=False): """ Instantiate a new image. :param w: The width of the image (px). :param h: The height of the image (...
gpl-3.0
2,049,984,958,980,118,500
33.124031
125
0.655838
false
3.841187
false
false
false
jamesiter/JimV-N
models/event_process.py
1
9567
#!/usr/bin/env python # -*- coding: utf-8 -*- import libvirt from models.initialize import guest_event_emit from models import Guest __author__ = 'James Iter' __date__ = '2017/6/15' __contact__ = 'james.iter.cn@gmail.com' __copyright__ = '(c) 2017 by James Iter.' class EventProcess(object): conn = None g...
gpl-3.0
7,831,306,273,110,688,000
35.497872
110
0.55847
false
3.11099
false
false
false
petrvanblokland/Xierpa3
xierpa3/sites/examples/helloworldblueprint/make.py
1
9548
# -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # xierpa server # Copyright (c) 2014+ buro@petr.com, www.petr.com, www.xierpa.com # # X I E R P A 3 # Distribution by the MIT License. # # -----------------------------------------------------------...
mit
-8,731,468,573,358,479,000
59.43038
143
0.662233
false
3.897143
false
false
false
bd-j/magellanic
magellanic/sfhs/prediction_scripts/predicted_total.py
1
5894
import sys, pickle, copy import numpy as np import matplotlib.pyplot as pl import astropy.io.fits as pyfits import magellanic.regionsed as rsed import magellanic.mcutils as utils from magellanic.lfutils import * try: import fsps from sedpy import observate except ImportError: #you wont be able to predict...
gpl-2.0
5,455,226,854,893,435,000
34.721212
99
0.557686
false
3.055469
false
false
false
reverse-CSE-591/reverse
driver.py
1
19133
#!/usr/bin/python -tt ##################################################################################################################### # CSE 591: Security and Vulnerability Analysis # # Team 5: # # Kartheek Nallepalli # Bhargavi Rajagopalan # Priya Pipada # Ayush Maheshwari # Nikhil Aourpally # # # This is the dr...
mit
6,833,721,684,920,172,000
39.111111
130
0.516176
false
4.391324
false
false
false
woelfware/BluMote
test/button_tx.py
1
1963
#!/usr/bin/env python # Copyright (C) 2011 Woelfware from bluetooth import * import blumote import cPickle from glob import glob import os import sys import time class Blumote_Client(blumote.Services): def __init__(self): blumote.Services.__init__(self) self.addr = None def find_blumote_pods(self, pod_name = N...
gpl-3.0
-4,726,947,572,065,195,000
23.5375
69
0.671931
false
2.903846
false
false
false
VcamX/grpc
src/python/grpcio/grpc/framework/alpha/_face_utilities.py
1
7822
# Copyright 2015-2016, 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 ...
bsd-3-clause
5,831,767,619,180,549,000
41.743169
94
0.749297
false
4.531866
false
false
false
ovnicraft/openerp-server
openerp/addons/base/module/wizard/base_update_translations.py
1
2901
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
-5,133,423,672,400,212,000
40.442857
98
0.592554
false
3.79712
false
false
false
PageArkanis/StEVE
steve/constellation.py
1
1217
from steve.backend.sqlitedb import SDB from steve.system import System class Constellation(object): def __init__(self, universe, data): self.universe = universe self.regionID = data[0] self.uid = data[1] self.name = data[2] self.x ...
agpl-3.0
3,538,158,798,730,244,000
26.659091
88
0.501233
false
3.744615
false
false
false
blueyed/coveragepy
tests/test_templite.py
1
10970
# coding: utf-8 # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt """Tests for coverage.templite.""" import re from coverage.templite import Templite, TempliteSyntaxError, TempliteValueError from tests.coveraget...
apache-2.0
1,905,987,912,981,123,000
33.670886
79
0.478094
false
3.555988
true
false
false
RyanSkraba/beam
sdks/python/apache_beam/coders/typecoders.py
1
8078
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
-3,578,803,315,472,674,000
41.072917
80
0.709953
false
3.87806
false
false
false
sunshinelover/chanlun
vn.trader/ctaAlgo/uiChanlunWidget.py
1
68647
# encoding: UTF-8 """ 缠论模块相关的GUI控制组件 """ from vtGateway import VtSubscribeReq from uiBasicWidget import QtGui, QtCore, BasicCell,BasicMonitor,TradingWidget from eventEngine import * from ctaBase import * import pyqtgraph as pg import numpy as np import pymongo from pymongo.errors import * from datetime import datetime...
mit
1,005,031,568,701,190,500
37.755556
237
0.49587
false
3.238819
false
false
false
blsmit5728/PokeAlarm
PokeAlarm/Events/MonEvent.py
1
13089
# Standard Library Imports from datetime import datetime # 3rd Party Imports # Local Imports from PokeAlarm import Unknown from PokeAlarm.Utilities import MonUtils from PokeAlarm.Utils import ( get_gmaps_link, get_move_type, get_move_damage, get_move_dps, get_move_duration, get_move_energy, get_pokemon_size, ...
agpl-3.0
1,737,988,250,561,061,600
39.150307
79
0.533578
false
3.544273
false
false
false
PLyczkowski/Sticky-Keymap
2.74/scripts/addons/io_anim_bvh/__init__.py
1
8032
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 version. # # This program is distrib...
gpl-2.0
8,315,018,521,340,759,000
35.017937
117
0.54868
false
4.058615
false
false
false
desihub/desimodel
py/desimodel/weather.py
1
15591
# See LICENSE.rst for BSD 3-clause license info # -*- coding: utf-8 -*- """ desimodel.weather ================= Model of the expected weather conditions at KPNO during the DESI survey. To generate a random time series of expected FWHM seeing in arcsecs and atmospheric transparency, use, for example:: n = 10000 ...
bsd-3-clause
-3,878,208,059,081,789,000
35.174014
88
0.635944
false
3.441722
false
false
false
taoliu/taolib
Scripts/kmeans2image.py
1
1598
#!/usr/bin/env python # Time-stamp: <2009-04-14 14:07:21 Tao Liu> import os import sys import re from PIL import Image, ImageDraw # ------------------------------------ # Main function # ------------------------------------ help_message = """ Draw the K-means clustering result. need 6 parameter: %s <kmeans_file> <li...
bsd-3-clause
-4,875,349,459,735,880,000
25.196721
127
0.530663
false
2.910747
false
false
false
TripleSnail/blender-zombie
python/text.py
1
1754
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 version. # # This program is distrib...
gpl-2.0
8,312,866,228,532,016,000
28.728814
76
0.676739
false
3.31569
false
false
false
renyi/drum
drum/links/templatetags/drum_tags.py
1
1472
from __future__ import unicode_literals from collections import defaultdict from django.template.defaultfilters import timesince from mezzanine import template from mezzanine.generic.models import ThreadedComment from drum.links.utils import order_by_score from drum.links.models import LinkCategory from drum.links.v...
bsd-2-clause
-4,074,832,187,691,731,000
25.763636
79
0.724185
false
3.607843
false
false
false
gdsfactory/gdsfactory
pp/layers.py
1
9564
"""A GDS layer is a tuple of two integers. You can: - Define your layers in a dataclass - Load it from Klayout XML file (.lyp) LayerSet adapted from phidl.device_layout load_lyp, name_to_description, name_to_short_name adapted from phidl.utilities preview_layerset adapted from phidl.geometry """ import pathlib from ...
mit
7,863,857,862,018,327,000
30.564356
88
0.603199
false
3.429186
false
false
false
alissonperez/django-onmydesk
onmydesk/utils.py
1
1501
"""Module with common utilities to this package""" import re from datetime import timedelta import importlib def my_import(class_name): """ Usage example:: Report = my_import('myclass.models.Report') model_instance = Report() model_instance.name = 'Test' model_instance.save()...
mit
-7,885,954,554,795,849,000
26.290909
73
0.578281
false
3.643204
false
false
false
bradallred/gemrb
gemrb/GUIScripts/iwd2/Abilities.py
1
7433
# GemRB - Infinity Engine Emulator # Copyright (C) 2003 The GemRB Project # # 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 versi...
gpl-2.0
7,460,413,711,233,489,000
26.428044
81
0.727297
false
2.695069
false
false
false
Southpaw-TACTIC/Team
src/python/Lib/site-packages/pythonwin/pywin/tools/browseProjects.py
1
8295
import hierlist, string, regutil, os import win32con, win32ui, win32api import commctrl from pywin.mfc import dialog import glob import pyclbr import pywin.framework.scriptutils import afxres class HLIErrorItem(hierlist.HierListItem): def __init__(self, text): self.text = text hierlist.HierListItem.__...
epl-1.0
5,805,571,004,573,647,000
30.276265
146
0.66522
false
3.014172
false
false
false
Commonists/SurfaceImageContentGap
surfaceimagecontentgap/rc.py
1
2812
from argparse import ArgumentParser import datetime import time from surfaceimagecontentgap.imagegap import isthereanimage from surfaceimagecontentgap.bot import SurfaceContentGapBot def last_rc_time(site): """Datetime of last change.""" rc = site.recentchanges() last_rev = rc.next() return datetime...
mit
8,370,749,980,757,185,000
26.568627
74
0.558677
false
4.111111
false
false
false
Purg/SMQTK
python/smqtk/bin/classifyFiles.py
1
5843
""" Based on an input, trained classifier configuration, classify a number of media files, whose descriptor is computed by the configured descriptor generator. Input files that classify as the given label are then output to standard out. Thus, this script acts like a filter. """ import glob import json import logging i...
bsd-3-clause
-9,202,389,211,392,059,000
33.169591
80
0.610303
false
4.403165
true
false
false
bgris/ODL_bgris
lib/python3.5/site-packages/odl/util/graphics.py
1
15419
# Copyright 2014-2016 The ODL development group # # This file is part of ODL. # # ODL 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. #...
gpl-3.0
-3,538,194,548,052,486,700
33.037528
79
0.560672
false
4.01223
false
false
false
kylejusticemagnuson/pyti
tests/test_stochastic.py
1
15612
from __future__ import absolute_import import unittest import numpy as np from tests.sample_data import SampleData from pyti import stochastic class TestStochastic(unittest.TestCase): def setUp(self): """Create data to use for testing.""" self.data = SampleData().get_sample_close_data() ...
mit
5,619,512,950,334,885,000
61.951613
83
0.711248
false
2.240207
true
false
false
edcast-inc/edx-platform-edcast
common/djangoapps/student/tests/test_login.py
1
25194
''' Tests for student activation and login ''' import json import unittest from unittest import skip from django.test import TestCase from django.test.client import Client from django.test.utils import override_settings from django.conf import settings from django.core.cache import cache from django.core.urlresolvers i...
agpl-3.0
888,919,011,720,206,700
45.828996
134
0.645114
false
3.910897
true
false
false
yantrabuddhi/blocos
tabs/UploadTab.py
1
13455
# -*- coding: utf-8 -*- # Este arquivo é parte do programa Monitor # Monitor é um software livre; você pode redistribui-lo e/ou # modifica-lo dentro dos termos da Licença Pública Geral GNU como # publicada pela Fundação do Software Livre (FSF); na versão 3 da # Licença, ou (na sua opinião) qualquer versão. # # Este...
gpl-3.0
-6,296,304,755,429,825,000
33.242347
127
0.554943
false
3.703918
false
false
false
AnumSheraz/IP-Controlled-Robotic-Car
Manual-IP-Controlled-Robotic-Car/Code.py
1
1696
import sys from PyQt4 import QtGui, QtCore import time, socket, json from main import Ui_MainWindow s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM) IP = "localhost" PORT = 8001 class main_menu(QtGui.QMainWindow): def __init__(self): super(main_menu, self).__init__() self.ui=Ui_MainWindow() ...
gpl-2.0
5,014,913,625,355,572,000
23.228571
49
0.504717
false
3.299611
false
false
false
be-cloud-be/horizon-addons
horizon/school_evaluations/wizard/evaluation_summary.py
1
3973
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2015 be-cloud.be # Jerome Sonnet <jerome.sonnet@be-cloud.be> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
agpl-3.0
5,508,467,179,672,360,000
36.490566
184
0.558017
false
4.151515
false
false
false
migihajami/memin
memin/frontend.py
1
10715
__author__ = 'algol' import cherrypy from jinja2 import Environment, PackageLoader import memin.core as mc from configparser import ConfigParser class Menu: def __init__(self): self.menu = [ {'name': 'Главная', 'link': '/'}, {'name': 'Персоны', 'link': '/persons'}, {'n...
bsd-3-clause
-6,257,122,399,343,155,000
29.134286
87
0.526216
false
3.623154
false
false
false
MShel/ttw
listener/packets/udpPacket.py
1
1408
from listener.packets.abstractPacket import AbstractPacket from struct import unpack class UdpPacket(AbstractPacket): UNPACK_FORMAT = '!HHHH' UDP_HEADER_LENGTH = 8 PROTOCOL_NAME = 'UDP' def __init__(self, binPacket: bytes, margin: int): self.binPacket = binPacket self.headerMa...
mit
2,091,908,008,284,972,500
36.078947
119
0.651989
false
3.857534
false
false
false
aerler/WRF-Tools
Python/wrfavg/wrfout_average.py
1
79431
''' Created on 2013-09-28, revised 2014-06-17, added daily output 2020-05-04 A script to average WRF output; the default settings are meant for my 'fineIO' output configuration and process the smaller diagnostic files. The script can run in parallel mode, with each process averaging one filetype and domain, producing...
gpl-3.0
659,906,441,429,333,200
64.054054
196
0.6327
false
3.803074
false
false
false
Aloomaio/googleads-python-lib
examples/ad_manager/v201808/creative_wrapper_service/update_creative_wrappers.py
1
2747
#!/usr/bin/env python # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
8,009,690,733,829,738,000
36.630137
78
0.705497
false
4.106129
false
false
false
icomms/wqmanager
apps/domain/models.py
1
6972
from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.db import models from domain import Permissions from wqm.models import WqmAuthority from locations.models import LocationType ##############################...
bsd-3-clause
1,128,780,121,399,136,400
44.575163
152
0.613884
false
4.26683
false
false
false
ArcherSys/ArcherSys
Lib/opcode.py
1
16466
<<<<<<< HEAD <<<<<<< HEAD """ opcode module - potentially shared between dis and other modules which operate on bytecodes (e.g. peephole optimizers). """ __all__ = ["cmp_op", "hasconst", "hasname", "hasjrel", "hasjabs", "haslocal", "hascompare", "hasfree", "opname", "opmap", "HAVE_ARGUMENT", "EX...
mit
-3,256,446,462,933,646,000
26.171617
80
0.635005
false
2.584929
false
false
false
benagricola/exabgp
lib/exabgp/bgp/message/update/nlri/evpn/multicast.py
1
2426
""" multicast.py Created by Thomas Morin on 2014-06-23. Copyright (c) 2014-2015 Orange. All rights reserved. """ from exabgp.protocol.ip import IP from exabgp.bgp.message.update.nlri.qualifier import RouteDistinguisher from exabgp.bgp.message.update.nlri.qualifier import EthernetTag from exabgp.bgp.message.update.nl...
bsd-3-clause
8,568,785,827,975,385,000
25.659341
86
0.54122
false
2.980344
false
false
false
emoronayuso/beeton
asterisk-bee/asteriskbee/api_status/scripts_graficas/recoge_marcas_graficas.py
1
2307
#!/usr/bin/python import matplotlib.pyplot as plt import numpy as np #import calendar from datetime import datetime from django.conf import settings settings.configure() import os #para conexion con la bases de datos de beeton (asteriskbee) import sqlite3 as dbapi ##Directorio de la aplicaion ### STATIC_ROOT = '/va...
gpl-3.0
2,008,526,283,982,816,800
24.633333
330
0.688773
false
2.595051
false
false
false
diedthreetimes/VCrash
pybindgen-0.15.0.795/pybindgen/typehandlers/inttype.py
1
29684
# docstrings not needed here (the type handler interfaces are fully # documented in base.py) # pylint: disable-msg=C0111 import struct assert struct.calcsize('i') == 4 # assumption is made that sizeof(int) == 4 for all platforms pybindgen runs on from base import ReturnValue, Parameter, PointerParameter, PointerRetu...
gpl-2.0
8,058,617,483,119,672,000
41.164773
131
0.638997
false
3.645787
false
false
false
persandstrom/home-assistant
homeassistant/components/sensor/netatmo_public.py
1
4390
""" Support for Sensors using public Netatmo data. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.netatmo_public/. """ from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SC...
apache-2.0
-397,387,515,900,327,800
30.134752
75
0.591116
false
3.761782
false
false
false
ryfeus/lambda-packs
pytorch/source/torch/nn/parallel/deprecated/distributed_cpu.py
1
4290
import torch from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors import torch.distributed.deprecated as dist from torch.nn.modules import Module from collections import defaultdict from torch.autograd import Variable import torch.utils.hooks class DistributedDataParallelCPU(Module): r"""Impl...
mit
-3,092,668,904,383,977,500
39.093458
94
0.648485
false
4.673203
false
false
false
geky/pyOCD
pyOCD/target/target_lpc4330.py
1
2872
""" mbed CMSIS-DAP debugger Copyright (c) 2006-2015 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable ...
apache-2.0
-5,108,212,287,236,866,000
38.342466
121
0.68071
false
3.585518
false
false
false
opennode/nodeconductor-assembly-waldur
src/waldur_slurm/apps.py
1
2931
from django.apps import AppConfig from django.db.models import signals class SlurmConfig(AppConfig): name = 'waldur_slurm' verbose_name = 'SLURM' service_name = 'SLURM' def ready(self): from waldur_core.quotas.fields import QuotaField, CounterQuotaField from waldur_core.structure impo...
mit
-963,469,003,066,524,500
34.743902
90
0.606619
false
4.278832
false
false
false
addisonElliott/SmartShopTouchScreen
Windows/ExpirationBox_ui.py
1
8236
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ExpirationBox.ui' # # Created by: PyQt5 UI code generator 5.7.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_ExpirationBox(object): def setupUi(self, ExpirationBox): ...
agpl-3.0
-5,871,618,067,304,195,000
43.76087
119
0.662943
false
3.571552
false
false
false
goddardl/gaffer
apps/gui/gui-1.py
1
5810
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted ...
bsd-3-clause
-2,702,933,978,917,300,000
36.973856
154
0.704819
false
4.031922
false
false
false
MaStanford/AnglishWordbook
Anglish/SyncWikia.py
1
4522
__author__ = 'm.stanford' import string from socket import error as SocketError import json, httplib STARTING_PAGE = 72; ENDING_PAGE = 98; invalidWords = ["un-English", "Anglish/English", "attested", "unattested", "Class"] delimiter = "\'\'\'" wierdfunkInSomeWords = ["\'\' \'\'\'", "\'\'\',", '\'\'\'\'\'', '\"\'\'']...
apache-2.0
-7,765,113,058,141,094,000
28.363636
156
0.570102
false
3.586043
true
false
false
jsirois/pants
src/python/pants/backend/python/goals/setup_py.py
1
37779
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import enum import io import itertools import logging import os import pickle from abc import ABC, abstractmethod from collections import abc, defaultdict from dataclasses import dataclass...
apache-2.0
-2,219,731,043,789,042,400
39.710129
123
0.672675
false
4.041399
false
false
false
azumimuo/family-xbmc-addon
plugin.video.bubbles/resources/lib/externals/hachoir/hachoir_parser/image/bmp.py
1
6874
""" Microsoft Bitmap picture parser. - file extension: ".bmp" Author: Victor Stinner Creation: 16 december 2005 """ from resources.lib.externals.hachoir.hachoir_parser import Parser from resources.lib.externals.hachoir.hachoir_core.field import (FieldSet, UInt8, UInt16, UInt32, Bits, String, RawBytes, Enum, ...
gpl-2.0
6,517,626,528,385,999,000
34.251282
104
0.586267
false
3.654439
false
false
false
msullivan/advent-of-code
2020/17a.py
1
1655
#!/usr/bin/env python3 import copy from collections import defaultdict import sys import re def extract(s): return [int(x) for x in re.findall(r'-?\d+', s)] def first(grid, x, y, dx, dy): while True: x += dx y += dy if x < 0 or x >= len(grid[0]) or y < 0 or y >= len(grid): ...
mit
4,169,982,579,958,940,000
24.859375
108
0.467674
false
3.099251
false
false
false
asamerh4/mesos
support/push-commits.py
1
4982
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "...
apache-2.0
-8,114,206,134,426,273,000
30.732484
80
0.545163
false
4.472172
false
false
false
quixey/scrapy-cluster
crawler/tests/tests_online.py
1
3938
''' Online link spider test ''' import unittest from unittest import TestCase import time import sys from os import path sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) import scrapy import redis from redis.exceptions import ConnectionError import json import threading, time from crawling.spiders....
mit
2,532,433,231,757,263,000
33.243478
79
0.623667
false
3.284404
true
false
false
yfauser/maxwindownotify
setup.py
1
1252
from setuptools import setup import io def read(*filenames, **kwargs): encoding = kwargs.get('encoding', 'utf-8') sep = kwargs.get('sep', '\n') buf = [] for filename in filenames: with io.open(filename, encoding=encoding) as f: buf.append(f.read()) return sep.join(buf) long_des...
mit
2,280,797,815,360,075,000
33.777778
147
0.654153
false
3.748503
false
false
false
hazybluedot/indie_helper
util.py
1
2278
import requests import bleach import sys if sys.version < '3': from urlparse import urlparse text_type = unicode text_types = [ str, unicode ] binary_type = str else: from urllib.parse import urlparse text_type = str text_types = [ str ] binary_type = bytes def is_url(url): try: ...
gpl-3.0
7,210,100,983,337,184,000
28.205128
124
0.611501
false
3.692058
false
false
false