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
harmsm/uhbd
previous_releases/0.5.0/single_file.py
1
1800
""" single_file.py: A script that runs a UHBD calculation on a single file. """ """ Version notes: 0.4: 060113 0.4.1: 060403 Hokiness fix. Changed from some_path = x + os.sep + y to os.path.join(x,y) """ __author__ = "Michael J. Harms" __date__ = "060403" __version__ = "0.4.1" # USER INPUTS pH_start = 0...
unlicense
3,873,800,045,858,526,700
27.125
86
0.612222
false
jiajiax/crosswalk-test-suite
cordova/cordova-feature-android-tests/feature/mobilespec_close.py
1
2244
#!/usr/bin/env python # # Copyright (c) 2015 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of conditions and t...
bsd-3-clause
-4,241,130,745,474,430,000
41.339623
101
0.723262
false
mattboyer/sqbrite
setup.py
1
1984
from setuptools.command.sdist import sdist as SetuptoolsSdist from setuptools import setup, find_packages import os import shutil import version from src import PROJECT_NAME, PROJECT_DESCRIPTION, README_PATH class SdistAndClean(SetuptoolsSdist): ''' Runs the default setuptools sdist command and then cleans t...
mit
-8,243,067,687,102,157,000
28.176471
74
0.632056
false
kubeflow/testing
py/kubeflow/testing/create_kf_instance.py
1
10831
"""Create a Kubeflow instance. The purpose of this script is to automate the creation of Kubeflow Deployments corresponding to different versions of Kubeflow. TODO: This script is obsolete; we should get rid of it in favor of create_unique_kf_instance.py. """ import argparse import logging import json import os...
apache-2.0
-987,374,734,785,568,400
33.714744
80
0.654049
false
wmizzi/tn2capstone
lib/jsonprocesser.py
1
8657
import json import uuid import datetime import os import socket class jsonprocesser: def __init__(self): self.client_mac = str(hex(uuid.getnode())) self.filestamp = datetime.datetime.now().strftime("%H-%M_%d-%m-%y") self.timestamp = str(datetime.datetime.utcnow()) pri...
bsd-2-clause
-3,928,381,272,662,818,000
40.826087
126
0.516807
false
Zerknechterer/pyload
module/plugins/hoster/RapidgatorNet.py
1
5675
# -*- coding: utf-8 -*- import pycurl import re from module.common.json_layer import json_loads from module.network.HTTPRequest import BadHeader from module.plugins.internal.AdsCaptcha import AdsCaptcha from module.plugins.internal.ReCaptcha import ReCaptcha from module.plugins.internal.SolveMedia import SolveMedia f...
gpl-3.0
3,505,129,110,890,734,000
33.603659
103
0.555947
false
lwcook/horsetail-matching
horsetailmatching/weightedsum.py
1
7051
import pdb import time import math import copy import warnings import numpy as np from hm import HorsetailMatching class WeightedSum(HorsetailMatching): '''Class for using weighted sum of moments within an optimization. The code is written such that all arguments that can be used at the initialization o...
mit
8,754,911,680,858,841,000
34.791878
80
0.600624
false
kislyuk/tweak
docs/conf.py
1
9203
# -*- coding: utf-8 -*- # # Tweak documentation build configuration file, created by # sphinx-quickstart on Tue Nov 17 11:55:06 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All...
apache-2.0
4,502,705,034,488,236,000
31.066202
79
0.706074
false
garthee/gnot
modules/pstemmer.py
1
12097
class PorterStemmer: def __init__(self): """The main part of the stemming algorithm starts here. b is a buffer holding a word to be stemmed. The letters are in b[k0], b[k0+1] ... ending at b[k]. In fact k0 = 0 in this demo program. k is readjusted downwards as the stemming progresses...
mit
3,138,866,654,744,761,300
31.783198
108
0.42432
false
eternalNight/ucore_app_go
misc/dashboard/godashboard/package.py
1
14975
# Copyright 2010 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # This is the server part of the package dashboard. # It must be run by App Engine. from google.appengine.api import mail from google.appengine.api import memcach...
bsd-3-clause
-8,376,817,798,995,562,000
33.90676
169
0.54177
false
rearmlkp/Smart_Flash
Flashcard/urls.py
1
2301
"""Flashcard URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/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-...
gpl-3.0
-7,804,049,766,153,713,000
41.611111
98
0.639722
false
daira/zcash
contrib/seeds/generate-seeds.py
3
4418
#!/usr/bin/env python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or https://www.opensource.org/licenses/mit-license.php . ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the directo...
mit
-2,900,496,788,579,006,500
31.014493
98
0.574015
false
Vicaris/ModPro
moviepy/video/io/ffmpeg_tools.py
1
2297
""" Misc. bindings to ffmpeg and ImageMagick.""" import os import sys import subprocess as sp from moviepy.tools import subprocess_call from moviepy.config import get_setting def ffmpeg_movie_from_frames(filename, folder, fps, digits=6): """ Writes a movie out of the frames (picture files) in a folder. ...
mit
703,182,229,391,548,000
32.289855
91
0.551589
false
prheenan/Research
Perkins/Projects/WetLab/Util/DilutionUtil.py
1
13174
# force floating point division. Can still use integer with // from __future__ import division # This file is used for importing the common utilities classes. import numpy as np class DilutionObj: def __init__(self,StockConc,StockVol,DesiredConc,AddVol,Name=""): self.StockConc=StockConc self.StockV...
gpl-3.0
7,359,071,448,070,813,000
38.921212
80
0.642781
false
dfm/emcee3
emcee3/tests/unit/test_autocorr.py
1
1109
# -*- coding: utf-8 -*- from __future__ import division, print_function import pytest import numpy as np from ...autocorr import integrated_time, AutocorrError __all__ = ["test_nd", "test_too_short"] def get_chain(seed=1234, ndim=3, N=100000): np.random.seed(seed) a = 0.9 x = np.empty((N, ndim)) x[...
mit
4,308,948,867,629,914,000
26.04878
54
0.61046
false
bjoernricks/kaizen
kaizen/phase/phase.py
1
2714
# vim: fileencoding=utf-8 et sw=4 ts=4 tw=80: # kaizen - Continuously improve, build and manage free software # # Copyright (C) 2011 Björn Ricks <bjoern.ricks@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as publishe...
gpl-2.0
-6,345,546,671,171,965,000
27.557895
79
0.56948
false
srinath-chakravarthy/ovito
tests/scripts/test_suite/wigner_seitz_modifier.py
1
1252
from ovito import * from ovito.io import * from ovito.modifiers import * import numpy as np node = import_file("../../files/NetCDF/sheared_aSi.nc") modifier = WignerSeitzAnalysisModifier() node.modifiers.append(modifier) modifier.reference.load("../../files/NetCDF/sheared_aSi.nc") dataset.anim.current_frame = 4 pri...
gpl-3.0
-175,022,617,238,454,720
31.947368
98
0.749201
false
PopulationGenetics/pyucsc
ucsc/db.py
1
3664
""" UCSC Interface via SQLalchemy ============================= """ import os import re from sqlalchemy import sql from sqlalchemy import orm import sqlalchemy as sa import logging; log = logging.getLogger(__name__) import config import model Session = orm.sessionmaker() session = Session() initialized = False meta...
bsd-3-clause
-1,658,897,240,787,379,700
31.424779
137
0.660753
false
mathieubenoit/GDSII_Generator
generateWaferMap.py
1
2385
#!/usr/bin/python import os import numpy import gdspy ld_mask_edge = {'layer': 300, 'datatype': 0} ld_kerf = {'layer': 200, 'datatype': 0} ld_acfmask = {'layer': 100, 'datatype': 0} ld_topmetal= {'layer': 81, 'datatype': 0} ld_po= {'layer': 27, 'datatype': 1} def GenerateCell(chipX = 14100., chipY=16210.,leftKerf=85...
lgpl-3.0
4,824,642,096,970,110,000
35.707692
207
0.690985
false
matthew-brett/draft-statsmodels
scikits/statsmodels/sandbox/bspline.py
1
20284
''' Bspines and smoothing splines. General references: Craven, P. and Wahba, G. (1978) "Smoothing noisy data with spline functions. Estimating the correct degree of smoothing by the method of generalized cross-validation." Numerische Mathematik, 31(4), 377-403. Hastie, Tibshirani and Friedman (20...
bsd-3-clause
-464,578,479,505,752,400
29.640483
105
0.543581
false
quantopian/nose_xunit_gevent
nose_xunit_gevent.py
1
6235
""" Xunit for the nose_gevented_multiprocess plugin The xunit plugin works by keeping ongoing stats on the test run as it progresses, with hooks that are run before/after each test to update the stats. Unfortunately, when those hooks are called in subprocesses, it doesn't work. There's a nose_xunitmp plugin which cl...
apache-2.0
-3,738,876,490,507,157,000
32.702703
78
0.6085
false
CrispyMcToast/bkup
src/fs/Scanner.py
1
4092
#!/usr/bin/python import threading import os import hashlib import time MAX_THREADS = 5 thread_count = 0 tc_lock = threading.Lock() def inc_count(): global thread_count tc_lock.acquire() thread_count += 1 tc_lock.release() def dec_count(): global thread_count tc_lock.acquire() thread_cou...
gpl-3.0
-2,186,930,800,156,176,000
23.357143
72
0.516129
false
Nettacker/Nettacker
lib/payload/shellcode/stack/engine.py
1
3693
#!/usr/bin/env python # -*- coding: utf-8 -*- import binascii from core.alert import error from core.compatible import version def shellcoder(shellcode): n = 0 xshellcode = '\\x' for w in shellcode: n += 1 xshellcode += str(w) if n == 2: n = 0 xshellcode +=...
gpl-3.0
-6,920,994,318,472,593,000
33.839623
84
0.426753
false
destijl/grr
grr/gui/http_api.py
1
21177
#!/usr/bin/env python """HTTP API logic that ties API call handlers with HTTP routes.""" import json import time import traceback import urllib2 # pylint: disable=g-bad-import-order,unused-import from grr.gui import django_lib # pylint: enable=g-bad-import-order,unused-import from django import http from werkzeug...
apache-2.0
-6,772,753,926,901,431,000
35.893728
80
0.651934
false
bgroff/kala-app
django_kala/auth/views/settings/avatar.py
1
2011
from django.conf import settings from django.contrib import messages from auth.forms.settings.avatar import AvatarForm from django.contrib.auth import get_user_model from django.contrib.auth.mixins import LoginRequiredMixin from django.core.exceptions import PermissionDenied from django.shortcuts import get_object_or_...
mit
-1,904,576,512,794,497,300
34.910714
86
0.652909
false
errx/django
tests/cache/tests.py
1
82056
# -*- coding: utf-8 -*- # Unit tests for cache framework # Uses whatever cache backend is set in the test settings file. from __future__ import unicode_literals import os import re import copy import shutil import tempfile import threading import time import unittest import warnings from django.conf import settings ...
bsd-3-clause
8,306,885,958,215,502,000
38.638473
121
0.623275
false
jamespcole/home-assistant
homeassistant/components/modbus/switch.py
1
7154
"""Support for Modbus switches.""" import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_COMMAND_OFF, CONF_COMMAND_ON, CONF_NAME, CONF_SLAVE, STATE_ON) from homeassistant.helpers import config_validation as cv from homeassistant....
apache-2.0
-460,554,690,327,611,300
32.745283
79
0.599385
false
google/mobly
tests/mobly/controllers/android_device_lib/callback_handler_test.py
1
5977
# Copyright 2017 Google 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 writing, ...
apache-2.0
958,428,415,450,603,900
42.948529
80
0.575205
false
jgardner1/Python-Metrics
setup.py
1
1247
from setuptools import setup, find_packages import sys, os version = '0.2' setup(name='pymetrics', version=version, description="A metrics library to time and count what happens during a process.", long_description="""\ """, classifiers=[ 'Development Status :: 3 - Alpha', ...
agpl-3.0
4,747,061,692,150,908,000
32.702703
87
0.590217
false
nke001/attention-lvcsr
libs/Theano/theano/gof/cc.py
1
71042
""" Defines Linkers that deal with C implementations. """ from __future__ import print_function # Python imports from copy import copy import os import sys import logging import numpy import theano from theano import config from theano.compat import PY3 from theano.compat import izip from six import string_types, r...
mit
-3,159,184,381,697,750,500
38.380266
168
0.556333
false
Chaffelson/whoville
whoville/cloudbreak/apis/v1proxyconfigs_api.py
1
47332
# coding: utf-8 """ Cloudbreak API Cloudbreak is a powerful left surf that breaks over a coral reef, a mile off southwest the island of Tavarua, Fiji. Cloudbreak is a cloud agnostic Hadoop as a Service API. Abstracts the provisioning and ease management and monitoring of on-demand clusters. SequenceIQ's Cloud...
apache-2.0
6,885,332,943,980,451,000
42.866543
984
0.561269
false
quantifiedcode/checkmate
checkmate/management/commands/sync.py
1
2051
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .base import BaseCommand from collections import defaultdict import sys import os import random import os.path import copy import json import time import pprint import hashlib import logging logger = logging.getLogger(__name__)...
mit
329,443,048,359,415,500
29.553846
146
0.68942
false
southampton/unimatrix
deskctl/lib/errors.py
1
3040
#!/usr/bin/python # -*- coding: utf-8 -*- from deskctl import app from flask import g, render_template, make_response, session, request import traceback ################################################################################ ## standard error (uses render_template and thus standard page layout) def stderr(t...
gpl-3.0
6,697,952,601,230,375,000
23.699187
162
0.602041
false
lynchnf/maneki-neko-web
socialmedia/models.py
1
1095
from cms.models.pluginmodel import CMSPlugin from django.utils.translation import ugettext_lazy as _ from django.db import models ICON_CHOICES = ( ("fa-delicious", _("Delicious")), ("fa-digg", _("Digg")), ("fa-facebook", _("Facebook")), ("fa-flickr", _("Flickr")), ("fa-google-p...
mit
-454,674,423,884,372,100
33.25
87
0.552511
false
HUGG/NGWM2016-modelling-course
Lessons/06-Rheology-of-the-lithosphere/scripts/solutions/strength-envelope-uniform-crust.py
1
7747
''' strength-envelope-uniform-crust.py This script can be used for plotting strength envelopes for a lithosphere with a uniform crust. The script includes a function sstemp() that can be used for calculating the lithospheric temperature as a function of the input material properties dwhipp 01.16 (modified from code w...
mit
-5,469,655,399,814,648,000
36.97549
141
0.47954
false
librato/librato-python-web
librato_python_web/librato_config.py
1
1685
# Copyright (c) 2015. Librato, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions a...
bsd-3-clause
-4,723,268,181,559,105,000
48.558824
81
0.75727
false
vascotenner/holoviews
tests/testcomparisondimension.py
1
6477
""" Test cases for Dimension and Dimensioned object comparison. """ from holoviews.core import Dimension, Dimensioned from holoviews.element.comparison import ComparisonTestCase class DimensionsComparisonTestCase(ComparisonTestCase): def setUp(self): super(DimensionsComparisonTestCase, self).setUp() ...
bsd-3-clause
-5,668,580,000,063,761,000
40.787097
97
0.614173
false
sony/nnabla
python/src/nnabla/backward_function/log_softmax.py
1
1273
# Copyright 2019,2020,2021 Sony Corporation. # Copyright 2021 Sony Group Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
apache-2.0
1,820,603,704,380,515,000
34.361111
86
0.716418
false
thonkify/thonkify
src/lib/future/backports/email/iterators.py
1
2346
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Various types of useful iterators and generators.""" from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import __all...
mit
-7,011,586,712,797,445,000
30.702703
75
0.650469
false
crossroadchurch/paul
tests/resources/projector/data.py
1
2518
# -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4 ############################################################################### # OpenLP - Open Source Lyrics Projection # # ------------------------------------------------------...
gpl-2.0
3,210,781,646,622,776,000
48.372549
79
0.426926
false
eladnoor/equilibrator
gibbs/forms.py
1
5821
from django import forms from util import constants import haystack.forms class ListFormField(forms.MultipleChoiceField): """ A form field for a list of values that are unchecked. The Django MultipleChoiceField does *almost* what we want, except it validates that each choice is in a suppl...
mit
2,429,056,739,897,362,400
37.549669
79
0.655214
false
USGSDenverPychron/pychron
pychron/spectrometer/local_mftable_history_view.py
1
3951
# =============================================================================== # Copyright 2014 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
apache-2.0
8,448,448,464,310,305,000
33.060345
94
0.539863
false
yglazko/socorro
socorro/unittest/external/es/base.py
3
27601
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import mock import random import uuid from distutils.version import LooseVersion from elasticsearch.helpers import bulk ...
mpl-2.0
-6,022,690,469,080,127,000
28.968512
83
0.490489
false
dariost/utility
pi.py
1
1131
#!/usr/bin/env python3 ##################################################### # # # License: Apache License 2.0 # # Author: Dario Ostuni <another.code.996@gmail.com> # # # ##########################...
apache-2.0
1,180,066,181,916,586,800
20.75
53
0.402299
false
zenn1989/scoria-interlude
L2Jscoria-Game/data/scripts/custom/8009_HotSpringsBuffs/__init__.py
1
2538
import sys from com.l2scoria.gameserver.model.quest import State from com.l2scoria.gameserver.model.quest import QuestState from com.l2scoria.gameserver.model.quest.jython import QuestJython as JQuest from com.l2scoria.gameserver.datatables import SkillTable from com.l2scoria.util.random import Rnd qn = "8009_HotSprin...
gpl-3.0
-930,510,215,556,508,700
36.338235
78
0.611505
false
simleo/pydoop-features
pyfeatures/app/summarize.py
1
2371
# BEGIN_COPYRIGHT # # Copyright (C) 2017 Open Microscopy Environment: # - University of Dundee # - CRS4 # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at # # http://www.apache.org/licenses/...
apache-2.0
5,210,433,854,678,834,000
33.362319
77
0.601012
false
WBradbeer/port-routing
lp_helpers.py
1
2253
import itertools import numpy as np def flatten_2(data): vector = [] for i in data: for j in i: vector.append(j) return vector def flatten_3(data): return flatten_2(flatten_2(data)) def reshape_2D(vector, rows, cols): data = [] for i in range(0, rows): data.appe...
mit
-9,073,479,037,994,305,000
23.758242
81
0.537949
false
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Ops/PyScripts/lib/ops/env.py
1
2844
import dsz import dsz.ui import dsz.script SELF = int(dsz.script.Env['script_command_id']) def get(env, cmdid=0, addr=dsz.script.Env['target_address']): if (not dsz.env.Check(env, cmdid, addr)): return None else: return unicode(dsz.env.Get(env, cmdid, addr), 'utf_8') def set(env, value, cmdid...
unlicense
-8,656,190,649,097,942,000
29.923913
84
0.60443
false
lixingcong/shadowsocks_analysis
shadowsocks/server.py
1
5564
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' 服务端 ps:我是先看完local.py再看server.py; 发现:除了多用户的思路判断,别的代码思路是一致的,部分没有注释,可以回去翻翻local.py ''' from __future__ import absolute_import, division, print_function, \ with_statement import sys import os import logging import signal sys.path.insert(0, os.path.join(os.path.dirnam...
mit
9,211,529,882,349,999,000
33.353741
111
0.543762
false
JasonJW/mcoc-cogs
rssrelay/rssrelay.py
1
18047
import pathlib import asyncio # noqa: F401 import discord # noqa: F401 from discord.ext import commands from cogs.utils.dataIO import dataIO from cogs.utils import checks from .utils.chat_formatting import pagify path = 'data/rssrelay' class RSSRelay: """Configureable Announcements.""" __version__ = "3.0.1...
mit
899,777,887,668,815,400
37.810753
79
0.535823
false
lexdene/hbml
tests/template_test.py
1
1579
import os import unittest import hbml def _file_content(path): with open(path, 'r') as f: content = f.read() return content DIRPATH = os.path.join( os.path.dirname(os.path.realpath(__file__)), 'templates' ) class TemplateTestCase(unittest.TestCase): def _test_file(self, filename): ...
gpl-3.0
8,569,644,330,344,459,000
23.671875
58
0.419886
false
digitalvectorz/syn
Syn/Unlink.py
1
1819
""" Simple unlink routines @license: GPL-3+ @author: Paul Tagliamonte <paultag@gmail.com> @date: August 8th, 2011, 00:10 -0000 Unlink a package into the filesystem """ import os.path import Syn.Exceptions import Syn.Policy.Db as D import Syn.Policy.BinaryPackage as B import Syn.Policy.Chroot as C import Syn...
gpl-3.0
8,327,458,023,312,325,000
23.581081
91
0.692688
false
amd77/parker
matriculas/views.py
1
1489
# Create your views here. from django.utils import timezone # from django.views.generic import View, TemplateView, UpdateView from django.views.generic import ListView, RedirectView from models import Registro from django.core.urlresolvers import reverse class RedirectDia(RedirectView): permanent = False def...
gpl-2.0
-4,901,623,654,913,660,000
32.088889
82
0.67495
false
hylje/sankarit
sankarit/models/adventure.py
1
5383
# -*- encoding: utf-8 -*- import itertools import random import datetime from collections import defaultdict from flask import g from sankarit import itemclasses, adventureclasses from sankarit.models.item import Item class Adventure(object): @classmethod def create(cls, adventureclass, heroes): c =...
bsd-3-clause
-7,869,746,268,539,831,000
30.461988
113
0.563755
false
snakeleon/YouCompleteMe-x86
third_party/ycmd/ycmd/handlers.py
1
10839
# Copyright (C) 2013 Google Inc. # 2017 ycmd contributors # # This file is part of ycmd. # # ycmd is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
gpl-3.0
-3,310,765,388,054,272,000
29.880342
80
0.696374
false
jacentio/beam
beam/__init__.py
1
7104
import argparse import docker import logging from pythonjsonlogger import jsonlogger from importlib import import_module from time import time, sleep from beam.models.service import Service EXCLUDED_ATTRIBUTES = [ 'TAGS' ] class Beam(object): def __init__(self, args=[]): self.log = self.init_logge...
mit
-7,491,905,419,200,621,000
30.573333
79
0.519426
false
tweemeterjop/thug
thug/DOM/W3C/Attr.py
1
2167
#!/usr/bin/env python import bs4 as BeautifulSoup from .Node import Node class Attr(Node): _value = "" def __init__(self, doc, parent, attr): self.doc = doc self.parent = parent self.attr = attr self.tag = BeautifulSoup.Tag(parser = self.doc, name = 'attr') N...
gpl-2.0
-8,961,520,917,064,182,000
22.301075
121
0.580988
false
foxdog-studios/pyddp
ddp/messages/client/sub_message.py
1
1695
# -*- coding: utf-8 -*- # Copyright 2014 Foxdog Studios # # 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 l...
apache-2.0
7,933,461,572,024,796,000
26.786885
74
0.630088
false
KDNT/p2pool-worldcoin-old
p2pool/web.py
1
25333
from __future__ import division import errno import json import os import sys import time import traceback from twisted.internet import defer from twisted.python import log from twisted.web import resource, static import p2pool from bitcoin import data as bitcoin_data from . import data as p2pool_data, p2p from util...
gpl-3.0
3,808,312,413,652,431,000
54.922737
260
0.6306
false
heromod/migrid
mig/vm-proxy/deprecated/proxy/mipbroker.py
1
2409
#!/usr/bin/env python # -*- coding: utf-8 -*- # # --- BEGIN_HEADER --- # # MipBroker - An Mip broker # # # Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter # # This file is part of MiG. # # MiG is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
gpl-2.0
-8,736,584,838,630,681,000
26.386364
83
0.658364
false
kevin-zhaoshuai/zun
zun/api/controllers/v1/schemas/images.py
1
1106
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
apache-2.0
-7,546,945,377,160,482,000
29.722222
75
0.702532
false
d1m0/pyelf
__init__.py
1
13904
from pylibelf import * from pylibelf.types import * from pylibelf.iterators import * from pylibelf.constants import * from pylibelf.util import * from pylibelf.util.syms import * from pylibelf.macros import * from bisect import bisect_left import pylibelf.util import pylibelf import types import os def _inrange(x, a,b...
mit
-9,088,902,695,502,797,000
29.095238
111
0.583357
false
bburan/psiexperiment
psi/data/plots.py
1
35393
import logging log = logging.getLogger(__name__) import itertools import importlib from functools import partial from collections import defaultdict import numpy as np import pandas as pd import pyqtgraph as pg from atom.api import (Unicode, Float, Tuple, Int, Typed, Property, Atom, Bool, Enum...
mit
3,576,317,524,640,551,400
30.685765
84
0.559376
false
sdemircan/editobj2
field_qtopia.py
1
9247
# -*- coding: utf-8 -*- # field_gtk.py # Copyright (C) 2007-2008 Jean-Baptiste LAMY -- jiba@tuxfamily.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 License, or #...
gpl-2.0
1,841,811,769,113,129,200
34.980545
141
0.667676
false
PhasesResearchLab/ESPEI
tests/test_error_functions.py
1
17483
# pylint: disable=redefined-outer-name """ Test different error functions as isolated units. """ from unittest import mock import numpy as np import pytest import scipy.stats from tinydb import where from pycalphad import Database, Model, variables as v from espei.paramselect import generate_parameters from espei.er...
mit
2,473,230,179,185,101,300
40.825359
169
0.669622
false
codeforfrankfurt/PolBotCheck
polbotcheck/word_cluster.py
1
3812
import json from sklearn.feature_extraction.text import TfidfVectorizer import nltk from nltk.corpus import stopwords from wordcloud import WordCloud import matplotlib.pyplot as plt import db import os DATASET_PATH = os.environ['HOME'] + '/nltk_data/corpora/twitter_samples/tweets.20150430-223406.json' def calc_frequen...
mit
-4,804,049,777,207,499,000
37.505051
122
0.651626
false
trentspi/PX8
examples/plasma/plasma.py
1
17516
px8 / python cartridge version 1 __python__ # Original code from rez # https://www.lexaloffle.com/bbs/?tid=29529 SIZE = 128 A = None cr = None cg = None cb = None cw = None def _init(): global SIZE, A, cr, cg, cb, cw mode(SIZE, SIZE, 1) cls() A = SIZE - 1 cr = [0] * SIZE cg = [0] * SIZE ...
mit
-8,687,394,390,623,362,000
94.715847
128
0.96232
false
memsharded/conan
conans/client/graph/graph_builder.py
1
18724
import time from collections import OrderedDict from conans.client.graph.graph import DepsGraph, Node, RECIPE_EDITABLE from conans.errors import (ConanException, ConanExceptionInUserConanfileMethod, conanfile_exception_formatter) from conans.model.conan_file import get_env_context_manager fr...
mit
1,260,864,511,600,322,000
52.497143
101
0.605319
false
ianrenton/TelegraphFantasyFootballTeamPicker
telegraphpicker.py
1
19193
#!/usr/bin/python # -*- coding: cp1252 -*- # Telegraph Fantasy Football Team Picker # version 1.2.1 (11 March 2011) # by Ian Renton and Mark Harris # For details, see http://www.onlydreaming.net/software/telegraph-fantasy-football-team-picker # This code is released under the GPLv3 licence (http://www.gnu.org/licenses...
bsd-2-clause
-450,705,566,761,338,500
48.981771
238
0.602355
false
H-Software/Zabbix-II
zabbix-templates/ibm-storwize-perf/scripts/svc_perf_discovery_sender_zabbix.py
1
4012
#!/usr/bin/python # -*- coding: utf-8 -*- # coding: utf-8 # # IBM Storwize V7000 autodiscovery script for Zabbix # # 2013 Matvey Marinin # # Sends volume/mdisk/pool LLD JSON data to LLD trapper items "svc.discovery.<volume-mdisk|volume|mdisk|pool>" # Use with "_Special_Storwize_Perf" Zabbix template # # See also http:/...
gpl-2.0
5,975,721,742,574,174,000
31.617886
176
0.639083
false
rven/odoo
odoo/fields.py
1
165522
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. """ High-level objects for fields. """ from collections import defaultdict from datetime import date, datetime, time from operator import attrgetter from xmlrpc.client import MAXINT import itertools import logging impor...
agpl-3.0
7,060,470,593,801,443,000
41.981563
132
0.57512
false
kansanmuisti/kamu
parliament/models/funding.py
1
1287
from django.db import models from django.db.models import Q from django.utils.translation import ugettext_lazy as _ from parliament.models.member import Member from parliament.models.session import Term class FundingSource(models.Model): TYPES = ( ('co', _('Corporation')), ('ind', _('Individual')...
agpl-3.0
-1,693,515,536,714,444,500
31.175
94
0.608392
false
legalsylvain/odoo-addons-oli
mrp_to_purchase/model/__init__.py
1
1070
# -*- encoding: utf-8 -*- ############################################################################## # # MRP To Purchase module for Odoo # Copyright (C) 2015-Today Akretion (http://www.akretion.com) # @author Sylvain LE GAL (https://twitter.com/legalsylvain) # # This program is free software: you can re...
agpl-3.0
-7,551,090,035,109,000,000
45.521739
78
0.61215
false
dc3-plaso/dfvfs
dfvfs/path/fvde_path_spec.py
1
2024
# -*- coding: utf-8 -*- """The FileVault Drive Encryption (FVDE) path specification implementation.""" from dfvfs.lib import definitions from dfvfs.path import factory from dfvfs.path import path_spec class FVDEPathSpec(path_spec.PathSpec): """Class that implements the FVDE path specification. Attributes: e...
apache-2.0
3,737,688,749,816,931,300
31.126984
78
0.700593
false
emilydolson/avida-spatial-tools
avidaspatial/utils.py
1
11662
# This file contains functions that are used throuhgout avida-spatial-tools from math import sqrt, log, floor, ceil from copy import deepcopy import pysal import numpy as np from .environment_file import * import seaborn as sns def get_kwargs(grid, kwargs, phenotypes=False): """ Helper function to figure out...
mit
-5,382,053,387,468,629,000
28.6743
79
0.621763
false
squaresLab/Houston
experiments/filter_truth.py
1
2853
from typing import Iterator, Tuple, Set, List, Dict, Any, Optional, Type import argparse import logging import sys import os import concurrent.futures from ruamel.yaml import YAML import yaml from houston.mission import Mission from compare_traces import load_file as load_traces_file from compare_traces import is_tru...
mit
-7,573,749,851,091,781,000
31.793103
81
0.661059
false
FluVigilanciaBR/seasonality
methods/mem/sinan_mem_inset_thresholds.py
1
45032
# coding:utf8 __author__ = 'Marcelo Ferreira da Costa Gomes' import rpy2.robjects as ro from numpy import * from pandas import * from rpy2.robjects import pandas2ri from rpy2.robjects.packages import importr pandas2ri.activate() import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as ...
gpl-3.0
-6,955,606,979,555,097,000
51.231039
129
0.583441
false
Kuniwak/vint
vint/bootstrap.py
1
1382
import importlib import pkgutil from pathlib import Path from vint.linting.cli import start_cli import logging LOG_FORMAT = 'vint %(levelname)s: %(message)s' def init_logger(): logging.basicConfig(format=LOG_FORMAT) def init_linter(): import_all_policies() def init_cli(): start_cli() def import_a...
mit
1,752,616,255,235,649,500
26.64
86
0.675109
false
california-civic-data-coalition/django-calaccess-processed-data
calaccess_processed_elections/proxies/opencivicdata/elections/__init__.py
1
1472
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Proxy models for augmenting our source data tables with methods useful for processing. """ from .ballotmeasurecontests import ( OCDBallotMeasureContestProxy, OCDBallotMeasureContestIdentifierProxy, OCDBallotMeasureContestOptionProxy, OCDBallotMeasureCont...
mit
-3,196,519,617,878,607,400
26.773585
86
0.777853
false
charles-cooper/raiden
tools/create_compilation_dump.py
1
6453
#!/usr/bin/env python # -*- coding: utf-8 from __future__ import print_function import json from ethereum import tester from ethereum import slogging from raiden.utils import privatekey_to_address, get_contract_path, safe_lstrip_hex slogging.configure(":INFO") log = slogging.getLogger(__name__) TARGETS = dict( ...
mit
-7,197,976,191,324,780,000
28.600917
89
0.611808
false
AdamRTomkins/libSpineML
libSpineML/smlBundle.py
1
7712
#! /usr/bin/env python # -*- coding: utf-8 -*- """SpineML Bundle Module This modual will form a convience class to bundle together related SpineML objects into a single standard object which can be easily passed between programs. The bundle will be able to interact with premade spineML objects through the other suppor...
gpl-3.0
-8,174,739,726,877,663,000
37.56
91
0.566131
false
hbp-brain-charting/public_protocols
mtt/paradigm_descriptors/paradigm_descriptor_mtt.py
1
8624
# -*- coding: utf-8 -*- """ Script for paradigm descriptors' extraction on the Mental-Time-Travel protocol for both models author: Ana Luisa Pinho e-mail: ana.pinho@inria.fr Last update: November 2019 Compatibility: Python 3.5 """ import os import glob import csv import numpy as np # %% # =========================...
bsd-3-clause
-978,880,912,529,410,800
32.297297
79
0.50487
false
GabrielCasarin/Allegri
Meta_Compilador/minimizador.py
1
8819
# Copyright (c) 2016 Gabriel Casarin da Silva, All Rights Reserved. from comum.automatos import AutomatoFinito from comum.automatos.estado import Estado, EstadoNaoDeterministico def eliminar_transicoes_em_vazio(automato): def epsilon_closure(estado): fecho = [estado] pilha = list(fecho) ...
gpl-3.0
-5,765,172,779,519,239,000
34.504032
121
0.535718
false
3324fr/spinalcordtoolbox
scripts/isct_test_function.py
1
17025
#!/usr/bin/env python ######################################################################################### # # This function allows to run a function on a large dataset with a set of parameters. # Results are extracted and saved in a way that they can easily be compared with another set. # # Data should be organiz...
mit
3,687,924,555,566,886,400
38.228111
169
0.589662
false
SerpentCS/purchase-workflow
purchase_request/models/purchase_request.py
1
10281
# -*- coding: utf-8 -*- # Copyright 2016 Eficent Business and IT Consulting Services S.L. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0). from openerp import api, fields, models import openerp.addons.decimal_precision as dp _STATES = [ ('draft', 'Draft'), ('to_approve', 'To be approved'), ...
agpl-3.0
-740,625,282,075,647,100
40.289157
79
0.508803
false
elzaggo/pydoop
pydoop/__init__.py
1
5094
# BEGIN_COPYRIGHT # # Copyright 2009-2018 CRS4. # # 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 agree...
apache-2.0
339,911,344,888,792,400
24.59799
77
0.665096
false
mckinseyacademy/xblock-diagnosticfeedback
diagnostic_feedback/mixins.py
1
3760
from __future__ import absolute_import import pkg_resources from django import utils from xblockutils.resources import ResourceLoader from .config import student_assets, studio_assets loader = ResourceLoader(__name__) class XBlockWithTranslationServiceMixin(object): """ Mixin providing access to i18n servi...
agpl-3.0
-4,865,101,097,367,604,000
37.367347
114
0.5625
false
CStaich/Repository01
RPG.py
1
11997
import random from math import ceil import simpy #for simulating battle #Program written by Charlie Staich # staichcs@mail.uc.edu # in fulfillment of Katas excercise for Roto # To use, simply run in a console. You will be prompted with an easy menu. #Purpose: an RPG item generator and battle simulator # Bat...
mit
-8,551,126,958,085,172,000
41.154676
163
0.541385
false
macosforge/ccs-calendarserver
txdav/common/datastore/podding/test/test_resource.py
1
7770
## # Copyright (c) 2005-2017 Apple Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
5,385,579,506,552,117,000
28.884615
106
0.566924
false
cbode/ssr
ssr_algore.py
1
8571
#!/usr/bin/env python ############################################################################ # # MODULE: ssr_algore.py # AUTHOR: Collin Bode, UC Berkeley # # PURPOSE: # Al Gore Rhythm combines r.sun model with Light Penetration Index (LPI). # Merges all the r.sun solar radiation runs into a single ...
gpl-2.0
-8,142,489,074,652,205,000
46.882682
166
0.575779
false
google/ehr-predictions
ehr_prediction_modeling/tasks/mlp_task_layer.py
1
4033
# coding=utf-8 # Copyright 2020 Google Health Research. # # 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 la...
apache-2.0
-1,933,572,256,669,902,300
36
79
0.668237
false
joelfrederico/Blowout
blowout/support.py
1
4201
import h5py as _h5 import numpy as _np import logging as _logging import time as _time _logger = _logging.getLogger(__name__) import ipdb as pdb import re as _re def _timestamp2filename(cls, ftype, filename=None): # ====================================== # Get filename from timestamp # ==================...
mit
3,573,787,336,411,098,000
30.586466
118
0.502261
false
Saevon/spacebattle
menu/controllers.py
1
4003
from abstract.event_manager import EventManager, Mods from pygame import locals as const from ship import Ship # Missing Mouse button constants const.MOUSEKEY_LEFT = 1 const.MOUSEKEY_MIDDLE = 2 const.MOUSEKEY_RIGHT = 3 const.MOUSEKEY_SCROLLUP = 4 const.MOUSEKEY_SCROLLDOWN = 5 # Start up our pause_handler pause_hand...
mit
7,717,589,673,143,250,000
32.638655
81
0.681989
false
suutari-ai/shoop
shuup/campaigns/models/campaigns.py
2
18214
# This file is part of Shuup. # # Copyright (c) 2012-2017, 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. import random import string from django.conf import settings from django.core.exceptions ...
agpl-3.0
2,415,510,597,969,143,000
40.022523
118
0.65521
false
pade/sprinkler
src/channel.py
1
3188
# -*- coding: UTF-8 -*- ''' Created on 29 août 2016 @author: dassierp ''' import logging from progdays import Progdays class Channel(): ''' Control a water channel ''' def __init__(self, pName, pChNumber, pHwInterface): ''' Constructor @param pName: channel name @para...
gpl-3.0
-1,962,895,549,548,024,300
27.711712
77
0.531534
false
Letractively/rdflib
rdflib/plugins/parsers/notation3.py
1
78910
#!/usr/bin/env python u""" notation3.py - Standalone Notation3 Parser Derived from CWM, the Closed World Machine Authors of the original suite: * Dan Connolly <@@> * Tim Berners-Lee <@@> * Yosi Scharf <@@> * Joseph M. Reagle Jr. <reagle@w3.org> * Rich Salz <rsalz@zolera.com> http://www.w3.org/2000/10/swap/notation3....
bsd-3-clause
-6,180,058,760,584,588,000
31.715589
290
0.48554
false
ieugen/Teachingbox
usercontrib/crawler3D/python/pyui/grid.py
1
8378
# PyUI # Copyright (C) 2001-2002 Sean C. Riley # # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope that it will be useful...
gpl-3.0
-7,408,309,931,645,807,000
34.907489
100
0.584149
false
mridang/django-eggnog
eggnog/management/commands/checkupdates.py
1
2002
from threading import Thread from pkg_resources import * from django.core.management.base import BaseCommand, CommandError from yolk.setuptools_support import get_pkglist from yolk.yolklib import get_highest_version, Distributions from yolk.pypi import CheeseShop from eggnog.models import Update class Command(BaseC...
bsd-3-clause
-1,709,283,128,330,770,400
32.366667
123
0.608891
false
IdahoDataEngineers/vcardz
vcardz/data.py
1
2577
# # Kontexa vCard data structure and processing # from email.utils import parseaddr import re from six.moves.urllib.parse import urlparse from .atom import Atom from .bag import Bag from .utils import new_id REX_BEGIN = "^BEGIN:VCARD" REX_END = "END:VCARD$" REX_PHONE_NUMBERS = "\+?1? *\(?([0-9]{3})\)?[-. ]?([0-9]{3}...
gpl-2.0
9,038,364,064,295,289,000
17.810219
155
0.503686
false
aerkalov/Booktype
lib/booki/editor/management/commands/bookrename.py
1
3217
# This file is part of Booktype. # Copyright (c) 2012 Aleksandar Erkalovic <aleksandar.erkalovic@sourcefabric.org> # # Booktype 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 Li...
agpl-3.0
7,888,365,485,220,761,000
34.744444
138
0.588126
false