repo_name
stringlengths
6
61
path
stringlengths
4
230
copies
stringlengths
1
3
size
stringlengths
4
6
text
stringlengths
1.01k
850k
license
stringclasses
15 values
hash
int64
-9,220,477,234,079,998,000
9,219,060,020B
line_mean
float64
11.6
96.6
line_max
int64
32
939
alpha_frac
float64
0.26
0.9
autogenerated
bool
1 class
ratio
float64
1.62
6.1
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
kidaa/ffrk-bottle
models/quest.py
1
4427
from __future__ import absolute_import import json import logging import sys from sqlalchemy import Column, Integer, String from sqlalchemy.orm import relationship from sqlalchemy.dialects.mysql import TINYINT from .base import BetterBase, session_scope from .drop import Drop from .log import Log from .prize import ...
gpl-3.0
-8,172,674,799,110,996,000
30.848921
74
0.521572
false
4.054029
false
false
false
Gebesa-Dev/Addons-gebesa
mrp_bom_detail_history/models/mrp_bom_detail_history.py
1
1232
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import fields, models class MrpBomDetailHistory(models.Model): _name = 'mrp.bom.detail.history' _description = 'Mrp Bom Detail History' product_master_id = fields.Many2one(...
agpl-3.0
-8,925,116,920,077,532,000
23.137255
68
0.562145
false
3.599415
false
false
false
AyoobAli/pyfuzz
pyfuzz.py
1
13022
#!/usr/bin/env python3 #### ### Project: Pyfuzz ### Version: 1.1.0 ### Creator: Ayoob Ali ( www.AyoobAli.com ) ### License: MIT ### import http.client import sys import os from optparse import OptionParser import string import signal import ssl from time import sleep import random import subprocess logFile = "" def s...
mit
-1,045,662,705,322,039,200
42.697987
214
0.568807
false
4.059227
false
false
false
kazcw/NGCCCBase
coloredcoinlib/builder.py
1
10522
""" Color data builder objects""" from logger import log from explorer import get_spends from toposort import toposorted class ColorDataBuilder(object): pass class ColorDataBuilderManager(object): """Manages multiple color data builders, one per color""" def __init__(self, colormap, blockchain_state, ...
mit
-6,262,354,011,642,335,000
35.408304
79
0.608154
false
3.314016
false
false
false
jamontes/plugin.video.latelelibre_fr
resources/lib/lutil.py
1
8978
# _*_ coding: utf-8 _*_ ''' lutil: library functions for KODI media add-ons. Copyright (C) 2017 José Antonio Montes (jamontes) 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 v...
gpl-3.0
-6,179,852,869,048,163,000
36.410042
139
0.608209
false
3.503527
false
false
false
jinzekid/codehub
python/day7/socket/socket_server.py
1
1384
# Author: Jason Lu ''' import socket server = socket.socket() server.bind(('localhost', 6969)) #绑定监听端口 server.listen(5) #监听数量5个 ''' ''' print("开始等电话了...") conn, addr = server.accept() # 等电话打进来 print("电话来了...%s" %(conn)) ''' # 英文 ''' data = conn.recv(1024) print("recv: %s" % (data)) ''' # 中文 '''' data = conn.recv(102...
gpl-3.0
-5,954,584,469,373,423,000
15.628571
43
0.541237
false
2.225621
false
false
false
dblodgett-usgs/OWSLib
examples/wps-pml-script-1.py
16
2404
# Example script that performs a set of (small) live requests versus the live PML WPS service from __future__ import absolute_import from __future__ import print_function from owslib.wps import WebProcessingService, monitorExecution # instantiate WPS client verbose = False wps = WebProcessingService('http://rsg.pml.a...
bsd-3-clause
6,431,059,856,046,459,000
48.061224
262
0.74376
false
3.101935
false
false
false
rs2/pandas
pandas/core/arrays/period.py
1
33033
from datetime import timedelta import operator from typing import Any, Callable, List, Optional, Sequence, Type, Union import numpy as np from pandas._libs.tslibs import ( BaseOffset, NaT, NaTType, Timedelta, delta_to_nanoseconds, dt64arr_to_periodarr as c_dt64arr_to_periodarr, iNaT, p...
bsd-3-clause
-2,622,719,645,001,006,600
29.389144
88
0.564587
false
4.033333
false
false
false
atiberghien/makerscience-server
makerscience_admin/middleware.py
1
2620
from django.conf import settings from django.http import HttpResponse from django.core.urlresolvers import resolve from .models import PageViews from ipware.ip import get_real_ip, get_ip import json class PageViewsMiddleware(object): def process_response(self, request, response): if request.method == ...
agpl-3.0
5,691,684,768,779,739,000
47.518519
138
0.509542
false
5.282258
false
false
false
jeffcharles/Open-Source-at-Laurier-Website
wluopensource/osl_voting/views.py
1
1390
from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.shortcuts import render_to_response from django.utils import simplejson from voting.models import Vote def get_vote_box_template(request, object_id, model, vote_url_name, vote_box_url_name): lo...
bsd-3-clause
-4,559,534,169,786,427,400
37.611111
80
0.645324
false
3.518987
false
false
false
blabla1337/skf-flask
skf/api/projects/endpoints/project_update.py
1
1283
from flask import request from flask_restplus import Resource from skf.api.security import security_headers, validate_privilege from skf.api.projects.business import update_project from skf.api.projects.serializers import project_update, message from skf.api.projects.parsers import authorization from skf.api.restplus ...
agpl-3.0
8,402,734,135,304,279,000
36.735294
90
0.700701
false
3.665714
false
false
false
rspavel/spack
var/spack/repos/builtin/packages/singularity/package.py
1
7578
# 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 * import llnl.util.tty as tty import os import shutil class Singularity(MakefilePackage): '''Sing...
lgpl-2.1
-8,852,560,500,763,001,000
42.302857
104
0.650699
false
3.347173
true
false
false
jclgoodwin/bustimes.org.uk
timetables/txc.py
1
27262
"""Represent TransXChange concepts, and generate a matrix timetable from TransXChange documents """ import re import xml.etree.cElementTree as ET import calendar import datetime import ciso8601 import logging from psycopg2.extras import DateRange as PDateRange from django.utils.text import slugify from django.utils.dat...
mpl-2.0
-4,024,976,303,751,727,000
37.022315
117
0.597021
false
3.869146
false
false
false
mesosphere/hackers-at-berkeley
find_hack/find_hack.py
1
1106
import sys from flask import Flask, jsonify import srvlookup app = Flask(__name__) mapping = { "10.0.4.70": "52.89.82.119", "10.0.4.63": "52.89.78.120", "10.0.4.66": "52.88.33.238", "10.0.4.71": "52.89.79.28", "10.0.4.64": "52.89.79.55", "10.0.4.68": "52.89.76.194", "10.0.4.69": "52...
apache-2.0
-1,163,061,589,259,164,000
24.72093
66
0.550633
false
2.614657
false
false
false
forseti-security/forseti-security
google/cloud/forseti/scanner/audit/firewall_rules_engine.py
1
24417
# Copyright 2017 The Forseti Security 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 ap...
apache-2.0
592,752,568,076,237,700
35.119822
80
0.588361
false
4.428183
false
false
false
openstack/zaqar
zaqar/conf/storage.py
1
2136
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
apache-2.0
415,385,300,332,636,350
29.956522
78
0.691011
false
4.350305
false
false
false
magicicada-bot/magicicada-server
magicicada/server/tests/test_volumes.py
1
18529
# -*- coding: utf-8 -*- # Copyright 2008-2015 Canonical # Copyright 2015-2018 Chicharreros (https://launchpad.net/~chicharreros) # # 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 ...
agpl-3.0
-5,594,257,917,132,242,000
41.877315
78
0.587432
false
4.088962
true
false
false
NeuralProsthesisLab/unlock
unlock/state/diagnostic_state.py
1
9523
# Copyright (c) Byron Galbraith and Unlock contributors. # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this...
bsd-3-clause
-16,656,330,169,797,434
37.873469
97
0.620183
false
4.402681
false
false
false
amolkahat/pandas
pandas/tests/extension/test_common.py
1
2329
import numpy as np import pytest import pandas as pd import pandas.util.testing as tm from pandas.core.arrays import ExtensionArray from pandas.core.dtypes.common import is_extension_array_dtype from pandas.core.dtypes import dtypes class DummyDtype(dtypes.ExtensionDtype): pass class DummyArray(ExtensionArray)...
bsd-3-clause
-8,029,631,026,453,329,000
24.043011
62
0.657364
false
3.633385
true
false
false
cwgreene/Nanostructure-Simulator
meshes/triangle/mesh_creator.py
1
1081
from dolfin import * import triangulate as trig from itertools import * def mesh_creator(triangles): #flatten triangle list print "triangles",triangles[0:1] points = trig.flat(triangles) print "points",points[0:3] #create mesh and editor mesh = Mesh() editor = MeshEditor() editor.open(mesh,"triangle",2,2) ...
mit
-1,139,904,979,769,238,100
24.139535
73
0.712303
false
2.793282
false
false
false
kalleastrom/LocoPositioningSystemSlam
python/data/converter.py
1
1346
""" Converts a .mat file to the appropriate JSON format """ import scipy.io as sio import os import json def convert_data_set(lfile): """ Converts a .mat file to the appropriate JSON format """ directory = os.path.dirname(os.path.abspath(__file__)) try: data = sio.loadmat(lfile) except:...
mit
4,789,105,622,986,190,000
28.282609
87
0.547548
false
3.677596
false
false
false
PnX-SI/GeoNature
install/deploy_gn/run.py
1
1403
import sys from config import * from connection import connect def deploy(): conn = connect() URL_SETTING = f"https://raw.githubusercontent.com/PnX-SI/GeoNature/{GN_VERSION}/install/install_all/install_all.ini" URL_SCRIPT = f"https://raw.githubusercontent.com/PnX-SI/GeoNature/{GN_VERSION}/install/install...
gpl-3.0
2,093,802,083,464,185,600
34.974359
120
0.626515
false
2.904762
false
false
false
protonyx/labtronyx-gui
labtronyxgui/common/rpc/jsonrpc.py
1
8281
import json """ JSON RPC Python class Follows the JSON RPC 2.0 Spec (http://www.jsonrpc.org/specification) This class can either be instantiated with a JSON encoded string or used as a utility helper class """ #=============================================================================== # Error Type #=========...
mit
6,244,627,912,885,074,000
32.257028
87
0.473735
false
4.699773
false
false
false
danielparton/TargetExplorer
targetexplorer/oncotator.py
3
1547
import urllib2 import json import StringIO def build_oncotator_search_string( chromosome_number, chromosome_start_pos, chromosome_end_pos, ref_allele, var_allele ): search_string = '{0}_{1}_{2}_{3}_{4}'.format( chromosome_number, chromosome_start_pos...
gpl-2.0
-6,292,946,117,440,557,000
24.360656
83
0.614092
false
3.540046
false
false
false
arborh/tensorflow
tensorflow/python/autograph/pyct/error_utils.py
3
6081
# 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,587,418,798,658,513,000
30.02551
80
0.667818
false
3.964146
false
false
false
simmetria/sentry
src/sentry/pool/redis.py
1
2551
""" sentry.pool.redis ~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import random from nydus.db import create_cluster class RedisCappedPool(object): """ Implements a capped queue based on Reservoir Sammpling ...
bsd-3-clause
2,098,426,676,678,218,000
33.472973
119
0.578989
false
3.894656
false
false
false
fluxer/spm
nuitka/nuitka/codegen/ExpressionCodes.py
1
2219
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
gpl-2.0
1,210,095,960,699,402,000
29.819444
80
0.646237
false
4.094096
false
false
false
carlgao/lenga
images/lenny64-peon/usr/share/python-support/pyrite-publisher/PyritePublisher/plugin_CSV.py
1
6822
# # $Id: plugin_CSV.py,v 1.1 2002/03/26 12:56:06 rob Exp $ # # Copyright 2001 Rob Tillotson <rob@pyrite.org> # All Rights Reserved # # Permission to use, copy, modify, and distribute this software and # its documentation for any purpose and without fee or royalty is # hereby granted, provided that the above copyr...
mit
4,477,478,368,812,505,600
32.772277
97
0.49355
false
4.124547
false
false
false
jpoppe/puppetmodules
modules/shared/reprepro/files/usr/local/bin/rep.py
1
7804
#!/usr/bin/env python """ rep.py (c) 2010-2011 eBay - written by Jasper Poppe <jpoppe@ebay.com> """ import optparse import os import pwd import subprocess def get_repos(path): """create a dictionary with all the repositories""" repos = os.listdir(path) repos = [repo for repo in repos if os.path.isfile(o...
apache-2.0
5,650,508,856,775,417,000
44.905882
147
0.587007
false
3.806829
false
false
false
lightalchemist/ML-algorithms
dim_reduction/test_spectral_embedding.py
1
1960
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import matplotlib.pyplot as plt from sklearn.datasets import make_moons import spectral_embedding import sys sys.path.insert(0, '../cluster') import kmeans def test(): k = 2 X, y_true = make_moons(n_samples=500, random_state=0, noise=0.01) ...
mit
-4,237,771,139,865,878,000
28.69697
85
0.593367
false
2.707182
false
false
false
milara/recipe-project-master-2016
autograder.py
1
5651
'''Version 0.33''' import json import csv import glob import sys import importlib from pprint import pprint from collections import Counter # init is an optional flag to indicate you're starting # over; old autograder results are written over and column # headers are printed to the file. team = "0" init = False for ar...
mit
7,319,128,202,753,511,000
37.442177
237
0.551584
false
3.727573
false
false
false
ivmech/iviny-scope
lib/xlsxwriter/test/comparison/test_chart_layout05.py
1
2626
############################################################################### # # 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
-7,320,063,357,677,295,000
25
79
0.464966
false
3.85044
true
false
false
tkliuxing/bookspider
bookspider/bookspider/spiders/qidianrank_spider.py
1
3343
# -*- coding: utf-8 -*- from __future__ import unicode_literals # import re import urlparse import urllib import time # import redis from pyquery import PyQuery as PQ from scrapy.spiders import Spider # from scrapy.selector import Selector from scrapy.http import Request from bookspider.items import QidianRankItem ...
apache-2.0
310,982,364,915,513,540
36.561798
82
0.56566
false
3.264648
false
false
false
scizen9/kpy
SEDMrph/transformations.py
1
3245
# -*- coding: utf-8 -*- """ Created on Thu Dec 3 15:25:46 2015 @author: nadiablago """ import numpy as np def johnson2sdss(U, B, V, R, I): '''global transformations between UBVRI and ugriz''' ''' #Color Color Term Zeropoint Range "gV": (0.630 ± 0.002) (B − V) −(0.124 ± 0.002) "ri": (1.007 ± ...
gpl-2.0
-1,532,624,609,444,865,500
39.641026
149
0.422215
false
2.060468
false
false
false
waipu/bakawipe
lib/beon/exc.py
1
1273
# -*- coding: utf-8 -*- # -*- mode: python -*- from exceptions import * class InvalidLogin(PermanentError, AnswerException): pass class GuestDeny(PermanentError, AnswerException): pass class UserDeny(PermanentError, AnswerException): pass class Bumplimit(PermanentError, AnswerException): pass class PermClosed(Permanen...
gpl-3.0
673,661,353,908,967,800
38.78125
79
0.769049
false
4.05414
false
false
false
mfisk/smacq
pysmacq/smacq.py
1
8900
"""System for Modular Analysis and Continuous Queries. See http://smacq.sourceforge.net/ """ import libpysmacq import time, sys # TODO: # Change all instances of raise Exception to raise More_Appropriate_Exception class SmacqQuery: # {{{ """Executes one or more queries in the SMACQ (System for Modular Analysis...
gpl-2.0
8,746,293,703,037,373,000
29.902778
108
0.611798
false
3.806672
false
false
false
jadarve/optical-flow-filter
python/flowfilter/propagation.py
1
9419
""" flowfilter.propagation ---------------------- Module containing propagation methods. :copyright: 2015, Juan David Adarve, ANU. See AUTHORS for more details :license: 3-clause BSD, see LICENSE for more details """ import numpy as np import scipy.ndimage as nd __all__ = ['dominantFlowX', 'dom...
bsd-3-clause
-5,081,180,791,804,882,000
26.144092
94
0.573097
false
3.476929
false
false
false
stefanklug/mapnik
scons/scons-local-2.3.6/SCons/Tool/ipkg.py
4
2475
"""SCons.Tool.ipkg Tool-specific initialization for ipkg. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. The ipkg tool calls the ipkg-build. Its only argument should be the packages fake_root. """ # # Copyrigh...
lgpl-2.1
-683,296,968,136,176,600
35.940299
103
0.684848
false
3.761398
false
false
false
dkodnik/arp
addons/website_sale_delivery/models/sale_order.py
39
5989
# -*- coding: utf-8 -*- from openerp.osv import orm, fields from openerp import SUPERUSER_ID from openerp.addons import decimal_precision class delivery_carrier(orm.Model): _inherit = 'delivery.carrier' _columns = { 'website_published': fields.boolean('Available in the website'), 'website_des...
agpl-3.0
-115,469,809,943,804,400
46.531746
127
0.605944
false
3.934954
false
false
false
mfm24/uidecorators
qt_framework.py
1
7615
# -*- coding: utf-8 -*- """ Created on Sat May 4 22:07:54 2013 @author: matt Qt-specific code for creating UI elements from objects decorated with ui_decorators """ from ui_decorators import * #UI creation from properties: import PySide.QtCore import PySide.QtGui from Queue import Queue _bool_checkstate_map = {True...
apache-2.0
341,605,952,793,275,140
39.084211
140
0.603808
false
4.074371
false
false
false
corinnelhh/chatbot
brains.py
1
2729
import random from nltk.tokenize import wordpunct_tokenize from collections import OrderedDict from trainbot import Trainbot import chatbot_brain brain_dict = OrderedDict({}) def add_func_to_dict(name=None): def wrapper(func): function_name = name if function_name is None: function_nam...
mit
7,755,319,220,106,287,000
33.987179
74
0.580799
false
4.007342
false
false
false
dherrendoerfer/My-3D-Things
Malyan-M180-docs/settings-tools/m180_sanify.py
1
1090
#!/usr/bin/python import sys, getopt def main(argv): inputfile = '' outputfile = '' count = 0 try: opts, args = getopt.getopt(argv,"hi:o:",["ifile=","ofile="]) except getopt.GetoptError: print 'test.py -i <inputfile> -o <outputfile>' sys.exit(2) for opt, arg in opts: ...
cc0-1.0
-7,753,466,669,175,833,000
24.585366
73
0.511927
false
3.273273
false
false
false
mcocdawc/chemcoord
src/chemcoord/cartesian_coordinates/_cartesian_class_symmetry.py
1
4797
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals, with_statement) from chemcoord.cartesian_coordinates._cartesian_class_core import CartesianCore from chemcoord.cartesian_coordinates.point_group import PointGroupOperations class Carte...
lgpl-3.0
-520,179,848,877,947,600
38.644628
79
0.603294
false
4.388838
false
false
false
replica-con-k/retropi3d_engine
tests/26_puppet_inherit.py
1
1591
#!/usr/bin/env python # import glob import random import test import replika import replika.assets from replika.ingame import action background = replika.assets.image('../assets/background.jpg') woman = replika.assets.Loop( replika.assets.images(sorted(glob.glob('../assets/walk_*.png')))) class Woman(replika.i...
gpl-3.0
4,187,544,860,923,314,700
27.410714
74
0.634821
false
3.342437
true
false
false
chasing0819/Sample_CPP_Cocos2dx
tools/cocos2d-console/plugins/plugin_update.py
33
1759
# ---------------------------------------------------------------------------- # cocos2d "update" plugin # # Author: Luis Parravicini # # License: MIT # ---------------------------------------------------------------------------- ''' "update" plugin for cocos2d command line tool ''' __docformat__ = 'restructuredtext' ...
mit
-1,075,677,219,558,098,000
27.836066
106
0.558272
false
4.148585
true
false
false
akelux-github/typendraw
typendraw.py
1
5213
""" A canvas class with type and draw feature. Author: Rong Xiao <akelux@gmail.com> LICENSE: GPL 2.0 """ try: # Python2 import Tkinter as tk except ImportError: # Python3 import tkinter as tk from font_chooser import askChooseFont from tkColorChooser import askcolor import tkFileDialog, tkMessageBox...
gpl-2.0
-3,260,505,024,188,491,300
29.664706
146
0.525417
false
3.852919
false
false
false
t3dev/odoo
addons/point_of_sale/wizard/pos_payment.py
4
2994
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.tools import float_is_zero class PosMakePayment(models.TransientModel): _name = 'pos.make.payment' _description = 'Point of Sale Payment' def _default_sess...
gpl-3.0
-5,949,387,394,674,377,000
37.384615
115
0.601202
false
3.766038
false
false
false
d2emon/generator-pack
src/genesys/generator/fng/description/character/__init__.py
1
3300
from genesys.generator._unknown.character import race import random class Mark(): types = [] # 12 places_from = [] # 13 places_through = [] # 14 places_to = [] # 15 memory_types = [] # 16 memory_ofs = [] # 17 def __init__(self, name_id): self.name_id = name_id class Scar(M...
gpl-3.0
2,039,169,166,083,165,700
22.913043
138
0.534848
false
3.095685
false
false
false
grit-engine/grit-engine
dependencies/quex-0.34.1/quex/core_engine/generator/base.py
2
8715
from quex.frs_py.file_in import error_msg import quex.core_engine.state_machine.parallelize as parallelize from quex.core_engine.generator.action_info import PatternActionInfo import quex.core_engine.state_machine.nfa_to_dfa as nfa_to_dfa import quex.core_engine.state_machine.hopcrof...
mit
-2,361,270,941,677,922,300
49.375723
114
0.590476
false
4.029126
false
false
false
Ehco1996/django-sspanel
apps/sspanel/migrations/0004_auto_20201108_0400.py
1
10904
# Generated by Django 3.1.2 on 2020-11-07 20:00 from decimal import Decimal import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("sspanel", "0003_auto_20200729_0733"), ] operations = [ migrations.CreateModel(...
gpl-3.0
804,888,003,165,539,600
34.856164
88
0.316141
false
4.655402
false
false
false
wavefrontHQ/python-client
wavefront_api_client/api/search_api.py
1
285331
# coding: utf-8 """ Wavefront REST API <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ...
apache-2.0
-6,381,698,075,157,138,000
38.236936
409
0.586333
false
4.206623
false
false
false
jordij/menorkayak
config/settings/local.py
1
2241
# -*- coding: utf-8 -*- """ Local settings - Run in Debug mode - Use console backend for emails - Add Django Debug Toolbar - Add django-extensions as app """ import socket import os from .base import * # noqa # DEBUG # ------------------------------------------------------------------------------ DEBUG = env.bool...
mit
-3,946,521,920,245,016,600
29.283784
99
0.484159
false
4.15
false
false
false
joeedh/webblender
tools/extjs_cc/js_smcat.py
1
1399
#!/usr/bin/env python3 import sys, os.path, os, time, stat, struct, ctypes, io, subprocess, math, random, difflib import ply, re, traceback import argparse, base64, json from js_global import AbstractGlob from js_cc import concat_smaps #source map concatenator, for #browsers that don't support #index maps class Local...
apache-2.0
542,645,221,419,791,800
20.19697
90
0.596855
false
3.420538
false
false
false
looprock/Megaphone
sample_service2.py
1
1843
#!/usr/bin/env python import json import sys import os from bottle import route, run, get import time import httplib server = "127.0.0.1" statport = "18082" host = "%s:18001" % server staturl = "http://%s:%s/status" % (server,statport) blob = {"id": "foo", "url": staturl} data = json.dumps(blob) connection = httplib...
isc
8,763,208,669,548,261,000
25.623188
107
0.623843
false
3.183709
false
false
false
fluxcapacitor/pipeline
libs/pipeline_model/tensorflow/core/framework/tensor_description_pb2.py
1
4799
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: tensorflow/core/framework/tensor_description.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google...
apache-2.0
-6,591,478,038,082,507,000
46.04902
598
0.770994
false
3.450036
false
true
false
MattPerron/esper
esper/query/management/commands/face_gender.py
1
1653
from django.core.management.base import BaseCommand from faceDB.face_db import FaceDB from faceDB.face import FaceCluster from faceDB.util import * # only required for saving cluster images from carnie_helper import RudeCarnie from query.models import * import random import json class Command(BaseCommand): help ...
apache-2.0
5,525,166,055,548,253,000
32.734694
89
0.611615
false
3.487342
false
false
false
antoinecarme/pyaf
pyaf/TS/PredictionIntervals.py
1
3711
# Copyright (C) 2016 Antoine Carme <Antoine.Carme@Laposte.net> # All rights reserved. # This file is part of the Python Automatic Forecasting (PyAF) library and is made available under # the terms of the 3 Clause BSD license import pandas as pd import numpy as np from . import SignalDecomposition as sigdec from . i...
bsd-3-clause
1,306,167,367,611,973,600
49.148649
169
0.642684
false
3.289894
true
false
false
lxylinki/medCC
src/main/resources/output/evalresults2014/avgImpNew/overIndex/impoverss.py
1
1586
#!/usr/bin/python3 # generate a 20x20 matrix import os def collectimps(Mods, Edges, maxbudlevel): filedir = './' outfilename = 'impoverss.dat' outfilename = os.path.join('./', outfilename) outfile = open(outfilename, 'w') # for each bud level for x in range(1, maxbudlevel+1): impov...
gpl-3.0
6,885,915,757,102,359,000
28.924528
73
0.504414
false
3.388889
false
false
false
kholia/ReproducibleBuilds
koji/ssl/SSLCommon.py
1
5017
# 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 distributed in the hope that it will be useful, # bu...
gpl-2.0
-5,407,672,898,626,829,000
34.58156
100
0.644608
false
3.732887
false
false
false
ainterr/scoring_engine
scoring_engine/settings.py
1
4139
import os import logging # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/ # SECURITY WAR...
mit
-1,615,866,596,781,920,500
25.196203
91
0.624547
false
3.637083
false
false
false
crooks/mimix
mimix/webcgi.py
1
1333
#!/usr/bin/python # # vim: tabstop=4 expandtab shiftwidth=4 noautoindent # # webcgi.py - CGI file for storing Mimix messages in a Pool # # Copyright (C) 2014 Steve Crook <steve@mixmin.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as ...
gpl-3.0
-14,758,339,898,345,144
30
78
0.694674
false
3.426735
false
false
false
polarise/RP-python
name_change.py
1
1132
#!/home/paulk/software/bin/python from sys import argv,stderr,stdout import argparse parser = argparse.ArgumentParser(description="Script to replace a column in a file with another identifier given a map between identifiers.") parser.add_argument('infile',help="the file whose column is to be swapped") parser.add_argum...
gpl-2.0
8,682,498,210,810,467,000
28.789474
141
0.688163
false
3.026738
false
false
false
sebrandon1/nova
nova/tests/unit/scheduler/test_scheduler_utils.py
4
17048
# Copyright (c) 2013 Rackspace Hosting # 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 req...
apache-2.0
2,927,628,251,592,277,500
44.340426
78
0.558013
false
4.36345
true
false
false
redhat-openstack/python-neutronclient
quantumclient/tests/unit/test_cli20_subnet.py
1
15395
# Copyright 2012 OpenStack LLC. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
apache-2.0
-4,125,228,170,321,448,400
42.735795
79
0.517895
false
3.63004
true
false
false
hankcs/HanLP
hanlp/components/parsers/constituency/crf_constituency_model.py
1
9086
# -*- coding:utf-8 -*- # Adopted from https://github.com/yzhangcs/parser # MIT License # # Copyright (c) 2020 Yu Zhang # # 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, i...
apache-2.0
4,345,479,136,631,748,600
41.457944
122
0.596412
false
3.698006
false
false
false
shiny-fortnight/auto_id
OpenCNAMAPI.py
1
1598
#!/bin/python # coding: utf-8 """ Python API to retrieve Caller ID from phone number using OpenCNAM api. """ import requests from bs4 import BeautifulSoup import json import phonenumbers class OpenCNAMAPI(object): """ OpenCNAMAPI Main Handler """ _instance = None _verbose = False def ...
apache-2.0
-447,218,251,182,167,500
28.054545
160
0.611389
false
3.519824
false
false
false
csala/zato
code/zato-server/test/zato/server/service/internal/outgoing/test_ftp.py
6
7296
# -*- coding: utf-8 -*- """ Copyright (C) 2013 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 # Bunch from bunch import Bunch # Zato from zato.common import zato_namespace fr...
gpl-3.0
-9,125,045,859,334,039,000
44.31677
146
0.611979
false
3.920473
true
false
false
geoffkilpin/pombola
pombola/settings/base.py
1
20414
import os import re import yaml from .apps import * from django.template.defaultfilters import slugify from pombola.core.logging_filters import skip_unreadable_post from pombola.hansard.constants import NAME_SUBSTRING_MATCH, NAME_SET_INTERSECTION_MATCH IN_TEST_MODE = False # Work out where we are to set up the pat...
agpl-3.0
4,693,962,837,680,868,000
31.6624
98
0.654845
false
3.346009
true
false
false
gbanegas/KissECC
attack_ecc/old/window_attack.py
1
4626
import random import math from itertools import product from itertools import chain from thread_sum import ThreadSum q = 2**252 + 27742317777372353535851937790883648493 r = [] v = [] alpha = [] def int_to_bin(number): return [int(x) for x in bin(number)[2:]] def bin_to_int(bit_list): output = 0 for bit ...
apache-2.0
1,589,489,777,004,982,000
30.684932
97
0.521401
false
3.292527
false
false
false
cloudsigma/cloud-init
cloudinit/handlers/boot_hook.py
6
2676
# vi: ts=4 expandtab # # Copyright (C) 2012 Canonical Ltd. # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # Copyright (C) 2012 Yahoo! Inc. # # Author: Scott Moser <scott.moser@canonical.com> # Author: Juerg Haefliger <juerg.haefliger@hp.com> # Author: Joshua Harlow <harlowja@yahoo-inc....
gpl-3.0
7,836,307,426,370,143,000
36.690141
77
0.649851
false
3.77433
false
false
false
apenwarr/bup
cmd/tag-cmd.py
8
1981
#!/usr/bin/env python """Tag a commit in the bup repository. Creating a tag on a commit can be used for avoiding automatic cleanup from removing this commit due to old age. """ import sys import os from bup import git, options from bup.helpers import * handle_ctrl_c() optspec = """ bup tag bup tag <tag name> <commi...
lgpl-2.1
-7,389,819,531,498,158,000
21.770115
74
0.614841
false
2.747573
false
false
false
ricardaw/pismdev
examples/ross/prognostic/preprocess_prog.py
5
7797
#!/usr/bin/env python # Import all necessary modules here so that if it fails, it fails early. try: import netCDF4 as NC except: import netCDF3 as NC import subprocess import numpy as np import os smb_name = "climatic_mass_balance" temp_name = "ice_surface_temp" def run(commands): """Run a list of comm...
gpl-2.0
247,885,660,459,141,630
31.219008
106
0.559446
false
3.086698
false
false
false
karulont/combopt
project8/concord.py
1
4102
from sys import argv, stdout import networkx as nx import subprocess as proc import os INFTY = 999999 def read_rpp(fname): with open(fname) as f: lines = [s for s in [l.strip() for l in f] if s and not s.startswith('#')] n, m = lines[0].split() print('N:', n, 'M:', m) edges = [(int(u), int...
mit
-5,280,329,697,371,602,000
26.5
136
0.547782
false
2.636247
false
false
false
rafaelolg/visiondataset
visiondataset/datasets/migrations/0002_auto__add_dataset__add_datum.py
1
5921
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Dataset' db.create_table('datasets_dataset', ( ('id', self.gf('django.db.models....
gpl-3.0
-3,515,394,332,634,719,700
61.336842
182
0.561561
false
3.738005
false
false
false
leasunhy/GalaxyOJ
manager.py
1
1996
import os from flask.ext.script import Manager, Shell, Command from flask.ext.migrate import Migrate, MigrateCommand from server import app, db from server.models import * migrate = Migrate(app, db) manager = Manager(app) manager.add_command('db', MigrateCommand) def make_shell_context(): return dict(app=app, d...
gpl-3.0
-5,505,434,221,279,720,000
25.613333
83
0.649299
false
3.109034
false
false
false
hariharaselvam/djangotraining
ecommerce/settings.py
1
3406
""" Django settings for ecommerce project. Generated by 'django-admin startproject' using Django 1.9.4. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os ...
apache-2.0
-1,010,263,903,655,032,300
25.403101
91
0.688197
false
3.49692
false
false
false
openearth/PyWPS
pywps/utils.py
1
2556
import tempfile import json import os import shapely.wkt import shapely.geometry def first_from_filename(filename): """read the first geometry from filename""" import ogr ds = ogr.Open(filename) layer = ds.GetLayer(0) feature = layer.GetFeature(0) geometry = feature.geometry() wkt = geomet...
gpl-2.0
-2,127,957,431,719,990,300
29.428571
103
0.571987
false
3.6
false
false
false
earlideal/jiandan
misc/untitled.py
1
2220
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'untitled.ui' # # Created by: PyQt4 UI code generator 4.11.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s): ...
apache-2.0
4,534,596,966,765,934,600
37.947368
79
0.703153
false
4.228571
false
false
false
belokop/indico_bare
indico/modules/categories/models/legacy_mapping.py
1
1531
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
gpl-3.0
4,220,421,249,217,486,300
31.574468
98
0.700196
false
3.997389
false
false
false
JohnLunzer/flexx
flexx/ui/widgets/_bokeh.py
1
4204
""" Simple example: .. UIExample:: 300 import numpy as np from bokeh.plotting import figure from flexx import app, ui, event x = np.linspace(0, 6, 50) p1 = figure() p1.line(x, np.sin(x)) p2 = figure() p2.line(x, np.cos(x)) class Example(ui.Widget): ...
bsd-2-clause
6,902,889,755,763,184,000
30.848485
79
0.558516
false
3.801085
false
false
false
Tafkas/fritzbox-munin
fritzbox_power_consumption.py
1
3244
#!/usr/bin/env python3 # coding=utf-8 """ fritzbox_power_consumption - A munin plugin for Linux to monitor AVM Fritzbox Copyright (C) 2015 Christian Stade-Schuldt Author: Christian Stade-Schuldt Like Munin, this plugin is licensed under the GNU GPL v2 license http://www.opensource.org/licenses/GPL-2.0 Add t...
gpl-2.0
-9,206,741,028,250,949,000
31.44
79
0.655055
false
3.300102
false
false
false
saschwarz/django-stw
stw/templatetags/shrinkthewebtags.py
1
3582
""" Django template tags for inserting Shrink The Web images into templates. There is one templatetag: - stwimage - supports all free and PRO features. - shrinkthewebimage - the original image insertion templatetag that implements the STW preview feature. This is DEPRECATED. """ from collections import OrderedDict ...
mit
6,499,853,531,888,666,000
32.166667
127
0.635678
false
4.047458
false
false
false
jtwhite79/pyemu
examples/Freyberg_Truth/Process_output.py
1
1603
from __future__ import print_function import flopy from flopy import utils as fu import platform import numpy as np if 'window' in platform.platform().lower(): newln = '\n' else: newln = '\r\n' print ('Starting to read HYDMOD data') obs = flopy.utils.HydmodObs('freyberg.hyd.bin') times = obs.get_times() read...
bsd-3-clause
-6,881,194,321,184,488,000
33.847826
108
0.666251
false
2.694118
false
false
false
skytoup/AppServer
app/blueprints/apps.py
1
6419
# -*- coding: utf-8 -*- # Created by apple on 2017/2/5. import os from ..log import log from ..config import Config from sqlalchemy import func, desc from sanic import Blueprint from sanic.request import Request from sanic.response import text from ..exceptions import BadRequest from ..utils import JsonResult, Regex, ...
mit
5,114,168,623,798,925,000
31.592784
117
0.580104
false
3.568284
true
false
false
karolisr/krpy
krpy/tools/check-synonymy-for-ncbi-records.py
2
5302
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function # from __future__ import unicode_literals if __name__ == '__main__': import os import argparse from krpy import krseqsearch from krpy import krio from krpy import krbioio from krpy import krseq from krpy ...
gpl-3.0
5,662,015,182,590,594,000
30.372781
91
0.563372
false
3.651515
false
false
false
JasonLG1979/pithos
pithos/pandora/pandora.py
1
23793
# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: nil; -*- # Copyright (C) 2010 Kevin Mehall <km@kevinmehall.net> # Copyright (C) 2012 Christopher Eby <kreed@kreed.org> # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as publishe...
gpl-3.0
5,187,091,006,426,525,000
38.262376
148
0.611819
false
3.825241
false
false
false
lablup/sorna-manager
tests/gateway/test_utils.py
1
1688
import asyncio import pytest from ai.backend.manager.models import verify_dotfile_name, verify_vfolder_name from ai.backend.gateway.utils import ( call_non_bursty, ) @pytest.mark.asyncio async def test_call_non_bursty(): key = 'x' execution_count = 0 async def execute(): nonlocal execution_...
lgpl-3.0
3,031,620,088,801,859,000
25.793651
78
0.675355
false
3.583864
true
false
false
virt-manager/virt-manager
virtManager/createconn.py
2
9260
# Copyright (C) 2006, 2013 Red Hat, Inc. # Copyright (C) 2006 Daniel P. Berrange <berrange@redhat.com> # # This work is licensed under the GNU GPLv2 or later. # See the COPYING file in the top-level directory. import glob import os import urllib.parse from gi.repository import Gtk from virtinst import log from .lib...
gpl-2.0
4,736,887,359,726,736,000
31.264808
77
0.576242
false
3.56428
false
false
false
hildeth/chapel
util/test/send_email.py
3
4970
#!/usr/bin/env python """Portable email sender. Acts as replacement for mail, Mail, mailx, email (cygwin). Message body is taken from stdin. """ from __future__ import print_function import email.mime.text import getpass import logging import optparse import os import smtplib import socket import sys def main(): ...
apache-2.0
797,079,011,877,448,400
28.939759
93
0.635412
false
3.922652
false
false
false
davinwang/caffe2
caffe2/python/layers/add_bias.py
4
2212
# Copyright (c) 2016-present, Facebook, 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...
apache-2.0
6,581,035,748,500,131,000
36.491525
78
0.629747
false
3.942959
false
false
false
bsmithyman/pygeo
util/segy2fast.py
1
7338
#!/usr/bin/env python # pygeo - a distribution of tools for managing geophysical data # Copyright (C) 2011, 2012 Brendan Smithyman # This file is part of pygeo. # pygeo 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 Sof...
gpl-3.0
-5,089,923,384,913,584,000
28.119048
92
0.633688
false
3.006145
false
false
false
packdl/Relations
Relations.py
1
36944
# # Gramps - a GTK+/GNOME based genealogy program - Family Sheet plugin # # Copyright (C) 2008,2009,2010 Reinhard Mueller # Copyright (C) 2010 Jakim Friant # # 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 Softwa...
mit
7,471,650,773,089,485,000
36.092369
126
0.565071
false
4.037154
false
false
false
vinnyspb/nexa-controller-rpi
datadog_stat.py
1
1424
import httplib import time class DataDogStat: def __init__(self, config): self._config = config def post_status(self, status): conn = httplib.HTTPSConnection("app.datadoghq.com", timeout=60) conn.request("GET", "/api/v1/validate?api_key=" + self._config.DATADOG_API_KEY) r1 = c...
mit
-6,053,304,983,212,914,000
37.486486
87
0.554775
false
3.632653
true
false
false
PaddlePaddle/Paddle
python/paddle/distributed/fleet/runtime/parameter_server_runtime.py
1
27324
# Copyright (c) 2020 PaddlePaddle 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 appli...
apache-2.0
1,028,175,440,913,156,700
39.843049
132
0.544576
false
4.318634
true
false
false
LLNL/spack
var/spack/repos/builtin/packages/r-genomicfeatures/package.py
5
3183
# 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 RGenomicfeatures(RPackage): """Conveniently import and query gene models. A set of...
lgpl-2.1
8,884,826,130,342,280,000
54.842105
82
0.649387
false
2.844504
false
false
false
scottsilverlabs/raspberrystem
rstem/projects/led_matrix_games/game_of_life.py
1
4277
#!/usr/bin/env python3 # # Copyright (c) 2014, Scott Silver Labs, 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 require...
apache-2.0
-1,774,233,955,111,298,800
29.333333
92
0.594342
false
3.555278
false
false
false
DolphDev/PSV
psv/core/objects/rowobjects.py
2
14722
from ..utils import asciireplace, limit_text from ..exceptions.messages import RowObjectMsg as msg from functools import lru_cache from tabulate import tabulate from string import ascii_lowercase, digits from types import FunctionType import keyword accepted_chars = (ascii_lowercase + "_" + digits) class Row(dict):...
mit
-8,322,092,544,493,355,000
36.365482
109
0.545238
false
4.503518
false
false
false
lmorillas/python_events
extract_calendars.py
1
7866
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 @lmorillas. 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...
apache-2.0
-6,285,781,665,194,991,000
27.298561
112
0.606153
false
3.655204
false
false
false
bbc/kamaelia
Sketches/PT/BouncingCatGame/X-MPS-likesprite.py
3
4359
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License,...
apache-2.0
8,544,102,827,104,753,000
35.940678
122
0.681349
false
3.541024
false
false
false
miyyer/qb
qanta/buzzer/util.py
2
7569
import os import pickle import numpy as np import chainer from multiprocessing import Pool from functools import partial from chainer import Variable from chainer.backends import cuda from qanta.datasets.quiz_bowl import QuizBowlDataset from qanta.guesser.abstract import AbstractGuesser from qanta.util.constants import...
mit
5,055,332,657,816,431,000
34.535211
82
0.570485
false
3.182927
false
false
false