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
Brazelton-Lab/bio_utils
bio_utils/iterators/fasta.py
1
5590
#! /usr/bin/env python3 """Faster, simpler, Screed-esque iterator for FASTA files Copyright: fasta.py iterate over and return entries of a FASTA file Copyright (C) 2015 William Brazelton, Alex Hyer This program is free software: you can redistribute it and/or modify it under the terms of the GNU Ge...
gpl-3.0
-4,799,499,336,410,846,000
33.294479
82
0.584258
false
4.329977
true
false
false
berrak/cookiecutter-py3starter
{{cookiecutter.github_repo_name}}/{{cookiecutter.package_name}}/cli.py
1
1728
#!/usr/bin/env python3 # # Copyright {{ cookiecutter.author_name }}, {{ cookiecutter.initial_year_to_release }} # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licen...
apache-2.0
-237,356,212,394,522,000
29.315789
123
0.681713
false
3.585062
false
false
false
roiser/WLCG
ssbCvmfsStatus/wlcg-cvmfs4ssb.py
1
10226
#/bin/env python import urllib, json, datetime from xml.parsers import expat class c4s : def __init__(self): self.cvmfsBaseVersionFile = 'cvmfsVersion.txt' self.requestedVersion = '' self.myVO = 'LHCb' self.cvmfsColumnNo = 202 self.wlcgTopoColumnNo = 144 self.topoDict = {'WLCG':{}, self.myV...
mit
7,568,485,905,248,002,000
39.741036
194
0.622531
false
2.956346
false
false
false
arkabytes/abc
ABC/migrations/0005_auto_20171023_0929.py
1
7572
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-10-23 09:29 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ABC', '0004_auto_20171023_0924'), ] operations = [ migrations.AddField( ...
gpl-3.0
5,220,348,303,067,717,000
29.288
66
0.509377
false
4.875724
false
false
false
tomhur/domoticz-scripts
python/script_time_verisure.py
1
3621
#!/usr/bin/python # -*- coding: utf-8 -*- import domoticz as d import sys import time sys.path.insert(0, '/opt/python-verisure/') import verisure import pickle import pytz import urllib3 import certifi from datetime import datetime from tzlocal import get_localzone debug = False try: execfile("/etc/domoticz/scrip...
mit
8,858,491,424,379,706,000
28.680328
196
0.638498
false
2.772588
false
false
false
AFMD/smallProjects
nanowire-network-simulations/manningp3plotedit6.py
1
20377
""" Created on Mon Jun 15 15:42:23 2020 @author: sturdzal """ #@title Imports from shapely.geometry import LineString, MultiLineString, MultiPoint, Point from shapely.ops import cascaded_union from scipy.special import comb from itertools import product import scipy.stats as stats import matplotlib.pyplot ...
gpl-2.0
-3,190,882,586,409,944,000
40.416667
327
0.551112
false
3.36977
false
false
false
rbuffat/pyidf
tests/test_zonemixing.py
1
5372
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.zone_airflow import ZoneMixing log = logging.getLogger(__name__) class TestZoneMixing(unittest.TestCase): def setUp(self): self.fd, self.path = tempfile.mkstemp() ...
apache-2.0
8,416,077,038,472,639,000
51.676471
142
0.706627
false
3.610215
false
false
false
applied-mixnetworks/txmix
txmix/udp_transport.py
1
1452
from __future__ import print_function import attr from zope.interface import implementer from twisted.internet.interfaces import IReactorUDP from twisted.internet.protocol import DatagramProtocol from twisted.internet import defer from txmix import IMixTransport @implementer(IMixTransport) @attr.s() class UDPTrans...
gpl-3.0
8,444,479,411,809,278,000
29.25
83
0.683196
false
4.4
false
false
false
catapult-project/catapult
telemetry/telemetry/internal/platform/network_controller_backend.py
3
7521
# 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. from __future__ import absolute_import import os from telemetry.internal.util import webpagereplay_go_server from telemetry.internal.util import ts_proxy_se...
bsd-3-clause
-3,696,970,511,087,998,500
33.819444
80
0.68568
false
3.866838
false
false
false
felipenaselva/felipe.repository
script.module.placenta/lib/resources/lib/sources/fr/filmenstreaminghd.py
1
6831
# -*- coding: UTF-8 -*- ####################################################################### # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # @tantrumdev wrote this file. As long as you retain this notice you # can do whatever you want wit...
gpl-2.0
2,041,355,159,829,254,000
36.740331
224
0.495389
false
3.792893
false
false
false
vamdt/spider
douban/pics.py
1
1638
# coding=utf-8 import re import urllib import json import os, random BASE_DOWN_DIR = './download' BASE_DOWN_POSTS_DIR = BASE_DOWN_DIR + '/posts' BASE_URL = 'http://www.douban.com/photos/photo/2230938262/' class AppURLopener(urllib.FancyURLopener): version = "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/5...
mit
6,337,651,235,404,347,000
25.015873
162
0.616606
false
2.762226
false
false
false
ewindisch/nova
nova/compute/manager.py
1
251375
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
apache-2.0
-2,143,329,436,891,058,400
44.235739
79
0.561126
false
4.692721
false
false
false
agx/git-buildpackage
setup.py
1
3370
#!/usr/bin/python3 # vim: set fileencoding=utf-8 : # Copyright (C) 2006-2011 Guido Günther <agx@sigxcpu.org> # # 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 Li...
gpl-2.0
564,592,606,133,849,100
31.07619
75
0.635986
false
3.645022
false
false
false
rhazdon/django-sonic-screwdriver
django_sonic_screwdriver/apps/ban/migrations/0001_initial.py
1
2978
# Generated by Django 3.0.2 on 2020-01-23 13:24 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
mit
-282,668,870,110,881,380
62.361702
258
0.629953
false
4.024324
false
false
false
cuckoobox/cuckoo
stuff/distributed/cluster-test.py
1
3084
# Copyright (C) 2017-2018 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import click import requests import time class Script(object): def __init__(self): self.name = self.__class__.__name__.lower() sel...
mit
-8,013,044,425,276,418,000
29.534653
76
0.519455
false
3.5986
false
false
false
Illumina/HapMix
scripts/haplobams/split_by_haplotype_lib.py
1
11911
import sys sys.path.append('/opt/rh/python27/root/usr/lib64/python2.7/site-packages/pysam') sys.path.append('/home/ptedder/local/lib/python2.7/site-packages') sys.path.append('/home/ptedder/local/lib64/python2.7/site-packages') print sys.path import random,pysam,re,subprocess,HTSeq,pdb,argparse from collections import ...
gpl-3.0
-1,688,665,998,435,795,000
43.114815
363
0.608513
false
2.980731
false
false
false
Runscope/pysaml2
src/saml2/pack.py
1
8806
#!/usr/bin/env python # -*- coding: utf-8 -*- # """Contains classes and functions that are necessary to implement different bindings. Bindings normally consists of three parts: - rules about what to send - how to package the information - which protocol to use """ import urlparse import saml2 import base64 import u...
bsd-2-clause
-1,560,756,759,072,883,200
33.533333
92
0.607086
false
3.920748
false
false
false
mosra/magnum-examples
src/python/magnum-primitives-scenegraph.py
1
4843
#!/usr/bin/env python3 # # This file is part of Magnum. # # Original authors — credit is appreciated but not required: # # 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 # — Vladimír Vondruš <mosra@centrum.cz> # # This is free and unencumbered software released into the p...
unlicense
7,908,722,276,422,597,000
42.576577
81
0.674178
false
3.604322
false
false
false
jeremiahyan/odoo
addons/account/models/chart_template.py
1
74310
# -*- coding: utf-8 -*- from odoo.exceptions import AccessError from odoo import api, fields, models, _ from odoo import SUPERUSER_ID from odoo.exceptions import UserError, ValidationError from odoo.http import request from odoo.addons.account.models.account_tax import TYPE_TAX_USE import logging _logger = logging.g...
gpl-3.0
-6,534,800,096,511,794,000
55.595583
274
0.642282
false
4.084314
false
false
false
Brocade-OpenSource/OpenStack-DNRM-Neutron
neutron/db/migration/alembic_migrations/versions/128e042a2b68_ext_gw_mode.py
1
2121
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 OpenStack Foundation # # 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...
apache-2.0
-8,302,952,998,911,602,000
32.140625
78
0.728901
false
3.517413
false
false
false
amolenaar/gaphor
gaphor/core/modeling/coremodel.py
1
2200
# This file is generated by codegen.py. DO NOT EDIT! from __future__ import annotations import uuid from typing import TYPE_CHECKING, Callable, List, Optional from gaphor.core.modeling.element import Element from gaphor.core.modeling.properties import ( association, attribute, derived, derivedunion, ...
lgpl-2.1
8,562,233,402,867,397,000
22.913043
88
0.742273
false
3.826087
false
false
false
rackerlabs/deuce-client
deuceclient/auth/rackspaceauth.py
1
2721
""" Deuce Rackspace Authentication API """ import logging import deuceclient.auth import deuceclient.auth.openstackauth def get_identity_apihost(datacenter): if datacenter in ('us', 'uk', 'lon', 'iad', 'dfw', 'ord'): return 'https://identity.api.rackspacecloud.com/v2.0' elif datacenter in ('hkg', 'sy...
apache-2.0
-272,386,779,934,035,970
39.014706
78
0.609335
false
4.893885
false
false
false
lambdaloop/CIT-biosignals
pygame/present_images_pygame.py
1
1565
import pygame from pygame.locals import * from constants import * from generate_images import * import time import pandas as pd from pylsl import StreamInfo, StreamOutlet import random pygame.init() #pygame.mouse.set_visible(False) from screen import screen from drawstuff import * study_time = int(time.time()) print...
mit
3,029,757,093,882,281,000
19.324675
61
0.630671
false
3.206967
false
false
false
Metruption/hophacks17project
src/analysis.py
1
2022
""" analysis.py: A wrapper for the Bark Partner API Copyright (C) 2016 Aaron Thomas 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 ...
gpl-3.0
-570,306,720,088,601,800
35.763636
113
0.670129
false
4.06841
false
false
false
yadt/yadt-config-rpm-maker
src/config_rpm_maker/token/treenode.py
1
1209
# yadt-config-rpm-maker # Copyright (C) 2011-2013 Immobilien Scout GmbH # # 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 l...
gpl-3.0
7,911,371,813,833,091,000
35.636364
81
0.679901
false
3.86262
false
false
false
cfobel/camip
camip/bin/vpr_net_to_df.py
1
2970
import sys from collections import OrderedDict import numpy as np import pandas as pd from path_helpers import path from vpr_netfile_parser.VprNetParser import cVprNetFileParser try: profile except NameError: profile = lambda f: f INPUT_DRIVER_PIN = 0 LOGIC_DRIVER_PIN = 4 LOGIC_BLOCK = 0 INPUT_BLOCK = 1 OU...
gpl-2.0
-9,034,308,781,177,645,000
33.137931
81
0.606734
false
3.53151
false
false
false
khchine5/xl
lino_xl/lib/ledger/fixtures/demo_bookings.py
1
4927
# -*- coding: UTF-8 -*- # Copyright 2012-2017 Luc Saffre # License: BSD (see file COPYING for details) """ Creates fictive demo bookings with monthly purchases. See also: - :mod:`lino_xl.lib.finan.fixtures.demo_bookings` - :mod:`lino_xl.lib.sales.fixtures.demo_bookings` - :mod:`lino_xl.lib.invoicing.fixtures.demo_bo...
bsd-2-clause
-259,979,154,959,346,780
33.697183
77
0.56505
false
3.62813
false
false
false
AeroNotix/django-timetracker
tracker/management/commands/approval_reminders.py
1
1376
''' Simple module to aid in command-line debugging of notification related issues. ''' from django.core.management.base import BaseCommand, CommandError from django.conf import settings from django.core.mail import EmailMessage from timetracker.overtime.models import PendingApproval, Tbluser def send_approval_digest...
bsd-3-clause
6,090,599,434,145,423,000
31.761905
86
0.646802
false
3.988406
false
false
false
digitalhealthhack/is_it_good_for_me
data_scripts/get_studies.py
1
3019
from requests import get as get_page from bs4 import BeautifulSoup import csv import codecs import cStringIO TOPIC = 'chocolate' def _get_study_url(url): # Receives the url of a cochrane search result and returns the url for the # study result_page = get_page(url) result_soup = BeautifulSoup(result_...
mit
-463,493,121,653,917,700
27.752381
86
0.613448
false
3.659394
false
false
false
EliCDavis/PyChart
src/ColorSelector.py
1
1167
import math import random class ColorSelector: def __init__(self): self._colors_for_selection = ['F94F48', 'FF6A41', 'B4B4B4', 'D5D5D5', 'E973F5', '237FEA', 'F2B838', '19EC5A', '2395DE', 'D4B57F', 'FFD700'] self._colors_already_selected = [] def get_ran...
mit
-6,649,144,329,297,534,000
28.175
97
0.59126
false
3.728435
false
false
false
justb4/GeoHealthCheck
GeoHealthCheck/app.py
1
38830
# ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com> # Just van den Broecke <justb4@gmail.com> # # Copyright (c) 2014 Tom Kralidis # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documenta...
mit
1,309,314,165,383,930,400
34.3303
79
0.579298
false
3.971361
true
false
false
openstates/openstates
openstates/az/__init__.py
1
15461
import lxml.html import re import requests from openstates.utils import State from .people import AZPersonScraper from .bills import AZBillScraper # from .committees import AZCommitteeScraper # from .events import AZEventScraper class Arizona(State): scrapers = { "people": AZPersonScraper, # 'com...
gpl-3.0
-4,138,875,049,610,144,300
44.878338
88
0.563935
false
3.661141
false
false
false
jcsalterego/pynsour
src/bot.py
1
5843
"""Bot class""" import os import socket from parser import Parser from logger import Logger from sandbox import Sandbox import botcode MAX_CONSOLE_LEN = 50 BUFFER_SIZE = 1024 STATE_DISCONNECTED = 0 STATE_CONNECTING = 1 STATE_HANDSHAKE = 2 STATE_CONNECTED = 3 STATE_ONLINE = 4 class Bot: def __init__(self): ...
bsd-2-clause
-995,107,099,016,354,200
30.079787
74
0.475441
false
4.197557
false
false
false
plucena24/OpenClos
jnpr/openclos/cli_parser.py
1
16382
#------------------------------------------------------------------------------ # cli_parser.py #------------------------------------------------------------------------------ ''' @author : rgiyer Date : October 20th, 2014 This module is responsible for parsing command model defined in cl...
apache-2.0
-8,635,042,734,460,953,000
39.751244
132
0.398608
false
4.878499
false
false
false
xapple/plumbing
plumbing/scraping/blockers.py
1
1536
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Written by Lucas Sinclair. MIT Licensed. Contact at www.sinclair.bio """ # Built-in modules # # Internal modules # # First party modules # from autopaths.file_path import FilePath ################################################################################ def...
mit
-2,501,178,769,367,362,000
30.367347
85
0.580729
false
3.98961
false
false
false
juja256/tasks_manager
des/perm.py
1
1503
from bitarray import * class Permutation: def __init__(self, l): # if sorted(l) != range(1, len(l)+1): # raise ValueError("List is not valid!") self.__bare = [i - 1 for i in l] def Get(self): return self.__bare def Reverse(self): rev = [0] * len(self.__bare) ...
gpl-2.0
2,248,312,554,323,554,300
25.857143
69
0.503659
false
3.863753
false
false
false
lzkelley/sne
scripts/import.py
1
293386
#!/usr/local/bin/python3.5 import csv import os import re import urllib import requests import calendar import sys import json import codecs import resource import argparse import gzip import io import shutil import statistics import warnings from datetime import timedelta, datetime from glob import glob from hashlib ...
mit
6,726,496,294,048,525,000
49.503873
561
0.497728
false
3.827239
false
false
false
dparks1134/STAMP
stamp/plugins/samples/plots/SeqHistogram.py
1
9822
#======================================================================= # Author: Donovan Parks # # Sequence histogram plot. # # Copyright 2011 Donovan Parks # # This file is part of STAMP. # # STAMP is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publi...
gpl-3.0
-6,319,789,311,616,871,000
36.492366
129
0.723376
false
3.12504
true
false
false
jtladner/Scripts
BEAST_prep/beast_nexus_prep_v2.0.py
1
4797
#!/usr/bin/env python from __future__ import division import optparse, os #This script uses an aligned fasta file and a tab deliminted file containing CDS coordinates to create a nexus input for BEAST #In version 2.0, added a flag to throw if you only want coding sequence to be included in the nexus file def main()...
gpl-3.0
1,622,315,349,966,179,600
38.644628
252
0.62143
false
3.164248
false
false
false
Xicnet/radioflow-scheduler
project/icecast_stats/views.py
1
4776
import os.path import datetime import pytz from django.conf import settings from django.db.models import F from datetime import timedelta from django.shortcuts import render from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.contrib.auth.models i...
agpl-3.0
-1,338,487,912,704,370,200
31.27027
142
0.650126
false
3.898776
false
false
false
ndp-systemes/odoo-addons
stock_specific_inventory/__openerp__.py
1
1636
# -*- coding: utf8 -*- # # Copyright (C) 2015 NDP Systèmes (<http://www.ndp-systemes.fr>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License,...
agpl-3.0
438,542,075,688,769,860
33.020833
117
0.660747
false
3.711364
false
false
false
PaddoInWonderland/PaddoCogs
schmeckles/schmeckles.py
1
2347
import re class Schmeckles: def __init__(self, bot): self.bot = bot self.p = re.compile('([^\n\.\,\r\d-]{0,30})(-?[\d|,]{0,300}\.{0,1}\d{1,300} schmeckle[\w]{0,80})([^\n\.\,\r\d-]{0,30})', re.IGNORECASE) async def schmeckle2usd(self, schmeckle): """1 Schmeckle = $148 USD https...
gpl-3.0
-4,986,179,851,531,409,000
40.910714
143
0.588411
false
2.970886
false
false
false
joshua-cogliati-inl/raven
framework/Optimizers/GradientBasedOptimizer.py
1
52237
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
3,588,424,962,406,685,000
53.128497
240
0.646571
false
4.269577
false
false
false
marcwagner/alarmclock
testset.py
1
6477
import time, datetime import unittest import alarm format = "%a %d-%b-%Y %H:%M" current_time = datetime.datetime(2015,4,4,16,4,0) #april 4 2015 16:04 default = {'name' : 'default', 'time' : datetime.time(12,0,0), 'days' : ('MO','TU','WE','TH','FR','SA','SU'), 'date' : None, 'path' : './', 'date'...
mit
8,184,091,684,865,688,000
42.469799
142
0.561371
false
3.212798
true
false
false
timsavage/extopen
setup.py
1
1140
from setuptools import setup, find_packages setup( name = 'extopen', version = '0.1.1', description = "Cross platform helper for opening a file with the default external application.", long_description = open('README.rst').read(), url='https://github.com/timsavage/extopen', author = 'Tim Savage...
bsd-3-clause
4,112,152,975,187,760,000
33.545455
100
0.607018
false
4.367816
false
false
false
reinaldomaslim/Singaboat_RobotX2016
robotx_vision/nodes/color_sequence.py
1
20932
#! /usr/bin/python """ detect color sequence ren ye 2016-10-21 reference: http://stackoverflow.com/questions/14476683/identifying-color-sequence-in-opencv algorithm: # image preparation 1. subwindowing to light buoy by laser and camera 2. convert to hsv 3. check hue for the blob # detection 1...
gpl-3.0
2,657,304,766,669,864,400
37.691312
169
0.559431
false
3.640348
false
false
false
albertobeta/UberSimpleWebsockets
send.py
1
1219
import tornado.httpserver import tornado.websocket import tornado.ioloop from tornado.ioloop import PeriodicCallback import tornado.web from random import randint #Random generator #Config port = 9000 #Websocket Port timeInterval= 2000 #Milliseconds class WSHandler(tornado.websocket.WebSocketHandler): #check_origin ...
mit
-5,836,817,919,319,675,000
29.5
127
0.710418
false
3.716463
false
false
false
vojtechtrefny/anaconda
pyanaconda/anaconda.py
1
8728
# anaconda: The Red Hat Linux Installation program # # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 # Red Hat, Inc. 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 Softw...
gpl-2.0
8,755,333,330,063,547,000
35.066116
106
0.601169
false
4.074697
false
false
false
PolicyStat/docx2html
docx2html/core.py
1
48167
import cgi import logging import os import os.path import re from PIL import Image from lxml import etree from lxml.etree import XMLSyntaxError from collections import namedtuple, defaultdict from zipfile import ZipFile, BadZipfile from docx2html.exceptions import ( ConversionFailed, FileNotDocx, Malforme...
bsd-3-clause
5,576,685,716,385,988,000
31.326846
79
0.567048
false
3.736193
false
false
false
pymir3/pymir3
mir3/modules/supervised/linear/decomposer/beta_nmf.py
1
19321
import argparse import numpy import numpy.random import mir3.data.linear_decomposition as ld import mir3.data.metadata as md import mir3.data.spectrogram as spectrogram import mir3.module # TODO: maybe split this into 2 modules to compute activation and # basis+activation class BetaNMF(mir3.module.Module): def g...
mit
3,395,723,832,904,271,400
39.420502
80
0.537239
false
4.367315
false
false
false
slacker007/OFF-ToolKit
Modules/Correlation.py
1
1103
from Builders import wigile_query from Builders import kml_builder class ClassName(): #These are the options we will set def __init__(self): # Descriptions that are required!!! self.name = "Registry Network info corelation" self.description = "WIGLE Query your known BSSID" self.langu...
gpl-2.0
-6,857,196,701,473,363,000
41.423077
102
0.600181
false
3.592834
false
false
false
ContinuumIO/dask
setup.py
2
2210
#!/usr/bin/env python import sys from os.path import exists from setuptools import setup import versioneer # NOTE: These are tested in `continuous_integration/travis/test_imports.sh` If # you modify these, make sure to change the corresponding line there. extras_require = { "array": ["numpy >= 1.13.0", "toolz >= ...
bsd-3-clause
-553,675,897,247,055,000
27.701299
88
0.60724
false
3.303438
true
false
false
whtsky/catsup-docs-zh
catsup/generator/__init__.py
1
4323
import time import os import catsup.parser from catsup.logger import logger from catsup.generator.renderer import Renderer from catsup.reader import get_reader from catsup.options import g from catsup.utils import smart_copy from catsup.models import * class Generator(object): def __init__(self, config_path, loc...
mit
2,849,377,199,365,245,000
27.440789
65
0.53065
false
3.988007
true
false
false
skygeek/skyproc
data_server/data/model_Archives.py
1
3610
# -*- coding: utf-8 -*- # Copyright 2012, Nabil SEFRIOUI # # This file is part of Skyproc. # # Skyproc is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of # the License, or any later ...
agpl-3.0
-8,264,354,205,025,495,000
38.67033
113
0.69446
false
3.694985
false
false
false
orting/emphysema-estimation
Experiments/02-ScalabilityOfClusteringAlgorithm/Scripts/RunScalability-1.py
1
2142
#!/usr/bin/python3 '''Run Scalability-1. See README.md for details. ''' import sys, subprocess, os.path from Util import intersperse def main(): skip = { 'Measure' : False, } basedir = '' dirs = { 'Instances' : os.path.join(basedir, 'Data', 'Instances'), 'Statistics' ...
gpl-3.0
-2,892,246,233,755,231,000
30.970149
112
0.505602
false
3.852518
false
false
false
hideoussquid/aureus-12-bitcore
contrib/linearize/linearize-hashes.py
1
3034
#!/usr/bin/python # # linearize-hashes.py: List blocks in a linear, no-fork version of the chain. # # Copyright (c) 2013-2014 The Aureus Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from __future__ import pri...
mit
1,344,201,614,436,289,500
25.849558
90
0.663481
false
2.948494
false
false
false
osgee/redigit
redigit/settings.py
1
2956
""" Django settings for redigit 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, ...) im...
apache-2.0
-2,283,062,519,946,228,700
24.491379
71
0.688769
false
3.397701
false
false
false
tobi-wan-kenobi/bumblebee-status
bumblebee_status/modules/contrib/twmn.py
1
1236
# pylint: disable=C0111,R0903 """Toggle twmn notifications. Requires the following executable: * systemctl contributed by `Pseudonick47 <https://github.com/Pseudonick47>`_ - many thanks! """ import core.module import core.widget import core.input import core.decorators import util.cli class Module(core.modul...
mit
-1,048,578,473,358,335,700
25.869565
87
0.632686
false
3.734139
false
false
false
xArm-Developer/xArm-Python-SDK
example/wrapper/xarm7/2004-move_joint.py
1
2851
#!/usr/bin/env python3 # Software License Agreement (BSD License) # # Copyright (c) 2019, UFACTORY, Inc. # All rights reserved. # # Author: Vinman <vinman.wen@ufactory.cc> <vinman.cub@gmail.com> """ Description: Move Joint """ import os import sys import time import math sys.path.append(os.path.join(os.path.dirname(...
bsd-3-clause
-8,415,697,118,851,235,000
33.768293
83
0.677306
false
2.762597
false
false
false
laenderoliveira/exerclivropy
exercicios_resolvidos/capitulo 05/exercicio-05-28.py
1
1772
############################################################################## # Parte do livro Introdução à Programação com Python # Autor: Nilo Ney Coutinho Menezes # Editora Novatec (c) 2010-2014 # Primeira edição - Novembro/2010 - ISBN 978-85-7522-250-8 # Primeira reimpressão - Outubro/2011 # Segunda reimpressão - ...
mit
-280,417,563,851,955,170
38.25
83
0.607991
false
2.524854
false
false
false
ToFuProject/tofu
tofu/tests/tests01_geom/test_03_core_data/WEST_Ves_VesOut_Notes.py
1
1355
#!/usr/bin/env python import os import argparse import numpy as np _save = True _here = os.path.abspath(os.path.dirname(__file__)) _Exp, _Cls, _name = os.path.split(__file__)[1].split('_')[:3] assert not any([any([ss in s for ss in ['Notes','.']]) for s in [_Exp, _Cls, _name]]) def get_notes(): ...
mit
-8,711,176,521,942,796,000
25.057692
79
0.57048
false
3.024554
false
false
false
miooim/project_hours
src/project_hours/driver/mongo_driver.py
1
2290
import datetime import pprint __author__ = 'michaell' import pymongo from tornado.options import options class ProjectHoursMongoDriver(object): """ Project hours mongo driver implementation """ @staticmethod def get_month_data(month, year, user): """ Get results from database ...
mit
-589,547,220,272,757,100
27.271605
104
0.501747
false
4.312618
false
false
false
asd43/Structural-Variation
popgen/getFeatureTable.py
1
2289
#!/usr/bin/env python3 # Copyright (c) 2017 Genome Research Ltd. # Author: Alistair Dunham # 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 Licens...
gpl-3.0
-661,282,732,030,508,800
37.15
137
0.70817
false
3.361233
false
false
false
2-B/etherpad-lite
bin/parsejson.py
1
1119
import json import re # Regular expression for comments comment_re = re.compile( '(^)?[^\S\n]*/(?:\*(.*?)\*/[^\S\n]*|/[^\n]*)($)?', re.DOTALL | re.MULTILINE ) def parse_json(filename): """ Parse a JSON file First remove comments and then use the json module package Comments look like : ...
apache-2.0
-6,526,917,865,432,967,000
25.023256
69
0.540661
false
3.832192
false
false
false
bitwiseman/js-beautify
python/cssbeautifier/css/options.py
1
2360
# # The MIT License (MIT) # Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors. # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without ...
mit
4,209,632,697,914,879,500
39
85
0.680508
false
4.322344
false
false
false
openstack/python-heatclient
heatclient/osc/v1/software_deployment.py
1
13006
# 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 # distrib...
apache-2.0
8,401,926,805,075,033,000
35.533708
79
0.557204
false
4.55871
true
false
false
masc3d/btrfs-sxbackup
btrfs_sxbackup/shell.py
1
2492
# Copyright (c) 2014 Marco Schindler # # 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. import subprocess import logging...
gpl-2.0
3,123,260,312,765,524,000
30.15
107
0.642055
false
3.968153
false
false
false
Petr-By/qtpyvis
dltb/tool/adversarial.py
1
1626
"""Tools for creating and definding againts adversarial examples. """ # third party imports import numpy as np # Toolbox imports from ..datasource import Datasource from .tool import Tool from .classifier import Classifier, ClassIdentifier class Attacker(Tool): # pylint: disable=too-many-ancestors """An a...
mit
-8,583,027,495,194,409,000
27.526316
74
0.633456
false
4.179949
false
false
false
cvandeplas/plaso
plaso/parsers/firefox_cache_test.py
1
6803
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2014 The Plaso Project Authors. # Please see the AUTHORS file for details on individual 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 L...
apache-2.0
-3,736,644,465,021,609,000
35.772973
80
0.694694
false
3.344641
true
false
false
Pikecillo/genna
external/PyXML-0.8.4/xml/xpath/ParsedAbbreviatedRelativeLocationPath.py
1
2141
######################################################################## # # File Name: ParsedAbbreviatedRelativeLocationPath.py # # """ A parsed token that represents a abbreviated relative location path. WWW: http://4suite.org/XPATH e-mail: support@4suite.org Copyright (c) 2000-2001 Fourthought Inc, USA. ...
gpl-2.0
2,580,934,514,517,384,700
29.15493
75
0.586175
false
3.723478
false
false
false
b1r3k/recruitment-challanges
data-hacking/src/task1/classifier/channel.py
1
1678
''' * Author: Lukasz Jachym * Date: 9/14/13 * Time: 5:40 PM * * This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/. ''' from collections import namedtuple from brandi...
mit
-6,849,401,520,349,252,000
23.691176
110
0.61621
false
3.570213
false
false
false
leriomaggio/pycon_site
p3/templatetags/p3.py
1
21562
# -*- coding: UTF-8 -*- from __future__ import absolute_import import mimetypes import os import os.path import re import random import sys import urllib from collections import defaultdict from datetime import datetime from itertools import groupby from django import template from django.conf import settings from dja...
bsd-2-clause
-4,565,564,612,632,686,600
31.471386
112
0.596215
false
3.569111
false
false
false
Semprini/cbe-retail
retail/store/models.py
1
2047
from django.db import models from django.contrib.contenttypes.fields import GenericRelation from cbe.location.models import Location, GeographicArea from cbe.party.models import Organisation, PartyRole from cbe.physical_object.models import Structure class Store(PartyRole): enterprise_id = models.IntegerField(uni...
apache-2.0
-8,812,676,983,199,888,000
52.894737
288
0.682462
false
3.610229
false
false
false
ytec/instaforex-web
app/open/migrations/0001_initial.py
1
1404
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cms', '0016_auto_20160608_1535'), ] operations = [ migrations.CreateModel( name='form', fields=[ ...
gpl-3.0
2,533,682,071,263,246,300
31.651163
174
0.533476
false
4.471338
false
false
false
slideclick/toys
Simple/oMachine2.3.1-1.py
1
3469
# -* - coding: UTF-8 -* - ## Virtual Machine 2.3.1 ## 小步语义 -- 表达式 ## python 3.4 class Number(object): """ 数值符号类 """ def __init__(self, value): self.value = value def reducible(self): return False def to_s(self): return str(self.value) class Boolean(object): """ 布尔值符号...
gpl-2.0
-6,269,499,450,322,178,000
20.433121
70
0.55156
false
3.273346
false
false
false
jszopi/repESP
repESP/respin_format.py
1
19161
"""Parsing and writing ``resp`` program instruction file format ("respin")""" from dataclasses import dataclass, asdict from fortranformat import FortranRecordWriter as FW from itertools import zip_longest import io import math import re import sys from typing import Dict, List, Optional, TextIO, Tuple, Type, TypeVar,...
gpl-3.0
4,448,487,963,937,923,600
35.358634
105
0.604405
false
4.170875
false
false
false
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_12_01/aio/operations/_route_tables_operations.py
1
23236
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
-8,438,199,354,132,655,000
47.712788
191
0.638879
false
4.319762
true
false
false
Azure/azure-sdk-for-python
sdk/cosmos/azure-cosmos/test/test_diagnostics.py
1
1357
import unittest import pytest import azure.cosmos.diagnostics as m _common = { 'x-ms-activity-id', 'x-ms-session-token', 'x-ms-item-count', 'x-ms-request-quota', 'x-ms-resource-usage', 'x-ms-retry-after-ms', } _headers = dict(zip(_common, _common)) _headers['other'] = 'other' class BaseUnitT...
mit
9,059,282,863,094,365,000
25.607843
62
0.572587
false
3.63807
true
false
false
Storj/pyp2p
tests/test_sock.py
1
15565
""" * Test whether multiple recvs on the same connection (non-blocking) will eventually have the connection closed (use another net instance.) * Test whether multiple sends on the same connection (non-blocking) will eventually lead to the connection being closed (use a net instance with no recvs! and loop over the ...
mit
-2,747,348,296,401,501,000
27.403285
78
0.511083
false
3.649472
true
false
false
julython/julython.org
july/people/migrations/0010_auto__add_userbadge.py
1
9221
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'UserBadge' db.create_table(u'people_userbadge', ( ...
mit
1,895,763,320,148,108,300
71.614173
195
0.544193
false
3.609002
false
false
false
astromme/classify-handwritten-characters
utils/gnt.py
1
1587
#!/usr/bin/env python3 import os import sys import numpy as np from .tagcode import tagcode_to_unicode def samples_from_gnt(f): header_size = 10 # read samples from f until no bytes remaining while True: header = np.fromfile(f, dtype='uint8', count=header_size) if not header.size: break...
mit
-8,479,756,461,216,267,000
28.388889
103
0.592313
false
3.272165
false
false
false
crawfordsm/pyspectrograph
PySpectrograph/WavelengthSolution/WavelengthSolution.py
1
3169
"""Wavelength Solution is a task describing the functional form for transforming pixel position to wavelength. The inputs for this task are the given pixel position and the corresponding wavelength. The user selects an input functional form and order for that form. The task then calculates the coefficients for that ...
bsd-3-clause
-8,209,459,238,024,676,000
32.712766
92
0.60082
false
3.655133
false
false
false
Guokr1991/ProstateSensitivityAnalysis
convert_histology_txt_json.py
1
2295
def main(): hist_txt_to_json() def hist_txt_to_json(): j = open('HistologyLesions.json', 'w') j.write('{\n') index = True benign = False with open('HistologyLesions.txt', 'r') as t: tfile = t.readlines() num_lesions = len(tfile) global td # define globally for ece_extent...
apache-2.0
-3,372,639,854,298,931,000
33.253731
76
0.423965
false
2.87234
false
false
false
harlowja/speedlimit
speedlimit/__init__.py
1
3653
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
apache-2.0
4,321,641,280,246,281,700
40.044944
78
0.588284
false
4.34881
false
false
false
dubourg/openturns
python/test/t_FisherSnedecor_std.py
1
4992
#! /usr/bin/env python from __future__ import print_function from openturns import * from cmath import * TESTPREAMBLE() RandomGenerator.SetSeed(0) try: # Instanciate one distribution object distribution = FisherSnedecor(5.5, 10.5) print("Distribution ", repr(distribution)) print("Distribution ", dist...
gpl-3.0
-8,776,602,948,175,847,000
42.408696
217
0.672276
false
3.635834
false
false
false
Fuchai/Philosophy-Machine
knowledgeframework/playground2.py
1
3640
from knowledgeframework.kf2 import * kf=KF() pred1 = Predicate(id="male") pred2 = Predicate(id="single") pred4 = Predicate(id="bachelor") pred5 = Predicate(id="thief") pred6 = Predicate(id="steals") pred7 = Predicate(id="female") pred8 = Predicate(id="human") kf.add_node(pred1, name="male") kf.add_node(pred2, name="...
apache-2.0
8,127,122,852,842,790,000
29.341667
124
0.736538
false
2.821705
false
false
false
tensorflow/privacy
tensorflow_privacy/privacy/estimators/multi_label_head.py
1
6457
# Copyright 2020, The TensorFlow 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 t...
apache-2.0
1,296,019,722,160,518,000
41.480263
100
0.628775
false
4.386549
false
false
false
DentonJC/virtual_screening
moloi/descriptors/morgan_descriptor.py
1
1427
#!/usr/bin/env python """ https://github.com/kudkudak """ import numpy as np from rdkit import Chem from rdkit.Chem import AllChem def smiles_to_morgan(smi, hashed=True, radius=2, n_bits=300): mol = Chem.MolFromSmiles(smi) if hashed: try: vect = AllChem.GetHashedMorganFingerprint(mol=mo...
gpl-3.0
3,558,702,890,475,788,000
31.431818
71
0.501752
false
3.941989
false
false
false
maym2104/ift6266-h17-project
lib/updates.py
1
9422
""" Copyright (c) 2017 - Philip Paquette Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribu...
mit
2,983,714,831,106,733,600
36.537849
93
0.585863
false
3.546105
false
false
false
Stunkymonkey/passworts
calc.py
1
2206
#!/usr/bin/env python3 import os.path from collections import defaultdict import pickle from optparse import OptionParser import sys n = 3 def analyse(counts, text, n): """analyse text with n chars markov state, update the counts""" text = '^' * n + text + '$' * n for i in range(len(text) - n): ...
mit
6,256,238,498,084,905,000
23.511111
71
0.577063
false
3.616393
false
false
false
wolfsonliu/crispr
pycas/script/pycasanalysis.py
1
3253
#! /bin/env python3 __all__ = ['pycaspattern'] # ------------------ # Libraries # ------------------ import argparse import os import sys sys.path.append('/gpfs/user/liuzh/Code/crispr') import pandas as pd from pycas.analysis import Screening from pycas.utils.decorator import helpstring from pycas.utils.decorator impo...
gpl-3.0
329,395,760,262,836,000
29.383178
127
0.550907
false
3.907452
false
false
false
alberthdev/cihelper
cihelper/download.py
1
2101
#!/usr/bin/env python3 import os import requests import time from collections import namedtuple from urllib3.util.retry import Retry from requests.adapters import HTTPAdapter class TimeoutRequestsSession(requests.Session): def __init__(self, *args, **kwargs): self.__default_timeout = None if 'tim...
mit
-3,698,014,187,821,694,000
30.358209
96
0.656354
false
4.03263
false
false
false
kennt/fixtest
simple/logon_controller.py
1
4782
""" Simple client/server controller for testing. Copyright (c) 2014 Kenn Takara See LICENSE for details """ import logging from fixtest.base.asserts import * from fixtest.base.controller import TestCaseController from fixtest.fix.constants import FIX from fixtest.fix.messages import logon_message, logout_me...
mit
-4,686,859,582,700,257,000
32.914894
74
0.592221
false
4.216931
true
false
false
gwob/Maarifa
twpm/manage.py
1
5250
from csv import DictReader from datetime import datetime from pprint import pprint from flask.ext.script import Manager from taarifa_api import add_document, delete_documents, get_schema from taarifa_waterpoints import app from taarifa_waterpoints.schemas import facility_schema, service_schema manager = Manager(app)...
apache-2.0
7,342,189,801,768,494,000
29.172414
80
0.60781
false
3.947368
false
false
false
kevinah95/bmc-sequence-alignment
algorithms/needleman_wunsch/plot_nw.py
1
3189
import matplotlib.pyplot as plt import matplotlib.ticker as ticker import numpy as np import datetime from Bio.Seq import Seq if __name__ == '__main__': from needleman_wunsch import needleman_wunsch else: from .needleman_wunsch import needleman_wunsch #------------------------------- def plot_nw(seq_alpha_col,...
mit
-9,171,932,329,394,185,000
34.032967
106
0.548792
false
3.12145
false
false
false
cchampet/TuttleOFX
doc/scripts/plaintext2html.py
1
3911
#!/usr/bin/env python from __future__ import with_statement import re import cgi colorcodes = {'bold':{True:'\033[1m',False:'\033[22m'}, 'cyan':{True:'\033[1;36m',False:'\033[0;0m'}, #'#8E4429':{True:'\033[1;33m',False:'\033[0;0m'}, '#8E4429':{True:'\033[0;33m',False:'\033[0;0m'}, ...
gpl-3.0
-902,266,013,893,889,500
31.591667
157
0.520327
false
2.996935
false
false
false
mantarayforensics/mantaray
Tools/Python/extract_ntfs_artifacts_mr.py
1
15861
#!/usr/bin/env python3 #This program extracts NTFS artifacts ($MFT, $Logfile, $USRJRNL) (Overt, Deleted #Shadow Volumes) #Use to extract files when using Triforce ANJP NTFS Journal Parser | Triforce (David Cohen) #########################COPYRIGHT INFORMATION############################ #Copyright (C) 2013 dougkoster@...
gpl-3.0
2,019,264,180,146,138,400
39.256345
256
0.617868
false
3.182384
false
false
false
vlegoff/tsunami
src/secondaires/auberge/editeurs/aubedit/__init__.py
1
3826
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # 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 # ...
bsd-3-clause
-3,694,249,358,320,712,000
40.326087
79
0.694108
false
3.364602
false
false
false
fkie-cad/FACT_core
src/storage/db_interface_compare.py
1
4915
import logging from contextlib import suppress from time import time from typing import List, Optional from pymongo.errors import PyMongoError from helperFunctions.data_conversion import ( convert_compare_id_to_list, convert_uid_list_to_compare_id, normalize_compare_id ) from storage.db_interface_common import Mo...
gpl-3.0
2,370,626,291,600,637,000
44.091743
212
0.647202
false
3.885375
false
false
false
d2chau/git-demo-fizzbuzz
python-fizz-buzz/fizzbuzz.py
1
1059
def basicfizzbuzz(n): if n % 3 == 0 and n % 5 == 0: return 'FizzBuzz' elif n % 3 == 0: return 'Fizz' elif n % 5 == 0: return 'Buzz' else: return str(n) print "\n".join(basicfizzbuzz(n) for n in xrange(1, 100)) print "\n" print "*****************************************...
apache-2.0
-1,047,292,258,414,213,900
28.416667
84
0.313503
false
4.202381
false
false
false