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
tclim/your
urscript/urscript/comm.py
1
3567
""" comm.py module manages Robot communication using sockets. It contains functions for sending and listening to the robot """ import socket from struct import unpack PORT_DASH = 29999 PORT = 30002 PORT_RT = 30003 def send_script(ur_program, robot_ip) : """Send a script to robot via a socket Arg...
mit
9,156,183,232,854,302,000
32.990196
85
0.626857
false
3.371456
false
false
false
igorgai/django-custom-user
custom_user/models.py
1
4588
"""User models.""" import django from django.contrib.auth.models import ( AbstractBaseUser, BaseUserManager, PermissionsMixin) from django.core.mail import send_mail from django.db import models from django.utils import timezone from django.utils.translation import ugettext_lazy as _ class EmailUserManager(BaseUs...
bsd-3-clause
7,541,121,175,570,798,000
32.985185
78
0.637533
false
4.299906
false
false
false
LevinJ/SSD_tensorflow_VOC
exercise/data_generator.py
1
8416
import tensorflow as tf from datasets import dataset_utils from datasets import flowers import matplotlib.pyplot as plt import tensorflow.contrib.slim as slim from datasets import download_and_convert_flowers import numpy as np from preprocessing import inception_preprocessing flowers_data_dir = '../../data/flower' t...
apache-2.0
5,897,464,082,682,168,000
36.73991
116
0.606702
false
3.887298
false
false
false
gnocchixyz/gnocchi
gnocchi/rest/api.py
1
87732
# -*- encoding: utf-8 -*- # # Copyright © 2016-2018 Red Hat, Inc. # Copyright © 2014-2015 eNovance # # 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/LICE...
apache-2.0
-4,405,489,096,522,094,000
35.578223
94
0.557312
false
4.272807
false
false
false
Royal-Society-of-New-Zealand/NZ-ORCID-Hub
orcid_api_v3/models/employment_v30.py
1
13727
# coding: utf-8 """ ORCID Member No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: Latest Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six fr...
mit
-2,466,509,074,726,212,000
28.394004
276
0.585197
false
3.786759
false
false
false
Agicia/lpod-python
utils.py
1
17649
# -*- coding: UTF-8 -*- # # Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend. # # Authors: David Versmisse <david.versmisse@itaapy.com> # Hervé Cauwelier <herve@itaapy.com> # Romain Gauthier <romain@itaapy.com> # # This file is part of Lpod (see: http://lpod-project.org). # Lpod is free sof...
apache-2.0
-884,333,073,897,304,000
32.808429
78
0.576609
false
3.862552
false
false
false
L33thium/xu4fanctl
xu4fanctl-1/sbin/fanctl.py
1
2490
#!/usr/bin/env python # -*- coding: UTF-8 -*- ########## ## Fan control for odroid xu4 ## when hit hiTmp manage fan speed until hit loTmp then stop. ## steps make fan wants to speed down more than speed up, for silence. ## recommanded governor : conservative ############################ import os, sys, signal, re, tim...
gpl-3.0
5,299,237,560,384,031,000
21.232143
70
0.626908
false
2.49
false
false
false
peterloron/archive
archive.py
1
5459
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Migrates files older than specified date from source to destination. """ import argparse import os import logging import datetime import time import shutil import random from threading import Thread from Queue import Queue parser = argparse.ArgumentParser(description=...
mit
-2,543,240,342,558,028,300
35.885135
108
0.549551
false
4.040711
false
false
false
tanium/pytan
EXAMPLES/PYTAN_API/ask_manual_question_complex_query1.py
1
5859
#!/usr/bin/env python """ Ask a manual question using human strings by referencing the name of a two sensors sensor. Supply 3 parameters for the second sensor, one of which is not a valid parameter (and will be ignored). Supply one option to the second sensor. Supply two question filters that limit the rows returned...
mit
7,895,586,940,574,294,000
42.69403
370
0.731866
false
3.440399
false
false
false
Ricyteach/parmatter
src/parmatter/group/meta.py
1
7243
from ..utilities import args_kwargs_from_args from collections import OrderedDict as od, namedtuple as nt import parse class SpecialAttrsMeta(type): '''A base metaclass that removes special attribute names from the namespace prior to passing them for initialization. Special attributes are designated by the...
bsd-2-clause
441,881,972,316,338,240
51.875912
185
0.619219
false
4.319022
false
false
false
FireBladeNooT/Medusa_1_6
medusa/providers/torrent/html/scc.py
1
7435
# coding=utf-8 # Author: Idan Gutman # Modified by jkaberg, https://github.com/jkaberg for SceneAccess # # This file is part of Medusa. # # Medusa 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...
gpl-3.0
-8,627,801,519,026,012,000
36.550505
101
0.551715
false
4.198193
false
false
false
strus38/WPaaS
wpars/glance.py
1
5431
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Code inspired from Docker and modified to fit our needs # # 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/LIC...
apache-2.0
-8,204,466,227,459,851,000
29.511236
75
0.690112
false
3.14294
false
false
false
csala/zato
code/zato-common/src/zato/common/test/__init__.py
1
11503
# -*- coding: utf-8 -*- """ Copyright (C) 2012 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ from __future__ import absolute_import, division, print_function, unicode_literals # stdlib from datetime import datetime from random import choice, randint from un...
gpl-3.0
-7,934,916,597,127,886,000
32.205202
136
0.61511
false
3.799272
true
false
false
rarmknecht/nlpfun
basic_info.py
1
6347
#!/usr/bin/python2 # Randy Armknecht # 19 Feb 2014 # # Playing around with the Natural Language Processing Toolkit (nltk) # http://www.nltk.org/ # from __future__ import division import sys import nltk from nltk.corpus import cmudict from nltk.corpus import stopwords from pprint import pprint from hyphen import Hyphe...
mit
-6,004,009,814,675,770,000
31.382653
114
0.618245
false
3.202321
false
false
false
by46/recipe
templates/python.lib/{{cookiecutter.project_safe_name}}/setup.py
1
1964
from __future__ import print_function import io import os.path import re from distutils.text_file import TextFile from setuptools import find_packages, setup home = os.path.abspath(os.path.dirname(__file__)) missing = object() def read_description(*files, **kwargs): encoding = kwargs.get('encoding', 'utf-8') ...
mit
-6,274,117,673,014,789,000
29.215385
71
0.6222
false
4.008163
false
false
false
jeffersonfparil/GTWAS_POOL_RADseq_SIM
simulateVAR.py
1
3264
#!/usr/bin/env python import os, sys, math, random import numpy as np from Bio import SeqIO from Bio import Seq work_DIR = sys.argv[1] input_SEQ = sys.argv[2] output_SEQ = sys.argv[3] output_VCF = sys.argv[4] varPerScaf = int(sys.argv[5]) #number of variants per scaffold # #for testing: # work_DIR = "/mnt/SIMULATED/D...
gpl-3.0
9,102,283,531,665,851,000
34.48913
116
0.630208
false
2.452292
false
false
false
edosedgar/xs-pkg
deep_learning/HW2/notmnist.py
1
2059
import os import numpy as np from scipy.misc import imread,imresize from urllib.request import urlretrieve def load_notmnist(path=".", letters='ABCDEFGHIJ', img_shape=(28,28),test_size=0.25,one_hot=False): root = os.path.join(path, "notMNIST_small") # download data if it's missing. If y...
gpl-2.0
1,673,140,495,444,828,200
34.5
99
0.606605
false
3.420266
true
false
false
yobibyte/DeepFried2
DeepFried2/utils.py
1
2973
import DeepFried2 as df import numpy as _np from warnings import warn as _warn from numbers import Number as _Number def create_param_state_as(other, initial_value=0, prefix='state_for_'): return df.th.shared(other.get_value()*0 + initial_value, broadcastable=other.broadcastable, name=prefix + str...
mit
-2,337,813,472,281,590,300
34.392857
152
0.671712
false
3.456977
false
false
false
adael/goldminer
goldminer/draw.py
1
11274
from math import ceil from bearlibterminal import terminal from goldminer import settings, texts, colors from goldminer.actor import Actor from goldminer.inventory import Inventory from goldminer.history import History from goldminer.geom import Rect from goldminer.items import Item from goldminer.worldmap import Tile ...
mit
-7,870,676,331,743,460,000
26.700246
115
0.621873
false
3.122992
false
false
false
igoumiri/pyMST
adhoc/cyleq.py
1
7837
# old16 is to preserve the code that was adding one element to all the # radial arrays in adhoc.py and cyleq.py. # Generic cylindrical equilibrium solutions def zfunc(rho, bz, bq, lam, press): return -lam * bq - press / (bz**2 + bq**2) * bz def qfunc(rho, bz, bq, lam, press): if rho == 0.0: return (...
mit
-1,738,313,170,859,749,000
35.451163
74
0.511803
false
2.62634
false
false
false
ownport/ansiblite
src/ansiblite/playbook/handler.py
1
2018
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible 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) an...
gpl-3.0
-1,476,278,930,421,509,400
35.690909
97
0.701685
false
3.873321
false
false
false
wavelets/GroundHog
groundhog/layers/rec_layers.py
1
34050
""" Recurrent layers. TODO: write more documentation """ __docformat__ = 'restructedtext en' __authors__ = ("Razvan Pascanu " "KyungHyun Cho " "Caglar Gulcehre ") __contact__ = "Razvan Pascanu <r.pascanu@gmail>" import numpy import copy import theano import theano.tensor as TT # Nicer i...
bsd-3-clause
-443,794,965,629,435,000
39.729665
113
0.472041
false
3.732734
false
false
false
mufaddalq/cloudstack-datera-driver
api/test/integration/api/test/account/testCreateAccount.py
1
2136
# 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 # "License"); you may not u...
apache-2.0
2,810,052,616,260,023,300
34.016393
110
0.722378
false
4.076336
true
false
false
lrq3000/pyFileFixity
pyFileFixity/lib/gooey/gui/build_spec_validator.py
1
1627
''' Validates that the json has meaningful keys ''' import itertools a = { 'required' : [ { 'component': 'TextField', 'data': { 'display_name': 'filename', 'help_text': 'path to file you want to process', 'command_args': ['-f', '--infile'] } }, { 'compone...
mit
2,159,226,274,328,498,200
19.594937
98
0.559312
false
3.723112
false
false
false
nblago/utils
src/utils/tns_query.py
1
2954
# -*- coding: utf-8 -*- """ Created on Wed Deb 14 14:21:41 2018 Script to query TNS with different parameters: either for transients discovered between two different dates, or a cone search radius around a given RA, DEC @author: nadiablago """ from __future__ import print_function try: # For Python 3.0 and later ...
mit
9,166,153,378,906,148,000
28.55
143
0.646919
false
3.315376
false
false
false
Letractively/aha-gae
aha/wsgi/appinit.py
1
3932
# -*- coding: utf-8 -*- # appinits.py # Init functions for application __author__ = 'Atsushi Shibata <shibata@webcore.co.jp>' __docformat__ = 'plaintext' __licence__ = 'BSD' __all__ = ['initConfig', 'initPlugins', 'run', 'get_app'] import os import sys import re import logging import wsgiref.handlers def initConf...
bsd-3-clause
-6,219,672,598,750,610,000
26.893617
77
0.591302
false
4.121593
true
false
false
shea256/coinrpc
coinrpc/config.py
1
1552
#!/usr/bin/env python # -*- coding: utf-8 -*- """ coinrpc ~~~~~ :copyright: (c) 2014 by Halfmoon Labs :license: MIT, see LICENSE for more details. """ import os from commontools import log NAMECOIND_ENABLED = True BITCOIND_ENABLED = False DEBUG = True #-------------------------------------------------- if NAM...
mit
-7,431,524,886,803,951,000
24.048387
73
0.67268
false
2.746903
false
false
false
rustychris/stomel
src/equilateral_paver.py
1
5386
# Make a grid with all equilateral triangles # Currently only supports a rectangular domain, constant density, # and either vertical or horizontal orientation import trigrid import numpy as np class EquilateralPaver(trigrid.TriGrid): def __init__(self,L,W,dens,orientation='horizontal',**kwargs): super(Equ...
gpl-2.0
-8,226,103,744,813,507,000
35.890411
93
0.492573
false
3.803672
false
false
false
hugobranquinho/ines
ines/middlewares/gzipper.py
1
3689
# -*- coding: utf-8 -*- from io import BytesIO from gzip import compress as gzip_compress from pyramid.decorator import reify from ines.middlewares import Middleware class Gzip(Middleware): name = 'gzip' def __init__(self, config, application, **settings): super(Gzip, self).__init__(config, applic...
mit
4,223,264,974,435,183,600
32.234234
86
0.564381
false
4.216
false
false
false
marianotepper/csnmf
csnmf/third_party/mrnmf/nmf_process_algorithms.py
1
4252
""" Copyright (c) 2014, Austin R. Benson, David F. Gleich, Purdue University, and Stanford University. All rights reserved. This file is part of MRNMF and is under the BSD 2-Clause License, which can be found at http://opensource.org/licenses/BSD-2-Clause Copyright (c) 2015, Mariano Tepper, Duke ...
bsd-2-clause
8,538,298,718,568,246,000
30.264706
74
0.601834
false
3.39075
false
false
false
timeartist/flask_chutes
flask_chutes/__init__.py
1
3171
from flask_sockets import Sockets from flask import Flask from redis import StrictRedis from json import loads, dumps from multiprocessing import Process from gevent import sleep, Greenlet from geventwebsocket.exceptions import WebSocketError processes = {} def enable_chutes(app, endpoint='/chutes'): ''' Fact...
mit
-6,333,327,705,612,059,000
28.091743
92
0.48029
false
4.754123
false
false
false
LLNL/spack
var/spack/repos/builtin/packages/precice/package.py
2
6339
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Precice(CMakePackage): """preCICE (Precise Code Interaction Coupling Environment) is a ...
lgpl-2.1
-7,378,302,579,113,582,000
41.26
95
0.62218
false
3.015699
false
false
false
fdemian/Morpheus
api/routes/Alerts.py
1
4990
import json from api.model.sessionHelper import get_session from api.model.models import Notification from api.authentication.AuthenticatedHandler import AuthenticatedHandler from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound from tornado.gen import coroutine from api.Utils import authenticated class ...
bsd-2-clause
4,065,950,719,263,779,000
29.426829
118
0.589379
false
4.331597
false
false
false
piotrmaslanka/vanad
interfaces/vanad.py
1
7505
from __future__ import division from socket import socket, AF_INET, SOCK_STREAM from time import time from select import select from struct import pack, unpack from threading import Lock RQT_GET = 0x00 RQT_ASSIGN = 0x01 RQT_DELETE = 0x02 def REQ_to_bytes(request, tablespace, key, value): return pack('!BBLL', re...
gpl-3.0
-2,702,130,170,785,214,500
31.489177
90
0.582678
false
4.320668
false
false
false
fboender/miniorganizer
src/lib/kiwi/db/sqlalch.py
1
6532
## ## Copyright (C) 2007 Async Open Source ## ## This program is free software; you can redistribute it and/or ## modify it under the terms of the GNU Lesser General Public License ## as published by the Free Software Foundation; either version 2 ## of the License, or (at your option) any later version. ## ## This prog...
gpl-3.0
-430,581,801,005,307,300
31.497512
78
0.58068
false
4.467852
false
false
false
celliern/triflow
triflow/core/simulation.py
1
15719
#!/usr/bin/env python # coding=utf8 import inspect import logging import pprint import time import warnings from collections import namedtuple from uuid import uuid1 import pendulum import streamz import tqdm from numpy import isclose from . import schemes from ..plugins.container import TriflowContainer logging.ge...
gpl-3.0
905,709,783,713,381,900
34.888128
79
0.531204
false
4.69364
false
false
false
gencer/sentry
src/sentry/api/endpoints/group_events.py
1
2698
from __future__ import absolute_import import six from sentry import tagstore from sentry.api.base import DocSection, EnvironmentMixin from sentry.api.bases import GroupEndpoint from sentry.api.serializers import serialize from sentry.api.paginator import DateTimePaginator from sentry.models import Environment, Event...
bsd-3-clause
6,260,924,192,562,631,000
31.902439
89
0.588213
false
4.504174
false
false
false
derekjchow/models
research/object_detection/core/target_assigner.py
1
29856
# Copyright 2017 The TensorFlow 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 applica...
apache-2.0
-8,006,630,844,042,189,000
45.796238
80
0.675744
false
4.046077
false
false
false
caihaibin/Blog
handlers/blog.py
1
6084
import datetime import config import PyRSS2Gen from google.appengine.ext import webapp from models import blog import view class IndexHandler(webapp.RequestHandler): def get(self): query = blog.Post.all() query.filter('publish =', True) query.order('-pub_date') template_values = ...
mit
-8,702,056,349,484,685,000
34.372093
117
0.545529
false
4.007905
true
false
false
zoho/books-python-wrappers
books/service/ZohoBooks.py
1
7982
#$Id$# from books.api.ContactsApi import ContactsApi from books.api.ContactPersonsApi import ContactPersonsApi from books.api.EstimatesApi import EstimatesApi from books.api.InvoicesApi import InvoicesApi from books.api.RecurringInvoicesApi import RecurringInvoicesApi from books.api.CreditNotesApi import CreditNotesAp...
mit
-840,055,033,120,695,400
28.562963
98
0.609997
false
4.439377
false
false
false
philtgun/horse
horse-welcome.py
1
1475
#!/usr/bin/env python import RPi.GPIO as GPIO import time import requests def greeting(): "Plays greeting audio via REST API" r = requests.get("http://localhost:3000/playAudio/welcome.mp3"); def decCount(i): if i > 0: i -= 1 T_POLL = 0.5 # sec T_INSIDE_ACTIVE = 20 # sec T_WELCOME_DELAY = 2 # sec T_WELC...
mit
4,151,467,977,349,972,500
21.348485
110
0.661695
false
2.711397
false
false
false
jennywoites/MUSSA
MUSSA_Flask/app/API_Rest/GeneradorPlanCarreras/GeneradorPLE/OptimizadorCodigoPulp.py
1
4966
from app.API_Rest.GeneradorPlanCarreras.Constantes import * MENOR_IGUAL = 0 MAYOR_IGUAL = 1 def obtener_variables_candidatas(parametros): variables_candidatas = {} with open(parametros.nombre_archivo_pulp, 'r') as arch: for linea in arch: linea = linea.rstrip('\n') ecuacion = l...
gpl-3.0
-6,937,123,647,893,344,000
32.106667
90
0.638743
false
2.88051
false
false
false
platformio/platformio-core
platformio/debug/config/blackmagic.py
1
1286
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
apache-2.0
6,271,656,748,231,535,000
25.244898
74
0.734059
false
3.247475
false
false
false
ntt-sic/heat
heat/engine/resources/route_table.py
1
6007
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # 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 applicab...
apache-2.0
-2,251,101,202,301,618,700
30.615789
78
0.575828
false
4.334055
false
false
false
otsaloma/gaupol
gaupol/agents/open.py
1
19435
# -*- coding: utf-8 -*- # Copyright (C) 2005 Osmo Salomaa # # 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 pr...
gpl-3.0
3,600,033,596,375,179,000
45.944444
185
0.639516
false
3.712512
false
false
false
ULHPC/modules
easybuild/easybuild-framework/easybuild/tools/filetools.py
1
38368
# # # Copyright 2009-2015 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (ht...
mit
-7,227,287,605,544,151,000
34.362212
125
0.607225
false
3.771923
false
false
false
awadhn/robotframework-run-keyword-async
runKeywordAsync/runKeywordAsync.py
1
3148
import sys import os import time from robot.libraries.BuiltIn import BuiltIn from robot.output.logger import LOGGER class runKeywordAsync: def __init__(self): self._thread_pool = {} self._last_thread_handle = 1 #self._robot_log_level = BuiltIn().get_variable_value("${LOG_LEVEL}") def r...
mit
6,771,067,669,261,232,000
34.772727
86
0.576239
false
4.020434
false
false
false
zooniverse/panoptes-cli
panoptes_cli/commands/workflow.py
1
5255
import yaml import click from panoptes_cli.scripts.panoptes import cli from panoptes_client import Workflow @cli.group() def workflow(): """Contains commands for managing workflows.""" pass @workflow.command() @click.argument('workflow-id', required=False, type=int) @click.option( '--project-id', ...
apache-2.0
8,488,461,908,351,289,000
24.028571
80
0.634634
false
3.740214
false
false
false
noironetworks/group-based-policy
gbpservice/contrib/nfp_service/reference_configurator/scripts/configure_fw_rules.py
1
3818
# 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 # d...
apache-2.0
8,109,188,629,917,404,000
35.711538
78
0.529073
false
4.172678
true
false
false
NixaSoftware/CVis
venv/lib/python2.7/site-packages/pandas/core/indexes/multi.py
1
99739
# pylint: disable=E1101,E1103,W0232 import datetime import warnings from functools import partial from sys import getsizeof import numpy as np from pandas._libs import index as libindex, lib, Timestamp from pandas.compat import range, zip, lrange, lzip, map from pandas.compat.numpy import function as nv from pandas ...
apache-2.0
-8,210,810,238,779,362,000
34.406106
79
0.524389
false
4.388569
false
false
false
ricardoy/coccimorph
coccimorph/content.py
1
23248
import math import numpy as np import os import pandas as pd from coccimorph.aux import load_image import cv2 RED = (0, 0, 255) fowl_species = [ 'E. acervulina', 'E. maxima', 'E. brunetti', 'E. mitis', 'E. praecox', 'E. tenella', 'E. necatrix' ] rabbit_species = [ 'E. coecicola', ...
gpl-3.0
6,436,709,685,596,016,000
30.843836
115
0.462789
false
3.116921
false
false
false
xju2/hzzws
bsubs/submit_limit.py
1
2128
#!/usr/bin/env python import os import sys import commands workdir = os.getcwd() submit = True do_hist = False do_scalar = True exe = "/afs/cern.ch/user/x/xju/work/h4l/h4lcode/hzzws/bsubs/run_limit.sh" cal_opt = "pvalue" # limit,pvalue data_opt = "obs" #obs, exp ws_name = "combWS" mu_name = "xs" #mG_low = 500 #mG_...
mit
-4,650,468,770,263,121,000
28.555556
121
0.598214
false
2.557692
false
false
false
g2p/systems
lib/systems/plugins/apache2/a2mod.py
1
1252
# vim: set fileencoding=utf-8 sw=2 ts=2 et : from __future__ import absolute_import from systems.dsl import resource, transition from systems.registry import get_registry from systems.typesystem import AttrType, ResourceType, EResource from systems.util.templates import build_and_render class A2Mod(EResource): """...
gpl-2.0
-8,509,602,508,099,704,000
25.638298
70
0.626198
false
3.468144
false
false
false
amaurywalbert/twitter
n6/n6_alters_timeline_collect_v5.0_50egos.py
2
14123
# -*- coding: latin1 -*- ################################################################################################ # # import tweepy, datetime, sys, time, json, os, os.path, shutil, time, struct, random import multi_oauth_n6 #Script que contém as chaves para autenticação do twitter reload(sys) sys.setdefaulten...
gpl-3.0
3,922,565,552,435,736,600
50.547794
198
0.461341
false
3.788165
false
false
false
Kagee/youtube-dl
youtube_dl/extractor/teamcoco.py
1
3246
from __future__ import unicode_literals import base64 import re from .common import InfoExtractor from ..utils import qualities class TeamcocoIE(InfoExtractor): _VALID_URL = r'http://teamcoco\.com/video/(?P<video_id>[0-9]+)?/?(?P<display_id>.*)' _TESTS = [ { 'url': 'http://teamcoco.com/v...
unlicense
-4,121,415,404,715,677,700
34.282609
156
0.496303
false
3.460554
false
false
false
qpython-android/QPython3-core
pybuild/packages/pandas.py
1
1975
from ..source import GitSource from ..package import Package from ..patch import LocalPatch from ..util import target_arch import os class Pandas(Package): source = GitSource('https://github.com/AIPYX/pandas.git', alias='pandas', branch='qpyc/0.23.4') patches = [ #LocalPatch('0001-cross-compile'), ...
apache-2.0
1,866,403,884,767,679,500
35.574074
145
0.56557
false
3.07154
false
false
false
cylc/cylc
cylc/flow/cycling/iso8601.py
1
34605
# THIS FILE IS PART OF THE CYLC SUITE ENGINE. # Copyright (C) NIWA & British Crown (Met Office) & Contributors. # # 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,...
gpl-3.0
-7,118,441,874,249,039,000
35.970085
79
0.615102
false
3.975643
false
false
false
kfix/SleepProxyServer
sleepproxy/sniff.py
1
1143
from select import select from threading import Event, Thread from scapy.config import conf from scapy.data import ETH_P_ALL, MTU class SnifferThread(Thread): """A thread which runs a scapy sniff, and can be stopped""" def __init__(self, prn, filterexp, iface): Thread.__init__(self) #make this a gree...
bsd-2-clause
825,196,674,331,822,000
28.307692
87
0.504812
false
3.822742
false
false
false
midokura/python-midonetclient
src/midonetclient/application.py
1
18841
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Midokura PTE LTD. # 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/LICENS...
apache-2.0
-5,466,880,693,771,139,000
37.217039
80
0.581869
false
3.918677
false
false
false
sheppard/django-rest-framework
tests/test_generics.py
1
19410
from __future__ import unicode_literals import pytest from django.db import models from django.shortcuts import get_object_or_404 from django.test import TestCase from django.utils import six from rest_framework import generics, renderers, serializers, status from rest_framework.response import Response from rest_fra...
bsd-2-clause
8,100,674,122,528,714,000
34.680147
109
0.631685
false
4.076875
true
false
false
wwitzel3/awx
awx/main/tests/unit/api/serializers/conftest.py
1
1711
import mock import pytest @pytest.fixture def get_related_assert(): def fn(model_obj, related, resource_name, related_resource_name): assert related_resource_name in related assert related[related_resource_name] == '/api/v2/%s/%d/%s/' % (resource_name, model_obj.pk, related_resource_name) retu...
apache-2.0
6,837,339,957,018,921,000
30.685185
123
0.6955
false
3.648188
true
false
false
BV-DR/foamBazar
ideFoam/inputFiles/transportProperties.py
1
1464
from ideFoam.inputFiles import ReadWriteFile, getFilePath from PyFoam.Basics.DataStructures import DictProxy from os.path import join from ideFoam.inputFiles.compatOF import water, air """ Convenience class to simply write "TransportProperties" """ class TransportProperties(ReadWriteFile) : """ Transp...
gpl-3.0
7,376,739,367,757,549,000
32.272727
134
0.551913
false
3.428571
false
false
false
caspartse/QQ-Groups-Spider
vendor/pyexcel/plugins/renderers/sqlalchemy.py
1
2226
""" pyexcel.plugin.renderers.sqlalchemy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Export data into database datables :copyright: (c) 2015-2017 by Onni Software Ltd. :license: New BSD License """ from pyexcel_io import save_data import pyexcel_io.database.common as sql from pyexcel._compact import Ord...
mit
-2,864,051,646,709,129,700
38.75
77
0.624888
false
3.989247
false
false
false
gkc1000/pyscf
pyscf/nao/m_gpaw_wfsx.py
1
1781
# Copyright 2014-2018 The PySCF Developers. 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 appl...
apache-2.0
-6,172,492,844,675,328,000
36.104167
87
0.691746
false
3.310409
false
false
false
jrversteegh/softsailor
deps/scipy-0.10.0b2/scipy/misc/__init__.py
2
1914
""" ========================================== Miscellaneous routines (:mod:`scipy.misc`) ========================================== .. currentmodule:: scipy.misc Various utilities that don't have another home. Note that the Python Imaging Library (PIL) is not a dependency of SciPy and therefore the `pilutil` module...
gpl-3.0
5,945,414,943,550,416,000
30.9
72
0.673981
false
3.812749
false
false
false
naresh21/synergetics-edx-platform
lms/djangoapps/edcast/api.py
1
3170
import logging from rest_framework.response import Response from rest_framework.views import APIView from rest_framework import status from student.models import User from enrollment import api from course_modes.models import CourseMode from openedx.core.lib.exceptions import CourseNotFoundError from enrollment.error...
agpl-3.0
7,598,553,352,521,704,000
37.658537
117
0.603785
false
4.738416
false
false
false
Stargrazer82301/CAAPR
CAAPR/CAAPR_AstroMagic/PTS/pts/core/basics/quantity.py
1
3116
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
mit
8,029,924,372,909,666,000
25.853448
117
0.402889
false
5
false
false
false
cloudwatt/contrail-controller
src/opserver/opserver.py
1
79582
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # Opserver # # Operational State Server for VNC # from gevent import monkey monkey.patch_all() try: from collections import OrderedDict except ImportError: # python 2.6 or earlier, use backport from ordereddict import OrderedDict from ...
apache-2.0
-6,446,021,524,382,836,000
40.362786
98
0.526124
false
3.963247
false
false
false
borevitzlab/Gigavision
libs/IPCamera.py
1
21632
import datetime import logging.config import os import re import time import numpy import requests from requests.auth import HTTPBasicAuth, HTTPDigestAuth from xml.etree import ElementTree from PIL import Image from io import BytesIO try: logging.config.fileConfig("logging.ini") except: pass exiv2_exists = F...
mit
2,764,234,713,448,507,000
34.873964
120
0.546644
false
3.947445
true
false
false
emijrp/pywikibot-core
tests/namespace_tests.py
1
11867
# -*- coding: utf-8 -*- """Tests for the Namespace class.""" # # (C) Pywikibot team, 2014 # # Distributed under the terms of the MIT license. # from __future__ import unicode_literals __version__ = '$Id$' from collections import Iterable from pywikibot.site import Namespace from tests.aspects import unittest, TestCa...
mit
8,047,064,952,597,964,000
35.922118
111
0.599477
false
3.795069
true
false
false
MoroGasper/client
client/plugins/hoster/http.py
1
26525
# -*- coding: utf-8 -*- """Copyright (C) 2013 COLDWELL AG 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 dist...
gpl-3.0
7,281,487,483,231,738,000
52.585859
170
0.837135
false
1.744951
false
false
false
our-city-app/oca-backend
src/solutions/common/restapi/reservation.py
1
12531
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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 appl...
apache-2.0
-8,618,700,201,135,557,000
46.828244
166
0.743676
false
3.815773
false
false
false
os-cloud-storage/openstack-workload-disaster-recovery
dragon/openstack/common/processutils.py
1
9182
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation. # 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.apac...
apache-2.0
-8,191,133,469,897,886,000
36.174089
79
0.574167
false
4.489976
false
false
false
jinzekid/codehub
python/code_snippet/DataAnalysis/1.py
1
1107
# -*- encoding:utf-8 -*- import jieba.analyse from os import path from scipy.misc import imread import matplotlib as mpl mpl.use('TkAgg') import matplotlib.pyplot as plt from wordcloud import WordCloud, STOPWORDS, ImageColorGenerator list_test = [1,2,3,4,5] for i in list_test: print(i) if __name__ == "__main__":...
gpl-3.0
6,991,800,573,141,162,000
24.744186
74
0.65673
false
3.227405
false
false
false
J77D/fallout-terminal
fallout_hack.py
1
7441
import curses import random import os from fallout_functions import slowWrite from fallout_functions import upperInput ################## text strings ###################### HEADER_TEXT = 'ROBCO INDUSTRIES (TM) TERMLINK PROTOCOL' ################## global "constants" ################ # number of characters for hex ...
mit
-8,222,715,190,287,671,000
26.356618
103
0.57452
false
3.829645
false
false
false
rozim/KaggleFindingElo
generate-game2json.py
1
1513
#!/usr/bin/python import chess.pgn import sys import cjson import time def StudyGame(game): headers = game.headers node = game ply = 0 positions = [] while True: board = node.board() node = node.variations[0] p = {'ply': ply, 'num_legal_moves': len(boar...
mit
2,885,319,990,388,454,400
23.803279
83
0.484468
false
3.354767
false
false
false
bartdag/recodoc2
recodoc2/apps/doc/management/commands/parsedoc.py
1
1160
from __future__ import unicode_literals from django.core.management.base import NoArgsCommand from doc.actions import parse_doc from optparse import make_option from docutil.commands_util import recocommand from docutil.str_util import smart_decode class Command(NoArgsCommand): option_list = NoArgsCommand.option_...
bsd-3-clause
3,877,381,356,536,306,000
40.428571
73
0.650862
false
4.013841
false
false
false
FrancoisRheaultUS/dipy
doc/examples/denoise_nlmeans.py
5
2864
""" ============================================== Denoise images using Non-Local Means (NLMEANS) ============================================== Using the non-local means filter [Coupe08]_ and [Coupe11]_ and you can denoise 3D or 4D images and boost the SNR of your datasets. You can also decide between modeling the n...
bsd-3-clause
7,466,975,111,948,228,000
26.538462
79
0.688198
false
3.005247
false
false
false
contractvm/libcontractvm
libcontractvm/WalletExplorer.py
1
3035
# Copyright (c) 2015 Davide Gessa # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from pycoin.networks import * from pycoin.key import Key from pycoin.key.BIP32Node import BIP32Node from pycoin import encoding from pycoin.ecdsa im...
mit
-7,089,695,856,140,569,000
29.049505
269
0.679407
false
2.949466
false
false
false
vividvilla/olaf
olaf/__init__.py
1
3809
# -*- coding: utf-8 -*- """ Olaf ~~~~~~~ Flask main app :copyright: (c) 2015 by Vivek R. :license: BSD, see LICENSE for more details. """ import os import sys import shutil import click default_theme = 'basic' module_path = os.path.dirname(os.path.abspath(__file__)) contents_dir = '_contents' posts_dir = 'pos...
mit
-7,437,390,118,091,616,000
23.416667
75
0.688107
false
3.011067
true
false
false
mefly2012/platform
src/clean_validate/qyxx_hzp_pro_prod_cert.py
1
3642
# -*- coding: utf-8 -*- import sys import re reload(sys) sys.setdefaultencoding('utf-8') from common import public class qyxx_hzp_pro_prod_cert(): """中标""" need_check_ziduan = [ u'bbd_dotime', u'company_name', u'location', u'produce_address', u'issue_date', ...
apache-2.0
4,407,941,176,787,903,000
23.529412
70
0.476019
false
2.928885
false
false
false
slgobinath/SafeEyes
safeeyes/rpc.py
1
3412
#!/usr/bin/env python # Safe Eyes is a utility to remind you to take break frequently # to protect your eyes from eye strain. # Copyright (C) 2017 Gobinath # 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...
gpl-3.0
-7,180,652,859,256,321,000
29.19469
99
0.611079
false
4.120773
false
false
false
sagiss/sardana
src/sardana/taurus/qt/qtgui/extra_macroexecutor/macroparameterseditor/customeditors/senv.py
1
14391
#!/usr/bin/env python ############################################################################## ## ## This file is part of Sardana ## ## http://www.sardana-controls.org/ ## ## Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## ## Sardana is free software: you can redistribute it and/or modify ## it und...
lgpl-3.0
7,709,384,933,967,993,000
37.47861
184
0.637968
false
3.920185
false
false
false
quaddra/engage
python_pkg/engage/drivers/standard/memcached__1_4/driver.py
1
7343
"""Service manager for memcached """ import os import os.path import shutil import sys import time # fix path if necessary (if running from source or running as test) try: import engage.utils except: sys.exc_clear() dir_to_add_to_python_path = os.path.abspath((os.path.join(os.path.dirname(__file__), "../.....
apache-2.0
4,515,107,118,665,952,000
37.244792
105
0.625221
false
3.495002
false
false
false
enricopesce/ec2_snap
ec2_snap_exec.py
1
3106
import logging import boto3 import datetime logger = logging.getLogger() logger.setLevel(logging.INFO) simulate = False def get_instance_tag(id, tag_name): res_ec2 = boto3.resource('ec2') tags = res_ec2.Instance(id).tags if tags is not None: for tag in tags: if tag['Key'] == tag_name:...
gpl-3.0
1,819,731,942,005,402,600
34.295455
119
0.538635
false
3.764848
false
false
false
dianchang/flask-debugtoolbar
flask_debugtoolbar/panels/routes.py
1
1876
from collections import OrderedDict from flask_debugtoolbar.panels import DebugPanel from flask import current_app _ = lambda x: x class RoutesDebugPanel(DebugPanel): """ A panel to display Flask app routes. """ name = 'Routes' has_content = True def nav_title(self): return _('Routes...
bsd-3-clause
-7,090,675,488,362,132,000
30.266667
99
0.585288
false
4.332564
false
false
false
google-research/google-research
poem/cv_mim/train.py
1
1327
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
apache-2.0
8,310,518,479,641,039,000
29.860465
74
0.75584
false
3.605978
false
false
false
same-moon/smutils
windows/juggler/pyhook/hookit.py
1
9077
import os, collections, threading, Queue, time import win32api import win32com.client import pythoncom, pyHook """ MessageName: key down Message: 256 Time: 112416317 Window: 197094 WindowName: Emacs/Python <ruttbe@LAGER> hookit.py Ascii: 120 x Key: X KeyID: 88 ScanCode: 45 Extended: 0 Injected: 0 Alt 0 Transition 0 "...
mit
169,636,825,907,364,860
30.19244
123
0.539495
false
3.735391
false
false
false
YiqunPeng/Leetcode-pyq
solutions/298BinaryTreeLongestConsecutiveSequence.py
1
1902
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: # dfs, post order, no global variable def longestConsecutive(self, root): """ :type root: TreeNode :rtype: in...
gpl-3.0
-9,160,639,779,577,161,000
27.402985
63
0.419558
false
3.819277
false
false
false
UCL-dataspring/cluster-code
bluclobber/model/corpus.py
1
2359
import glob import os import traceback from book import Book from archive import Archive from functools import reduce from dataset import DataSet from ..harness.mapreduce import MapReduce from ..harness.utils import merge from ..harness.decomposer import Decomposer import logging class Corpus(DataSet): def __i...
mit
1,672,840,677,074,940,200
38.316667
110
0.635863
false
3.998305
false
false
false
canesin/FEVal
feval/ShapeFunctions.py
1
37904
# -*- coding: iso-8859-1 -*- #============================================================ # # This file is part of FEval, a module for the # evaluation of Finite Element results # # Licencse: FEval is provided under the GNU General Public License (GPL) # # Authors: Martin Lüthi, tinu@tnoo.net # #...
gpl-2.0
-1,197,586,550,653,715,200
31.675862
93
0.400828
false
2.429121
false
false
false
gibil5/openhealth
models/management/mgt_patient_line.py
1
2816
# -*- coding: utf-8 -*- """ Management Patient Line Should contain class methods Created: 20 Jun 2019 Last up: 27 oct 2020 """ from __future__ import print_function from __future__ import absolute_import from openerp import models, fields, api from .management_db import ManagementDb #from openerp.addons.op...
agpl-3.0
2,078,314,972,504,652,000
22.663866
94
0.57848
false
3.309048
false
false
false
Fokko/incubator-airflow
airflow/contrib/example_dags/example_winrm_operator.py
1
2457
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
-5,874,133,508,260,719,000
31.76
82
0.607245
false
3.956522
false
false
false
mikewesner-wf/glasshouse
glasshouse.indigoPlugin/Contents/Server Plugin/werkzeug/testsuite/wsgi.py
1
10308
# -*- coding: utf-8 -*- """ werkzeug.testsuite.wsgi ~~~~~~~~~~~~~~~~~~~~~~~ Tests the WSGI utilities. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import unittest from os import path from cStringIO import StringIO ...
apache-2.0
2,790,075,410,506,452,500
39.301961
109
0.587331
false
3.448658
true
false
false
romanarranz/PPR
P1/calculaGanancia.py
1
2508
#!/usr/bin/env python # -*- coding: utf-8 -*- from sys import argv import re # Si el numero de parametros del programa es menor que 3 o los parametros primero y segundo son el mismo archivo if len(argv) < 3 or argv[1] == argv[2]: print "Error la sintaxis es:" print "\t$",argv[0]," output/floydS.dat"," output/floyd1...
mit
-8,811,057,606,774,372,000
31.141026
112
0.647247
false
2.610417
false
false
false
pernici/sympy
sympy/polys/tests/test_euclidtools.py
1
20892
"""Tests for Euclidean algorithms, GCDs, LCMs and polynomial remainder sequences. """ from sympy.polys.euclidtools import ( dup_gcdex, dup_half_gcdex, dup_invert, dup_euclidean_prs, dmp_euclidean_prs, dup_primitive_prs, dmp_primitive_prs, dup_subresultants, dmp_subresultants, dup_prs_resultant, dmp...
bsd-3-clause
8,572,424,864,415,290,000
32.970732
101
0.448736
false
2.235873
true
false
false
botswana-harvard/eit
eit/config/urls.py
1
3578
from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.conf.urls import patterns, include, url from django.contrib.auth.decorators import login_required from django.conf import settings from django.views.generic import RedirectView from django.db.models import get_models import django_databrows...
gpl-3.0
-2,307,491,408,388,197,000
32.754717
114
0.707658
false
3.264599
false
false
false
vaginessa/Pentesting-Scripts
InSpy.py
1
8805
#!/usr/bin/python # InSpy - A LinkedIn employee enumerator # This script enumerates employees from any organization # using LinkedIn. Please note that this will not harvest all # employees within a given organization. # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
gpl-3.0
-8,991,955,847,205,722,000
44.864583
183
0.527655
false
3.738854
false
false
false
r3dact3d/tweeter
tweepy/chucknorrisTwitBot.py
1
1485
#!/usr/bin/env python # written by r3dact3d (brady) import requests import tweepy from random import choice from config import * ''' Chucknorris.io is free and will always be! However, as maintaining this service costs $$$, we are glad to be sponsored by Jugendstil.io. ''' # Available Catagories - I did this way so s...
unlicense
7,604,012,989,098,353,000
29.9375
179
0.657912
false
3.132911
false
false
false
Dikovinka/HRCS
API/permissions.py
1
2558
from rest_framework import permissions from API.models import * class IsOwnerOrReadOnly(permissions.BasePermission): """ Custom permission to only allow owners of an object to edit it. """ def has_object_permission(self, request, view, obj): # Read permissions are allowed to any request, ...
apache-2.0
-8,638,617,535,118,737,000
37.772727
107
0.654808
false
4.543517
false
false
false