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
joehakimrahme/thawra
thawra/hero.py
1
3453
# 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 t...
apache-2.0
5,366,765,848,036,491,000
26.404762
76
0.5766
false
3.888514
false
false
false
raonyguimaraes/mendelmd
analyses/migrations/0001_initial.py
1
2097
# Generated by Django 2.1.4 on 2018-12-27 08:50 from django.conf import settings import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('tasks', '__first__'), ...
bsd-3-clause
-6,945,387,423,287,230,000
39.326923
138
0.567477
false
4.305955
false
false
false
rsteed11/GAT
gat/core/sna/resilience.py
1
1298
import networkx as nx import random import scipy as sp from gat.core.sna import ergm def resilience(cliques_found, ergm_iters=3000): scaledResilience = {} scaledBaseline = {} toScale = [] baselinesToScale = [] traces = [] formatted_traces = {} cliques, selected = cliques_found # Find ...
mit
5,061,723,243,135,137,000
37.176471
103
0.68567
false
3.452128
false
false
false
benreynwar/pyvivado
pyvivado/test_utils.py
1
9478
import os import unittest import logging import shutil import time import testfixtures from pyvivado import filetestbench_project, fpga_project, axi from pyvivado.synopsys import synopsys_project from pyvivado import vivado_project, test_info from pyvivado import config from pyvivado import base_test_utils logger = l...
mit
2,229,433,497,618,155,000
29.973856
90
0.614265
false
3.873314
true
false
false
tuulos/ringo
ringogw/py/ringodisco.py
1
3199
import ringogw def ringo_reader(fd, sze, fname): import struct, zlib MAGIC_HEAD = (0x47da66b5,) MAGIC_TAIL = (0xacc50f5d,) def read_really(s): t = 0 buf = "" while t < s: r = fd.read(s - t) ...
bsd-3-clause
8,622,937,710,840,089,000
36.635294
77
0.371366
false
4.649709
false
false
false
ColumbiaDVMM/ColumbiaImageSearch
cufacesearch/cufacesearch/ingester/deprecated/kafka_image_processor.py
1
7700
# DEPRECATED # import json # import time # import multiprocessing # from .generic_kafka_processor import GenericKafkaProcessor # from ..imgio.imgio import buffer_to_B64 # # default_prefix = "KIP_" # default_prefix_frompkl = "KIPFP_" # # # TODO: This class should be rewritten to actually extract features from images... ...
apache-2.0
-2,658,118,316,542,654,000
42.264045
179
0.633636
false
3.062848
false
false
false
breuderink/psychic
psychic/tests/testedf.py
1
2121
# -*- coding: utf-8 -*- import unittest, os from ..edfreader import * class TestEDFBaseReader(unittest.TestCase): def test_synthetic_content(self): ''' Test EDF reader using artifical EDF dataset. Note that this is not an EDF+ dataset and as such does not contain annotations. Annotations decoding is ...
bsd-3-clause
4,709,166,478,044,871,000
34.283333
79
0.619745
false
3.028612
true
false
false
quarkslab/irma
probe/modules/antivirus/comodo/cavl.py
1
2379
# # Copyright (c) 2013-2018 Quarkslab. # This file is part of IRMA project. # # 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 in the top-level directory # of this distribution and at: # # http:...
apache-2.0
6,662,217,824,837,010,000
34.507463
78
0.592686
false
3.9
false
false
false
marksamman/pylinkshortener
app/models.py
1
2721
# Copyright (c) 2014 Mark Samman <https://github.com/marksamman/pylinkshortener> # # 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...
mit
-7,008,481,928,122,294,000
38.434783
114
0.715913
false
3.937771
false
false
false
corpnewt/CorpBot.py
Cogs/Xp.py
1
41529
import asyncio import discord import datetime import time import random from discord.ext import commands from Cogs import Settings, DisplayName, Nullify, CheckRoles, UserTime, Message, PickList def setup(bot): # Add the bot and deps settings = bot.get_cog("Settings") bot.add_cog(Xp(bot, settings)) ...
mit
-1,479,371,113,077,877,200
34.143603
194
0.642081
false
3.189386
false
false
false
5t111111/markdown-preview.vim
markdownpreview_lib/markdown_preview/markdown_preview.py
1
2621
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import webbrowser from bs4 import BeautifulSoup import chardet import markdown class MarkdownPreview(object): _source = None _template_path = None _html_path = None _css_path = None def __init__(self, source=None, template=None, ...
lgpl-2.1
157,799,395,344,033,540
26.882979
89
0.533003
false
3.696756
false
false
false
Djiit/err-jenkins
test_jenkinsBot.py
1
4684
# coding: utf-8 from errbot.backends.test import testbot import jenkinsBot class TestJenkinsBot(object): extra_plugin_dir = '.' def test_jenkins_build_no_args(self, testbot): testbot.push_message('!jenkins build') assert ('What job would you like to build?' in testbot.pop_mes...
mit
1,269,524,832,738,409,500
36.472
75
0.591161
false
3.871074
true
false
false
jpurma/Kataja
kataja/SemanticsItem.py
1
5838
import math from PyQt5 import QtCore, QtWidgets, QtGui from kataja.globals import SMALL_FEATURE from kataja.singletons import ctrl, qt_prefs FREE = 0 SENTENCE = 1 NOUN_PHRASE = 2 class SemanticsItem(QtWidgets.QGraphicsSimpleTextItem): def __init__(self, sm, label, array_id, color_key, x=0, y=0): QtWid...
gpl-3.0
6,065,196,672,987,887,000
39.825175
98
0.477561
false
3.577206
false
false
false
MjnMixael/knossos
releng/macos/dmgbuild_cfg.py
1
4501
# -*- coding: utf-8 -*- from __future__ import unicode_literals import biplist import os.path import subprocess # .. Useful stuff .............................................................. application = 'dist/Knossos.app' appname = os.path.basename(application) def icon_from_app(app_path): plist_path = os.p...
apache-2.0
-4,118,771,942,043,023,000
26.284848
80
0.612531
false
3.192199
false
false
false
evildmp/django-curated-resources
curated_resources/admin.py
1
4333
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from django import forms from django.contrib.admin.widgets import FilteredSelectMultiple from mptt.forms import TreeNodeMultipleChoiceField from treeadmin.admin import TreeAdmin from widgetry.tabs.admin import ModelAdminWithTabs...
bsd-2-clause
5,507,491,974,509,886,000
36.353448
107
0.643203
false
3.896583
false
false
false
palankai/baluster
src/baluster/utils.py
1
1844
from asyncio import iscoroutinefunction, coroutine from contextlib import contextmanager from functools import partial import re from .exceptions import MultipleExceptions class Undefined: pass def make_if_none(obj, default): if obj is not None: return obj return default def dict_partial_copy...
mit
1,445,387,088,957,653,500
19.954545
63
0.632863
false
3.817805
false
false
false
aylward/ITKTubeTK
setup.py
1
1986
# -*- coding: utf-8 -*- from __future__ import print_function from os import sys import numpy as np try: from skbuild import setup except ImportError: print('scikit-build is required to build from source.', file=sys.stderr) print('Please run:', file=sys.stderr) print('', file=sys.stderr) print(' ...
apache-2.0
1,078,648,965,849,893,400
36.471698
147
0.639476
false
3.841393
false
false
false
angst7/far
models/models1.py
1
3286
# SQLAlchemy, SQLElixir from sqlalchemy import ForeignKey from sqlalchemy.orm import relation, backref from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class AttackType: UNDEFINED = 0 # Melee attacks HIT = 1 CRUSH = 2 SLASH = 3 PIERCE = 4 CL...
mit
-6,676,001,317,496,061,000
23.340741
111
0.590992
false
3.591257
false
false
false
farert/farert
db/scripts/jr_db_reg_old_1.py
1
2553
#!python3.0.1 # -*- coding: utf-8 -*- """ ƒf[ƒ^ƒx[ƒX“o˜^ –kŠC“¹ JR–kŠC“¹ ”ŸŠÙü ”ŸŠÙ‰w ‚Í‚±‚¾‚Ä 0 0 """ import os import sqlite3 import sys import re from collections import defaultdict if 1 < len(sys.argv): fn = sys.argv[1] else: fn = 'jr.txt' dbname = 'jr.db' if os.access(d...
gpl-3.0
5,349,268,513,671,626,000
19.275
64
0.550333
false
2.852514
false
false
false
aziele/alfpy
alfpy/utils/seqrecords.py
1
3791
from . import fasta class SeqRecords: """Object representing an ordered collection of sequence records. Attributes: id_list (list) : List of sequence record identifiers seq_list (list) : List of sequence strings count (int) : Number of sequence records """ def __init__(...
mit
-537,299,720,962,794,500
26.273381
73
0.543128
false
3.713026
false
false
false
blukat29/notifyhere
notifyhere/dash/api/gmail.py
1
2935
from httplib import HTTPSConnection import json import imaplib import re import base import tools import secrets class GmailApi(base.ApiBase): list_re = re.compile(r'\((.+)\) "(.+)" "(.+)"') def __init__(self): base.ApiBase.__init__(self, "gmail") self.token = "" def icon_url(self): ...
mit
1,942,986,103,054,837,800
28.94898
94
0.539353
false
3.758003
false
false
false
kashefy/nideep
nideep/iow/copy_lmdb.py
1
1826
''' Created on May 30, 2016 @author: kashefy ''' import lmdb from lmdb_utils import IDX_FMT, MAP_SZ def copy_samples_lmdb(path_lmdb, path_dst, keys, func_data=None): """ Copy select samples from an lmdb into another. Can be used for sampling from an lmdb into another and generating a random shuffle o...
bsd-2-clause
-6,608,046,657,129,439,000
30.482759
89
0.594743
false
3.478095
false
false
false
leductan-nguyen/RaionPi
src/octoprint/plugins/softwareupdate/scripts/update-octoprint.py
1
6006
#!/bin/env python from __future__ import absolute_import __author__ = "Gina Haeussge <osd@foosel.net>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2014 The RaionPi Project - Released under terms of the AGPLv3 License" import errno import subp...
agpl-3.0
8,245,839,758,198,759,000
32.366667
135
0.670663
false
3.445783
false
false
false
sassoftware/pymaven
pymaven/artifact.py
1
4769
# # Copyright (c) SAS Institute 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 w...
apache-2.0
7,652,122,665,989,008,000
30.375
78
0.534284
false
4.176007
false
false
false
krzychb/rtd-test-bed
components/partition_table/test_gen_esp32part_host/gen_esp32part_tests.py
1
16713
#!/usr/bin/env python from __future__ import print_function, division import unittest import struct import csv import sys import subprocess import tempfile import os import io import re try: import gen_esp32part except ImportError: sys.path.append("..") import gen_esp32part SIMPLE_CSV = """ # Name,Type,Su...
apache-2.0
5,730,980,972,176,826,000
35.097192
121
0.585891
false
3.233314
true
false
false
moxgreen/partial_corr.py
partial_corr.py
1
3301
#!/usr/bin/env python from sys import stdin, stderr from optparse import OptionParser import numpy as np from scipy import stats, linalg """ Partial Correlation in Python (clone of Matlab's partialcorr) This uses the linear regression approach to compute the partial correlation (might be slow for a huge number of v...
agpl-3.0
8,374,982,293,936,116,000
27.704348
108
0.646471
false
3.403093
false
false
false
htcondor/htcondor
src/condor_contrib/condor_pigeon/src/condor_pigeon_client/skype_linux_tools/Skype4Py/utils.py
1
17863
'''Utility functions and classes used internally by Skype4Py. ''' import sys import weakref import threading from new import instancemethod def chop(s, n=1, d=None): '''Chops initial words from a string and returns a list of them and the rest of the string. @param s: String to chop from. @type s: str or...
apache-2.0
-8,032,516,272,118,471,000
34.869478
105
0.60477
false
4.369618
false
false
false
bhrzslm/uncertainty-reasoning
my_engine/others/pbnt/examples/ExampleModels.py
1
3873
# PBNT: Python Bayes Network Toolbox # # Copyright (c) 2005, Elliot Cohen # 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 copy...
mit
3,967,815,240,085,659,600
32.580357
216
0.67338
false
3.433511
false
false
false
fungos/gemuo
src/gemuo/data.py
1
8601
# # GemUO # # (c) 2005-2012 Max Kellermann <max@duempel.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; version 2 of the License. # # This program is distributed in the hope tha...
gpl-2.0
-6,442,318,921,544,303,000
29.938849
92
0.537379
false
3.346693
false
false
false
gonicus/gosa
backend/src/gosa/backend/objects/filter/strings.py
1
10619
# This file is part of the GOsa framework. # # http://gosa-project.org # # Copyright: # (C) 2016 GONICUS GmbH, Germany, http://www.gonicus.de # # See the LICENSE file in the project's top-level directory for details. import json import logging import re from gosa.backend.objects.filter import ElementFilter import dat...
lgpl-2.1
-5,871,137,458,832,482,000
26.371134
142
0.486957
false
3.733826
false
false
false
takkaneko/netengtools
boreasprov.py
1
2030
#!/usr/bin/env python3 # boreasprov.py import hafwl2l3prov import fwl2l3prov import halbl2l3prov import lbl2l3prov import ipsprov import hafwiloprov import fwiloprov def main(): title ='\n****************************************\n' title += 'BOREAS NETWORK DEVICE PROVISIONING SUITE\n' title += '**********...
mit
8,231,743,044,508,089,000
32.833333
79
0.587192
false
3.690909
false
false
false
cdemulde/wwdata
wwdata/Class_HydroData.py
1
84432
# -*- coding: utf-8 -*- """ Class_HydroData provides functionalities for handling data obtained in the context of (waste)water treatment. Copyright (C) 2016 Chaim De Mulder 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 Fre...
agpl-3.0
-375,071,956,958,271,900
42.792012
164
0.55373
false
4.1518
false
false
false
54lihaoxin/leetcode_python
src/StringToInteger/solution.py
1
2389
# String to Integer (atoi) # # Implement atoi to convert a string to an integer. # # Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases. # # Notes: It is intended for this problem to be specified vaguely (ie, no...
apache-2.0
-8,124,587,870,390,814,000
35.359375
296
0.60653
false
4.304505
false
false
false
foer/linuxmuster-client-unity
tests/autopilot/unity/emulators/panel.py
1
11333
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- # Copyright 2012 Canonical # Author: Marco Trevisan (Treviño) # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundati...
gpl-3.0
-4,977,705,003,350,863,000
31.193182
90
0.618602
false
3.709329
false
false
false
ComputerArchitectureGroupPWr/Floorplan-Maker
src/device.py
1
7566
import xml.dom.minidom as dom from math import * class Element: x = 0 y = 0 def __eq__(self,other): if(isinstance(other,Element)): if( self.x == other.x and self.y == other.y): return True else: return False return NotImplemented def __ne__(self,other): if(isinstance(other,Element)): if(se...
mit
7,512,026,252,719,605,000
23.888158
85
0.597145
false
3.582386
false
false
false
beeftornado/sentry
tests/sentry/lang/native/test_utils.py
1
1580
from __future__ import absolute_import from sentry.lang.native.utils import get_sdk_from_event, is_minidump_event def test_get_sdk_from_event(): sdk_info = get_sdk_from_event( { "debug_meta": { "sdk_info": { "sdk_name": "iOS", "version_m...
bsd-3-clause
1,585,955,638,993,456,400
36.619048
95
0.555063
false
3.419913
false
false
false
YuxuanLing/trunk
trunk/code/study/python/core_python_appilication/ch04/mtsleepF.py
1
1118
#!/usr/bin/env python from atexit import register from random import randrange from threading import Thread, Lock, currentThread from time import sleep, ctime class CleanOutputSet(set): def __str__(self): return ', '.join(x for x in self) lock = Lock() loops = (randrange(2, 5) for x in xrange...
gpl-3.0
8,837,571,305,694,491,000
26.666667
113
0.595707
false
3.317507
false
false
false
kaizentech/skeleton
urls.py
1
1052
"""temp URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based ...
apache-2.0
4,995,287,408,869,362,000
37.962963
79
0.701521
false
3.44918
false
false
false
habibmasuro/django-wiki
wiki/urls.py
1
8204
# -*- coding: utf-8 -*- from django.conf.urls import patterns, url, include from wiki.conf import settings from wiki.core.plugins import registry from wiki.views import article, accounts from wiki.core.utils import get_class_from_str from django.contrib.auth.views import password_reset class WikiURLPatterns(object): ...
gpl-3.0
7,259,859,571,351,220,000
50.597484
175
0.60312
false
3.777164
true
false
false
insomnia-lab/calibre
src/calibre/ebooks/metadata/book/render.py
1
8008
#!/usr/bin/env python # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>' import os from functools import partial from calibre import prepare_string_f...
gpl-3.0
1,372,773,711,632,978,400
39.649746
131
0.49975
false
3.87234
false
false
false
pferreir/indico-backup
indico/web/flask/blueprints/legacy.py
1
21964
# -*- coding: utf-8 -*- ## ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 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; eith...
gpl-3.0
-6,249,722,430,769,871,000
83.153257
119
0.785103
false
3.743013
false
false
false
merc-devel/merc
merc/features/rfc1459/nick.py
1
1773
import regex from merc import errors from merc import feature from merc import message MAX_NICKNAME_LENGTH = 12 NICKNAME_REGEX = regex.compile(r"^[\p{L}\p{So}_\[\]\\^{}|`][\p{L}\p{So}\p{N}_\[\]\\^{}|`-]*$") class NickFeature(feature.Feature): NAME = __name__ install = NickFeature.install class _Nick(message....
mit
8,278,732,483,026,297,000
22.025974
94
0.684715
false
3.110526
false
false
false
yang0110/comPy
modulation.py
1
10528
import numpy as np import matplotlib.pyplot as plt import pandas as pd import seaborn as sns from sklearn import preprocessing import pylab import itertools from line_coding import polar_nrz import math from scipy import signal from scipy.integrate import simps import numpy.matlib from compy.bin2gray impor...
mit
2,672,909,887,420,412,000
33.567568
140
0.698898
false
2.385679
false
false
false
ivanbgd/Genetic_Algorithm_01
GA01v2.py
1
7880
# Python 2.7 """ An Application of Genetic Algorithms Task: Inscribe a triangle of the maximum area in a given ellipse. Ellipse is defined as: (x/a)^2 + (y/b)^2 = 1 """ import math import matplotlib.pyplot as plt import numpy as np import random from timeit import default_timer as timer tstart = ti...
mit
-7,571,025,908,308,426,000
30.970711
124
0.55736
false
2.905605
false
false
false
ayy1337/CryptoPriceWatcher
grabtrex.py
1
5552
#!/usr/bin/python3 ''' Version: 1.0.02 Author: ayy1337 Licence: GNU GPL v3.0 ''' import sys import time import os import datetime import urllib.request import collections from operator import attrgetter from operator import itemgetter import shelve from trexapi import Bittrex condperc = .0...
gpl-3.0
-6,008,384,891,887,564,000
22.629787
122
0.634726
false
2.835546
false
false
false
noinil/euler_pysolution
python_solutions/p098_Anagramic_squares.py
1
1634
#!/usr/bin/env python3 from itertools import permutations as pm def is_sqr(n): i = round(n**0.5) if i ** 2 == n: return True else: return False def main(): words = [] with open("../data/p98_words.txt", "r") as fin: for lines in fin: for i in lines.split(','): ...
gpl-2.0
-1,285,471,491,725,333,200
26.694915
82
0.442472
false
3.03154
false
false
false
nofdev/fastforward
fastforward/horizon.py
1
1829
import sys from fastforward.cliutil import priority from playback.api import Horizon def install(args): try: target = Horizon(user=args.user, hosts=args.hosts.split(','), key_filename=args.key_filename, password=args.password) except AttributeError: sys.stderr.write('No hosts found. Please usin...
mit
66,383,570,392,045,620
40.568182
165
0.545653
false
4.701799
false
false
false
yausern/stlab
devices/Cryocon_44C.py
1
3712
import visa import numpy as np import time from stlab.devices.instrument import instrument class Cryocon_44C(instrument): def __init__(self,addr='TCPIP::192.168.1.5::5000::SOCKET',reset=True,verb=True,**kwargs): #RST reboots the instrument. Avoid... Also needs special read_termination = '\r\n' if ...
gpl-3.0
2,980,873,264,327,063,000
36.494949
96
0.545797
false
3.555556
false
false
false
luozhaoyu/leetcode
valid_number.py
1
2387
# -*- coding: utf-8 -*- """ valid_number.py ~~~~~~~~~~~~~~ A brief description goes here. """ import re class Solution: # @param s, a string # @return a boolean def isNumber(self, s): s = s.strip().lower() if len(s) == 0: return False if s.count('.') > 1 ...
mit
-6,678,119,990,164,091,000
22.87
75
0.485547
false
3.315278
false
false
false
Orav/kbengine
kbe/res/scripts/common/Lib/site-packages/pip/vcs/git.py
1
8092
import tempfile import re import os.path from pip.util import call_subprocess from pip.util import display_path, rmtree from pip.vcs import vcs, VersionControl from pip.log import logger from pip.backwardcompat import url2pathname, urlparse urlsplit = urlparse.urlsplit urlunsplit = urlparse.urlunsplit cla...
lgpl-3.0
4,057,708,579,213,142,000
39.71134
111
0.547578
false
3.964723
false
false
false
pataquets/namecoin-core
test/functional/wallet_importdescriptors.py
1
26430
#!/usr/bin/env python3 # Copyright (c) 2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the importdescriptors RPC. Test importdescriptors by generating keys on node0, importing the correspon...
mit
4,546,330,020,616,663,000
56.707424
464
0.59319
false
3.115276
true
false
false
Shiva-Iyer/kepler
pykepler/riseset.py
1
3379
# riseset.py - Wrapper for celestial body rise/transit/set times # Copyright (C) 2016 Shiva Iyer <shiva.iyer AT g m a i l DOT c o m> # # 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 vers...
gpl-3.0
-8,199,793,369,504,019,000
32.79
76
0.606096
false
3.52714
false
false
false
tylertian/Openstack
openstack F/glance/glance/registry/api/v1/members.py
1
13468
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010-2011 OpenStack LLC. # 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...
apache-2.0
-568,843,902,991,611,650
39.444444
79
0.529032
false
4.492328
false
false
false
jsenko/repour
repour/server/server.py
1
3266
import asyncio import logging from aiohttp import web from .endpoint import cancel from .endpoint import endpoint from ..adjust import adjust from .. import clone from .. import pull from .. import repo from .endpoint import validation from ..auth import auth from ..config import config logger = logging.getLogger(__...
apache-2.0
3,060,298,820,635,262,000
34.89011
127
0.676975
false
3.98779
false
false
false
fracpete/python-weka-wrapper
python/weka/flow/container.py
1
7925
# 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 program is distributed in the hope that it will be useful, # bu...
gpl-3.0
-7,964,519,696,073,500,000
28.243542
107
0.592303
false
4.474873
false
false
false
clwainwright/CosmoTransitions
cosmoTransitions/finiteT.py
1
10960
""" This module provides the functions for the one-loop finite temperature corrections to a potential in QFT. The two basic functions are: Jb(x) = int[0->inf] dy +y^2 log( 1 - exp(-sqrt(x^2 + y^2)) ) Jf(x) = int[0->inf] dy -y^2 log( 1 + exp(-sqrt(x^2 + y^2)) ) Call them by: Jb(x, approx='high', deriv=0...
mit
2,406,444,055,076,283,400
28.226667
79
0.565967
false
2.76001
false
false
false
isthatme/openHomeControl
src/A10-LIME/mqtt_PCA9685_first_copy.py
1
2431
#!/usr/bin/env python import paho.mqtt.client as mqtt from pyA10Lime import i2c import time ''' Overall design of the program: Set up mqtt set up the PCA9685 sub to relevent channels how do channels work? devID/controllerID/pinNum maybe? so A10-1/0x42/4 would reference pyA10 number 1, with a controller addresse...
bsd-2-clause
8,889,925,543,877,168,000
20.324561
100
0.679144
false
3.012392
false
false
false
EvilDako/PyTraining
test/test_edit_contact.py
1
1268
__author__ = 'dako' # -*- coding: utf-8 -*- from model.contact import Contact import random def test_edit_contact(app, db, check_ui): if len(db.get_contact_list()) == 0: app.contact.create(Contact(firstname="test")) old_contacts = db.get_contact_list() contact = random.choice(old_contacts) cont...
gpl-2.0
2,127,943,103,430,762,500
59.428571
221
0.665615
false
3.092683
false
false
false
AdrianGaudebert/socorro-crashstats
crashstats/api/views.py
1
6278
import re import datetime from django import http from django.shortcuts import render from django.contrib.sites.models import RequestSite from django.core.urlresolvers import reverse from django.conf import settings from django import forms from ratelimit.decorators import ratelimit from waffle.decorators import waff...
mpl-2.0
5,001,584,025,281,107,000
28.336449
78
0.597005
false
4.116721
false
false
false
timurbakibayev/trains
tutu/views.py
1
9410
from django.shortcuts import render from django.http import HttpResponseRedirect from tutu.models import Track from django.views.decorators.csrf import csrf_exempt from tutu.models import Switch from tutu import draw def index(request): tracks = Track.objects.all() # draw.something() tracks_plus = [] ...
gpl-3.0
1,335,998,830,436,119,000
32.133803
129
0.547928
false
3.616449
false
false
false
cloudera/hue
desktop/core/src/desktop/lib/raz/raz_client.py
1
7363
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Li...
apache-2.0
-8,960,432,691,178,515,000
37.752632
141
0.665082
false
3.431034
false
false
false
druce/safewithdrawal_tensorflow
run_safewithdrawal_linearalloc.py
1
5015
#!/home/ubuntu/anaconda2/bin/python # MIT License # Copyright (c) 2016 Druce Vertes drucev@gmail.com # 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
-5,372,145,557,114,190,000
48.653465
683
0.771087
false
2.694788
false
false
false
cemarchi/biosphere
Src/BioDataManagement/DataAccess/Entities/MessengerRnaSample.py
1
1434
from typing import List, Dict from Src.BioDataManagement.DataAccess.Entities.BiologicalSampleBase import BiologicalSampleBase from Src.BioDataManagement.DataAccess.Entities.GeneExpressionLevel import GeneExpressionLevel class MessengerRnaSample(BiologicalSampleBase): """description of class""" def __init__(...
bsd-3-clause
579,169,642,502,552,600
26.576923
100
0.603208
false
3.865229
false
false
false
atumanov/ray
python/ray/rllib/optimizers/replay_buffer.py
1
8536
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import random import sys from ray.rllib.optimizers.segment_tree import SumSegmentTree, MinSegmentTree from ray.rllib.utils.annotations import DeveloperAPI from ray.rllib.utils.compression im...
apache-2.0
-6,601,539,590,877,492,000
32.73913
77
0.575679
false
3.950023
false
false
false
shreyasp/erpnext
erpnext/controllers/accounts_controller.py
1
28222
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _, throw from frappe.utils import today, flt, cint, fmt_money, formatdate, getdate from erpnext.setup.utils import get_...
gpl-3.0
-5,101,145,368,860,695,000
38.035961
180
0.690383
false
3.166386
false
false
false
cortext/crawtextV2
page.py
1
4427
#!/usr/bin/env python # -*- coding: utf-8 -*- #from __future__ import print_function import datetime from os.path import exists import sys import requests import json import re #from goose import Goose from pymongo import errors as mongo_err #from bs4 import BeautifulSoup as bs #import beautifulsoup4 as bs from urlpa...
mit
8,397,858,714,817,989,000
33.585938
445
0.658911
false
2.991216
false
false
false
galuszkak/djangodash
game/migrations/0007_auto__chg_field_game_host.py
1
5665
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Game.host' db.alter_column(u'game_game', 'host_id', self.gf('django.db.models.fields.rela...
gpl-2.0
-7,510,298,253,660,137,000
66.452381
187
0.55481
false
3.60369
false
false
false
wraiden/spacewalk
backend/satellite_tools/repo_plugins/__init__.py
1
12733
# # Copyright (c) 2008--2016 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
gpl-2.0
-7,994,968,211,476,632,000
36.014535
107
0.56758
false
3.95312
false
false
false
umitproject/tease-o-matic
django_mongodb_engine/widgets.py
1
2621
from django.conf import settings from django.forms import widgets from django.db import models from django.utils.safestring import mark_safe import warnings warnings.warn("django_mongodb_engine.widgets is deprecated and will be removed " "in version 0.5", DeprecationWarning) class DictWidget(widgets.Wi...
bsd-3-clause
4,250,996,487,729,507,000
40.603175
145
0.47272
false
3.640278
false
false
false
ib-lundgren/django-oauthlib
django_oauthlib/views.py
1
4525
from __future__ import absolute_import from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, HttpResponse from django.views.decorators.csrf import csrf_exempt from django.views.generic.base import View # TODO: don't import errors like this from oauthlib.oauth2.draft25 import error...
bsd-3-clause
-8,697,564,746,311,574,000
40.136364
100
0.655249
false
4.309524
false
false
false
sorpaas/reread
reader/views/queries/read_records.py
1
1465
from django.shortcuts import render, redirect from django.http import HttpResponse, HttpResponseRedirect from django.contrib.auth.decorators import login_required from reader.documents import * import datetime import json import urllib @login_required def like_article(request, record_id): record = ReadRecord.objec...
mit
6,258,733,803,302,709,000
36.564103
101
0.651877
false
4.024725
false
false
false
wujuguang/scrapyd
scrapyd/webservice.py
3
6619
from copy import copy import traceback import uuid try: from cStringIO import StringIO as BytesIO except ImportError: from io import BytesIO from twisted.python import log from .utils import get_spider_list, JsonResource, UtilsCache, native_stringify_dict class WsResource(JsonResource): def __init__(sel...
bsd-3-clause
-5,762,503,081,443,580,000
37.935294
125
0.599033
false
3.724817
false
false
false
ohrstrom/django-nunjucks
nunjucks/management/commands/nunjucks_tools.py
1
4480
import os import sys from collections import OrderedDict from optparse import make_option from django.core.files.storage import FileSystemStorage from django.core.management.base import CommandError, NoArgsCommand from django.contrib.staticfiles import finders, storage from django.template.loader import render_to_stri...
bsd-3-clause
7,821,409,506,878,498,000
30.556338
89
0.577902
false
4.303554
false
false
false
CaptainHayashi/lass
urysite/url_regexes.py
1
1298
""" Common regular expression stubs for URLconfs. These are collected in a common module to ensure consistency across the LASS platform. """ # Helper functions # def relative(partials): """ Given a sequence of partial regexes, constructs a full regex that treats the partial regexes as stages in a direc...
gpl-2.0
6,314,977,351,025,411,000
24.96
69
0.657935
false
3.054118
false
false
false
tbenthompson/LMS_public
lms_code/plots/plot_hazard.py
1
3557
import matplotlib.pyplot as plt import numpy as np from lms_code.analysis.run_bem import get_slip_magnitude import lms_code.lib.rep2 as rep2 import lms_code.plots.plot_all as lms_plot def main(): lms_plot.setup() fig = plt.figure() which_model = 'all_details' bem_soln = rep2.load('bem_' + which_model)...
mit
8,852,281,276,699,813,000
33.201923
128
0.536688
false
2.531673
false
false
false
jbest/digitization_tools
sort/sort.py
1
5387
import argparse #import glob #import os import shutil from pathlib import Path DEFAULT_HERBARIUM_PREFIX = 'BRIT' DEFAULT_FOLDER_INCREMENT = 1000 DEFAULT_NUMBER_PAD = 7 files_analyzed = 0 files_sorted = 0 verbose = False # set up argument parser ap = argparse.ArgumentParser() ap.add_argument("-d", "--directory", requi...
mit
-1,070,387,984,230,873,100
39.810606
119
0.664377
false
3.94652
false
false
false
tsileo/incremental-backups-tools
incremental_backups_tools/__init__.py
1
11140
# -*- coding: utf-8 -*- import os import tarfile import logging import tempfile import shutil from datetime import datetime import json import itertools import librsync from dirtools import Dir, DirState, compute_diff import sigvault logging.basicConfig(level=logging.INFO) log = logging CACHE_PATH = os.path.expand...
mit
4,781,952,771,890,564,000
33.918495
103
0.566299
false
3.879833
false
false
false
gxxjjj/QuantEcon.py
quantecon/markov/core.py
1
19386
r""" Authors: Chase Coleman, Spencer Lyon, Daisuke Oyama, Tom Sargent, John Stachurski Filename: core.py This file contains some useful objects for handling a finite-state discrete-time Markov chain. Definitions and Some Basic Facts about Markov Chains ---------------------------------------------------- L...
bsd-3-clause
-8,939,832,694,485,968,000
35.033457
79
0.615444
false
3.682051
false
false
false
garbersc/keras-galaxies
solutionToClass.py
1
1410
import numpy as np import os import csv with open(TRAIN_LABELS_PATH, 'r') as f: reader = csv.reader(f, delimiter=",") train_ids = [] for k, line in enumerate(reader): if k == 0: continue # skip header train_ids.append(int(line[0])) isEndClass = np.asarray([0,0,1, 0,0, 0,0, 0,0, 0,0...
bsd-3-clause
-187,993,293,303,596,700
20.692308
58
0.648227
false
2.558984
false
false
false
unreal666/outwiker
src/outwiker/core/iconmaker.py
3
1151
# -*- coding: utf-8 -*- from PIL import Image from outwiker.core.defines import ICON_WIDTH, ICON_HEIGHT class IconMaker(object): """ Class for creation icons by images. """ def create(self, fname_in, fname_out): """ Create icon by file fname_in. Result will have saved as fname_out. """ ...
gpl-3.0
5,693,076,158,499,590,000
33.878788
78
0.546481
false
3.519878
false
false
false
hofschroeer/shinysdr
shinysdr/test/test_telemetry.py
1
4109
# Copyright 2015 Kevin Reid <kpreid@switchb.org> # # This file is part of ShinySDR. # # ShinySDR 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 lat...
gpl-3.0
1,781,579,853,708,462,800
33.822034
117
0.627403
false
3.78361
true
false
false
Ecogenomics/GtdbTk
gtdbtk/config/config.py
1
12048
import json import os import sys """ Load the reference package. This will fail if the directory doesn't exist. """ try: GENERIC_PATH = os.environ['GTDBTK_DATA_PATH'] except KeyError: print('\n' + '=' * 80) print(' ERROR '.center(80)) print('_' * 80 + '\n') print("The 'GTDBTK_DATA_PATH' environment...
gpl-3.0
698,190,801,838,647,900
51.842105
97
0.560508
false
2.614016
false
false
false
m3talstorm/foe-bot
foe/models/resources.py
1
2337
""" """ # Native import time import pprint import json from collections import OrderedDict # 3rd-Party from sqlalchemy import Table, Column, ForeignKey, Integer, String, Boolean, Float from sqlalchemy.orm import relationship, backref import pydash # from request import Request from models.model import Model class...
mit
-8,472,919,973,206,751,000
19.146552
83
0.611896
false
3.775444
false
false
false
SectorLabs/django-postgres-extra
psqlextra/models/partitioned.py
1
1374
from django.db.models.base import ModelBase from psqlextra.types import PostgresPartitioningMethod from .base import PostgresModel from .options import PostgresPartitionedModelOptions class PostgresPartitionedModelMeta(ModelBase): """Custom meta class for :see:PostgresPartitionedModel. This meta class extr...
mit
-2,785,277,113,692,309,000
30.953488
78
0.700873
false
3.994186
false
false
false
vially/googlemusic-xbmc
resources/Lib/navigation.py
1
31743
import time from urllib import quote_plus, urlencode import api import utils import xbmc import xbmcplugin from xbmcgui import ListItem fanart = utils.addon.getAddonInfo('fanart') class Navigation: def __init__(self): self.lang = utils.addon.getLocalizedString self.api = api.Api() self.c...
gpl-3.0
4,076,895,093,247,734,000
48.290373
156
0.560502
false
3.83277
false
false
false
siavooshpayandehazad/high_level_test_pattern_gen
src/DetPatGen/ALU.py
1
1113
import numpy def alu( op1, op2, alu_op, c_in): if alu_op == "0000": # mov result = op2 elif alu_op == "0001": # add result = op1 + op2 elif alu_op == "0010": # sub result = op1 - op2 elif alu_op == "0011": # cmp result = op1 elif alu_op == "0100": # and result = numpy.bitwise_and(op1, op2) elif...
gpl-3.0
402,474,652,033,670,900
29.944444
82
0.592992
false
2.212724
false
false
false
shoopio/shoop
shuup/gdpr/models.py
1
8040
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2019, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.conf import s...
agpl-3.0
-4,302,238,486,277,676,000
36.050691
116
0.631219
false
3.990074
false
false
false
jowolf/thelibregroup
fabfile.py
1
16139
import os import re import sys from functools import wraps from getpass import getpass, getuser from glob import glob from contextlib import contextmanager from posixpath import join from fabric.api import env, cd, prefix, sudo as _sudo, run as _run, hide, task from fabric.contrib.files import exists, upload_template ...
agpl-3.0
8,274,986,944,124,153,000
28.831793
78
0.564719
false
3.659637
false
false
false
Cadasta/cadasta-qgis-plugin
cadasta/gui/tools/utilities/edit_text_dialog.py
1
4651
# coding=utf-8 """ Cadasta Widget -**Edit Text Dialog** This module provides: Login : Login for cadasta and save authnetication .. note:: 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; ei...
gpl-3.0
-5,289,462,695,124,991,000
31.298611
78
0.614061
false
3.988851
false
false
false
poppogbr/genropy
tutorial/projects/warhammer/packages/warh/webpages/carriere.py
1
2502
#!/usr/bin/env python # encoding: utf-8 """ Created by Softwell on 2010-05-15. Copyright (c) 2008 Softwell. All rights reserved. """ class GnrCustomWebPage(object): maintable = 'warh.carriera' py_requires = 'public:Public,standard_tables:TableHandlerLight,public:IncludedView' ######################## STAN...
lgpl-2.1
-5,609,397,692,937,491,000
29.52439
87
0.564349
false
3.465374
false
false
false
davidh-ssec/polar2grid
polar2grid/readers/amsr2_l1b.py
1
6911
#!/usr/bin/env python3 # encoding: utf-8 # Copyright (C) 2016 Space Science and Engineering Center (SSEC), # University of Wisconsin-Madison. # # 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 F...
gpl-3.0
9,032,680,333,966,982,000
49.816176
138
0.620605
false
3.911149
false
false
false
senuido/stash-scanner
lib/ItemHelper.py
1
21784
import itertools import re from enum import IntEnum, Enum from array import array from lib.CurrencyManager import cm from lib.ItemCollection import ItemCollection from lib.Utility import logger, dround from lib.ItemClass import ItemClass, dir_to_id float_expr = '[0-9]+|[0-9]+\s*\.\s*[0-9]+' _BO_PRICE_REGEX = re.comp...
gpl-3.0
-404,214,246,043,495,740
29.98862
130
0.54843
false
3.637335
false
false
false
TheCoSMoCompany/biopredyn
Prototype/src/libsbml-5.10.0/examples/python/arrays/CreateArrays2.py
1
2436
from libsbml import * arraysNs = ArraysPkgNamespaces(); doc = SBMLDocument(arraysNs); doc.setPackageRequired("arrays", True); model = doc.createModel(); # create parameters param = model.createParameter(); param.setId("n"); param.setValue(10); param.setConstant(True); param = model.createParameter(); ...
bsd-3-clause
8,932,212,683,409,533,000
21.631068
50
0.706656
false
2.890736
false
true
false
fako/datascope
src/online_discourse/management/commands/analyse_wizenoze.py
1
2367
from operator import itemgetter from pprint import pprint import logging import numpy as np from django.core.management.base import BaseCommand from core.models import Collective log = logging.getLogger("datascope") class Command(BaseCommand): """ Base command for Community centered commands """ ...
gpl-3.0
-7,041,660,738,028,607,000
38.466667
111
0.60921
false
4.743487
false
false
false
SoCdesign/EHA
Tools/Minimization_Tool/find_problematic_checkers.py
1
1772
# copyright 2016 Siavoosh Payandeh Azad and Behrad Niazmand import package_file from area_coverage_calc import calculate_area, calculate_coverage from file_generator import generate_specific_file import copy from for_testing import gen_dummy_dict def find_problematic_checkers(): if package_file.test_mode: ...
gpl-3.0
-6,955,556,709,692,845,000
44.435897
100
0.580135
false
4.209026
false
false
false
ktmud/david
david/core/accounts/__init__.py
1
1743
# coding: utf-8 from flask.ext.security import UserMixin, RoleMixin from config import BABEL_DEFAULT_LOCALE, BABEL_DEFAULT_TIMEZONE from david.core.mapper import add_kind from david.core.db import db, UidMixin from david.lib.mixins.props import PropsMixin, PropsItem from flask.ext.security import SQLAlchemyUserDatast...
mit
3,447,524,261,894,055,000
30.690909
80
0.667814
false
3.239777
false
false
false
JaneliaSciComp/osgpyplusplus
examples/rough_translated1/osgscalarbar.py
1
5130
#!/bin/env python # Automatically translated python version of # OpenSceneGraph example program "osgscalarbar" # !!! This program will need manual tuning before it will work. !!! import sys from osgpypp import osg from osgpypp import osgDB from osgpypp import osgGA from osgpypp import osgSim from osgpypp import osg...
bsd-3-clause
-8,399,547,675,412,330,000
30.472393
176
0.719688
false
3.335501
false
false
false
fusionbox/buggy
buggy/views.py
1
10158
import json from django.contrib import messages from django.contrib.auth.mixins import LoginRequiredMixin from django.views.generic import ListView, FormView, View from django.http import Http404, HttpResponseRedirect, HttpResponse, HttpResponseForbidden from django.shortcuts import redirect from django.db.models impo...
bsd-3-clause
3,617,712,142,736,727,600
34.642105
96
0.60189
false
3.947921
false
false
false
hughperkins/pub-prototyping
py/change_indent.py
1
5169
#!/usr/bin/python """ Copyright Hugh Perkins 2016 You can use this under the BSDv2 license This script re-indent files, without changing git blame. It will create a new commit for each author present in the original blame, with commit message 'automated re-indentation' """ import sys import os from os import path i...
apache-2.0
4,955,187,367,232,464,000
28.706897
134
0.60089
false
3.374021
false
false
false
tcp813/mouTools
qt/table_editor.py
1
7125
""" PyQt5.6 python3.4 Table has editor """ import random from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * txt = '''The ASCII character set is suitable for encoding English-language documents,but it does not have much in the way of special characters, such as the French ‘ç.’ It is who...
mit
3,111,446,913,765,119,000
33.712195
657
0.626001
false
3.740799
false
false
false