repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
Micronaet/micronaet-order
order_partner_default_address/__openerp__.py
1
1540
############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # 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 ...
agpl-3.0
-7,340,566,109,645,672,000
34
79
0.555195
false
DaMonkey/hankypanky
lazylibrarian/gr.py
1
2378
import time, threading, urllib, urllib2, sys from xml.etree import ElementTree from xml.etree.ElementTree import Element, SubElement import lazylibrarian from lazylibrarian import logger, formatter, database class GoodReads: # http://www.goodreads.com/api/ def __init__(self, name=None, type=None): se...
gpl-3.0
303,320,833,390,499,000
36.15625
124
0.589151
false
merlinpatt/py-trello
trello/board.py
1
7269
from __future__ import absolute_import from .card import Card from .list import List from .member import Member class Board(object): """ Class representing a Trello board. Board attributes are stored as normal Python attributes; access to all sub-objects, however, is always an API call (Lists, Cards)...
bsd-3-clause
-675,035,804,408,850,800
29.670886
116
0.551245
false
waterblue13/tensor2tensor
tensor2tensor/data_generators/ptb.py
1
5009
# coding=utf-8 # Copyright 2017 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
6,008,215,858,963,581,000
27.622857
79
0.678978
false
trabucayre/gnuradio
grc/core/blocks/dummy.py
1
1190
# Copyright 2016 Free Software Foundation, Inc. # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later # from . import Block, register_build_in from ._build import build_params @register_build_in class DummyBlock(Block): is_dummy_block = True label = 'Missing Block' key = '_du...
gpl-3.0
8,029,031,467,999,280,000
26.045455
101
0.626891
false
sagiss/sardana
test/test_ctrl/WaterPapCtrl_stat1.py
1
4673
import PyTango import socket import MotorController class IcePapController(MotorController.MotorController): MaxDevice = 6 def __init__(self,inst,props): print "PYTHON -> IcePapController ctor for instance",inst MotorController.MotorController.__init__(self,inst,props) self.nb_call = ...
lgpl-3.0
-6,052,067,277,264,365,000
31.908451
123
0.598973
false
jmread/cerebro
cerebro/RTF.py
1
3665
from numpy import * from functions import sigmoid set_printoptions(precision=4) class RTF(): ''' Recurrent Basis/Transformation Function --------------------------------------- Turn x into \phi in a recurrent manner. ''' W_hh = None W_ih = None z = None def __init__(...
gpl-3.0
-5,572,325,840,859,599,000
27.192308
151
0.505048
false
vlimant/IntelROCCS
Monitor/datasetSummary.py
1
10120
#!/usr/bin/python #------------------------------------------------------------------------------------------------- #quick script to give basic information about usage of a class of datasets #originally written to provide PromptReco RECO info to Dima #-------------------------------------------------------------------...
mit
-671,869,903,044,938,800
32.509934
103
0.578953
false
benauthor/pykafka
pykafka/test/utils.py
1
1395
import time import os from pykafka.test.kafka_instance import KafkaInstance, KafkaConnection def get_cluster(): """Gets a Kafka cluster for testing, using one already running is possible. An already-running cluster is determined by environment variables: BROKERS, ZOOKEEPER, KAFKA_BIN. This is used prim...
apache-2.0
-317,677,155,204,829,200
32.214286
104
0.630824
false
ESA-VirES/eoxserver-magnetism
eoxsmagnetism/ows/wms/capabilitiesrenderer.py
1
3134
#------------------------------------------------------------------------------- # $Id$ # # Project: EOxServer <http://eoxserver.org> # Authors: Fabian Schindler <fabian.schindler@eox.at> # #------------------------------------------------------------------------------- # Copyright (C) 2011 EOX IT Services GmbH # # Per...
mit
4,156,629,531,796,532,700
38.670886
80
0.659221
false
iLoveTux/data_store
test/test_api.py
1
2541
import data.store import bottle from io import BytesIO from data.store import api def test_api_exists(): assert hasattr(data.store, "api") def test_get_collections_returns_list_of_collections(): assert data.store.api.get_collections() == {} def test_del_collection_deletes_a_collection(): api.post_collect...
gpl-2.0
-7,675,300,760,249,336,000
40.655738
88
0.683983
false
psiwczak/openstack
nova/db/sqlalchemy/models.py
1
38288
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # All Rights Reserved. # # Lic...
apache-2.0
-8,264,634,571,435,047,000
34.951174
79
0.619385
false
cevaris/pants
tests/python/pants_test/backend/python/tasks2/test_gather_sources.py
1
2951
# coding=utf-8 # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from pex....
apache-2.0
4,771,192,398,828,748,000
43.044776
98
0.680108
false
kyamagu/psd2svg
src/psd2svg/__main__.py
1
1695
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import argparse import logging import os from psd2svg import psd2svg def main(): parser = argparse.ArgumentParser(description='Convert PSD file to SVG') parser.add_argument( 'input', metavar='INPUT', type=str, help='Input ...
mit
7,406,820,582,032,174,000
38.418605
78
0.637168
false
hdb3/ministack
merlyn.py
1
1184
spec = { 'name' : "The devil's work...", 'external network name' : "exnet3", 'keypair' : "openstack_rsa", 'controller' : "r720", 'dns' : "10.30.65.200", 'credentials' : { 'user' : "nic", 'password' : "nic", 'project' : "nic" }, 'Networks' : [ { 'name' : "merlynctl" , "start": "172.1...
apache-2.0
3,854,112,634,913,775,600
61.315789
157
0.495777
false
phockett/ePSproc
epsproc/vol/setOptions.py
1
3675
""" ePSproc vol module setOptions Functions to read & write default set of plotting options to file. If run as main: - Check existing file from passed arg, or in default location (epsproc/vol/plotOptions.json) - Read file if exists. - If file is missing, prompt to write defaults to file. 08/08/20 v1, dev. See ...
gpl-3.0
-1,978,875,038,658,223,400
29.122951
242
0.626939
false
jralls/gramps
gramps/gui/views/treemodels/flatbasemodel.py
1
32063
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2006 Donald N. Allingham # Copyright (C) 2009 Benny Malengier # Copyright (C) 2010 Nick Hall # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published ...
gpl-2.0
737,878,693,955,550,700
36.32596
91
0.571781
false
tensorflow/models
official/vision/beta/ops/box_ops.py
1
24043
# Copyright 2021 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
3,766,865,018,543,478,000
36.625978
80
0.655284
false
jo-tez/aima-python
nlp.py
1
21959
"""Natural Language Processing; Chart Parsing and PageRanking (Chapter 22-23)""" from collections import defaultdict from utils import weighted_choice import urllib.request import re # ______________________________________________________________________________ # Grammars and Lexicons def Rules(**rules): """C...
mit
3,861,374,006,818,428,000
37.578207
114
0.515056
false
w495/python-video-shot-detector
etc/experiments/test_pyav.py
1
2469
# -*- coding: utf8 -*- from __future__ import absolute_import, division, print_function import av from av.video.frame import VideoFrame from av.video.stream import VideoStream # В этом списке будем хранить кадры в виде numpy-векторов. array_list = [] # Откроем контейнер на чтение input_container = av.open('input.mp...
bsd-3-clause
-1,050,391,235,802,443,000
31.241379
69
0.688235
false
clgplus/sample
retrain.py
1
37008
# -*- coding: utf-8 -*- # ============================================================================== """ 运行以下命令 python retrain.py \ --bottleneck_dir=/home/clg/tf_files/bottlenecks \ --how_many_training_steps 60 \ --model_dir=/home/clg/tf_files/inception \ --output_graph=/home/clg/tf_files/retrained_graph.pb \ --ou...
apache-2.0
1,741,741,162,625,397,500
41.977881
129
0.666829
false
vathpela/anaconda
tests/nosetests/regex_tests/iscsi_name_test.py
1
2690
#!/usr/bin/python # vim:set fileencoding=utf-8 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is dis...
gpl-2.0
-5,264,170,302,068,901,000
35.351351
82
0.555762
false
mburakergenc/Malware-Detection-using-Machine-Learning
cuckoo/analyzer/windows/modules/packages/ppt.py
1
2066
# Copyright (C) 2010-2013 Claudio Guarnieri. # Copyright (C) 2014-2016 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from _winreg import HKEY_CURRENT_USER from lib.common.abstracts import Package class PPT(Package): "...
mit
172,675,020,858,053,400
37.259259
84
0.56728
false
Notxor/Neuronal
neuronal/capa.py
1
1911
# -*- coding: utf-8 -*- # Neuronal - Framework for Neural Networks and Artificial Intelligence # # Copyright (C) 2012 dddddd <dddddd@pyphiverses.org> # Copyright (C) 2012 Notxor <gnotxor@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General P...
agpl-3.0
5,911,570,045,528,917,000
38.75
79
0.702306
false
kaleoyster/ProjectNBI
nbi-utilities/data_gen/maps.py
1
9134
""" Contains al dictionaries and list from National Bridge Inventory Records""" __author__ = "Akshay Kale" __copyright__ = "GPL" __credit__ = [] __email__ = 'akale@unomaha.edu' # key: State code # Value: Abbreviation of the state code_state_mapping = { '25':'MA', '04':'AZ', ...
gpl-2.0
-5,501,000,904,377,520,000
35.682731
113
0.378476
false
freifunk-darmstadt/ffda-jarvis
willie/willie/modules/seen.py
1
1825
# coding=utf8 """ seen.py - Willie Seen Module Copyright 2008, Sean B. Palmer, inamidst.com Copyright © 2012, Elad Alfassa <elad@fedoraproject.org> Licensed under the Eiffel Forum License 2. http://willie.dftba.net """ from __future__ import unicode_literals import time import datetime from willie.tools import Identi...
mit
-5,590,594,171,366,750,000
33.415094
75
0.631579
false
fedoraredteam/elem
setup.py
1
1996
from distutils.core import setup from distutils.core import Command import os import sys import unittest import setuptools class CleanPycCommand(Command): user_options = [] def initialize_options(self): """Abstract method that is required to be overwritten""" pass def finalize_options(se...
gpl-3.0
-1,796,376,005,776,839,000
33.413793
104
0.617735
false
hipnusleo/laserjet
resource/pypi/cffi-1.9.1/cffi/verifier.py
1
11834
# # DEPRECATED: implementation for ffi.verify() # import sys, os, binascii, shutil, io from . import __version_verifier_modules__ from . import ffiplatform if sys.version_info >= (3, 3): import importlib.machinery def _extension_suffixes(): return importlib.machinery.EXTENSION_SUFFIXES[:] el...
apache-2.0
-3,877,184,796,602,867,700
35.449367
86
0.533885
false
termoshtt/unite-bibtex
src/unite_bibtex.py
1
2073
# -*- coding: utf-8 -*- import os.path from pybtex.database.input import bibtex class unite_bibtex(object): """ Name space for unite_bibtex.vim (not to pollute global name space) """ @staticmethod def _read_file(filename): parser = bibtex.Parser() return parser.parse_file(fil...
mit
-5,800,734,522,061,089,000
31.904762
92
0.544139
false
luiscarlosgph/t-Student-Mixture-Models
setup.py
1
1594
#!/usr/bin/env python import setuptools import unittest # Read the contents of the README file from os import path this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() setuptools.setup(name='smm', version='...
bsd-3-clause
4,214,325,765,447,081,000
35.227273
80
0.622334
false
arteria/django-favicon-plus
favicon/models.py
1
3314
from compat import python_2_unicode_compatible import sys from django.db import models from django.conf import settings from django.core.files.storage import default_storage as storage from django.core.files.uploadedfile import InMemoryUploadedFile from PIL import Image from compat import BytesIO config = { 'sh...
mit
-2,069,037,191,939,895,000
28.327434
74
0.630658
false
salvoventura/pyunsplash
pyunsplash/tests/documentation_test.py
1
9927
############################################################################### # Copyright (c) 2017 Salvatore Ventura <salvoventura@gmail.com> # # File: documentation_test.py # # Author: Salvatore Ventura <salvoventura@gmail.com> # Date: 07 Sep 2017 # Purpose: Test examples in documentation # # Revi...
mit
-1,336,868,179,278,288,600
25.975543
80
0.652664
false
xalt/xalt
py_src/xalt_extract_linker.py
1
1691
#----------------------------------------------------------------------- # XALT: A tool that tracks users jobs and environments on a cluster. # Copyright (C) 2013-2015 University of Texas at Austin # Copyright (C) 2013-2015 University of Tennessee # # This library is free software; you can redistribute it and/or modif...
lgpl-2.1
7,246,546,160,335,109,000
36.577778
72
0.641632
false
airbnb/caravel
superset/migrations/versions/6c7537a6004a_models_for_email_reports.py
1
4101
# 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
-3,753,114,214,703,253,500
47.247059
119
0.691539
false
actuaryzhang/spark
python/pyspark/ml/tests/test_feature.py
1
14100
# -*- 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 "L...
apache-2.0
-5,482,461,792,148,981,000
44.044728
98
0.602738
false
silly-wacky-3-town-toon/SOURCE-COD
toontown/shtiker/OptionsPageGUI.py
1
3792
from direct.gui.DirectGui import DirectButton, DirectLabel from panda3d.core import TextNode, Vec4 Preloaded = {} def loadModels(): if Preloaded: return gui = loader.loadModel('phase_3.5/models/gui/fishingBook.bam') Preloaded['tab1'] = gui.find('**/tabs/polySurface1') Preloaded['tab2'] = gui.f...
apache-2.0
-5,793,325,956,545,810,000
31.144068
111
0.554325
false
ISISComputingGroup/EPICS-inst_servers
CollisionAvoidanceMonitor/configurations/config_larmor.py
1
4210
from math import radians from CollisionAvoidanceMonitor.transform import Transformation import os # Config happens here: # Colors for each body colors = [(0.6, 0.6, 0.6), (1, 0, 1), (1, 1, 0), (0, 1, 1), (0, 1, 0), (1, 0.5, 0), (0.2, 0.2, 1), (1, 1, 1)] # PV prefix pv_prefix = os.environ["MYPVPREFIX"] # PV prefix f...
bsd-3-clause
8,660,980,917,994,422,000
27.255034
109
0.585273
false
mertyildiran/Cerebrum
cerebrum/hearing/utilities.py
1
1960
__author__ = 'Mehmet Mert Yildiran, mert.yildiran@bil.omu.edu.tr' import rethinkdb as r # Rethinkdb Python driver # Memory class class Memory(object): def __init__(self, starting_time, ending_time, data): # Initialize the object self.starting_time = starting_time # Starting time attribute self.ending_time = endi...
mit
-5,825,145,654,931,058,000
32.220339
99
0.681122
false
AndreasHeger/alignlib
python/tests/test_MultAlignment.py
1
9238
# alignlib - a library for aligning protein sequences # # $Id: test_Alignment.py,v 1.3 2004/01/23 17:34:58 aheger Exp $ # # Copyright (C) 2004 Andreas Heger # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Softw...
gpl-2.0
-4,594,516,625,187,176,000
35.513834
88
0.582485
false
sjTaylor/cmd_queue
client.py
1
2997
import socket import select import codes import funs import os import subprocess import argparse parser = argparse.ArgumentParser() parser.add_argument('server_ip', type=str, help='address of the server (e.g. 198.123.1.3)') parser.add_argument('--server_port', type=int, default=12345, required=False, help='port server...
mit
-2,199,648,740,256,074,200
36
113
0.575909
false
jrconlin/server-key-exchange
keyexchange/util.py
1
3643
# ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (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.mozilla.org/MPL/ # # Softwa...
mpl-2.0
-8,685,065,241,772,336,000
29.613445
77
0.664562
false
jddixon/bindex
setup.py
1
1138
#!/usr/bin/python3 # bindex/setup.py """ Setuptools project configuration for bindex. """ from os.path import exists from setuptools import setup LONG_DESC = None if exists('README.md'): with open('README.md', 'r') as file: LONG_DESC = file.read() setup(name='bindex', version='0.0.24', autho...
mit
-3,196,861,824,986,049,500
29.756757
73
0.593146
false
a2ialabelme/LabelMeAnnotationTool
toolBar.py
1
1837
# # Copyright (C) 2011 Michael Pitidis, Hussein Abdulwahid. # # This file is part of Labelme. # # Labelme 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) ...
gpl-3.0
8,428,212,745,408,746,000
33.660377
79
0.684268
false
yochow/autotest
client/common_lib/control_data_unittest.py
1
4595
#!/usr/bin/python import os, sys, unittest, tempfile import common from autotest_lib.client.common_lib import control_data ControlData = control_data.ControlData CONTROL = """ AUTHOR = 'Author' DEPENDENCIES = "console, power" DOC = \"\"\"\ doc stuff\"\"\" # EXPERIMENTAL should implicitly be False NAME = 'nA' "mE" RU...
gpl-2.0
-6,934,877,084,798,846,000
31.588652
69
0.576279
false
patochectp/navitia
source/jormungandr/jormungandr/__init__.py
1
3983
# encoding: utf-8 # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobilit...
agpl-3.0
-1,356,667,356,695,377,400
30.611111
113
0.762491
false
OSSESAC/odoopubarquiluz
addons/hr_timesheet_sheet/hr_timesheet_sheet.py
1
30074
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
3,142,552,518,188,816,400
50.320819
290
0.557093
false
RuiNascimento/krepo
script.module.lambdascrapers/lib/lambdascrapers/sources_ lambdascrapers/pl/trt.py
1
3892
# -*- coding: UTF-8 -*- ####################################################################### # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # @Daddy_Blamo wrote this file. As long as you retain this notice you # can do whatever you want wi...
gpl-2.0
2,059,342,441,990,086,000
37.92
146
0.460689
false
rboman/progs
apps/pdf2ppt/pdf2ppt.py
1
1429
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2017 Romain Boman # # 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 # ...
apache-2.0
2,452,702,609,578,649,000
30.733333
76
0.654062
false
danja/elfquake
prednet_/ingv_train.py
1
3488
''' Train PredNet on INGV sequences. ''' import os import numpy as np np.random.seed(123) from six.moves import cPickle from keras import backend as K from keras.models import Model from keras.layers import Input, Dense, Flatten from keras.layers import LSTM from keras.layers import TimeDistributed from keras.callbac...
apache-2.0
4,245,735,531,598,125,000
42.061728
164
0.716456
false
TariqEE/PrivEx
S2/S2-netified/exitListener.py
1
5097
from collections import defaultdict from privexUtils import q, epoch, dc_start_delay, dc_reg_delay from router import router from tkgserver import tkgserver from twisted.internet import reactor, protocol, task, ssl from twisted.protocols import basic import time import json import argparse import pprint parser = argpa...
bsd-3-clause
1,234,578,571,938,410,000
30.85625
107
0.613106
false
exp-publishing/cloudbot-plugins
plugins/tell.py
1
5133
""" tell.py Created By: - CloudBot IRC <https://github.com/ClodbotIRC> Modified By: - Josh Elsasser <https://github.com/jaelsasser> License: GNU General Public License (Version 3) """ import re from datetime import datetime from sqlalchemy import Table, Column, String, Boolean, DateTime from sqlalchemy.s...
gpl-3.0
-2,896,529,931,401,494,000
28.331429
91
0.591467
false
ivmech/iviny-scope
lib/xlsxwriter/test/comparison/test_fit_to_pages05.py
1
1938
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013, John McNamara, jmcnamara@cpan.org # import unittest import os from ...workbook import Workbook from ..helperfunctions import _compare_xlsx_files class TestCompareXLSXFiles(unittest.TestC...
gpl-3.0
4,416,242,346,363,676,700
27.925373
91
0.512384
false
talon-one/talon_one.py
test/test_set_discount_effect_props.py
1
2126
# coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. #...
mit
7,183,432,051,782,559,000
36.964286
647
0.670273
false
CanonicalLtd/subiquity
subiquity/models/identity.py
1
1628
# Copyright 2015 Canonical, Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
agpl-3.0
4,035,972,600,284,715,000
27.068966
74
0.665233
false
open-craft/opencraft
instance/migrations/0002_auto_20150530_1255.py
1
1562
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('instance', '0001_initial'), ] operations = [ migrations.CreateModel( name='LogE...
agpl-3.0
-7,473,166,844,276,405,000
35.325581
178
0.576184
false
geotrellis/geotrellis-osm-elevation
ingest/src/main/python/geotrellis/osme/ingest/translate.py
1
9548
# 1. function create_object_links() gets a bucket path and returns a list of the link of each .img file # 2. s3://azavea-datahub/emr/bootstrap.sh: install python2.7: sudo yum install -y python27; # install gdal; # install gdal_retile...
apache-2.0
8,990,720,175,938,981,000
33.348921
159
0.542417
false
AutorestCI/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/win_rm_listener.py
1
1814
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-2,108,547,658,817,203,000
42.190476
83
0.624587
false
googleapis/googleapis-gen
google/cloud/ondemandscanning/v1/ondemandscanning-v1-py/google/cloud/ondemandscanning_v1/services/scanner_service/transports/base.py
1
7756
# -*- coding: utf-8 -*- # 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...
apache-2.0
-98,890,217,601,211,180
40.037037
161
0.640923
false
kevana/corpscores
dci_notify/database.py
1
2185
# -*- coding: utf-8 -*- ''' Database module, including the SQLAlchemy database object and DB-related utilities. ''' from sqlalchemy.orm import relationship from .extensions import db # Alias common SQLAlchemy names Column = db.Column relationship = relationship class CRUDMixin(object): '''Mixin that adds conve...
bsd-3-clause
5,581,491,092,407,811,000
26.658228
72
0.628375
false
Symantec/py-statsd
pystatsd/pystatsagent.py
1
2187
#!/usr/bin/env python # -*- coding: utf-8 -*- import socket import json try: import pystats_config except ImportError: import pystatsd.pystats_config as pystats_config class UDPClient(object): def __init__(self, server_ip, server_port): """Initalize client""" self.server_ip = server_ip ...
apache-2.0
7,166,294,631,678,672,000
32.646154
76
0.581619
false
lukovkin/ufcnn-keras
models/create_signals_bid_ask.py
1
13710
from __future__ import absolute_import from __future__ import print_function import sys from copy import copy, deepcopy import numpy as np #import matplotlib.pyplot as plt import pandas as pd pd.set_option('display.width', 1000) pd.set_option('display.max_rows', 1000) from signals import * def find_all_signals...
mit
75,075,838,899,933,100
40.41994
139
0.515536
false
ingadhoc/odoo-infrastructure
infrastructure/wizard/instance_update_add_instances.py
1
1450
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import models, fields, api class in...
agpl-3.0
-7,664,425,907,704,967,000
29.851064
78
0.536552
false
joehakimrahme/thawra
thawra/hero.py
1
3453
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
5,366,765,848,036,491,000
26.404762
76
0.5766
false
raonyguimaraes/mendelmd
analyses/migrations/0001_initial.py
1
2097
# Generated by Django 2.1.4 on 2018-12-27 08:50 from django.conf import settings import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('tasks', '__first__'), ...
bsd-3-clause
-6,945,387,423,287,230,000
39.326923
138
0.567477
false
rsteed11/GAT
gat/core/sna/resilience.py
1
1298
import networkx as nx import random import scipy as sp from gat.core.sna import ergm def resilience(cliques_found, ergm_iters=3000): scaledResilience = {} scaledBaseline = {} toScale = [] baselinesToScale = [] traces = [] formatted_traces = {} cliques, selected = cliques_found # Find ...
mit
5,061,723,243,135,137,000
37.176471
103
0.68567
false
benreynwar/pyvivado
pyvivado/test_utils.py
1
9478
import os import unittest import logging import shutil import time import testfixtures from pyvivado import filetestbench_project, fpga_project, axi from pyvivado.synopsys import synopsys_project from pyvivado import vivado_project, test_info from pyvivado import config from pyvivado import base_test_utils logger = l...
mit
2,229,433,497,618,155,000
29.973856
90
0.614265
false
tuulos/ringo
ringogw/py/ringodisco.py
1
3199
import ringogw def ringo_reader(fd, sze, fname): import struct, zlib MAGIC_HEAD = (0x47da66b5,) MAGIC_TAIL = (0xacc50f5d,) def read_really(s): t = 0 buf = "" while t < s: r = fd.read(s - t) ...
bsd-3-clause
8,622,937,710,840,089,000
36.635294
77
0.371366
false
ColumbiaDVMM/ColumbiaImageSearch
cufacesearch/cufacesearch/ingester/deprecated/kafka_image_processor.py
1
7700
# DEPRECATED # import json # import time # import multiprocessing # from .generic_kafka_processor import GenericKafkaProcessor # from ..imgio.imgio import buffer_to_B64 # # default_prefix = "KIP_" # default_prefix_frompkl = "KIPFP_" # # # TODO: This class should be rewritten to actually extract features from images... ...
apache-2.0
-2,658,118,316,542,654,000
42.264045
179
0.633636
false
schollz/prevent-link-rot
lib.py
1
2472
# -*- coding: utf-8 -*- import sys import re import json from multiprocessing import Pool, cpu_count import requests def isurl(s): if re.match(r'(?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))...
mit
-5,427,227,733,330,338,000
26.977273
229
0.587327
false
GoogleCloudPlatform/tf-estimator-tutorials
00_Miscellaneous/model_evaluation_pipeline/trainer/model.py
1
7151
#!/usr/bin/env python # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
apache-2.0
-1,798,591,389,103,198,500
39.40113
103
0.658369
false
breuderink/psychic
psychic/tests/testedf.py
1
2121
# -*- coding: utf-8 -*- import unittest, os from ..edfreader import * class TestEDFBaseReader(unittest.TestCase): def test_synthetic_content(self): ''' Test EDF reader using artifical EDF dataset. Note that this is not an EDF+ dataset and as such does not contain annotations. Annotations decoding is ...
bsd-3-clause
4,709,166,478,044,871,000
34.283333
79
0.619745
false
quarkslab/irma
probe/modules/antivirus/comodo/cavl.py
1
2379
# # Copyright (c) 2013-2018 Quarkslab. # This file is part of IRMA project. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License in the top-level directory # of this distribution and at: # # http:...
apache-2.0
6,662,217,824,837,010,000
34.507463
78
0.592686
false
marksamman/pylinkshortener
app/models.py
1
2721
# Copyright (c) 2014 Mark Samman <https://github.com/marksamman/pylinkshortener> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights...
mit
-7,008,481,928,122,294,000
38.434783
114
0.715913
false
corpnewt/CorpBot.py
Cogs/Xp.py
1
41529
import asyncio import discord import datetime import time import random from discord.ext import commands from Cogs import Settings, DisplayName, Nullify, CheckRoles, UserTime, Message, PickList def setup(bot): # Add the bot and deps settings = bot.get_cog("Settings") bot.add_cog(Xp(bot, settings)) ...
mit
-1,479,371,113,077,877,200
34.143603
194
0.642081
false
5t111111/markdown-preview.vim
markdownpreview_lib/markdown_preview/markdown_preview.py
1
2621
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import webbrowser from bs4 import BeautifulSoup import chardet import markdown class MarkdownPreview(object): _source = None _template_path = None _html_path = None _css_path = None def __init__(self, source=None, template=None, ...
lgpl-2.1
157,799,395,344,033,540
26.882979
89
0.533003
false
Djiit/err-jenkins
test_jenkinsBot.py
1
4684
# coding: utf-8 from errbot.backends.test import testbot import jenkinsBot class TestJenkinsBot(object): extra_plugin_dir = '.' def test_jenkins_build_no_args(self, testbot): testbot.push_message('!jenkins build') assert ('What job would you like to build?' in testbot.pop_mes...
mit
1,269,524,832,738,409,500
36.472
75
0.591161
false
jpurma/Kataja
kataja/SemanticsItem.py
1
5838
import math from PyQt5 import QtCore, QtWidgets, QtGui from kataja.globals import SMALL_FEATURE from kataja.singletons import ctrl, qt_prefs FREE = 0 SENTENCE = 1 NOUN_PHRASE = 2 class SemanticsItem(QtWidgets.QGraphicsSimpleTextItem): def __init__(self, sm, label, array_id, color_key, x=0, y=0): QtWid...
gpl-3.0
6,065,196,672,987,887,000
39.825175
98
0.477561
false
MjnMixael/knossos
releng/macos/dmgbuild_cfg.py
1
4501
# -*- coding: utf-8 -*- from __future__ import unicode_literals import biplist import os.path import subprocess # .. Useful stuff .............................................................. application = 'dist/Knossos.app' appname = os.path.basename(application) def icon_from_app(app_path): plist_path = os.p...
apache-2.0
-4,118,771,942,043,023,000
26.284848
80
0.612531
false
rscalzo/pyBoloSN
Tests/test_A82.py
1
3804
from BoloMass.Arnett82 import tau_0, Lambda, A82LC_full, A82LC_gp from RetroSpect.Plotting import color_ramp import sys import numpy as np import matplotlib.pyplot as pypl def test_A82_Lambda(): """Test plots for Lambda""" y = np.arange(0.7, 1.41, 0.1) c = color_ramp(len(y)) for yi, ci in zip(y, c): ...
mit
4,331,748,857,861,955,600
34.222222
74
0.52918
false
evildmp/django-curated-resources
curated_resources/admin.py
1
4333
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from django import forms from django.contrib.admin.widgets import FilteredSelectMultiple from mptt.forms import TreeNodeMultipleChoiceField from treeadmin.admin import TreeAdmin from widgetry.tabs.admin import ModelAdminWithTabs...
bsd-2-clause
5,507,491,974,509,886,000
36.353448
107
0.643203
false
SoBeRBot94/TicTacToe-GE
GameEngine/conf.py
1
9904
# -*- coding: utf-8 -*- # # TicTacToe-GE documentation build configuration file, created by # sphinx-quickstart on Tue Sep 19 23:45:17 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. ...
gpl-3.0
-8,068,536,931,307,508,000
27.959064
80
0.69164
false
tboyce1/home-assistant
tests/components/test_canary.py
4
2623
"""The tests for the Canary component.""" import unittest from unittest.mock import patch, MagicMock, PropertyMock import homeassistant.components.canary as canary from homeassistant import setup from tests.common import ( get_test_home_assistant) def mock_device(device_id, name, is_online=True): """Mock Can...
apache-2.0
2,485,681,822,438,767,000
29.858824
70
0.627526
false
palankai/baluster
src/baluster/utils.py
1
1844
from asyncio import iscoroutinefunction, coroutine from contextlib import contextmanager from functools import partial import re from .exceptions import MultipleExceptions class Undefined: pass def make_if_none(obj, default): if obj is not None: return obj return default def dict_partial_copy...
mit
1,445,387,088,957,653,500
19.954545
63
0.632863
false
aylward/ITKTubeTK
setup.py
1
1986
# -*- coding: utf-8 -*- from __future__ import print_function from os import sys import numpy as np try: from skbuild import setup except ImportError: print('scikit-build is required to build from source.', file=sys.stderr) print('Please run:', file=sys.stderr) print('', file=sys.stderr) print(' ...
apache-2.0
1,078,648,965,849,893,400
36.471698
147
0.639476
false
angst7/far
models/models1.py
1
3286
# SQLAlchemy, SQLElixir from sqlalchemy import ForeignKey from sqlalchemy.orm import relation, backref from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class AttackType: UNDEFINED = 0 # Melee attacks HIT = 1 CRUSH = 2 SLASH = 3 PIERCE = 4 CL...
mit
-6,676,001,317,496,061,000
23.340741
111
0.590992
false
farert/farert
db/scripts/jr_db_reg_old_1.py
1
2553
#!python3.0.1 # -*- coding: utf-8 -*- """ ƒf[ƒ^ƒx[ƒX“o˜^ –kŠC“¹ JR–kŠC“¹ ”ŸŠÙü ”ŸŠÙ‰w ‚Í‚±‚¾‚Ä 0 0 """ import os import sqlite3 import sys import re from collections import defaultdict if 1 < len(sys.argv): fn = sys.argv[1] else: fn = 'jr.txt' dbname = 'jr.db' if os.access(d...
gpl-3.0
5,349,268,513,671,626,000
19.275
64
0.550333
false
aziele/alfpy
alfpy/utils/seqrecords.py
1
3791
from . import fasta class SeqRecords: """Object representing an ordered collection of sequence records. Attributes: id_list (list) : List of sequence record identifiers seq_list (list) : List of sequence strings count (int) : Number of sequence records """ def __init__(...
mit
-537,299,720,962,794,500
26.273381
73
0.543128
false
blukat29/notifyhere
notifyhere/dash/api/gmail.py
1
2935
from httplib import HTTPSConnection import json import imaplib import re import base import tools import secrets class GmailApi(base.ApiBase): list_re = re.compile(r'\((.+)\) "(.+)" "(.+)"') def __init__(self): base.ApiBase.__init__(self, "gmail") self.token = "" def icon_url(self): ...
mit
1,942,986,103,054,837,800
28.94898
94
0.539353
false
eldarerathis/xpertmud
xpertmud/scripting/python/perl2python.py
1
1233
#!/usr/bin/python import sys import re line = sys.stdin.readline() while(line != ""): line = re.sub(r' {', r':', line) line = re.sub(r'}\s*', r'', line) line = re.sub(r'->', r'.', line) line = re.sub(r'sub', r'def', line) line = re.sub(r'elsif', r'elif', line) line = re.sub(r'\$(\d)', r'reS.mat...
gpl-2.0
-8,560,738,911,464,285,000
35.264706
82
0.453366
false
kashefy/nideep
nideep/iow/copy_lmdb.py
1
1826
''' Created on May 30, 2016 @author: kashefy ''' import lmdb from lmdb_utils import IDX_FMT, MAP_SZ def copy_samples_lmdb(path_lmdb, path_dst, keys, func_data=None): """ Copy select samples from an lmdb into another. Can be used for sampling from an lmdb into another and generating a random shuffle o...
bsd-2-clause
-6,608,046,657,129,439,000
30.482759
89
0.594743
false
leductan-nguyen/RaionPi
src/octoprint/plugins/softwareupdate/scripts/update-octoprint.py
1
6006
#!/bin/env python from __future__ import absolute_import __author__ = "Gina Haeussge <osd@foosel.net>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2014 The RaionPi Project - Released under terms of the AGPLv3 License" import errno import subp...
agpl-3.0
8,245,839,758,198,759,000
32.366667
135
0.670663
false
TopherGopher/aws-infra.jenkins-scripts
gluster.py
1
7395
#!/usr/bin/python import click import aws_instance import jenkins import jenkinspoll import subprocess import os import time aws_key='/var/jenkins_home/.ssh/aws.pem' CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) @click.group(context_settings=CONTEXT_SETTINGS) @click.version_option(version='1.0.0') def ...
mit
-5,279,975,518,175,508,000
34.552885
272
0.710074
false
sassoftware/pymaven
pymaven/artifact.py
1
4769
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
apache-2.0
7,652,122,665,989,008,000
30.375
78
0.534284
false
krzychb/rtd-test-bed
components/partition_table/test_gen_esp32part_host/gen_esp32part_tests.py
1
16713
#!/usr/bin/env python from __future__ import print_function, division import unittest import struct import csv import sys import subprocess import tempfile import os import io import re try: import gen_esp32part except ImportError: sys.path.append("..") import gen_esp32part SIMPLE_CSV = """ # Name,Type,Su...
apache-2.0
5,730,980,972,176,826,000
35.097192
121
0.585891
false
moxgreen/partial_corr.py
partial_corr.py
1
3301
#!/usr/bin/env python from sys import stdin, stderr from optparse import OptionParser import numpy as np from scipy import stats, linalg """ Partial Correlation in Python (clone of Matlab's partialcorr) This uses the linear regression approach to compute the partial correlation (might be slow for a huge number of v...
agpl-3.0
8,374,982,293,936,116,000
27.704348
108
0.646471
false
htcondor/htcondor
src/condor_contrib/condor_pigeon/src/condor_pigeon_client/skype_linux_tools/Skype4Py/utils.py
1
17863
'''Utility functions and classes used internally by Skype4Py. ''' import sys import weakref import threading from new import instancemethod def chop(s, n=1, d=None): '''Chops initial words from a string and returns a list of them and the rest of the string. @param s: String to chop from. @type s: str or...
apache-2.0
-8,032,516,272,118,471,000
34.869478
105
0.60477
false
bhrzslm/uncertainty-reasoning
my_engine/others/pbnt/examples/ExampleModels.py
1
3873
# PBNT: Python Bayes Network Toolbox # # Copyright (c) 2005, Elliot Cohen # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copy...
mit
3,967,815,240,085,659,600
32.580357
216
0.67338
false
ychab/mymoney-server
mymoney/core/tests/test_views.py
1
2328
from django.test import override_settings from rest_framework.reverse import reverse from rest_framework.test import APITestCase from mymoney.transactions.models import Transaction from ..factories import UserFactory class ConfigAPITestCase(APITestCase): @classmethod def setUpTestData(cls): cls.us...
bsd-3-clause
-8,764,923,689,607,414,000
33.716418
78
0.66896
false
fungos/gemuo
src/gemuo/data.py
1
8601
# # GemUO # # (c) 2005-2012 Max Kellermann <max@duempel.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in the hope tha...
gpl-2.0
-6,442,318,921,544,303,000
29.938849
92
0.537379
false
gonicus/gosa
backend/src/gosa/backend/objects/filter/strings.py
1
10619
# This file is part of the GOsa framework. # # http://gosa-project.org # # Copyright: # (C) 2016 GONICUS GmbH, Germany, http://www.gonicus.de # # See the LICENSE file in the project's top-level directory for details. import json import logging import re from gosa.backend.objects.filter import ElementFilter import dat...
lgpl-2.1
-5,871,137,458,832,482,000
26.371134
142
0.486957
false