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
labase/eica
src/analisys/clean.py
1
28069
# -*- coding: UTF8 -*- from tinydb import TinyDB, Query from tinydb.operations import delete import os import operator # from tinydb.storages import MemoryStorage from uuid import uuid1 from datetime import datetime as dt from datetime import timedelta as td import matplotlib.pyplot as plt Y_M_D_H_M_S = "%Y-%m-%d %H:%...
gpl-2.0
8,350,608,619,195,372,000
48.959002
152
0.589003
false
2.976845
false
false
false
jacquesd/indico-plugins
livesync/indico_livesync/handler.py
1
7832
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
gpl-3.0
2,174,161,273,497,920,300
38.16
117
0.723059
false
3.696083
false
false
false
ToferC/gcclassifier
gc_classifier/contrib/sites/migrations/0003_set_site_domain_and_name.py
1
1086
""" To understand why this file is here, please read: http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django """ from django.conf import settings from django.db import migrations def update_site_forward(apps, schema_editor): """Set site d...
mit
-8,201,692,270,655,157,000
24.857143
129
0.624309
false
3.62
false
false
false
rmarkello/peakdet
peakdet/analytics.py
1
4395
# -*- coding: utf-8 -*- """ Functions and classes for generating analytics on physiological data """ import numpy as np from scipy.signal import welch from scipy.interpolate import interp1d class HRV(): """ Class for calculating various HRV statistics Parameters ---------- data : Physio_like ...
gpl-3.0
-3,991,602,749,243,940,400
23.691011
75
0.576564
false
3.482567
false
false
false
Digital-Preservation-Finland/dpres-siptools
siptools/scripts/create_addml.py
1
14105
"""Command line tool for creating ADDML metadata.""" from __future__ import unicode_literals import io import os import sys import csv import six import click import addml import lxml.etree as ET from siptools.mdcreator import MetsSectionCreator from siptools.utils import encode_path click.disable_unicode_literals_...
lgpl-3.0
2,224,515,752,166,806,800
34
79
0.623892
false
4.282028
false
false
false
RajaS/Eepee
src/playlist_select.py
1
10363
#!/usr/bin/env python # -*- coding: utf-8 -*- """PlayListSelector is a dialog for constructing a playlist. A playlist is simply a list of filepaths written as rows in a plain text file. The selector is called as a modal dialog and can be initiated with a base list or an empty list. """ ################## ## Drag n dr...
gpl-3.0
6,214,633,775,538,986,000
39.639216
103
0.591914
false
3.83957
false
false
false
Bollegala/MLIB
classify/predict.py
1
10430
""" This module contains various functionalities required by the training algorithms such as rolling averages, predicion and evaluation metrics. """ ######## CHANGE LOG ############################################## # 2012/04/23: Resolved the bug that caused MLIB to crash when # logreg:SGD was called with ...
bsd-3-clause
2,232,344,856,082,249,500
32.645161
96
0.48907
false
4.099843
false
false
false
rogerberm/plugin.video.kasetophono
kasetophono.py
1
10757
import sys import re import xbmc import xbmcgui import xbmcplugin import xbmcaddon import urlparse import urllib import CommonFunctions import random common = CommonFunctions common.plugin = 'kasetophono-1.0' base_url = sys.argv[0] addon_handle = int(sys.argv[1]) xbmcplugin.setContent(addon_handle, 'musicvideos') arg...
gpl-3.0
-8,549,255,823,529,919,000
42.727642
174
0.700846
false
3.024178
false
false
false
arcyfelix/Courses
18-05-05-Apache-Spark-with-Python-Big-Data-with-PySpark-and-Spark/5_Advanced_Spark_Topics/2_StackOverFlowSurveyFollowUp.py
1
1235
from pyspark import SparkContext, SparkConf import re class Utils(): COMMA_DELIMITER = re.compile(''',(?=(?:[^"]*"[^"]*")*[^"]*$)''') if __name__ == "__main__": conf = SparkConf().setAppName('StackOverFlowSurvey').setMaster("local[*]") sc = SparkContext(conf = conf) total = sc.accumulator(0) miss...
apache-2.0
-217,847,907,637,320,060
37.59375
99
0.675304
false
3.859375
false
false
false
defzzd/django-imagr
imagr_site/imagr_site/settings.py
1
4133
""" Django settings for imagr_site project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...)...
mit
1,481,087,383,474,692,900
26.370861
122
0.724655
false
3.410066
false
false
false
JDownloader/GEL-3014_Design3
vision/robotLocator.py
1
10820
import cv2 from cube import Cube, FormStencil, TABLE_STENCIL, FormFilter # import cube from kinect import Kinect from kinectCaptureHelper import KinectCaptureHelper from visiontools import VisionTools import numpy as np import math import time class RobotLocator(): PIXEL_SHIFT = 3 def __init__(self): ...
mit
-3,919,011,091,735,630,000
45.839827
114
0.603142
false
3.332307
false
false
false
yourlabs/django-autocomplete-light
test_project/select2_nestedadmin/migrations/0001_initial.py
1
2003
# Generated by Django 2.0.6 on 2018-06-08 15:51 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='TModelOne', fields=[ ...
mit
-2,544,699,015,682,852,400
39.877551
178
0.587619
false
4.104508
false
false
false
richcaudle/ingestion-connectors
rss-connector/xml2json.py
1
3385
import xml.etree.cElementTree as ET import simplejson, optparse, sys, os def elem_to_internal(elem,strip=1): """Convert an Element into an internal dictionary (not JSON!).""" d = {} for key, value in elem.attrib.items(): d['@'+key] = value # loop over subelements to merge them for subele...
mit
-198,499,093,890,503,260
26.088
76
0.594682
false
3.9637
false
false
false
devalbo/mm_anywhere
devices.py
1
3424
""" devices.py ~~~~~~~~~~~~ This module supports accessing and updating devices and device properties. :copyright: (c) 2012 by Albert Boehmler :license: GNU Affero General Public License, see LICENSE for more details. """ from flask import Blueprint, render_template, abort, request, url_for from jinja2 import Templ...
agpl-3.0
-7,148,003,944,098,885,000
32.568627
79
0.675818
false
3.570386
false
false
false
leeping/crank
crank/WQtools.py
1
3853
from __future__ import print_function import os, sys, time import work_queue class WorkQueue: def __init__(self, port, name='dihedral'): work_queue.set_debug_flag('all') wq = work_queue.WorkQueue(port=port, exclusive=False, shutdown=False) wq.specify_keepalive_interval(8640000) wq.s...
mit
6,082,932,368,173,435,000
44.869048
174
0.607838
false
3.733527
false
false
false
adapt-sjtu/novelner
tagger/utils.py
1
10659
import os import re import codecs import numpy as np import theano models_path = "./models" eval_path = "./evaluation" eval_temp = os.path.join(eval_path, "temp") eval_script = os.path.join(eval_path, "conlleval") def get_name(parameters): """ Generate a model name from its parameters. """ l = [] ...
apache-2.0
55,120,574,341,508,590
30.913174
84
0.541139
false
3.256645
false
false
false
liucode/tempest-master
tempest/scenario/test_network_v6.py
1
10201
# Copyright 2014 Cisco Systems, 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 required...
apache-2.0
310,552,758,021,151,360
40.133065
79
0.596118
false
3.58685
true
false
false
SGenheden/Scripts
Lammps/insert_in_elba.py
1
5439
# Author: Samuel Genheden samuel.genheden@gmail.com """ Program to insert an atomistic solute in box of ELBA molecules Examples -------- insert_in_elba.py data.toluene -o elba_toluene -b data.128dopc_4232wat -f forcefield.elba -z {0..30} insert_in_elba.py data.kalp23_heavyh -b data.128dopc_4232wat_mod_whole -f fo...
mit
-8,535,281,310,741,929,000
38.992647
245
0.690752
false
2.885411
false
false
false
nigelb/SerialGrabber
serial_grabber/reader/SerialReader.py
1
3115
#!/usr/bin/env python # SerialGrabber reads data from a serial port and processes it with the # configured processor. # Copyright (C) 2012 NigelB # # 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 Foundatio...
gpl-2.0
4,984,227,558,085,990,000
38.43038
103
0.682504
false
4.443652
false
false
false
malkia/cards
cards.py
1
4980
import csv import sys from reportlab.lib.units import inch from reportlab.pdfgen import canvas from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, PageBreak from reportlab.lib.styles import ParagraphStyle from reportlab.pdfbase import pdfmetrics from reportlab.pdfbase.ttfonts import TTFont # sudo...
mit
8,128,353,973,174,884,000
27.62069
97
0.60743
false
3.1125
false
false
false
carlomt/dicom_tools
bin/cfr_maxroi.py
1
1638
#!/usr/bin/python import ROOT import numpy as np import glob import argparse from dicom_tools.roiFileHandler import roiFileHandler import os from dicom_tools.FileReader import FileReader from dicom_tools.pyqtgraph.Qt import QtCore, QtGui import dicom_tools.pyqtgraph as pg from skimage.measure import grid_points_in_poly...
mit
558,733,560,483,201,500
28.25
94
0.703297
false
3.096408
false
false
false
Nic30/hwtLib
hwtLib/abstract/frame_utils/join/state_trans_item.py
1
5183
from copy import deepcopy from typing import Dict, List, Optional from hwtLib.abstract.frame_utils.join.input_reg_val import InputRegInputVal from hwtLib.abstract.frame_utils.join.state_trans_table import StateTransTable def _cmp_with_None_as_2(o0, o1): """ :return: 0 if o0 == o1, -1 if o0 < o1, 1 if o0 > o1...
mit
8,534,321,089,075,293,000
32.655844
99
0.519004
false
3.407627
false
false
false
mscook/BanzaiDB
docs/conf.py
1
8510
# -*- coding: utf-8 -*- # # BanzaiDB documentation build configuration file, created by # sphinx-quickstart on Tue Feb 18 23:08:05 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
apache-2.0
3,288,223,409,814,006,300
30.518519
79
0.707168
false
3.680796
true
false
false
adwasser/masktools
masktools/superskims/slit.py
1
1174
from __future__ import (absolute_import, division, print_function, unicode_literals) class Slit: def __init__(self, x, y, length, width, pa, name): ''' Representation of a slit in a mask. Coordinates are relative to the mask, so that the x-axis is along the lon...
mit
4,325,134,315,061,449,700
39.482759
98
0.567291
false
3.66875
false
false
false
chris-ch/coinarb
bf-arb-pylab/scripts/testbitfinex.py
1
1342
import json import asyncio import websockets WSS_BITFINEX_2 = 'wss://api2.bitfinex.com:3000/ws' async def consumer_handler(pair): async with websockets.connect(WSS_BITFINEX_2) as websocket: subscription = json.dumps({ 'event': 'subscribe', 'channel': 'book', 'symbol': ...
mit
5,123,590,038,034,242,000
30.97619
75
0.590909
false
3.947059
false
false
false
liyocee/job_hunt
backend/employer/serializers.py
1
1754
from rest_framework import serializers from django.contrib.auth.hashers import make_password from rest_framework.exceptions import ValidationError from django.contrib.auth import get_user_model from common.serializers import JobSerializer from job_auth.serializers import UserSerializer from .models import( Employer...
mit
6,953,642,436,738,389,000
34.08
77
0.684151
false
4.136792
false
false
false
rbuffat/pyidf
tests/test_zonecrossmixing.py
1
5476
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.zone_airflow import ZoneCrossMixing log = logging.getLogger(__name__) class TestZoneCrossMixing(unittest.TestCase): def setUp(self): self.fd, self.path = tempfile.m...
apache-2.0
1,390,179,909,339,341,800
52.696078
147
0.712199
false
3.628893
false
false
false
luwei0917/awsemmd_script
pulling_analysis.py
1
16152
#!/usr/bin/env python3 # @Author: Wei Lu <weilu> # @Date: 25-Jan-2017 # @Email: wl45@rice.edu # @Last modified by: weilu # @Last modified time: 25-Jan-2017 # @Copyright: Free import os import sys import random import time from random import seed, randint import argparse import platform from datetime import datet...
mit
7,160,352,301,623,178,000
33.810345
106
0.494304
false
2.804167
false
false
false
lingdb/CoBL-public
ielex/lexicon/migrations/0039_languagebranches_to_sndcomp.py
1
1227
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function from django.db import migrations def forwards_func(apps, schema_editor): LanguageBranches = apps.get_model('lexicon', 'LanguageBranches') SndComp = apps.get_model('lexicon', 'SndComp') print('Creating SndComp from LanguageBran...
bsd-2-clause
-5,479,476,683,361,122,000
30.461538
68
0.640587
false
3.352459
false
false
false
sciencewiz1/datahub
src/datahub/config/settings.py
1
4720
# DataHub Settings. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('Anant Bhardwaj', 'anantb@csail.mit.edu'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'datahub', ...
mit
-3,512,951,586,345,453,600
31.777778
120
0.674576
false
3.731225
false
false
false
nvazquez/Turtlebots
plugins/butia/pybot/pybot_server.py
1
4112
#! /usr/bin/python # -*- coding: utf-8 -*- # # Pybot server # # Copyright (c) 2012-2014 Alan Aguiar alanjas@hotmail.com # Copyright (c) 2012-2014 Butiá Team butia@fing.edu.uy # Butia is a free and open robotic platform # www.fing.edu.uy/inco/proyectos/butia # Facultad de Ingeniería - Universidad de la República - Urugu...
mit
6,281,504,219,295,540,000
33.233333
97
0.520204
false
3.984481
false
false
false
all-of-us/raw-data-repository
rdr_service/alembic/versions/0e92151ebd4a_amend_biobank_orders.py
1
3772
"""amend biobank orders Revision ID: 0e92151ebd4a Revises: 075b9eee88b7 Create Date: 2018-08-15 11:43:57.043915 """ import model.utils import sqlalchemy as sa from alembic import op from rdr_service.participant_enums import BiobankOrderStatus # revision identifiers, used by Alembic. revision = "0e92151ebd4a" down_r...
bsd-3-clause
5,930,976,023,165,496,000
45
117
0.69141
false
3.159129
false
false
false
SINGROUP/pycp2k
pycp2k/classes/_each13.py
1
1113
from pycp2k.inputsection import InputSection class _each13(InputSection): def __init__(self): InputSection.__init__(self) self.Just_energy = None self.Powell_opt = None self.Qs_scf = None self.Xas_scf = None self.Md = None self.Pint = None self.Metad...
lgpl-3.0
8,776,845,930,231,338,000
41.807692
447
0.575921
false
2.906005
false
false
false
USGSDenverPychron/pychron
pychron/canvas/canvas2D/dumper_canvas.py
1
2355
# =============================================================================== # Copyright 2015 Jake Ross # # 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...
apache-2.0
4,657,083,122,191,478,000
36.983871
83
0.574947
false
4.124343
false
false
false
NorfairKing/sus-depot
shared/shared/vim/dotvim/bundle/YouCompleteMe/third_party/ycmd/ycmd/completers/go/gocode_completer.py
1
9026
# Copyright (C) 2015 Google Inc. # # This file is part of ycmd. # # ycmd 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. # # ycmd is di...
gpl-2.0
1,829,152,658,590,855,400
35.840816
78
0.611345
false
3.832696
false
false
false
geekmug/sgsp
sgsp.py
1
16819
#!/usr/bin/env python __license__ = """ Copyright 2011 Scott A. Dial <scott@scottdial.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 requi...
apache-2.0
4,190,308,785,440,239,600
39.430288
80
0.622035
false
4.086249
false
false
false
Bysmyyr/chromium-crosswalk
tools/telemetry/telemetry/internal/platform/power_monitor/power_monitor_controller.py
1
3099
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import atexit import logging import telemetry.internal.platform.power_monitor as power_monitor def _ReenableChargingIfNeeded(battery): if not battery.Ge...
bsd-3-clause
6,751,405,167,170,747,000
38.227848
78
0.70313
false
4.11008
false
false
false
CloudVE/djcloudbridge
djcloudbridge/admin.py
1
3228
from django.contrib import admin import nested_admin from polymorphic.admin import PolymorphicChildModelAdmin, PolymorphicParentModelAdmin from . import forms from . import models class ZoneInline(nested_admin.NestedTabularInline): model = models.Zone extra = 1 class AWSRegionInline(nested_admin.NestedSt...
mit
-1,195,567,295,705,361,400
27.566372
85
0.732962
false
3.927007
false
false
false
dom96/MDSBot
modules/modulepb/modulepb.py
1
3148
#!/usr/bin/env python ''' Created on 2010-04-02 @author: Dominik ''' about = "This module lets you download other modules from pastebin." def main(server, initOnChannel, usrManager): pass def destroy(server): pass def cmd(server, word, word_eol, usrManager): if word[3].startswith("|modules"): if ...
gpl-2.0
-6,812,439,348,188,196,000
44.623188
118
0.462834
false
4.191744
false
false
false
liqd/a4-meinberlin
meinberlin/apps/cms/emails.py
1
2810
import io from email.mime.application import MIMEApplication from email.mime.text import MIMEText import xlsxwriter from django.utils import timezone from django.utils.translation import ugettext as _ from meinberlin.apps.contrib.emails import Email class FormEmail(Email): template_name = 'meinberlin_cms/emails...
agpl-3.0
8,352,434,911,422,125,000
32.855422
79
0.620285
false
3.797297
false
false
false
harvard-lil/nuremberg
nuremberg/search/templatetags/search_url.py
1
3641
from django import template from django.utils.safestring import SafeString from django.urls import reverse from django.http.request import QueryDict from urllib.parse import quote_plus register = template.Library() def cleaned_params(context): params = context['request'].GET.copy() if 'partial' in params: de...
mit
409,706,707,613,808,300
31.221239
90
0.659984
false
3.441399
false
false
false
slivne/ccm
ccmlib/common.py
1
17586
# # Cassandra Cluster Management lib # import os import platform import re import shutil import socket import stat import subprocess import sys from six import print_ import time import yaml import fnmatch BIN_DIR= "bin" CASSANDRA_CONF_DIR= "conf" DSE_CASSANDRA_CONF_DIR="resources/cassandra/conf" OPSCENTER_CONF_DIR= ...
apache-2.0
3,973,030,001,019,296,300
35.485477
165
0.605084
false
3.387787
true
false
false
StingraySoftware/stingray
stingray/pulse/pulsar.py
1
25608
""" Basic pulsar-related functions and statistics. """ import functools from collections.abc import Iterable import warnings from scipy.optimize import minimize, basinhopping import numpy as np from .fftfit import fftfit as taylor_fftfit from ..utils import simon, jit from . import HAS_PINT, get_model, toa __all__ ...
mit
837,690,638,767,963,600
28.915888
83
0.584153
false
3.547306
false
false
false
freesmartphone/framework
framework/subsystems/ogsmd/gsm/gprs.py
1
1816
#!/usr/bin/env python """ The Open GSM Daemon - Python Implementation (C) 2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de> (C) 2008 Openmoko, Inc. GPLv2 or later Package: ogsmd.gsm Module: gprs This module provides a database with GPRS settings for GPRS network providers. """ providerdb = {} #================...
gpl-2.0
6,100,173,966,316,784,000
27.375
75
0.40033
false
3.319927
false
false
false
Gnomescroll/Gnomescroll
tools/vox_lib/fill_color.py
1
2166
#!/usr/bin/python """ Fill color Takes 3 sets of arguments --file <filename> --base R,G,B # color to replace --fill R,G,B # color to fill """ import argparse import os import shutil import random def get_args(): parser = argparse.ArgumentParser() parser.add_argument('file', type=str, help='input voxel...
gpl-3.0
1,918,593,052,671,836,200
22.802198
104
0.590951
false
3.40566
false
false
false
googleads/googleads-python-lib
examples/ad_manager/v202011/creative_wrapper_service/get_all_creative_wrappers.py
1
1887
#!/usr/bin/env python # # Copyright 2016 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
-4,268,094,210,066,390,500
36
78
0.72549
false
4.120087
false
false
false
google-research/korvapuusti
listening_test_summer_2020/analysis/data_generation/generate_extra_data.py
1
4176
"""TODO(lauraruis): DO NOT SUBMIT without one-line documentation for generate_extra_data. TODO(lauraruis): DO NOT SUBMIT without a detailed description of generate_extra_data. """ from __future__ import absolute_import # Not necessary in a Python 3-only module from __future__ import division # Not necessary in a Py...
apache-2.0
-6,055,836,175,392,146,000
30.398496
89
0.701149
false
3.468439
false
false
false
AnhellO/DAS_Sistemas
Ago-Dic-2020/perez-sanchez-jose-jahir/Practica4/Practica4_test.py
1
2013
import unittest from Practica4 import SchoolMemberFactory, Teacher class SchoolMemberFactoryTest(unittest.TestCase): def test_student_creation(self): student = SchoolMemberFactory.make("student", name = "foo") self.assertEqual(str(student), "Soy el alumno foo!, tengo -1 años y mi ID = XXXXXX") ...
mit
-524,237,762,267,397,950
53.27027
201
0.673642
false
3.252836
true
false
false
dokterbob/django-metaphore
metaphore/admin.py
1
3040
import logging from sorl.thumbnail.admin import AdminImageMixin from django.contrib import admin from metaphore.baseadmin import PostAdmin from metaphore.models import * from metaphore.forms import * if settings.USE_TINYMCE: from tinymce.widgets import TinyMCE class ArticleImageInline(AdminImageMixin, admin....
gpl-3.0
-1,696,095,141,895,287,000
29.09901
97
0.676316
false
3.892446
false
false
false
KyleWendt/ncsm_ho_ir_scale
ncsm_ho_ir_scale.py
1
3840
#!/usr/bin/env python ''' author: Kyle Wendt <kylewendt@gmail.com> copyright: 2015 Kyle Wendt License: GPL v3 ''' def main(): import argparse, textwrap from numpy import arange, array, sqrt parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter, epilog=tex...
gpl-3.0
-2,794,175,279,695,916,500
35.226415
174
0.565625
false
2.563418
false
false
false
periwinklepreacher/obtuse-octo-guacamole
rtorrent-daemon/rtrpc.py
1
7785
#!/usr/bin/python2 ''' Created on Aug 19, 2015 @author: periwinklepreacher program name: rtrpc description: Python module for interacting with rtorrent's XML-RPC interface. examples: import rtrpc proxy = SCGIServerProxy( 'scgi://localhost:5000' ) downloads = proxy.d.mul...
gpl-2.0
8,418,697,816,144,101,000
37.161765
97
0.564804
false
3.865442
false
false
false
Crypt0-M3lon/k6
site_ctf/models.py
1
2176
#-*- coding: utf-8 -*- from django.db import models from django.contrib.auth.models import User from datetime import datetime class Categorie(models.Model): id = models.AutoField(primary_key=True, db_column='id') name = models.CharField(max_length=45, unique=True, db_column='name') description = models.Te...
mit
-3,905,066,385,082,305,500
45.297872
134
0.701287
false
3.509677
false
false
false
jamslevy/gsoc
app/soc/models/request.py
1
2061
#!/usr/bin/python2.5 # # Copyright 2008 the Melange 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...
apache-2.0
-5,336,916,727,863,762,000
34.534483
77
0.727317
false
3.918251
false
false
false
tomduck/pandoc-eqnos
setup.py
1
1971
"""setup.py - install script for pandoc-eqnos.""" # Copyright 2015-2020 Thomas J. Duck. # All rights reserved. # # 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 3. # # This program is d...
gpl-3.0
4,561,671,213,932,528,600
30.790323
75
0.676814
false
3.629834
false
false
false
uwosh/CCDET-CBRF
ccdet.py
1
8257
import csv import logging import transaction DIRNAME = "/opt/Plone-4.3/zeocluster/Extensions/" FILENAME = "ccdet.dat" MAXROWS = 100000000 TRANSSIZE = 50 TRANSSIZE_FOR_READING = 5000 FOLDERID = 'cbrf-folder' logger = logging.getLogger('ccdet_mem') html_escape_table = { "&": "&amp;", } def html_escape(text):...
gpl-2.0
-3,841,052,857,539,259,400
45.38764
240
0.482257
false
4.477766
false
false
false
rohitjogson/pythonwork
text editor.py
1
3626
import os,sys,shutil def choice(): ch = int(input("enter your choice \n1.open file \n 2.append file \n 3.create file \n 4.delete file \n 5.copy file \n 6.move file 7.rename_file \n 8. exit \n ")) if ch == 1: open_file() elif ch == 2: append_file() elif ch == 3: create_f...
gpl-3.0
-973,940,418,335,266,200
27.008
164
0.512135
false
3.997795
false
false
false
kajojify/heralding
heralding/capabilities/smtp.py
1
7900
# Copyright (C) 2013 Aniket Panse <contact@aniketpanse.in> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This pro...
gpl-3.0
8,999,639,891,289,031,000
36.980769
113
0.582911
false
4.084798
false
false
false
edljk/Mosek.jl
deps/src/mosek/7/tools/examples/fusion/python/sdo1.py
1
1487
## # Copyright: Copyright (c) MOSEK ApS, Denmark. All rights reserved. # # File: sdo1.py # # Purpose: # Solves the mixed semidefinite and conic quadratic optimization problem # # [2, 1, 0] # minimize Tr [1, 2, 1] * X + x0 # [0, 1, 2] # # [1, 0, 0]...
mit
-3,317,492,532,433,110,500
26.537037
99
0.453934
false
2.669659
false
false
false
hlange/LogSoCR
.waf/build_system_kit/noscript/dbdlib.py
1
3742
#! /usr/bin/env python import os, sys, imp from waflib import Context, Options, Configure, Utils, Logs, TaskGen, Task import waflib.Tools.c """ Compile main.c and dependent object files into a single target (program/shlib/stlib or just object files) - no build directory and no script files - just a c4che directory f...
agpl-3.0
-209,593,061,019,287,200
28.234375
122
0.693747
false
3.107973
true
false
false
Firefly-Automation/Firefly
tests/test_automation.py
1
6114
import unittest from unittest.mock import Mock, PropertyMock, patch from Firefly.const import EVENT_ACTION_ANY, EVENT_ACTION_ON, EVENT_TYPE_BROADCAST, STATE from Firefly.helpers.automation import Automation from Firefly.helpers.events import Event # TODO(zpriddy): These should be in const file LABEL_TRIGGERS = 'trigg...
apache-2.0
7,663,054,162,513,168,000
27.305556
110
0.459274
false
3.97013
true
false
false
schae234/Camoco
camoco/Ontology.py
1
23584
#!/usr/bin/python3 from .Camoco import Camoco from .RefGen import RefGen from .Locus import Locus from .Term import Term from pandas import DataFrame from scipy.stats import hypergeom from itertools import chain from functools import lru_cache from collections import OrderedDict import sys import copy import numpy i...
mit
-4,271,027,210,489,595,000
35.965517
101
0.52048
false
4.374699
false
false
false
googleapis/python-aiplatform
schema/predict/prediction/setup.py
1
1964
# -*- coding: utf-8 -*- # Copyright 2020 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...
apache-2.0
1,194,531,731,032,039,400
36.056604
189
0.671079
false
3.577413
false
false
false
brianmckenna/sci-wms
wms/views.py
1
11869
import os import json from collections import OrderedDict from django.conf import settings from django.template import RequestContext from django.http import HttpResponse from django.contrib.auth import authenticate, login, logout from django.template.response import TemplateResponse from django.core import serializer...
gpl-3.0
7,700,373,996,748,154,000
37.914754
227
0.670065
false
4.027486
false
false
false
markflyhigh/incubator-beam
sdks/python/apache_beam/runners/dataflow/internal/clients/dataflow/dataflow_v1b3_messages.py
1
229689
# # 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
-271,680,103,110,742,880
38.42482
102
0.733326
false
4.288443
false
false
false
SaintAttila/attila
attila/utility.py
1
8261
""" Utility functions. This module is the "miscellaneous bin", providing a home for simple functions and classes that don't really belong anywhere else. """ import msvcrt import sys import time from .exceptions import TooFewItemsError, TooManyItemsError __author__ = 'Aaron Hosford' __all__ = [ 'first', 'las...
mit
2,733,103,964,099,652,600
30.773077
100
0.644837
false
4.492115
false
false
false
kandluis/machine-learning
prac4/practical4-code/qlearner_long/branin_qlearner_long.py
1
2269
import sys ''' The below is only needed for Bayesian Optimization on Luis' Machine. Ignore and comment out if it causes problems. ''' path = "/home/luis/Documents/Harvard_School_Work/Spring_2015/cs181/assignments/practicals/prac4/practical4-code/" if path not in sys.path: sys.path.append(path) ''' End Bayesian '''...
mit
6,233,594,401,801,482,000
30.513889
113
0.599824
false
3.932409
false
false
false
BrendanLeber/adventofcode
2019/13-care_package/solve2.py
1
3070
# -*- coding: utf-8 -*- import argparse import pdb import traceback from collections import deque from re import findall from typing import Dict, List, Tuple from intcode import Intcode from point import Point from rect import Rectangle def extract_ints(line: str) -> List[int]: return [int(x) for x in findall(r...
mit
7,972,386,743,847,564,000
26.410714
98
0.550163
false
3.381057
false
false
false
paynejacob/Flask-Bootstrap
migrations/versions/93662ac30d13_.py
1
1099
"""Initial db Revision ID: 93662ac30d13 Revises: None Create Date: 2016-07-26 13:32:26.181303 """ # revision identifiers, used by Alembic. revision = '93662ac30d13' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): op.create_table('users', sa.Column('username', sa.String(l...
mit
-3,646,317,344,568,011,300
27.921053
64
0.675159
false
3.261128
false
false
false
data-8/DS8-Interact
app/auth.py
1
6140
""" Authenticator original from the JupyterHub repository https://github.com/jupyter/nbgrader/blob/master/nbgrader/auth/hubauth.py """ import json import requests from requests.exceptions import ReadTimeout from tornado.web import HTTPError from tornado.web import RequestHandler from . import util # Backfills fo...
apache-2.0
-3,581,361,824,885,827,000
37.136646
173
0.607329
false
4.211248
true
false
false
CacaoMovil/guia-de-cacao-django
cacao_app/event/migrations/0001_initial.py
1
1179
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import ckeditor.fields import django_countries.fields class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Event', f...
bsd-3-clause
-2,554,361,095,091,816,400
34.727273
114
0.564885
false
4.180851
false
false
false
Unofficial-Extend-Project-Mirror/openfoam-extend-Breeder-other-scripting-PyFoam
PyFoam/Applications/NetList.py
1
9666
"""Lists the running pyFoam-Processes""" from PyFoam.Applications.PyFoamApplication import PyFoamApplication from PyFoam import configuration as config from PyFoam.ThirdParty.six import print_,iteritems from PyFoam.Infrastructure.ZeroConf import getServerList from PyFoam.Infrastructure.ServerBase import getServerProxy...
gpl-2.0
-794,086,826,948,275,800
40.484979
181
0.512622
false
4.740559
true
false
false
aarne-kyppo/bachelorthesis
users/serviceclasses/updatefunctions.py
1
1175
def updateStateField(serviceobject,request,user,prev_state,new_state,newuser=False): if newuser: prev_state = 'd' if new_state: new_state = 'a' else: new_state = 'd' if new_state == 'd' and prev_state != 'd': serviceobject.service.disableServiceFromUse...
mit
1,714,290,388,103,912,400
48
100
0.676596
false
3.549849
false
false
false
obulpathi/poppy
poppy/bootstrap.py
1
7714
# Copyright (c) 2014 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
apache-2.0
-6,854,174,755,165,995,000
30.614754
72
0.565984
false
4.652593
false
false
false
nmalaguti/python-fuzzyhash
fuzzy.py
1
3527
import random import zlib import hashlib import math base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" S = 64 def md5hex(arr): m = hashlib.md5() m.update(str(bytearray(arr))) return m.hexdigest() def sha1hex(arr): m = hashlib.sha1() m.update(str(bytearray(arr))) retu...
mit
-8,049,882,757,483,165,000
25.719697
102
0.511766
false
2.734109
false
false
false
asg2016/stepic
ask/qa/forms.py
1
3781
from django import forms from django.shortcuts import get_object_or_404 from django.contrib.auth.models import User from django.contrib.auth import authenticate from qa.models import Question, Answer class AskForm(forms.Form): title = forms.CharField(max_length=255) text = forms.CharField(widget=forms.Textare...
gpl-3.0
8,513,565,105,495,177,000
30.773109
69
0.598519
false
4.391405
false
false
false
jirikadlec2/rushvalley
python/decagon.py
1
8188
#! /usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Jiri' from lxml import etree import requests import csv import xlrd import sys import argparse from dateutil.parser import parse import time import datetime import unicodedata ######################################## # checks if the file is a file or not ...
mit
-3,214,213,771,481,739,000
33.842553
113
0.59233
false
3.31498
false
false
false
SoftwareDefinedBuildings/uPMU-daemon
nagios_plugin/upmu_plugin.py
1
1702
#!/usr/bin/python # This is a plugin that will work with Nagios for monitoring a uPMU import argparse import datetime import math import pymongo parser = argparse.ArgumentParser() parser.add_argument('serialnum', help='the serial number of the uPMU to check on') parser.add_argument('-c', '--criticaltime', help='the ...
gpl-3.0
-1,638,661,290,261,841,700
38.581395
194
0.719741
false
3.583158
false
false
false
TheWitchers/Team
UserDetails.py
1
1544
__author__ = 'yagel' class UserDetails: def __init__(self,nickname, email, first_name, last_name, id , password, verQuestion, ans): self.id = id self.password=password sel...
gpl-2.0
-3,201,585,564,853,351,400
31.1875
122
0.454663
false
4.32493
false
false
false
Reilithion/xmms2-reilithion
wafadmin/Tools/gcc.py
1
3450
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2006-2008 (ita) # Ralf Habacker, 2006 (rh) import os, sys import Configure, Options, Utils import ccroot, ar from Configure import conftest @conftest def find_gcc(conf): v = conf.env cc = None if v['CC']: cc = v['CC'] elif 'CC' in os.environ: cc = os.environ[...
lgpl-2.1
7,631,888,786,036,290,000
22.793103
87
0.598551
false
2.641654
true
false
false
recap/pumpkin
pumpkin/PmkProcessGraph.py
1
13896
__author__ = 'reggie' import ujson as json import networkx as nx import time import thread import threading import copy import re from networkx.readwrite import json_graph from PmkShared import * class ProcessGraph(object): MAX_TTL = 60 #seconds INT_TTL = 15 #seconds def __init__(self, context): ...
mit
-7,439,684,345,510,058,000
31.092379
130
0.454016
false
3.854646
false
false
false
kvaps/vdsm
lib/vdsm/netlink/monitor.py
1
9989
# Copyright 2014-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...
gpl-2.0
-8,483,044,690,563,381,000
33.926573
79
0.567624
false
3.604836
false
false
false
alexpilotti/python-keystoneclient
keystoneclient/tests/v3/test_trusts.py
1
4215
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
apache-2.0
148,907,280,667,824,400
37.669725
79
0.625623
false
3.544996
true
false
false
chrisxue815/leetcode_python
problems/test_0934.py
1
1722
import collections import unittest from typing import List import utils neighbors = [ [0, -1], [0, 1], [-1, 0], [1, 0], ] next_neighbor_indexes = [ [0, 2, 3], [1, 2, 3], [0, 1, 2], [0, 1, 3], ] # DFS, BFS. class Solution: def shortestBridge(self, grid: List[List[int]]) -> int: ...
unlicense
5,558,264,485,482,811,000
23.6
73
0.404762
false
3.656051
true
false
false
dsilvestro/PyRate
PyRate_for_Python2/pyrate_lib/des_mcmc_lib.py
1
8139
import os,csv import argparse, os,sys, time from numpy import * import numpy as np import scipy import scipy.linalg from des_model_lib import * from mcmc_lib import * linalg = scipy.linalg import scipy.stats import random as rand np.set_printoptions(suppress=True) # prints floats, no scientific notation np.set_printopt...
agpl-3.0
-354,069,669,941,184,300
24.756329
125
0.641971
false
2.083184
false
false
false
pymssql/pymssql
dev/ccompiler.py
1
2533
# -*- coding: utf-8 -*- import contextlib from distutils import ccompiler from distutils.errors import * import os import sys import types def _has_function(self, funcname, includes=None, include_dirs=None, libraries=None, library_dirs=None): """Return a boolean indicating whether funcname is su...
lgpl-2.1
485,880,502,710,034,750
24.846939
68
0.609554
false
4.046326
false
false
false
geopy/geopy
geopy/geocoders/mapquest.py
1
7092
from functools import partial from urllib.parse import urlencode from geopy.geocoders.base import DEFAULT_SENTINEL, Geocoder from geopy.location import Location from geopy.util import logger __all__ = ("MapQuest", ) class MapQuest(Geocoder): """Geocoder using the MapQuest API based on Licensed data. Docume...
mit
-4,617,404,679,709,631,000
32.611374
85
0.571066
false
4.106543
false
false
false
blurstudio/cross3d
cross3d/abstract/abstractscenecamera.py
1
14285
## # \namespace cross3d.abstract.abstractscenecamera # # \remarks The AbstractSceneObject class provides the base foundation for the 3d Object framework for the cross3d system # This class will provide a generic overview structure for all manipulations of 3d objects # # \author eric # \author Blur Studio #...
mit
-8,535,320,742,636,920,000
24.851504
135
0.705565
false
3.596425
false
false
false
e-loue/django-storages
storages/backends/s3boto.py
1
10557
import os import mimetypes try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.conf import settings from django.core.files.base import File from django.core.files.storage import Storage from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation f...
bsd-3-clause
-7,913,822,272,025,471,000
38.68797
112
0.618357
false
3.864202
false
false
false
raphaelmenges/LSLBroadcaster
pylsl/pylsl.py
1
54876
"""Python API for the lab streaming layer. The lab streaming layer provides a set of functions to make instrument data accessible in real time within a lab network. From there, streams can be picked up by recording programs, viewing programs or custom experiment applications that access data streams in real time. The...
mit
3,702,009,811,059,228,700
40.890076
95
0.599679
false
4.133474
false
false
false
sbmlteam/deviser
generator/code_files/ExtensionFiles.py
1
8972
#!/usr/bin/env python # # @file ExtensionFiles.py # @brief class for generating the plugin files # @author Frank Bergmann # @author Sarah Keating # # <!-------------------------------------------------------------------------- # # Copyright (c) 2013-2018 by the California Institute of Technology # (California, U...
lgpl-2.1
-3,355,087,909,524,822,500
41.72381
83
0.559073
false
4.346899
false
false
false
Artanis/pygcui
pygcui/local.py
1
1708
"""Local constants for PygCUI Copyright (c) 2012, Erik Youngren 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 copyright notice, this list o...
bsd-2-clause
4,123,578,065,611,878,400
42.794872
80
0.785714
false
4.335025
false
false
false
SylvainGuieu/smartplotlib
plotfuncs.py
1
64629
from __future__ import division, absolute_import, print_function from .base import PlotFunc, PlotFactory from .recursive import popargs, KWS, extract_args, alias import matplotlib.pyplot as plt from matplotlib.axis import Axis as pltAxis import numpy as np import os # for savefig __all__ = ["get_axes", "get_figure",...
gpl-2.0
291,362,723,008,340,350
33.934595
126
0.562193
false
3.28066
false
false
false
amymcgovern/pymambo
MamboVision.py
1
4937
""" MamboVision is separated from the main Mambo class to enable the use of the drone without the FPV camera. If you want to do vision processing, you will need to create a MamboVision object to capture the video stream. This module relies on the opencv module, which can a bit challenging to compile on the Raspberry P...
mit
5,963,780,188,013,938,000
36.120301
118
0.645534
false
3.918254
false
false
false
dsm054/pandas
pandas/tests/groupby/test_grouping.py
1
32385
# -*- coding: utf-8 -*- """ test where we are determining what we are grouping, or getting groups """ import pytest from pandas import (date_range, Timestamp, Index, MultiIndex, DataFrame, Series, CategoricalIndex) from pandas.util.testing import (assert_panel_equal, assert_frame_equal, ...
bsd-3-clause
-5,780,578,440,501,353,000
38.445798
79
0.526725
false
3.564275
true
false
false
nuagenetworks/tempest
tempest/services/object_storage/object_client.py
1
9813
# Copyright 2012 OpenStack Foundation # 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 requ...
apache-2.0
393,515,026,877,273,150
37.034884
79
0.567207
false
4.215206
false
false
false
jt6562/my_startup_os
fabfile.py
1
1100
from fabric.api import local, warn_only from config_pkg import all def apt_update(): local('sudo apt update') def apt_upgrade(): local('sudo apt dist-upgrade') def config_all(): for script in all: script() def deploy(pkg_filepath=None): if pkg_filepath is None: pkg_filepath = 'p...
mit
-8,116,117,272,653,004,000
21.916667
88
0.562727
false
3.666667
false
false
false
stsouko/CGRtools
CGRtools/periodictable/groupXV.py
1
5229
# -*- coding: utf-8 -*- # # Copyright 2019-2021 Ramil Nugmanov <nougmanoff@protonmail.com> # Copyright 2019 Alexander Nikanshin <17071996sasha@gmail.com> # Copyright 2019 Tagir Akhmetshin <tagirshin@gmail.com> # This file is part of CGRtools. # # CGRtools is free software; you can redistribute it and/or modify # ...
lgpl-3.0
-1,903,388,920,095,160,600
23.781991
93
0.546185
false
3.165254
false
false
false
jabbalaci/Bash-Utils
slogan.py
1
1222
#!/usr/bin/env python3 """ a simple scraper for http://sloganmaker.com/sloganmaker.php """ import sys from urllib.parse import urlencode import requests from lib.scraper import bsoup as bs BASE = 'http://sloganmaker.com/sloganmaker.php?' def get_slogan(word, times=1): assert 1 <= times <= 10 # be nice w...
mit
6,952,091,926,366,484,000
23.44
77
0.522095
false
3.284946
false
false
false
ivukotic/ML_platform_tests
tutorial/ilija/GAN handwriting/GAN.py
1
6140
#!/usr/bin/env python3 import numpy as np import time from tensorflow.examples.tutorials.mnist import input_data import tensorflow as tf from keras.models import Sequential from keras.layers import Dense, Activation, Flatten, Reshape from keras.layers import Conv2D, Conv2DTranspose, UpSampling2D from keras.layers impo...
gpl-3.0
9,160,729,652,584,932,000
34.697674
110
0.582736
false
3.173127
false
false
false
blancha/abcngspipelines
bisseq/bamtools_merge.py
1
2165
#!/usr/bin/env python3 # Version 1.0 # Author Alexis Blanchet-Cohen # Date: 09/06/2014 import argparse import glob import os import subprocess import util # Read the command line arguments. parser = argparse.ArgumentParser(description="Generates Picard tools MarkDuplicates scripts.") parser.add_argument("-s", "--scr...
gpl-3.0
-6,098,532,624,381,138,000
36.982456
165
0.721478
false
3.578512
false
false
false