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
CylonicRaider/Instant
script/colorlogs.py
1
5716
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Perform syntax highlighting on Scribe logs. """ import sys, os, re import time import errno import instabot # Hard-coded ANSI escape sequences for coloring. COLORS = {None: '\033[0m', 'bold': '\033[1m', 'black': '\033[30m', 'red': '\033[31m', 'green': '\033[32m...
mit
5,965,448,285,206,380,000
35.177215
77
0.520469
false
3.574734
false
false
false
openstack/senlin
contrib/kubernetes/kube/master.py
1
10788
# 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 unde...
apache-2.0
4,121,959,655,715,227,600
37.666667
79
0.540786
false
4.157225
false
false
false
richardkiss/pycoin
pycoin/key/electrum.py
1
3426
import hashlib from .subpaths import subpaths_for_path_range from pycoin.encoding.bytes32 import from_bytes_32, to_bytes_32 from pycoin.encoding.hash import double_sha256 from pycoin.encoding.hexbytes import b2h from pycoin.key.Key import Key def initial_key_to_master_key(initial_key): """ initial_key: ...
mit
-3,823,016,807,712,825,300
33.26
108
0.593695
false
3.557632
false
false
false
Xilef11/runesofwizardry-classics
createrune.py
1
1958
import sys rune_Path = "./src/main/java/xilef11/mc/runesofwizardry_classics/runes/Rune" lang_file = "src/main/resources/assets/runesofwizardry_classics/lang/en_US.lang" runes_file = "src/main/java/xilef11/mc/runesofwizardry_classics/ModRunes.java" shortName = sys.argv[1] locName = sys.argv[2] clas = open(rune_Path+sho...
gpl-3.0
5,626,017,188,564,619,000
28.223881
85
0.752809
false
2.727019
false
false
false
eudaq/eudaq-configuration
jtag_generation/others/plume/okf7/chip3/jtag_generator.py
1
4579
# JTAG files generator # calculates DAC values for different S/N cuts (3 to 12) and generates JTAG (txt) files, update creation date # by Jan Dreyling-Eschweiler, telescope-coor@desy.de # First version: 4. September 2015 # ----------------------- # modules import re import math import numpy as np import time ########...
lgpl-3.0
-1,253,853,782,808,532,000
28.928105
125
0.605809
false
2.367632
false
false
false
ericacheong/p4_conference_central
models.py
1
4915
#!/usr/bin/env python """models.py Udacity conference server-side Python App Engine data & ProtoRPC models $Id: models.py,v 1.1 2014/05/24 22:01:10 wesc Exp $ created/forked from conferences.py by wesc on 2014 may 24 """ __author__ = 'wesc+api@google.com (Wesley Chun)' import httplib import endpoints from protor...
apache-2.0
8,344,834,078,810,159,000
34.359712
86
0.684842
false
3.913217
false
false
false
mastizada/kuma
kuma/search/models.py
1
15211
# -*- coding: utf-8 -*- import operator from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.db import models from django.db.models.signals import post_delete from django.utils.html import strip_tags from django.utils imp...
mpl-2.0
168,948,031,515,714,620
35.125891
79
0.509369
false
4.515736
false
false
false
deerwalk/voltdb
lib/python/voltcli/voltadmin.d/stop.py
1
3134
# This file is part of VoltDB. # Copyright (C) 2008-2017 VoltDB Inc. # # 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 ver...
agpl-3.0
2,137,626,913,957,797,000
40.786667
112
0.64933
false
3.859606
false
false
false
13steinj/praw
praw/objector.py
1
6362
"""Provides the Objector class.""" import re from .exceptions import APIException class Objector(object): """The objector builds :class:`.RedditBase` objects.""" @staticmethod def _camel_to_snake(name): """Return `name` converted from camelCase to snake_case. Code from http://stackoverf...
bsd-2-clause
7,777,390,700,536,816,000
38.271605
78
0.553128
false
4.088689
true
false
false
vroomfondle/podi
app/controllers/play_controller.py
1
6940
""" Podi, a command-line interface for Kodi. Copyright (C) 2015 Peter Frost <slimeypete@gmail.com> 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,164,990,353,190,180,000
42.375
125
0.598847
false
4.497732
false
false
false
shailcoolboy/Warp-Trinity
ResearchApps/Measurement/examples/TxPower_vs_BER/TxPower_vs_BER.py
2
3070
from warpnet_client import * from warpnet_common_params import * from warpnet_experiment_structs import * from twisted.internet import reactor from datetime import * import time minTime = 10 pktLen = 1412 pktPeriod = 2000 mod_hdr = 2 mod_payload = 2 txGains = [30, 45, 60]; class ScriptMaster: def startup(self): ...
bsd-2-clause
5,196,952,186,976,665,000
27.425926
81
0.695114
false
3.10101
false
false
false
yangjincai/Xq2EFT
test_eft_calculator.py
1
3471
#!/usr/bin/env python2 import numpy as np from time import time import heapq from matplotlib import pyplot as plt from eft_calculator import EFT_calculator, Water import tools def load_coordinates(name): lines = open('test.dat/random/'+name).readlines()[-7:-1] coors = [[float(item) for item in line.split()[...
apache-2.0
7,625,391,754,920,505,000
28.666667
121
0.518294
false
2.6557
false
false
false
mariocesar/django-startup
startup/accounts/models.py
1
2514
# coding=utf-8 from django.core.mail import send_mail from django.db import models from django.core import validators from django.conf import settings from django.utils.translation import ugettext_lazy as _ from django.utils import timezone from django.contrib.auth.models import AbstractBaseUser, UserManager, Permis...
mit
7,783,932,481,574,590,000
31.649351
103
0.639618
false
4.114566
false
false
false
elentarion/RatticWeb
cred/migrations/0035_auto__add_field_cred_expire_time.py
1
7806
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Cred.expire_time' db.add_column(u'cred_cred', 'expire_tim...
gpl-2.0
8,432,225,457,294,191,000
74.796117
217
0.549321
false
3.557885
false
false
false
birkin/rapid_exports
rapid_app/models.py
1
6176
# -*- coding: utf-8 -*- from __future__ import unicode_literals import codecs, csv, datetime, ftplib, itertools, json, logging, operator, os, pprint, shutil, time, zipfile import MySQLdb # really pymysql; see config/__init__.py import requests from django.conf import settings as project_settings from django.core.url...
mit
-5,328,917,401,375,825,000
41.888889
201
0.650259
false
3.833644
false
false
false
boudinfl/pke
pke/unsupervised/graph_based/textrank.py
1
6828
# -*- coding: utf-8 -*- # Authors: Ygor Gallina, Florian Boudin # Date: 10-18-2018 """TextRank keyphrase extraction model. Implementation of the TextRank model for keyword extraction described in: * Rada Mihalcea and Paul Tarau. TextRank: Bringing Order into Texts *In Proceedings of EMNLP*, 2004. """ from __fu...
gpl-3.0
159,721,785,282,820,700
35.908108
80
0.60208
false
4.278195
false
false
false
diofant/diofant
diofant/domains/realfield.py
1
3327
"""Implementation of :class:`RealField` class.""" from __future__ import annotations import mpmath from ..core import Float from ..polys.polyerrors import CoercionFailed from .characteristiczero import CharacteristicZero from .field import Field from .mpelements import MPContext from .simpledomain import SimpleDomai...
bsd-3-clause
-6,420,955,137,763,290,000
25.616
85
0.621882
false
3.914118
false
false
false
102/rsa
cli.py
1
1981
import argparse import rsa """ python3 cli.py -f key generate -l 8 python3 cli.py -f message encode -k key_public -d encoded python3 cli.py -f encoded decode -k key_private -d decoded """ def generate(args): public, private = rsa.get_key_pair(int(args.length)) with open(args.file + '_public', 'w+...
unlicense
-665,462,845,845,840,400
32.576271
94
0.669864
false
3.351946
false
false
false
tysonholub/twilio-python
twilio/rest/notify/v1/service/binding.py
1
18370
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import serialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import...
mit
4,937,572,604,946,714,000
34.057252
122
0.609581
false
4.451175
false
false
false
rogerthat-platform/rogerthat-backend
src/rogerthat/pages/payment.py
1
5119
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology 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 applicable...
apache-2.0
2,898,154,106,186,170,400
39.307087
115
0.664388
false
3.843093
false
false
false
dmisem/dsmblog
pelicanconf.py
1
1851
# -*- coding: utf-8 -*- # from __future__ import unicode_literals import os import sys SITE_ROOT = os.path.realpath(os.path.dirname(__file__)) sys.path.append(SITE_ROOT) import local_settings as ls AUTHOR = ls.AUTHOR SITENAME = ls.SITENAME SITEURL = ls.SITEURL PATH = ls.PATH TIMEZONE = ls.TIMEZONE LOCALE = ls.LOCAL...
mit
-77,352,275,435,833,500
23.355263
77
0.675851
false
2.81307
false
false
false
tum-ens/urbs
urbs/saveload.py
1
2106
import pandas as pd from .pyomoio import get_entity, list_entities def create_result_cache(prob): entity_types = ['set', 'par', 'var', 'exp'] if hasattr(prob, 'dual'): entity_types.append('con') entities = [] for entity_type in entity_types: entities.extend(list_entities(prob, entity_...
gpl-3.0
-8,746,768,734,882,240,000
28.25
72
0.616809
false
4.065637
false
false
false
eli-schwartz/pacman
test/pacman/util.py
1
4814
# Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2018 Pacman Development Team <pacman-dev@archlinux.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; eith...
gpl-2.0
4,919,808,286,097,878,000
24.743316
77
0.583922
false
3.361732
false
false
false
maferelo/saleor
saleor/product/migrations/0072_auto_20180925_1048.py
3
1358
# Generated by Django 2.0.8 on 2018-09-25 15:48 from django.db import migrations class Migration(migrations.Migration): dependencies = [("product", "0071_attributechoicevalue_value")] operations = [ migrations.RenameModel(old_name="ProductAttribute", new_name="Attribute"), migrations.Rename...
bsd-3-clause
-7,478,345,584,148,143,000
32.95
83
0.613402
false
4.85
false
false
false
macosforge/ccs-calendarserver
calendarserver/tools/dkimtool.py
1
8493
#!/usr/bin/env python ## # Copyright (c) 2012-2017 Apple Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
apache-2.0
2,544,725,631,419,095,600
26.134185
112
0.602849
false
3.837777
false
false
false
cfe-lab/Umberjack
test/simulations/sim_pipeline.py
1
7917
""" The full pipeline for generating simulated population reads for unit testing. Usage: python sim_pipeline.py [config file] """ import subprocess import os import logging import sys import ConfigParser import hyphy.hyphy_handler as hyphy_handler import fasttree.fasttree_handler as fasttree_handler import config.set...
bsd-2-clause
-6,855,658,814,491,119,000
46.981818
147
0.664898
false
3.418394
true
false
false
pgoeser/gnuradio-mlse
python/testapp.py
1
15170
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011 Paul Goeser # # This 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, or (at your option) # any later version. # # This softw...
gpl-3.0
5,299,925,792,086,577,000
42.314286
214
0.53252
false
3.626794
true
false
false
clawpack/clawpack-4.x
apps/tsunami/bowl-slosh/setrun.py
1
8919
""" Module to set up run time parameters for Clawpack. The values set in the function setrun are then written out to data files that will be read in by the Fortran code. """ import os from pyclaw import data #------------------------------ def setrun(claw_pkg='geoclaw'): #------------------------------ """ ...
bsd-3-clause
-2,397,011,731,965,025,000
26.358896
80
0.575737
false
3.542097
false
false
false
zsjohny/jumpserver
apps/users/views/profile/pubkey.py
1
1689
# ~*~ coding: utf-8 ~*~ from django.http import HttpResponse from django.urls import reverse_lazy from django.utils.translation import ugettext as _ from django.views import View from django.views.generic.edit import UpdateView from common.utils import get_logger, ssh_key_gen from common.permissions import ( Perm...
gpl-2.0
-3,068,625,369,736,953,300
30.277778
84
0.686797
false
3.992908
false
false
false
coolhacks/python-hacks
examples/codebreaker/vigenereDictionaryHacker.py
1
1270
# Vigenere Cipher Dictionary Hacker # http://inventwithpython.com/hacking (BSD Licensed) import detectEnglish, vigenereCipher, pyperclip def main(): ciphertext = """Tzx isnz eccjxkg nfq lol mys bbqq I lxcz.""" hackedMessage = hackVigenere(ciphertext) if hackedMessage != None: print('Copying hacke...
mit
432,503,798,185,404,800
31.564103
80
0.624409
false
3.956386
false
false
false
denys-duchier/kivy
kivy/uix/dropdown.py
1
11698
''' Drop-Down List ============== .. versionadded:: 1.4.0 A versatile drop-down list that can be used with custom widgets. It allows you to display a list of widgets under a displayed widget. Unlike other toolkits, the list of widgets can contain any type of widget: simple buttons, images etc. The positioning of the...
mit
86,564,783,490,734,420
32.232955
80
0.617712
false
3.949359
false
false
false
praw-dev/praw
praw/models/subreddits.py
1
6211
"""Provide the Subreddits class.""" from typing import TYPE_CHECKING, Dict, Iterator, List, Optional, Union from warnings import warn from ..const import API_PATH from . import Subreddit from .base import PRAWBase from .listing.generator import ListingGenerator from .util import stream_generator if TYPE_CHECKING: # ...
bsd-2-clause
-2,262,619,277,718,906,000
35.321637
87
0.628884
false
4.105089
false
false
false
jomyhuang/sdwle
SDWLE/agents/trade/possible_play.py
1
6263
from SDWLE.agents.trade.util import Util from functools import reduce class PossiblePlay: def __init__(self, cards, available_mana): if len(cards) == 0: raise Exception("PossiblePlay cards is empty") self.cards = cards self.available_mana = available_mana def card_mana(se...
mit
-9,081,206,652,314,761,000
27.085202
108
0.531055
false
3.809611
false
false
false
strummerTFIU/TFG-IsometricMaps
LAStools/ArcGIS_toolbox/scripts_production/las2demPro.py
1
8098
# # las2demPro.py # # (c) 2013, martin isenburg - http://rapidlasso.com # rapidlasso GmbH - fast tools to catch reality # # uses las2dem.exe to raster a folder of LiDAR files # # LiDAR input: LAS/LAZ/BIN/TXT/SHP/BIL/ASC/DTM # raster output: BIL/ASC/IMG/TIF/DTM/PNG/JPG # # for licensing see http://lasto...
mit
-6,832,320,602,952,765,000
28.104089
130
0.587059
false
3.131477
false
false
false
mozilla/kuma
kuma/users/adapters.py
1
13369
from allauth.account.adapter import DefaultAccountAdapter, get_adapter from allauth.account.models import EmailAddress from allauth.account.utils import cleanup_email_addresses from allauth.exceptions import ImmediateHttpResponse from allauth.socialaccount.adapter import DefaultSocialAccountAdapter from allauth.sociala...
mpl-2.0
-4,814,583,395,379,713,000
43.862416
83
0.612686
false
4.676111
false
false
false
vponomaryov/rally
tests/unit/plugins/openstack/wrappers/test_keystone.py
1
8687
# Copyright 2014: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
-867,412,063,852,557,000
40.764423
78
0.626453
false
3.749245
true
false
false
xbcsmith/frell
test/json_obj.py
1
1900
import logging log = logging.getLogger() logging.basicConfig(level=logging.DEBUG) class StorageObject(object): def __init__(self, storage): self._dict = storage def get(self, fieldName): return self._dict.get(fieldName) def set(self, fieldName, value): return self._dict.__setitem...
apache-2.0
8,738,986,348,364,620,000
31.20339
78
0.647895
false
3.551402
false
false
false
Arkapravo/morse-0.6
src/morse/sensors/stereo_unit.py
1
2329
import logging; logger = logging.getLogger("morse." + __name__) from morse.core.services import async_service import morse.core.sensor import bge from functools import partial class StereoUnitClass(morse.core.sensor.MorseSensorClass): """ Base for stereo pairs It is used to link two camera objects, and export...
bsd-3-clause
-2,536,339,978,277,546,000
34.287879
72
0.617003
false
4.345149
false
false
false
SumiTomohiko/Yog
tests/test_dict.py
1
2284
# -*- coding: utf-8 -*- from testcase import TestCase class TestDict(TestCase): def test_literal0(self): self._test(""" d = {} puts(d.size) """, """0 """) def test_literal5(self): self._test(""" d = { 42: 26 } puts(d[42]) """, """26 """) def test_literal10(self): self._test(""" ...
mit
-2,695,812,920,068,500,500
15.198582
70
0.487741
false
2.775213
true
false
false
Mangara/ArboralExplorer
lib/Cmpl/cmplServer/cmplServer/CmplServerTools.py
1
3351
#*********************************************************************** # This code is part of CmplServer # # Copyright (C) 2013, 2014 # Mike Steglich - Technical University of Applied Sciences # Wildau, Germany # # CmplServer is a project of the Technical University of # Applied Sciences Wildau and t...
apache-2.0
539,508,423,461,816,500
31.230769
140
0.563414
false
3.527368
false
false
false
Lana-B/Pheno4T
madanalysis/install/install_matplotlib.py
1
5864
################################################################################ # # Copyright (C) 2012-2013 Eric Conte, Benjamin Fuks # The MadAnalysis development team, email: <ma5team@iphc.cnrs.fr> # # This file is part of MadAnalysis 5. # Official website: <https://launchpad.net/madanalysis5> # # MadAnalysis 5...
gpl-3.0
4,663,602,692,768,040,000
36.589744
147
0.597715
false
4.280292
false
false
false
dropbox/emmer
emmer/response_router.py
1
5866
import re class ResponseRouter(object): """Handles the passing of control from a conversation to a client app's routes. For read requests and write requests, ResponseRouter maintains two lists of rules, where each rule is a tuple is of the form(filename pattern, action). When a request comes in, ...
mit
-3,915,947,709,512,583,700
38.106667
79
0.648483
false
4.900585
false
false
false
henrysher/duplicity
duplicity/backends/dpbxbackend.py
1
19561
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright 2013 jno <jno@pisem.net> # Copyright 2016 Dmitry Nezhevenko <dion@dion.org.ua> # # Version: 0.3 # # 0. You can make me happy with https://www.dropbox.com/referrals/NTE2ODA0Mzg5 # 1. Most of the code was taken from cli_client.py. The ftpsbackend.py w...
gpl-2.0
-7,412,439,218,951,572,000
40.442797
107
0.557998
false
4.222102
false
false
false
possess1on/botTelegram-zabbix
botTelegram-zabbix.py
1
19925
#!/usr/bin/env python # -*- coding: utf-8 -*- # ######################################################################### # BotTelegram Zabbix # Filename: botTelegram-zabbix.py ########################################################################## from telegram.ext import Updater, CommandHandler import logging imp...
gpl-2.0
-7,515,542,066,276,007,000
29.095016
122
0.571192
false
3.22339
false
false
false
xow/mdk
mdk/commands/install.py
1
3148
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Moodle Development Kit Copyright (c) 2013 Frédéric Massart - FMCorz.net 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 Lic...
gpl-3.0
-6,347,851,598,104,812,000
28.12963
77
0.493961
false
4.406162
false
false
false
mick-d/nipype
nipype/algorithms/modelgen.py
5
37627
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ The modelgen module provides classes for specifying designs for individual subject analysis of task-based fMRI experiments. In particular it also includes algorithms for generati...
bsd-3-clause
-2,022,518,823,186,561,500
42.349078
102
0.52372
false
3.956988
false
false
false
gatoravi/svviz
src/svviz/kde.py
1
3322
#------------------------------------------------------------------------------- # # Define classes for (uni/multi)-variate kernel density estimation. # # Currently, only Gaussian kernels are implemented. # # Written by: Robert Kern # # Date: 2004-08-09 # # Modified: 2005-02-10 by Robert Kern. # Contr...
mit
-4,350,426,905,358,045,000
29.477064
93
0.524985
false
3.728395
false
false
false
kevinlee12/oppia
core/controllers/suggestion_test.py
1
56805
# coding: utf-8 # # Copyright 2018 The Oppia 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 requi...
apache-2.0
-9,033,852,202,733,182,000
39.430605
111
0.565056
false
3.840511
true
false
false
grupoirona/django-date-validators
test_project/test_project/settings.py
1
2095
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '6+dqad9^b51rix$3hc#rdn9@%6uhat+@$9udx^yh=j-1+8+2n*' DEBUG = True ALLOWED_HOSTS = [] INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.session...
isc
8,153,460,069,941,095,000
23.360465
91
0.64821
false
3.550847
false
true
false
abhaystoic/barati
barati/vendors/views_cluster/list_product.py
1
1399
from django.shortcuts import render from django.template import RequestContext from django.shortcuts import render, render_to_response from django.views.generic import View from django.http import HttpResponse from customers.models import Users as users from customers.models import Vendors as vendors from customers.mod...
apache-2.0
9,219,910,691,958,777,000
38.971429
108
0.68549
false
3.822404
false
false
false
ikargis/horizon_fod
openstack_dashboard/dashboards/project/images_and_snapshots/images/forms.py
1
10129
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
apache-2.0
7,224,893,702,934,788,000
44.832579
78
0.51782
false
5.021815
false
false
false
eljrax/autoscale_setup
load_balancing/add_self_to_lb.py
1
5035
#!/usr/bin/env python ################################################################################### # # # This script should be executed as the last thing that happens during # # the configuration phase of a server. It will perform the health check # # defined in the load balanceri(s) co...
apache-2.0
-7,555,560,228,802,524,000
32.125
102
0.57994
false
3.831811
false
false
false
coin-or/GiMPy
src/gimpy/graph.py
1
139676
''' A Graph class implementation. The aim for this implementation is 1. To reflect implementation methods in literature as much as possible 3. To have something close to a "classic" object-oriented design (compared to previous versions) This implementation can be considered as a compromise between a graph class design...
epl-1.0
-4,642,684,740,455,221,000
38.827773
125
0.50736
false
4.284408
false
false
false
aaltay/beam
sdks/python/apache_beam/metrics/execution.py
1
11781
# # 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 us...
apache-2.0
1,169,649,252,800,144,600
31.907821
80
0.691962
false
3.94938
false
false
false
AlexanderPease/viv
app/ui_methods.py
1
2070
# Just for ordinalizing the number of district def ordinal(numb): if type(numb) is str: numb = int(float(numb)) if numb < 20: #determining suffix for < 20 if numb == 1: suffix = 'st' elif numb == 2: suffix = 'nd' elif numb == 3: suffix = 'rd'...
gpl-3.0
-6,869,473,597,955,327,000
24.256098
81
0.523671
false
3.526405
false
false
false
geceo/django-gallery
general/models.py
1
1025
from django.db import models from django import forms from django.forms import ModelForm # Create your models here. class Settings(models.Model): # General gallery informations general_title = models.CharField(max_length=255) intro = models.TextField(blank=True) url = models.CharField(max_length=255)...
bsd-3-clause
966,780,564,379,091,100
36.962963
70
0.743415
false
3.68705
false
false
false
pida42/Zabbix-Addons
App-Servers/Memcached/getMemcachedInfo.py
1
3120
#!/usr/bin/env python # -*- coding: utf-8 -*- import getopt, sys from telnetlib import Telnet # default memcached server to check memcachedServer = '127.0.0.1' memcachedPort = '11211' ITEMS = ( 'bytes', 'cmd_get', 'cmd_set', 'curr_items', 'curr_connections', 'evictions', 'limit_maxbytes',...
mit
4,151,833,745,684,230,000
28.149533
94
0.445976
false
4.302069
false
false
false
sergiusens/snapcraft
tests/integration/__init__.py
1
27766
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015-2018 Canonical Ltd # # 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 # published by the Free Software Foundation. # # This program is distributed in ...
gpl-3.0
-1,028,729,214,117,175,600
35.582345
102
0.587733
false
4.076641
true
false
false
LawrenceK/console-server
consoleserver/ssh.py
1
4049
# # (C) Copyright L.P.Klyne 2013 # """This is based on the basic ssh server example, the protocol handler has been pulled out as a separate source as this is where the logic for the console server sits. """ import logging _log = logging.getLogger(__name__) import os import grp from zope.interface import implements fr...
gpl-3.0
4,608,994,057,645,392,400
32.188525
104
0.687824
false
3.841556
false
false
false
marmyshev/transitions
openlp/plugins/songs/lib/mediashoutimport.py
1
5385
# -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4 ############################################################################### # OpenLP - Open Source Lyrics Projection # # ------------------------------------------------------...
gpl-2.0
-6,985,386,025,895,966,000
48.842593
106
0.552108
false
4.08732
false
false
false
rchaber/publishbay
bayforms.py
1
1690
from wtforms import fields from wtforms import Form from wtforms import validators from boilerplate.lib import utils from webapp2_extras.i18n import lazy_gettext as _ from webapp2_extras.i18n import ngettext, gettext from boilerplate import forms as forms from config import utils as bayutils FIELD_MAXLENGTH = 50 # ...
lgpl-3.0
1,359,037,825,371,715,600
51.8125
180
0.714793
false
3.976471
false
false
false
coderbone/SickRage-alt
sickbeard/providers/morethantv.py
1
9942
# coding=utf-8 # Author: Dustyn Gibson <miigotu@gmail.com> # # URL: https://sickchill.github.io # # This file is part of SickChill. # # SickChill 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
-2,864,894,290,968,248,000
39.251012
141
0.520821
false
4.525262
false
false
false
chrysante87/pyterpol
synthetic/auxiliary.py
1
10363
import numpy as np import matplotlib.pyplot as plt from astropy.constants import c from scipy.interpolate import splrep from scipy.interpolate import splev from scipy.interpolate import bisplrep from scipy.interpolate import bisplev from scipy.interpolate import RectBivariateSpline from scipy.interpolate import Interpo...
gpl-2.0
3,257,326,317,646,513,000
24.09201
115
0.595098
false
3.464728
false
false
false
jessamynsmith/eggtimer-server
periods/tests/management/commands/test_email_active_users.py
1
2900
import datetime import pytz from django.test import TestCase from mock import patch from periods import models as period_models from periods.management.commands import email_active_users from periods.tests.factories import FlowEventFactory TIMEZONE = pytz.timezone("US/Eastern") class TestCommand(TestCase): def...
mit
-7,983,820,550,675,869,000
45.774194
100
0.637586
false
4.148784
true
false
false
hmendozap/master-arbeit-projects
autosk_dev_test/utilities/test_two_GPUs_multiprocessing.py
1
3587
""" Test script that uses two GPUs, one per sub-process, via the Python multiprocessing module. Each GPU fits a logistic regression model. """ # These imports will not trigger any theano GPU binding from multiprocessing import Process, Manager import numpy as np import os def f(shared_args,private_args): """ B...
mit
6,711,862,250,160,399,000
34.88
101
0.618902
false
3.637931
false
false
false
CommonsDev/dataserver
projects/migrations/0014_auto__add_historicalproject.py
1
11787
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'HistoricalProject' db.create_table(u'projects_historicalp...
agpl-3.0
-7,540,497,227,849,037,000
76.552632
195
0.562823
false
3.603485
false
false
false
zhmz90/CS231N
assign/assignment1/cs231n/classifiers/softmax.py
1
2626
import numpy as np from random import shuffle def softmax_loss_naive(W, X, y, reg): """ Softmax loss function, naive implementation (with loops) Inputs have dimension D, there are C classes, and we operate on minibatches of N examples. Inputs: - W: A numpy array of shape (D, C) containing weights. - X:...
mit
6,263,552,307,527,689,000
37.617647
79
0.441356
false
4.926829
false
false
false
sxhexe/reaction-route-search
reactionroute_web/reaction/reaction/urls.py
1
1111
"""reaction URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-b...
mit
-4,855,968,317,904,313,000
40.148148
79
0.706571
false
3.538217
false
false
false
Nentix/xentriq.docs
docs/conf.py
1
4649
# -*- coding: utf-8 -*- # # Xentriq documentation build configuration file, created by # sphinx-quickstart on Wed Apr 26 16:44:14 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. # # A...
mit
6,299,663,179,183,129,000
29.188312
79
0.672188
false
3.880634
true
false
false
warrickball/figures
hmi_rot2d_coaster.py
1
2261
#!/usr/bin/env python import numpy as np from matplotlib import pyplot as pl from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument('--figsize', type=float, nargs=2, help="figure size, passed to rcParams['figure.figsize']") parser.add_argument('--levels', type=int, defau...
gpl-3.0
8,172,687,639,470,969,000
30.84507
85
0.670057
false
2.851198
false
false
false
foursquare/fsqio
scripts/fsqio/python3-port-utils/pants/remove_builtins.py
1
3393
#!/usr/bin/env python3 import argparse import subprocess from pathlib import Path from textwrap import dedent from typing import List, Sequence, Set def main() -> None: folders = create_parser().parse_args().folders for fp in get_files_with_import(folders): remove_builtins(file_path=fp) if safe_to_remov...
apache-2.0
-7,298,757,472,970,914,000
31.941748
96
0.666667
false
3.362735
false
false
false
useblocks/groundwork
groundwork/plugins/gw_recipes_builder.py
1
3282
# -*- coding: utf-8 -*- import os from click import Argument from groundwork.patterns import GwCommandsPattern, GwRecipesPattern class GwRecipesBuilder(GwCommandsPattern, GwRecipesPattern): """ Provides commands for listing and building recipes via command line interface. Provided commands: * reci...
mit
-8,096,438,655,980,942,000
45.885714
112
0.555454
false
4.564673
false
false
false
theY4Kman/neoalchemy
neoalchemy/util/langhelpers.py
1
2116
from . import compat class _symbol(int): def __new__(self, name, doc=None, canonical=None): """Construct a new named symbol.""" assert isinstance(name, compat.string_types) if canonical is None: canonical = hash(name) v = int.__new__(_symbol, canonical) v.name =...
mit
479,101,455,911,698,600
25.78481
75
0.606333
false
4.045889
false
false
false
gaetano-guerriero/eyeD3-debian
src/eyed3/__init__.py
1
1368
# -*- coding: utf-8 -*- import sys import locale from .__about__ import __version__ as version _DEFAULT_ENCODING = "latin1" LOCAL_ENCODING = locale.getpreferredencoding(do_setlocale=True) """The local encoding, used when parsing command line options, console output, etc. The default is always ``latin1`` if it cannot b...
gpl-3.0
-6,633,266,518,445,879,000
34.076923
80
0.614766
false
3.758242
false
false
false
virantha/photokeeper
photokeeper/flickr.py
1
10779
# -*- coding: utf-8 -*- # Copyright 2016 Virantha Ekanayake 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 r...
apache-2.0
7,724,130,514,751,252,000
35.788396
149
0.598386
false
3.658859
false
false
false
oaubert/advene
lib/advene/gui/plugins/packageimporter.py
1
8731
# # Advene: Annotate Digital Videos, Exchange on the NEt # Copyright (C) 2008-2017 Olivier Aubert <contact@olivieraubert.net> # # Advene 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 ...
gpl-2.0
-7,850,985,333,841,483,000
37.632743
134
0.624327
false
4.057156
false
false
false
pika/pika
pika/frame.py
1
7744
"""Frame objects that do the frame demarshaling and marshaling.""" import logging import struct from pika import amqp_object from pika import exceptions from pika import spec from pika.compat import byte LOGGER = logging.getLogger(__name__) class Frame(amqp_object.AMQPObject): """Base Frame object mapping. Defi...
bsd-3-clause
-8,649,238,038,116,597,000
28.333333
78
0.631586
false
4.150054
false
false
false
simonprickett/wmataapiexperiments
train_predictions_script/pollStationData.py
1
1887
##### # Script to poll API data for DC Metro station # # Author: Simon Prickett ##### import json import os import requests import sys import time ##### # Query the WMATA API for data for the station represented # by stationCode e.g. N06 = Reston Wiehle East ##### def getStationData(stationCode, apiKey): url = 'http...
mit
3,686,401,257,969,455,600
23.506494
122
0.666137
false
3.009569
false
false
false
iFedix/FirewallController
modules/live.py
1
19897
# Copyright (C) 2011 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
gpl-3.0
-781,128,038,751,831,400
52.058667
833
0.675881
false
2.895794
false
false
false
JanFan/py-aho-corasick
cmp.py
1
2262
# -*- coding: utf-8 -*- ''' Performance Testing Requirements: pip install pyahocorasick ''' import random import string import time from py_aho_corasick import py_aho_corasick import ahocorasick rand_str = lambda n: ''.join([random.choice(string.ascii_lowercase) for i in range(n)]) if __name__ == '__main__': ...
mit
-589,962,487,331,969,400
26.925926
149
0.589302
false
3.124309
false
false
false
irwinsnet/DesPy
despy/dp.py
1
3255
# Despy: A discrete event simulation framework for Python # Version 0.1 # Released under the MIT License (MIT) # Copyright (c) 2015, Stacy Irwin """ ******** despy.dp ******** .. autosummary:: """ EARLY = -1 STANDARD = 0 LATE = 1 class AbstractPackage(): def __init__(self): import despy.abstra...
mit
-9,093,828,271,728,340,000
28.590909
82
0.654378
false
3.998771
false
false
false
ma-ver-ick/pyaphrodite
prepare_images.py
1
1536
from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np import cv2 import os import dto import pickle ROOT_DIR = "/home/pi/jme3/assets/Textures/" RESIZE_WIDTH = 1920 # Raspberry pi texture size def list_files(directory, extension): ret = [] for file in os.listdir(direc...
mit
4,709,988,111,238,682,000
26.927273
83
0.708333
false
2.881801
false
false
false
dongqunxi/GrangerCausality
Preprocessing/CTPS_identifation_BrainComponents.py
1
4218
# -*- coding: utf-8 -*- """ Created on Fri Feb 21 10:42:55 2014 @author: imenb101 """ import numpy as np import matplotlib.pylab as pl import mne, sys, os from mne.viz import tight_layout from mne.fiff import Raw from mne.preprocessing import ICA from ctps import compute_ctps from ctps import plot_ctps_panel try: ...
bsd-3-clause
-859,910,584,621,222,400
38.055556
127
0.672357
false
2.787839
false
false
false
drhagen/parsita
src/parsita/metaclasses.py
1
4934
import inspect import builtins import re from . import options from .parsers import Parser, RegexParser class ParsersDict(dict): def __init__(self, old_options: dict): super().__init__() self.old_options = old_options # Holds state of options at start of definition self.forward_declarati...
mit
-8,236,695,756,848,111,000
32.794521
112
0.64167
false
4.501825
false
false
false
annahs/atmos_research
AL_incand_calib_SP217.py
1
1802
import sys import os import datetime import pickle import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm import matplotlib.colors as colors from pprint import pprint import sqlite3 import calendar from datetime import datetime from datetime import timedelta import math import numpy.polynomial.po...
mit
2,754,781,142,312,153,000
25.514706
81
0.709212
false
2.455041
false
false
false
mcalmer/spacewalk
spacecmd/src/lib/group.py
1
12970
# # Licensed under the GNU General Public License Version 3 # # 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 p...
gpl-2.0
-2,932,662,179,444,418,000
27.195652
88
0.594217
false
3.838414
false
false
false
vbmacher/emuStudio
add_server.py
1
4717
#!/usr/bin/env python import sys import os import os.path import shutil import xml.dom.minidom from xml.dom.minidom import getDOMImplementation from xml.dom.minidom import parseString from subprocess import call def get_vars(): errorMsg = "" travisSecurityVars = os.environ["TRAVIS_SECURE_ENV_VARS"] if tr...
gpl-2.0
-6,555,765,835,985,879,000
31.088435
104
0.705745
false
3.872742
false
false
false
OscarES/serpentinetracker
beamline.py
1
21534
#!/usr/bin/python # # Copyright 2009, Stephen Molloy, Stewart Boogert # # This file is part of Serpentine. # # Serpentine 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 th...
gpl-3.0
1,009,788,563,410,026,200
38.152727
81
0.555029
false
3.439387
false
false
false
hansomesong/TracesAnalyzer
Plot/Plot_newSize/Plot_variable_VP_scatter_RLOCs.py
1
4458
__author__ = 'yueli' import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl from config.config import * # Import the targeted raw CSV file rawCSV_file1 = os.path.join( CSV_FILE_DESTDIR, 'For_different_5_VP', 'Deleted_database', 'EID-153.16.47.16-MR-198.6.255.37', "liege-EID-153...
gpl-2.0
-854,535,159,552,120,600
28.926174
124
0.606999
false
2.826886
false
false
false
xsixing/blaze
blaze/io/sql/ops.py
1
3865
"""SQL implementations of element-wise ufuncs.""" from __future__ import absolute_import, division, print_function from ...compute.function import function, kernel from ...compute.ops import ufuncs from .kernel import sql_kernel, SQL from .syntax import Call, Expr, QOrderBy, QWhere, And, Or, Not def sqlfunction(sig...
bsd-3-clause
-2,212,009,295,683,632,400
28.280303
80
0.542044
false
2.989172
false
false
false
dbiesecke/dbiesecke.github.io
repo/script.module.urlresolver/lib/urlresolver/plugins/alldebrid.py
1
14611
""" urlresolver Kodi Addon 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 distributed...
mit
5,094,376,378,971,055,000
45.237342
199
0.549038
false
3.891079
false
false
false
ireapps/census
dataprocessing/load_sf_data_2010.py
1
1395
#!/usr/bin/env python import sys from csvkit.unicsv import UnicodeCSVReader from pymongo import objectid import config import utils if len(sys.argv) < 2: sys.exit('You must provide the filename of a CSV as an argument to this script.') FILENAME = sys.argv[1] YEAR = '2010' collection = utils.get_geography_co...
mit
-8,988,254,867,123,021,000
22.25
127
0.573477
false
3.531646
false
false
false
Joergen/zamboni
mkt/reviewers/helpers.py
1
6578
import datetime import urlparse from django.utils.encoding import smart_str import jinja2 import waffle from jingo import register from tower import ugettext as _, ugettext_lazy as _lazy from access import acl from amo.helpers import impala_breadcrumbs from amo.urlresolvers import reverse from mkt.developers.helpe...
bsd-3-clause
-5,529,736,335,256,113,000
30.028302
78
0.59471
false
3.892308
false
false
false
brucedjones/pyck
examples/stl_test.py
1
2459
import pyck domain = [100.0, 100.0, 500.0] h = domain[0] / 100 smoothingKernelFunc = 2 speedsound = 1 density = 1 shearmodulus = 1 bulkmodulus = 1 # Create a packer, see packers directory for options Hcp = pyck.HcpPacker(domain, h) pack = pyck.StructuredPack(Hcp) tibia_min = [154.2328, 204.0634, -853.9...
mit
-7,106,577,362,135,716,000
32.633803
92
0.681578
false
2.602116
false
false
false
Bam4d/neon
neon/backends/backend.py
1
87983
# ---------------------------------------------------------------------------- # Copyright 2015 Nervana Systems 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.o...
apache-2.0
6,893,616,573,040,554,000
37.947764
94
0.535217
false
4.870896
false
false
false
amlyj/pythonStudy
3.6/AI/ML/DL/study_face_recognition/facerec_from_video_file_faster.py
1
3084
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/12/27 11:47 # @Author : TOM.LEE import cv2 import face_recognition video_capture = cv2.VideoCapture("../videos/hamilton_clip.mp4") # Load a sample picture and learn how to recognize it. # Load some sample pictures and learn how to recognize them. lmm_i...
mit
-3,399,066,312,801,603,600
32.89011
101
0.651751
false
3.419069
false
false
false
prior/webinars
webinars_web/webinars/management/commands/seed.py
1
2093
from django.core.management.base import BaseCommand from optparse import make_option from webinars_web.webinars import models as wm from uuid import uuid4 from webex.attendee import Attendee as WebexRegistrant import hapi_plus.leads from django.conf import settings class Command(BaseCommand): help = 'Seeds registr...
apache-2.0
-8,942,040,098,241,600,000
48.833333
151
0.652174
false
3.488333
false
false
false
tyrchen/church
church/views/users.py
1
4675
# -*- coding: utf-8 -*- from __future__ import unicode_literals from datetime import datetime from dateutil.parser import parse import json import logging from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect, HttpResponse, HttpResponseBadRequest from django.utils.decora...
mit
3,288,241,117,156,940,000
37.00813
115
0.589947
false
4.002568
false
false
false
dennishuo/dataproc-initialization-actions
oozie/test_oozie.py
1
1805
import os import unittest from parameterized import parameterized from integration_tests.dataproc_test_case import DataprocTestCase class OozieTestCase(DataprocTestCase): COMPONENT = 'oozie' INIT_ACTIONS = ['oozie/oozie.sh'] TEST_SCRIPT_FILE_NAME = 'validate.sh' def verify_instance(self, name): ...
apache-2.0
-3,328,313,559,347,165,000
34.392157
76
0.516343
false
3.653846
true
false
false
veprbl/wikichords
show.py
1
9484
#!/usr/bin/env python from common import * from time import time, ctime session_start() urlname = args[1] res = con.execute( "SELECT id, band, name, contents, variant FROM pages WHERE urlname = ? LIMIT 1;", (urlname,)).fetchall() if len(res) == 0: fault404() else: (pid, band, name, contents, variant...
mit
5,521,724,893,140,749,000
29.692557
158
0.512653
false
3.47909
false
false
false