repo_name
stringlengths
6
90
path
stringlengths
4
230
copies
stringlengths
1
4
size
stringlengths
4
7
content
stringlengths
734
985k
license
stringclasses
15 values
hash
int64
-9,223,303,126,770,100,000
9,223,233,360B
line_mean
float64
3.79
99.6
line_max
int64
19
999
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
8.06
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
esrever10/doucoin
qa/rpc-tests/invalidateblock.py
1
3175
#!/usr/bin/env python2 # Copyright (c) 2014 The Doucoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test InvalidateBlock code # from test_framework import DoucoinTestFramework from doucoinrpc.authproxy imp...
mit
-8,325,025,890,153,318,000
40.776316
95
0.642205
false
3.700466
true
false
false
liuwenf/moose
python/chigger/tests/annotations/time_annotation_change.py
6
1766
#!/usr/bin/env python #pylint: disable=missing-docstring ################################################################# # DO NOT MODIFY THIS HEADER # # MOOSE - Multiphysics Object Oriented Simulation Environment # # #...
lgpl-2.1
-2,209,622,513,831,484,400
44.282051
90
0.455266
false
4.204762
false
false
false
zetaops/zengine
zengine/views/permissions.py
1
10428
from zengine.views.base import BaseView from zengine import forms from zengine.forms import fields from zengine.lib.cache import Cache from zengine.config import settings from pyoko import ListNode from pyoko.lib.utils import get_object_from_path from collections import defaultdict PermissionModel = get_object_from_pa...
gpl-3.0
-5,056,969,563,519,742,000
36.782609
105
0.521768
false
4.972818
false
false
false
yamahata/tacker
tacker/vm/mgmt_drivers/rpc/config.py
1
1186
# Copyright 2014 Intel Corporation. # Copyright 2014 Isaku Yamahata <isaku.yamahata at intel com> # <isaku.yamahata at gmail com> # All Rights Reserved. # # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the Lic...
apache-2.0
6,103,485,419,263,715,000
33.882353
78
0.697302
false
3.694704
false
false
false
marek-sezemsky/coreemu
daemon/core/bsd/vnet.py
11
7610
# # CORE # Copyright (c)2010-2012 the Boeing Company. # See the LICENSE file included in this distribution. # # authors: core-dev@pf.itd.nrl.navy.mil # ''' vnet.py: NetgraphNet and NetgraphPipeNet classes that implement virtual networks using the FreeBSD Netgraph subsystem. ''' import sys, threading from core.misc.ut...
bsd-2-clause
4,300,772,825,553,059,000
34.231481
80
0.537714
false
3.824121
false
false
false
harry0519/nsnqt
updatedb.py
1
7730
# -*- coding:utf-8 -*- import sys import time import os from time import clock from datetime import datetime,date,timedelta import logging from multiprocessing import Process import threading, multiprocessing from nsnqtlib.servers import serverlist from nsnqtlib.db import mongodb from nsnqtlib.utils import WindQuote ...
bsd-2-clause
-1,010,820,219,235,462,900
34.990244
150
0.659393
false
2.825737
false
false
false
etingof/pyasn1-modules
tests/test_rfc2634.py
2
8496
# # This file is part of pyasn1-modules software. # # Created by Russ Housley # Copyright (c) 2019, Vigil Security, LLC # License: http://snmplabs.com/pyasn1/license.html # import sys import unittest from pyasn1.codec.der.decoder import decode as der_decoder from pyasn1.codec.der.encoder import encode as der_encoder ...
bsd-2-clause
5,511,536,792,069,498,000
43.481675
89
0.784251
false
2.229921
true
false
false
stripe/stripe-python
tests/api_resources/test_charge.py
1
3795
from __future__ import absolute_import, division, print_function import stripe TEST_RESOURCE_ID = "ch_123" class TestCharge(object): def test_is_listable(self, request_mock): resources = stripe.Charge.list() request_mock.assert_requested("get", "/v1/charges") assert isinstance(resources...
mit
-2,756,975,618,088,878,600
35.490385
64
0.617391
false
3.659595
true
false
false
kaleissin/django-multipageforms
src/multipageforms/forms/multipageform.py
1
4549
from __future__ import unicode_literals from collections import OrderedDict import logging import copy LOGGER = logging.getLogger(__name__) class MultiPageForm(object): help_text = '' percentage_done = 0.0 def __init__(self, data=None, files=None, initial=None, **kwargs): self.initial = initial ...
mit
7,365,588,873,816,192,000
30.372414
83
0.572653
false
4.087152
false
false
false
spiffytech/npcworld
lib/utils.py
1
1436
from __future__ import division from collections import namedtuple from functools import partial from dogpile.cache import make_region dpc = make_region().configure('dogpile.cache.memory') import logging logging.basicConfig(level=logging.DEBUG) for handler in logging.root.handlers: # This makes sure we only show pdi...
gpl-3.0
1,541,730,345,965,494,500
40.028571
190
0.715877
false
3.468599
false
false
false
poetix/twentyfortyeight
twentyfortyeight.py
1
3017
import random def memoize(f): cache = {} def memoized(*arg): if arg in cache: return cache[arg] result = f(*arg) cache[arg] = result return result return memoized PADDING = (0, 0, 0, 0) def non_empty(row): return tuple(cell for cell in row if cell>0) def _crunch(row): if len(row)<=1:...
mit
-3,113,840,423,569,721,300
22.944444
74
0.651641
false
2.937683
false
false
false
jcmgray/quijy
quimb/tensor/tensor_approx_spectral.py
1
1751
"""Approximating spectral functions with tensor networks. """ import numpy as np import random import quimb as qu from .tensor_gen import MPO_rand, MPO_zeros_like def construct_lanczos_tridiag_MPO(A, K, v0=None, initial_bond_dim=None, beta_tol=1e-6, max_bond=None, seed=False, ...
mit
-2,138,345,272,080,495,600
28.183333
79
0.513421
false
2.947811
false
false
false
scwuaptx/CTF
2015-writeup/ais3-final/phddb.py
1
1930
#!/usr/bin/env python # -*- coding: utf-8 -*- from pwnpwnpwn import * import re #host = "10.211.55.20" #port = 8888 host = "final.ais3.org" port = 3333 sock = make_conn(host,port) atoi_got = 0x804b03c #atoi_off = 0x31860 atoi_off = 0x31560 #sys_off = 0x40190 sys_off = 0x3fcd0 def addphd(sock,name,age,thesis,size...
gpl-2.0
-3,525,525,465,577,358,000
21.44186
46
0.632124
false
2.590604
false
false
false
TissueMAPS/TmLibrary
tmlib/models/channel.py
1
27973
# TmLibrary - TissueMAPS library for distibuted image analysis routines. # Copyright (C) 2016 Markus D. Herrmann, University of Zurich and Robin Hafen # # 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 Softwa...
agpl-3.0
-6,604,104,591,148,633,000
36.598118
80
0.59729
false
4.287707
false
false
false
hakanozadam/bal
bal/genomic_io/functions.py
1
4143
# AUTHORS: # Hakan Ozadam # Rachel Brown # # Moore Laboratory # UMASS Medical School / HHMI # RNA Therapeutics Institute # Albert Sherman Center, ASC4-1009 # 368 Plantation Street # Worcester, MA 01605 # USA # ##############################################...
gpl-2.0
9,218,601,945,451,557,000
35.663717
118
0.593531
false
3.773224
false
false
false
Jmainguy/pyHackpySlash
combat.py
1
2437
#!/usr/bin/python import sys import dice import equip playerdex = equip.dex("jon.ini") enemydex = equip.dex("goblin.ini") if (playerdex >= enemydex): t1 = "jon.ini" t2 = "goblin.ini" else: t1 = "goblin.ini" t2 = "jon.ini" # Names of our heros t1name = equip.name(t1) t2name = equip.name(t2) #What is each combatants...
bsd-3-clause
6,398,387,931,936,058,000
31.932432
78
0.537136
false
2.929087
false
false
false
palankai/xadrpy
src/xadrpy/contrib/pages/templatetags/pages_tags.py
1
1132
from django.template.loader import render_to_string from xadrpy.core.router.models import Route from django.core.urlresolvers import resolve from xadrpy.core.templates.base import WidgetLibrary register = WidgetLibrary() @register.simple_tag(takes_context=True) def menu(context, parent=None, template="xadrpy/pages/m...
lgpl-3.0
-9,210,811,719,192,840,000
38.034483
96
0.671378
false
3.930556
false
false
false
whitmo/loadwarrior
loadwarrior/locustext.py
1
1462
from . import pypath from contextlib import contextmanager from logging import getLogger from path import path import os import yaml from . import utils logger = getLogger(__name__) def candidates(filename, userland='etc/loadwarrior'): """ A generator of possible pathes for a file to exist in config """ ...
bsd-2-clause
-5,146,321,326,914,198,000
25.581818
80
0.632011
false
4.095238
false
false
false
fake-name/ChromeController
ChromeController/__main__.py
1
3682
import logging import sys import click from .Generator import gen from . import chrome_context @click.group() @click.option('--verbose', '-v', is_flag=True, help=''' The opposite of silent. Causes the internal logging to output \ all traffic over the chromium control interface. VERY noisy.''') @click.option('--s...
bsd-3-clause
-7,874,988,140,492,672,000
31.875
143
0.708582
false
3.624016
false
false
false
michaelpacer/scikit-image
skimage/io/_plugins/matplotlib_plugin.py
16
4961
from collections import namedtuple import numpy as np import warnings import matplotlib.pyplot as plt from ...util import dtype as dtypes from ...exposure import is_low_contrast from ...util.colormap import viridis _default_colormap = 'gray' _nonstandard_colormap = viridis _diverging_colormap = 'RdBu' ImagePropertie...
bsd-3-clause
-3,115,570,919,576,506,000
30.00625
72
0.621649
false
4.046493
false
false
false
jason-callaway/ssg-el7-kickstart
config/hardening/menu.py
1
49781
#!/usr/bin/python # Graphical Kickstart Script # # This script was written by Frank Caviggia, Red Hat Consulting # Last update was 06 July 2015 # This script is NOT SUPPORTED by Red Hat Global Support Services. # Please contact Rick Tavares for more information. # # Author: Frank Caviggia (fcaviggi@redhat.com) # Copyri...
apache-2.0
6,878,870,942,228,947,000
42.744288
560
0.615797
false
3.038948
true
false
false
project-ncl/repour
test/test_pme_provider.py
1
1471
# flake8: noqa import json import unittest import repour.adjust.pme_provider as pme_provider class TestPMEProvider(unittest.TestCase): def test_parse_pme_result_manipulation_format(self): group_id = "org.apache.activemq" artifact_id = "artemis-pom" version = "2.6.3.redhat-00021" ...
apache-2.0
-4,516,597,712,546,872,300
31.688889
78
0.620666
false
3.860892
false
false
false
zojoncj/cleanthehead
nsnitro/nsresources/nscsvserverrewritepolicybinding.py
1
8110
from nsbaseresource import NSBaseResource __author__ = 'vlazarenko' class NSCSVServerRewritePolicyBinding(NSBaseResource): def __init__(self, json_data=None): """ Supplied with json_data the object can be pre-filled """ super(NSCSVServerRewriteP...
apache-2.0
4,442,475,959,604,288,500
37.440758
143
0.522565
false
5.273082
false
false
false
flyhigher139/mayblog
blog/main/feeds.py
1
3135
from django.contrib.syndication.views import Feed from django.core.urlresolvers import reverse from django.utils.feedgenerator import Atom1Feed from django.shortcuts import get_object_or_404 from django.conf import settings from .models import Post, BlogMeta from .views import get_site_meta # def get_site_meta(): # ...
gpl-2.0
-4,374,410,210,246,678,500
25.133333
86
0.600319
false
3.286164
false
false
false
LifeDJIK/S.H.I.V.A.
containers/shiva/hazelcast/protocol/codec/map_clear_near_cache_codec.py
2
1031
from hazelcast.serialization.bits import * from hazelcast.protocol.client_message import ClientMessage from hazelcast.protocol.custom_codec import * from hazelcast.util import ImmutableLazyDataList from hazelcast.protocol.codec.map_message_type import * REQUEST_TYPE = MAP_CLEARNEARCACHE RESPONSE_TYPE = 100 RETRYABLE =...
mit
7,985,061,223,323,927,000
29.323529
81
0.758487
false
3.708633
false
false
false
XianliangJ/collections
CNUpdates/updates/examples/loadwild/loadbalancer/lbtest/EvalRules.py
1
2683
# ========================================== # Author: Richard Wang # Contact: rwthree@princeton.edu # # 1. Parses Alpha File # 2. Determine Wildcard Rules # ========================================== import Alphas import Bins import Globals import IPRules import IPTransition # DELETE LATER TODO #class EvalRules: ...
gpl-3.0
-4,368,868,583,604,303,400
37.328571
157
0.714499
false
3.119767
false
false
false
shiyifuchen/PyFem
pyfem/pyfem/materials/BaseMaterial.py
1
1242
# -*- coding: utf-8 -*- class BaseMaterial: def __init__ ( self, props ): for name,val in props: setattr( self, name, val ) self.initHistory={} self.current = [] self.iIter = -1 def setIter( self, iIter ): self.iIter = iIter def setHistoryParameter( self , name , val ): if ...
gpl-3.0
4,633,500,720,779,759,000
20.714286
63
0.587993
false
3.396648
false
false
false
bioinformatics-ua/catalogue
emif/population_characteristics/services.py
2
8764
# -*- coding: utf-8 -*- # Copyright (C) 2014 Universidade de Aveiro, DETI/IEETA, Bioinformatics Group - http://bioinformatics.ua.pt/ # # 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
-5,634,071,502,088,468,000
31.220588
116
0.557964
false
3.828746
false
false
false
bzamecnik/ml-playground
instrument-classification/predict.py
2
4699
""" Allows to classify musical instrument families from audio clips using a trained model. Input: - audio clip (WAV/FLAC), 2sec, 44100 Hz sampling rate, mono - model files (architecture, weights) Ouput: instrument family [brass, guitar, organ, piano, pipe, reed, strings] """ import argparse import keras from keras.ut...
mit
-1,660,746,019,013,068,300
33.807407
99
0.591615
false
3.845336
false
false
false
RLesser/NetworkScraper
countyGraph.py
1
1422
#!/usr/bin/python from networkScrape import NetworkScraper class CountyGraph(NetworkScraper): """docstring for CountyGraph""" def __init__(self): super(CountyGraph, self).__init__() def getCountyData(self): if not hasattr(self, 'countyDict'): with open("county_adjacency.txt", "rb") as f: self.countyD...
mit
-4,879,712,124,356,013,000
33.682927
89
0.644866
false
2.844
false
false
false
DonaldMcRonald/SketchRecognitionWithTensorFlow
src/main/python/proto_decoder/proto_handler.py
1
2623
from generated_proto import pythonRecognitionService_pb2 as rec_proto import recognition.recognition_manager from generated_proto import sketch_pb2 as Sketch from gui import plotter import os rec = recognition.recognition_manager.Recognition_manager() rec.initialize() def generate_shapes(recognition_template...
mit
4,759,070,666,168,945,000
34.430556
106
0.706443
false
3.938438
false
false
false
raviqqe/lambda_calculus
lambda.py
1
10177
#!/usr/bin/env python import abc import functools import sys import unicodedata import argparse # constants PUNCTUATIONS = {"\\", ".", "(", ")"} DEBUG = False # classes ## error class Error: def __init__(self, pos, message, raw_message=False): if not raw_message: self.__message = self.__format_mes...
unlicense
1,155,554,406,408,134,700
26.806011
79
0.610789
false
3.955305
false
false
false
nightstrike/blender_nif_plugin
io_scene_nif/constraintsys/constraint_import.py
1
16689
'''Script to import/export constraints.''' # ***** BEGIN LICENSE BLOCK ***** # # Copyright © 2005-2015, NIF File Format Library and Tools contributors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # ...
bsd-3-clause
4,240,562,050,444,374,500
44.846154
148
0.555429
false
3.984718
false
false
false
lightsighter/CudaDMA
src/tests/test_strided/param_sweep_v2.py
2
3280
import sys import os import random import math import subprocess MAX_ELMT_SIZE=8192 # in floats MAX_NUM_ELMTS=32 MAX_DMA_WARPS=16 def run_experiment(test_k20,alignment,offset,register_bytes,elem_size,num_elmts,dma_warps): f = open("params_directed.h",'w') f.write("#define PARAM_ALIGNMENT "+str(alignment)+"\...
apache-2.0
1,177,472,053,272,156,000
34.652174
185
0.60061
false
2.954955
true
false
false
schimar/hts_tools
exclude_short_seqs.py
2
1260
#! /usr/bin/python # # This script reads a fasta file (the vsearch output with centroids) and writes a new file where all the sequences with less than 70 reads have been discarded. # Usage: ./exclude_short_seqs.py <input-file_name.fasta> <new_file_name.fasta> import sys #import re import shutil #import tempfile n...
gpl-2.0
-2,380,414,558,038,514,700
30.5
160
0.480952
false
4.07767
false
false
false
se4u/mvlsa
tex/tab_comparison.py
1
1657
s = """70.4 & 73.9 & 76.0 & 71.4 & 71.2 & -0.2 & 75.8 28.1 & 32.9 & 37.2 & 29.0 & 41.7 & \ma{12.7} & 40.5 54.1 & 65.6 & 60.7 & 61.8 & 67.3 & \ma{5.5} & 66.4 33.7 & 36.7 & 41.1 & 34.5 & 42.4 & \ma{7.9} & 43.9 ...
mit
629,537,911,881,055,600
47.735294
83
0.346409
false
2.157552
false
false
false
JazzeYoung/VeryDeepAutoEncoder
theano/gpuarray/subtensor.py
1
34990
from __future__ import absolute_import, print_function, division import os import numpy from six import integer_types from six.moves import StringIO from theano import tensor, gof, Op from theano.tensor.subtensor import IncSubtensor, Subtensor, get_idx_list try: import pygpu from pygpu import gpuarray excep...
bsd-3-clause
7,590,098,923,061,775,000
35.184074
123
0.481738
false
3.549041
false
false
false
koebbe/django-commoncore
commoncore/serializers.py
1
3576
from rest_framework import serializers from commoncore import models class DomainTypeSerializer(serializers.HyperlinkedModelSerializer): #strands = serializers.HyperlinkedRelatedField(many=True,view_name='commoncore:api:strand-detail') class Meta: model = models.DomainType view_name = 'commonc...
mit
1,048,014,346,650,756,100
42.084337
111
0.731544
false
4.119816
false
false
false
hsuchie4/TACTIC
src/tactic/ui/table/sobject_detail_wdg.py
4
5391
########################################################### # # Copyright (c) 2005-2008, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written ...
epl-1.0
2,895,060,008,603,521,500
26.646154
75
0.528844
false
3.622984
false
false
false
lshain-android-source/external-chromium_org
tools/telemetry/telemetry/core/temporary_http_server.py
31
1835
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import socket import subprocess import sys import urlparse from telemetry.core import util class TemporaryHTTPServer(object): def __init__(s...
bsd-3-clause
-1,645,007,324,313,799,700
25.594203
79
0.649591
false
3.692153
false
false
false
stackforge/refstack
refstack/db/migrations/alembic/versions/319ee8fe47c7_create_group_table.py
2
1690
"""Create group table and group-user links table. Revision ID: 319ee8fe47c7 Revises: 428e5aef5534 Create Date: 2016-01-15 16:34:00 """ # revision identifiers, used by Alembic. revision = '319ee8fe47c7' down_revision = '428e5aef5534' MYSQL_CHARSET = 'utf8' from alembic import op import sqlalchemy as sa def upgrade...
apache-2.0
8,677,085,467,242,310,000
31.5
76
0.621302
false
3.421053
false
false
false
uptown/django-town
django_town/oauth2/endpoint/authorizationendpoint.py
1
2456
#-*- coding: utf-8 -*- from .endpoint import Endpoint from ..errors import InvalidRequestError, UnauthorizedClientError from django_town.utils import add_params_to_url from django_town.utils import generate_random_from_vschar_set from django_town.core.settings import OAUTH2_SETTINGS class AuthorizationEndpoint(Endp...
mit
1,190,381,357,667,231,700
39.933333
118
0.625
false
4.227194
false
false
false
astra-toolbox/astra-toolbox
samples/python/s005_3d_geometry.py
3
3311
# ----------------------------------------------------------------------- # Copyright: 2010-2018, imec Vision Lab, University of Antwerp # 2013-2018, CWI, Amsterdam # # Contact: astra@astra-toolbox.com # Website: http://www.astra-toolbox.com/ # # This file is part of the ASTRA Toolbox. # # # The ASTRA Toolbo...
gpl-3.0
4,067,885,913,832,156,000
27.299145
80
0.647236
false
3.085741
false
false
false
EinfInPython-SS2017-LaJuTo/AbschlussProjekt
src/tower/Bullet.py
1
1405
import pygame as pg from lib.Vector import Vector class Bullet: # attributes: # radius # image # pos # vel # target # hitpoints # alive def __init__(self,pos,target,hitpoints ,image_bullet): self.radius = 7 self.image = i...
mit
-508,112,278,001,476,300
30.954545
97
0.553025
false
3.630491
false
false
false
JT5D/Alfred-Popclip-Sublime
Sublime Text 2/Github Tools/github.py
2
3138
import sublime, sublime_plugin from xml.dom.minidom import parseString import re, os from functools import wraps class NotAGitRepositoryError(Exception): pass class NotAGithubRepositoryError(Exception): pass class NoFileOpenError(Exception): pass class GitRepo: def __init__(self, path): self.path = path...
gpl-2.0
-776,248,135,546,125,600
28.603774
101
0.683556
false
3.498328
false
false
false
oudalab/phyllo
phyllo/extractors/seduliusDB.py
1
6143
import sqlite3 import urllib import re from urllib.request import urlopen from bs4 import BeautifulSoup from phyllo.phyllo_logger import logger # mostly finished, except for a problem w line numbers in the last poem def getBooks(soup): siteURL = 'http://www.thelatinlibrary.com' textsURL = [] # get links t...
apache-2.0
-1,014,427,152,466,564,900
38.88961
115
0.435129
false
4.758327
false
false
false
Christoph/tag-connect
brushing/create_sensitivity.py
1
1467
import pandas as pd import numpy as np import codecs, json data = [] for i in range(0, 1000): element = {} temp = [] p1 = [10, 20] p2 = [50, 60] p3 = [80, 70] temp.append({"t": 0, "out": i}) temp.append({"t": 1, "out": i}) temp.append({"t": 2, "out": i}) element["data"] = temp ...
mit
-7,436,616,654,047,204,000
25.672727
111
0.486026
false
2.667273
false
false
false
pombreda/pyfilesystem-4
fs/expose/wsgi/dirtemplate.py
14
1149
template = """ <html> <head> <title>${path}</title> <style type="text/css"> body { font-family:Arial, Verdana; margin:0px; padding:0px; } table.dirlist { margin:0 auto; font-size:13px; color:#666; } table.dirlist tr.r1 { background-color:#f4f4f4; } table.dirlist td { padding...
bsd-3-clause
-35,848,807,626,054,864
12.690476
100
0.527415
false
2.79562
false
false
false
bitborn/luther
luther/nfa.py
1
3145
from luther.collections import State, Stack, Transition from luther.exceptions import InvalidTransition from luther.dfa import DFA class NFA(): """ Creates a Non-deterministic Finite Automata based on a regular expression. """ def __init__(self): self.start = None self.end = None ...
mit
9,064,773,884,989,051,000
21.789855
67
0.502385
false
4.604685
false
false
false
oddeyeco/oe-agent2
checks_available/check_kube_state_metrics.py
1
1779
import lib.record_rate import lib.commonclient import lib.getconfig import lib.puylogger import lib.basecheck import re metrics = lib.getconfig.getparam('kube-state-metrics', 'metrics') podstats = lib.getconfig.getparam('kube-state-metrics', 'podinfo') check_type = 'kube-state-metrics' greps = ['kube_deployment_status...
apache-2.0
7,990,728,432,479,999,000
48.416667
184
0.587409
false
3.572289
false
false
false
jeanpm/pof
problems/knapsack.py
1
3728
# -*- coding: utf-8 -*- """ Created on Thu Jun 25 16:01:39 2015 @author: jean """ import numpy as np import random from pof import Solution class Knapsack(object): def __init__(self, instance_file, search_space): with open(instance_file) as f: self.N = int(next(f)) self.pr...
gpl-2.0
-1,744,740,899,697,936,600
34.169811
91
0.565987
false
3.758065
false
false
false
jpopham91/berserker
berserker/estimators/meta.py
1
1349
__author__ = 'jake' from sklearn.base import BaseEstimator import numpy as np class Averager(BaseEstimator): """ Simple meta-estimator which averages predictions May use any of the pythagorean means """ class StepwiseRegressor(Averager): """ An averager which iteratively adds predictions whi...
mit
8,232,686,877,373,087,000
29.681818
104
0.630096
false
3.513021
false
false
false
PanDAWMS/panda-harvester
pandaharvester/harvestertest/read_shared_file_messenger_files.py
2
2886
#!/bin/env python import json import os import re import os.path import tarfile import fnmatch import sys from pprint import pprint from pandaharvester.harvestercore.queue_config_mapper import QueueConfigMapper from pandaharvester.harvestercore.plugin_factory import PluginFactory from pandaharvester.harvestercore.plug...
apache-2.0
-3,561,476,124,490,086,400
35.075
84
0.7921
false
3.9
true
false
false
mdmintz/SeleniumBase
seleniumbase/fixtures/shared_utils.py
1
2881
""" This module contains shared utility methods. """ import time from selenium.webdriver.remote.errorhandler import ElementNotVisibleException from selenium.webdriver.remote.errorhandler import NoSuchElementException from selenium.webdriver.remote.errorhandler import NoAlertPresentException from selenium.webdriver.remo...
mit
5,747,092,097,276,207,000
35.468354
77
0.684137
false
4.6096
true
false
false
skavulya/spark-tk
regression-tests/sparktkregtests/testcases/frames/udf_remote_test.py
11
4349
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel 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 # # Unless require...
apache-2.0
3,581,948,279,095,588,000
39.67619
106
0.606649
false
3.461102
true
false
false
Zulban/stuart-spence-website
app/static/scripts/twitter_wizard_nokeys.py
1
4077
""" Twitter Wizard Automatic posts to twitter. <filename> is list of posts separated by newline. <interval> is how many hours to wait between each tweet. Usage: twitter_wizard.py start <filename> <interval> [options] twitter_wizard.py validate <filename> [options] Options: -h --help Show this screen. -...
gpl-2.0
5,193,498,691,532,208,000
25.822368
114
0.620309
false
3.514655
false
false
false
jbruestle/flock
flock/schema.py
1
6424
#!/usr/bin/python # pylint: disable=missing-docstring # pylint: disable=bad-continuation # pylint: disable=too-many-arguments import logging import traceback import struct import simplejson as json import re from flock import record logger = logging.getLogger('schema') # pylint: disable=invalid-name class Schema(ob...
mit
3,142,605,979,453,224,000
38.170732
94
0.53736
false
4.12059
false
false
false
dr-bigfatnoob/effort
datasets/albrecht.py
1
1090
from __future__ import print_function, division import sys import os sys.path.append(os.path.abspath(".")) sys.dont_write_bytecode = True from dataset import Dataset, Meta, read_csv class Albrecht(Dataset): def __init__(self): Dataset.__init__(self, data=Albrecht.data(), dec_meta=Albrecht....
mit
-8,512,219,938,468,049,000
35.333333
90
0.630275
false
3.132184
false
false
false
cloudwatt/contrail-controller
src/config/svc-monitor/svc_monitor/db.py
2
6019
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # """ Service monitor DB to store VM, SI information """ import pycassa from pycassa.system_manager import * from pysandesh.gen_py.process_info.ttypes import ConnectionStatus import inspect import time cla...
apache-2.0
2,711,781,465,369,490,000
31.89071
77
0.533145
false
4.061404
false
false
false
tropp/acq4
tools/generateChangelog.py
4
1919
from subprocess import check_output import re, time def run(cmd): return check_output(cmd, shell=True) tags = run('bzr tags') versions = [] for tag in tags.split('\n'): if tag.strip() == '': continue ver, rev = re.split(r'\s+', tag) if ver.startswith('acq4-'): versions.append(ver) fo...
mit
7,894,017,564,486,831,000
28.075758
131
0.498697
false
3.20903
false
false
false
michaelbrunnbauer/rdf2rdb
app.py
1
13599
from dbschema import dbschema from rdfschema import rdfschema from log import log import database import rdflib import pickle import settings import sys,os import _mysql_exceptions version=0.53 rdfns=settings.rdfns rdfsns=settings.rdfsns owlns=settings.owlns def init(conf): global dbs,rdfs,db,dblabels try: ...
gpl-2.0
5,828,418,277,220,349,000
43.009709
139
0.639826
false
3.688365
false
false
false
jobovy/galpy
galpy/orbit/Orbits.py
1
210797
from six import raise_from from past.builtins import basestring import os import sys _PY3= sys.version > '3' import json import copy import string from functools import wraps from random import choice from string import ascii_lowercase from pkg_resources import parse_version import warnings import numpy from scipy impo...
bsd-3-clause
-9,125,740,657,710,567,000
34.892559
660
0.524438
false
3.757991
false
false
false
CGenie/qwertyui
qwertyui/odoo/__init__.py
1
4208
import datetime import os import requests from requests_toolbelt.multipart.encoder import MultipartEncoder import tempfile import zipfile from qwertyui import urlparse def get_jsonrpc_result(j): if 'error' in j: raise Exception(j['error']) return j['result'] def get_odoo_version(host, **kwargs): ...
mit
-3,636,993,926,005,778,000
24.047619
98
0.535171
false
3.825455
false
false
false
jhcepas/npr
doc/conf.py
1
6820
# -*- coding: utf-8 -*- # # Environment for Tree Exploration documentation build configuration file, created by # sphinx-quickstart on Mon Oct 25 14:49:11 2010. # # 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 # au...
gpl-3.0
-3,163,869,786,586,247,700
31.626794
105
0.712128
false
3.705978
true
false
false
limited/LaundryWatcher
main.py
1
2422
#!/usr/bin/env python from flask import Flask, render_template from flask_bootstrap import Bootstrap from ApplianceStatus import Appliance, ApplianceStub from functools import partial import logging import json import sys stdOutLogHandler = logging.StreamHandler(sys.stderr) stdOutLogHandler.setLevel(logging....
apache-2.0
-106,797,580,489,714,820
28.180723
73
0.5545
false
4.063758
false
false
false
rsepassi/tensor2tensor
tensor2tensor/data_generators/imdb.py
1
3062
# coding=utf-8 # Copyright 2018 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
apache-2.0
84,219,502,428,120,300
29.316832
80
0.672763
false
3.702539
false
false
false
ivesbai/mediadrop
mediadrop/lib/storage/localfiles.py
10
4375
# This file is a part of MediaDrop (http://www.mediadrop.net), # Copyright 2009-2015 MediaDrop contributors # For the exact contribution history, see the git revision log. # The source code contained in this file is licensed under the GPLv3 or # (at your option) any later version. # See LICENSE.txt in the main project ...
gpl-3.0
1,683,665,100,857,348,000
35.764706
94
0.647771
false
3.878546
false
false
false
briefguo/learn-js
server/app.py
1
1114
# -*- coding:utf-8 -*- import json import urllib2 from flask import Flask from flask import make_response from flask import render_template from dataSource.spiders.github_trend import GitHubTrend app = Flask(__name__) def toResponse(res): response = make_response(res) response.headers['Access-Control-Allow-...
bsd-2-clause
-5,197,819,708,891,238,000
24.318182
78
0.680431
false
3.325373
false
false
false
dsp-jetpack/JetPack
src/deploy/osp_deployer/powerflexgw.py
1
9363
#!/usr/bin/env python3 # Copyright (c) 2021 Dell Inc. or its subsidiaries. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
apache-2.0
-2,641,553,296,441,594,000
35.717647
108
0.527395
false
3.75421
false
false
false
bilke/OpenSG-1.8
SConsLocal/scons-local-0.96.1/SCons/Sig/__init__.py
2
2419
"""SCons.Sig The Signature package for the scons software construction utility. """ # # Copyright (c) 2001, 2002, 2003, 2004 The SCons Foundation # # 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 S...
lgpl-2.1
3,170,517,548,650,047,500
34.057971
124
0.723439
false
4.106961
false
false
false
dgouldin/django-socialite
socialite/apps/base/oauth20/decorators.py
1
3441
from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME, authenticate as django_authenticate, login as django_login from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseRedirect from django.t...
mit
-58,077,103,986,966,810
48.157143
117
0.679744
false
4.227273
false
false
false
jon-stewart/mud
mudlib/world.py
1
1329
from threading import Thread from mudlib.location import Location from driver import database class World(Thread): def __init__(self): Thread.__init__(self, name="world") # name:Character self.characters = set() # location_id:Location self.locale = {} def run(sel...
mit
8,797,230,328,500,162,000
21.913793
64
0.539503
false
4.179245
false
false
false
michal-stuglik/tgm
consensus_and_clean.py
1
3946
import os import sys import time from Bio import SeqIO from optparse import OptionParser formats = ['fastq', 'fasta', 'fa', 'fas'] class AlignParseObject: def __init__(self, position): self.position = position self.nucl_dic = {"A": 0, "C": 0, "T": 0, "G": 0} def add_nucl(self, nucl): ...
gpl-2.0
-6,261,137,881,111,898,000
30.568
133
0.558287
false
3.558161
false
false
false
gurneyalex/odoo
addons/google_drive/models/google_drive.py
4
11473
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import ast import logging import json import re import requests import werkzeug.urls from odoo import api, fields, models from odoo.exceptions import RedirectWarning, UserError from odoo.tools.translate import _ from ...
agpl-3.0
-3,726,899,315,521,672,000
48.882609
201
0.609692
false
3.958937
true
false
false
AberDerBart/senseHatClock
Menu.py
1
1045
#!/usr/bin/python import Ui class Menu: def __init__(self,imgPath=None,leftAction=None,rightAction=None,upAction=None,downAction=None,middleAction=None): if(imgPath): self.img=Ui.sense.load_image(imgPath) else: self.img=None self.leftAction=leftAction self.rightAction=rightAction self.upAction=upActio...
gpl-3.0
-5,370,994,839,404,027,000
26.5
114
0.730144
false
2.816712
false
false
false
jpwhite3/wilmu-linux-toolkit
lab_toolkit/labs/lab3.py
1
3190
from __future__ import division, print_function, unicode_literals from .. import unittest, utils import sys, os class LabTestSuite(unittest.TestCase): longMessage = True def setup(self): """No setup required for now""" pass def tearDown(self): """No setup, so nothing to tear dow...
mit
-143,752,427,980,422,340
45.246377
132
0.648903
false
3.649886
true
false
false
brynmathias/rootpy
rootpy/root2tables.py
1
3978
""" This module handles conversion of ROOT's TFile and contained TTrees into HDF5 format with PyTables Also see scripts/root2hd5 """ import sys import os import traceback import numpy import tables import ROOT from .progressbar import * from .io import open as ropen, utils from .tree import Tree def convert(rfile, h...
gpl-3.0
-2,273,700,990,133,071,000
38
119
0.513575
false
4.323913
false
false
false
blouargant/Deep_Painting
neural_style.py
1
5356
#!/usr/bin/python -u # Copyright (c) 2015-2016 Anish Athalye. Released under GPLv3. import os import numpy as np import scipy.misc from stylize import stylize import math from argparse import ArgumentParser # default arguments CONTENT_WEIGHT = 5e0 STYLE_WEIGHT = 1e2 TV_WEIGHT = 1e2 LEARNING_RATE = 1e1 STYLE_SCALE ...
gpl-3.0
-2,879,822,518,361,644,000
32.267081
95
0.713779
false
3.230398
false
false
false
tensorflow/data-validation
tensorflow_data_validation/utils/vocab_util_test.py
1
1669
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-5,176,757,207,054,709,000
32.38
74
0.694428
false
3.604752
true
false
false
gklyne/annalist
src/annalist_root/annalist/views/fields/render_base.py
1
1335
from __future__ import unicode_literals from __future__ import absolute_import, division, print_function """ Base class for renderers """ __author__ = "Graham Klyne (GK@ACM.ORG)" __copyright__ = "Copyright 2014, G. Klyne" __license__ = "MIT (http://opensource.org/licenses/MIT)" import logging log = loggin...
mit
8,907,690,016,490,575,000
24.188679
86
0.594007
false
4.107692
false
false
false
hotzenklotz/pybeerxml
pybeerxml/equipment.py
1
1209
from typing import Any, Optional, Text from pybeerxml.utils import cast_to_bool class Equipment: def __init__(self): self.name: Optional[Text] = None self.version: Optional[Text] = None self.boil_size: Optional[float] = None self.batch_size: Optional[float] = None self.tun_...
mit
-780,448,158,483,371,500
35.636364
54
0.636063
false
3.464183
false
false
false
Winnetou/ManuTironis
unittests/auxilia_test.py
1
1207
import unittest import auxilia class AuxiliaTest(unittest.TestCase): def setUp(self): super(AuxiliaTest, self).setUp() self.pure_greek_word = 'προυπισχνουμένων' self.pure_latin_word = 'mentula' self.mixed_word = 'μeνtula' def test_all_letters_greek(self): result = auxi...
cc0-1.0
2,396,484,470,510,898,000
28
49
0.623213
false
3.387464
true
false
false
h3llrais3r/Auto-Subliminal
tests/providers/test_provider_cache.py
1
1138
# coding=utf-8 import os from subliminal.cache import region from subliminal.cli import MutexLock from autosubliminal.providers.provider_cache import fill_addic7ed_show_id_cache, ADDIC7ED_SEARCH_SHOW_ID_CACHE_PREFIX, \ CUSTOM_ADDIC7ED_SEARCH_SHOW_ID_CACHE_PREFIX def test_fill_addic7ed_show_id_cache(monkeypatch...
gpl-3.0
-7,849,723,470,490,627,000
50.727273
120
0.732865
false
3.05914
false
false
false
PointyShinyBurning/cpgintegrate
cpgintegrate/column_info_frame.py
1
2667
import pandas import json import cpgintegrate class ColumnInfoFrame(pandas.DataFrame): """ pandas DataFrame that also has column metadata, designed to be output as ckan-datastore compliant JSON LIKELY BAD FOR GENERAL USE, only parts I've used in this package have been looked at to see if they work proper...
agpl-3.0
-5,013,660,867,310,679,000
34.56
120
0.592426
false
3.859624
false
false
false
levkar/odoo
odoo/addons/base/tests/test_ir_sequence_date_range.py
24
6317
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import date from odoo.tests.common import SingleTransactionCase from odoo.tools import DEFAULT_SERVER_DATE_FORMAT as DATE_FORMAT class TestIrSequenceDateRangeStandard(SingleTransactionCase): """ A fe...
agpl-3.0
-4,996,433,762,517,440,000
43.485915
168
0.607725
false
3.52708
true
false
false
shaun-h/istaflow
elements/GetClipboardImage.py
1
1132
# coding: utf-8 from ElementBase import ElementBase from ElementParameter import ElementParameter from ElementValue import ElementValue import clipboard class GetClipboardImage(ElementBase): def __init__(self): self.status = 'running' self.output = None self.params = None self.type = 'Standard' self.setup_...
mit
-7,187,677,670,516,585,000
18.517241
61
0.70053
false
3.188732
false
false
false
thequbit/tapir
data/genfiles.py
1
1424
#from xml.dom import minidom from bs4 import BeautifulSoup import simplejson import csv print "Reading input ..." #xmldoc = minidom.parse("timhortons.xml") #markers = xmldoc.getElementsByTagName('markers') with open("timhortons.xml","r") as f: html = f.read() soup = BeautifulSoup(html) #exit() markers = soup.findAl...
gpl-3.0
-4,292,625,685,037,931,500
31.363636
89
0.574438
false
3.651282
false
false
false
Karspexet/Karspexet
karspexet/ticket/migrations/0017_positive_integers_20180322_2056.py
1
1241
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2018-03-22 19:56 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ticket', '0016_add_voucher_note_20180213_2307'), ] op...
mit
9,116,837,983,850,481,000
29.268293
154
0.589847
false
4.700758
false
false
false
foligny/browsershots-psycopg2
shotserver/shotserver04_rm_old_png.py
1
4334
#!/usr/bin/env python # browsershots.org - Test your web design in different browsers # Copyright (C) 2007 Johann C. Rocholl <johann@browsershots.org> # # Browsershots 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 Found...
gpl-3.0
-6,662,130,586,734,937,000
32.083969
73
0.644209
false
3.464428
false
false
false
mantidproject/mantid
Testing/SystemTests/tests/framework/HFIRTestsAPIv2.py
3
44212
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # py...
gpl-3.0
-5,315,560,230,884,147,000
43.748988
116
0.589704
false
2.947074
true
false
false
Wireless-Innovation-Forum/Citizens-Broadband-Radio-Service-Device
CBRS_Mock_SAS_Python_Master/cbrsPython-master/cbrsPython/model/Utils/JsonComparisonUtils.py
1
13239
# Copyright 2017 CBSD Project Authors. 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 applic...
apache-2.0
8,930,878,986,153,155,000
39.861111
140
0.565375
false
4.146257
false
false
false
N-lson/osu-top-modstats
process_scores.py
1
3365
from time import sleep import csv import json import sys import operator import requests from api_key import API_KEY all_mods = { "NF": 1 << 0, "EZ": 1 << 1, # NoVideo "HD": 1 << 3, "HR": 1 << 4, "SD": 1 << 5, "DT": 1 << 6, # Relax "HT": 1 << 8, "NC": (1 << 9) + (1 << 6), ...
mit
4,332,137,821,146,319,000
25.503937
114
0.536999
false
3.292564
false
false
false
klahnakoski/jx-sqlite
vendor/mo_sql/__init__.py
1
5582
# encoding: utf-8 # # # 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/. # from __future__ import absolute_import, division, unicode_literals from mo_dots import is_conta...
mpl-2.0
2,041,508,428,488,177,700
22.552743
75
0.528664
false
3.336521
false
false
false
zenoss/Community-Zenpacks
ZenPacks.community.mib_utils/ZenPacks/community/mib_utils/__init__.py
3
22742
import re import os import sys import urllib import tarfile import zipfile import os.path import tempfile from urllib import quote, unquote from urllib2 import urlopen from urlparse import urljoin, urlsplit from subprocess import * from xml.dom.minidom import parseString from StringIO import StringIO import Globals f...
gpl-2.0
5,430,469,077,875,182,000
28.306701
164
0.597793
false
3.53411
false
false
false
SaintGimp/BeagleBoneHardware
geiger-counter/remote-analysis.py
1
2797
import datetime, numpy, scipy, pandas import matplotlib.pyplot as plt print "Loading data" df = pandas.read_json("/Users/elee/Downloads/geiger.json", orient='records', dtype={'cpm' : 'int64', 'device_time' : 'datetime64[ns]', 'timestamp' : 'datetime64[ns]', 'pressure': 'float64', 'sea_level_pressure': 'float64'}) prin...
mit
-6,752,694,692,140,642,000
26.421569
223
0.644977
false
2.788634
false
false
false
iuridiniz/ekg-cv
src/main.py
1
9365
''' Created on 28/01/2015 @author: Iuri Gomes Diniz The MIT License (MIT) Copyright (c) 2015 Iuri Gomes Diniz 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 with...
mit
813,273,740,549,721,000
31.517361
118
0.585158
false
3.697197
false
false
false
omritoptix/django-ltg-skeleton
ltg_backend_app/api/base.py
1
3562
''' will hold Base model for all of our model resources and globals defenitions Created on April 22, 2014 @author: Yariv Katz & Omri Dagan @version: 1.0 @copyright: LTG ''' #=============================================================================== # begin imports #=============================================...
mit
6,552,781,922,944,385,000
32.933333
117
0.410163
false
5.887603
false
false
false
nanshe-org/nanshe_workflow
nanshe_workflow/vis.py
2
6446
__author__ = "John Kirkham <kirkhamj@janelia.hhmi.org>" __date__ = "$Nov 10, 2015 19:44$" import base64 import io import os import textwrap import webcolors import numpy import scipy import scipy.ndimage from matplotlib.colors import ColorConverter from matplotlib.cm import gist_rainbow import bokeh import bokeh...
apache-2.0
1,638,558,148,450,839,800
27.026087
139
0.541576
false
3.512807
false
false
false
elaeon/dsignature
creacion_firma/management/commands/find_data.py
1
1497
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand from creacion_firma.models import User from creacion_firma.utils import get_files_dir, pdfparser import os #path_pdfs = "/home/agmartinez/Timbrado INMEGEN/TIMBRADO 2016/QNA 05 2016/pdfs/" class Command(BaseCommand): def add_arguments(sel...
gpl-3.0
2,762,461,965,305,429,000
31.543478
80
0.535738
false
3.539007
false
false
false
whitegreyblack/Spaceship
tests/test_item.py
1
3696
import os import sys sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + '/../') from spaceship.menus.make import test_hero from spaceship.strings import stats from spaceship.classes.item import Item, Potion from spaceship.classes.items import itemlist from spaceship.classes.player import Player def test_r...
mit
2,165,411,669,531,464,400
29.303279
83
0.638528
false
3.428571
true
false
false