repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
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
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
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
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
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
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
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
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
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
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
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
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
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
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
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
mlecours/netman
tests/adapters/unified_tests/configured_test_case.py
1
3935
# Copyright 2015 Internap. # # 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, so...
apache-2.0
8,079,829,964,718,263,000
37.203883
139
0.637865
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
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
OCA/account-invoicing
purchase_stock_picking_return_invoicing/tests/test_purchase_stock_picking_return_invoicing.py
1
7543
# Copyright 2019 Eficent Business and IT Consulting Services # Copyright 2017-2018 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields from odoo.tests.common import Form, SavepointCase class TestPurchaseStockPickingReturnInvoicing(SavepointCase): at_...
agpl-3.0
-1,908,722,734,729,567,500
40.445055
88
0.558796
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
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
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
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
jhuapl-boss/intern
examples/cutout_timeseries_ex.py
1
1548
from intern.remote.boss import BossRemote from intern.resource.boss.resource import * import numpy as np from requests import HTTPError rmt = BossRemote('neurodata.cfg') xmax = 8 ymax = 4 zmax = 5 tmax = 10 COLL_NAME = 'gray' EXP_NAME = 'timeseries_test' CHAN_NAME = 'Ch1' COORD_FRAME = COLL_NAME + '_' + EXP_NAME c...
apache-2.0
8,872,616,388,416,469,000
22.815385
67
0.683463
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
jsharkey13/isaac-selenium-testing
isaactest/tests/back_to_board.py
1
2871
import time from ..utils.log import log, INFO, ERROR, PASS from ..utils.isaac import get_hexagon_properties from ..utils.i_selenium import assert_tab, image_div from ..tests import TestWithDependency from selenium.common.exceptions import NoSuchElementException __all__ = ["back_to_board"] ##### # Test : Back to Boar...
mit
4,891,062,847,319,937,000
45.306452
131
0.607106
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
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
gabstopper/smc-python
smc/core/general.py
1
15630
""" General configuration areas for an engine. This correlates to service level settings such as DNSRelay, SNMP, etc. """ import collections from smc.base.model import Element from smc.base.util import element_resolver from smc.elements.profiles import DNSRelayProfile from smc.base.structs import NestedDict from smc.p...
apache-2.0
6,845,697,112,201,236,000
33.656319
86
0.591363
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
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
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
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
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
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
swisscom/cleanerversion
versions_tests/tests/test_utils.py
1
4249
from unittest import skipUnless from django.db import IntegrityError from django.db import connection from django.test import TestCase, TransactionTestCase from versions.util.postgresql import get_uuid_like_indexes_on_table from versions_tests.models import ChainStore, Color @skipUnless(connection.vendor == 'postgr...
apache-2.0
2,115,446,103,184,632,000
38.342593
79
0.618028
false
globocom/database-as-a-service
dbaas/workflow/steps/tests/test_dns_step.py
1
1957
from random import randint from mock import patch from workflow.steps.util.dns import ChangeTTL, ChangeTTLTo5Minutes, ChangeTTLTo3Hours from . import TestBaseStep class FakeDNSProvider(object): dns_ttl = {} @classmethod def update_database_dns_ttl(cls, infra, seconds): cls.dns_ttl[infra] = secon...
bsd-3-clause
-3,945,911,910,310,747,000
32.741379
85
0.676546
false
pnpnpn/gimsan-py
gimsan_result.py
1
15480
#!/usr/bin/env python from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import import time_benchmark import os import sys import json import re import time import numpy as np import ConfigParser import subprocess from tornado...
mit
-2,596,120,700,495,742,000
37.034398
128
0.598385
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
Guymer/PyGuymer
simplify_poly.py
1
1717
# -*- coding: utf-8 -*- ############################################################################################## # This file is deprecated because Python 2.x is deprecated # # A Python 3.x version of this file can be found at: # # ...
apache-2.0
-1,302,850,525,396,926,500
40.878049
125
0.518346
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
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
DayGitH/Python-Challenges
DailyProgrammer/DP20140718C.py
1
2012
""" [7/18/2014] Challenge #171 [Hard] Intergalatic Bitstream https://www.reddit.com/r/dailyprogrammer/comments/2b21mp/7182014_challenge_171_hard_intergalatic_bitstream/ #Description: Keeping with our "Bit" theme this week. We will look into the future. It is 2114. We have colonized the Galaxy. To communicate we send ...
mit
-8,248,801,363,357,385,000
42.73913
119
0.752982
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
nkgilley/home-assistant
homeassistant/components/statistics/sensor.py
1
12228
"""Support for statistics for sensor values.""" from collections import deque import logging import statistics import voluptuous as vol from homeassistant.components.recorder.models import States from homeassistant.components.recorder.util import execute, session_scope from homeassistant.components.sensor import PLAT...
apache-2.0
5,336,948,942,436,154,000
35.177515
88
0.586932
false
rjdp/Easynginedemoplugin
ee/core/mysql.py
1
4004
"""EasyEngine MySQL core classes.""" import pymysql import configparser from os.path import expanduser import sys import os from ee.core.logging import Log from ee.core.variables import EEVariables class EEMysql(): """Method for MySQL connection""" def execute(self, statement, errormsg='', log=True): ...
mit
1,610,323,725,944,046,800
37.873786
79
0.441059
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
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
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
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
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
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
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
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
Tayamarn/socorro
socorro/unittest/processor/test_processor_2015.py
1
4727
import ujson from configman import ConfigurationManager from configman.dotdict import DotDict from mock import Mock, patch from socorro.lib.transform_rules import TransformRuleSystem from socorro.processor.processor_2015 import ( Processor2015, rule_sets_from_string ) from socorro.processor.general_transform_...
mpl-2.0
6,571,304,992,638,448,000
36.515873
94
0.632536
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
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
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
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
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
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
staneyffer/my_blog
config.py
1
1685
# -*- coding: UTF-8 -*- import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = os.environ.get('SECRET_KEY') SQLALCHEMY_COMMIT_ON_TEARDOWN = True SQLALCHEMY_TRACK_MODIFICATIONS = True SQLALCHEMY_FOREIGN_KEY_CHECKS = False SQLALCHEMY_RECORD_QUERIES = True FLASK...
mit
-8,295,825,654,970,580,000
30.264151
86
0.671092
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
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
Litetokens/liteblockd
armory_utxsvr.py
1
3736
#! /usr/bin/env python3 """ server for creating unsigned armory offline transactions """ import sys import logging import argparse import json import time import threading import flask from flask import request import jsonrpc from jsonrpc import dispatcher sys.path.append("/usr/lib/armory/") from armoryengine.ALL imp...
mit
2,905,679,054,115,964,000
34.923077
129
0.6697
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
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
ntucllab/libact
libact/query_strategies/multiclass/tests/test_hierarchical_sampling.py
1
2717
""" HierarchicalSampling test """ import unittest import numpy as np from numpy.testing import assert_array_equal from sklearn import datasets from sklearn.utils import shuffle from libact.base.dataset import Dataset from libact.models import SVM from libact.query_strategies import UncertaintySampling from libact.que...
bsd-2-clause
3,427,073,491,759,392,300
37.814286
76
0.580788
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
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
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
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
AlexaProjects/Alexa2
ALEXA-IDE/core/ninja_tests/gui/test_status_bar.py
1
1869
# -*- coding: utf-8 -*- # # This file is part of NINJA-IDE (http://ninja-ide.org). # # NINJA-IDE 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 # any later version. # # NIN...
gpl-3.0
4,837,241,543,870,073,000
31.224138
70
0.689674
false
josefschneider/switchboard
switchboard/__main__.py
1
1547
#!/usr/bin/env python '''The main entry point. Invoke as `switchboard' or `python -m switchboard'. ''' import argparse import sys from switchboard.config import SwitchboardConfig from switchboard.ws_ctrl_server import WSCtrlServer from switchboard.engine import SwitchboardEngine from switchboard.app_manager import A...
mit
4,278,887,027,851,164,000
27.648148
89
0.638655
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
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
senuido/stash-scanner
ui/ConfigEditor.py
1
40208
import copy import functools import os import pprint import threading from enum import Enum from tkinter import Toplevel, StringVar, BooleanVar, messagebox, IntVar from tkinter.constants import * import tkinter.font as tkfont from tkinter.ttk import Notebook, Frame, Label, Button, Style, Combobox, Entry, Checkbutton, S...
gpl-3.0
-7,908,959,473,610,707,000
41.684713
168
0.623756
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
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
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
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
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
ppolewicz/logfury
setup.py
1
3132
from codecs import open import os.path from setuptools import setup, find_packages import sys ################################################################### yapf: disable NAME = 'logfury' VERSION = '0.1.2' AUTHOR = 'Pawel Polewicz' AUTHOR_EMAIL = 'p.polewicz@gmail.com' DESCRIPTION = 'Toolki...
bsd-3-clause
-5,933,197,304,800,659,000
31.625
90
0.554917
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
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
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
stopthatcow/zazu
zazu/scm_host.py
1
1275
# -*- coding: utf-8 -*- """Source code management (SCM) host related classes.""" __author__ = 'Nicholas Wiles' __copyright__ = 'Copyright 2018' class ScmHost(object): """Parent of all ScmHost objects.""" class ScmHostError(Exception): """Parent of all ScmHost errors.""" class ScmHostRepo(object): """P...
mit
-3,430,967,397,524,650,000
25.020408
63
0.616471
false
randy3k/AutoWrap
tests/test_longline.py
1
2204
import sublime from unittesting import DeferrableTestCase Lorem = ("""Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod""" """tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,""" """quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commo...
mit
-5,633,155,568,879,142,000
34.548387
92
0.621597
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
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
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
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
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
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
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
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
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
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
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
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
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
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