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
ddu7/PyLC
071Simplifier Path.py
1
1220
# -*- coding: utf-8 -*- # Given an absolute path for a file (Unix-style), simplify it. # # For example, # path = "/home/", => "/home" # path = "/a/./b/../../c/", => "/c" # click to show corner cases. # # Corner Cases: # Did you consider the case where path = "/../"? # In this case, you should return "/". -> 即在输出的时候是用'...
mit
-5,708,675,871,309,676,000
32.83871
101
0.56584
false
2.513189
false
false
false
fengyc/flasky
flasky/main/views.py
1
1752
import datetime from flask import render_template, session, url_for, redirect, request, flash, current_app from . import main from .forms import NameForm from .. import db from ..models import User from ..email import send_mail app = current_app @main.route('/', methods=['GET', 'POST']) def index(): user_agent ...
mit
-6,673,264,239,355,838,000
30.303571
93
0.584475
false
4
false
false
false
suitai/MyTweetApp
bin/download.py
1
1944
#!/usr/bin/env python # -*- coding:utf-8 -*- import os import sys import getopt import urllib2 def download(url, out_dir, overwrite=False): file_name = url.split('/')[-1] out_dir = os.path.expanduser(out_dir) out_dir = os.path.expandvars(out_dir) out_file = "%s/%s" % (out_dir, file_name) if not o...
mit
-9,025,717,187,616,101,000
26
105
0.564815
false
3.471429
false
false
false
ShivamSarodia/VaxBot
vax_game.py
1
6711
import networkx as nx import random class VaxGame: """Stores the state of the Vax game, including the main graph. stage - stage of main game (see enum below) graph - main game NetworkX graph object status - an array indexed by node integer of node state (see enum below) orig_num_nodes - original ...
mit
-7,925,157,558,320,488,000
34.136126
82
0.566831
false
3.924561
false
false
false
dNG-git/mp_core
src/dNG/database/instances/mp_upnp_audio_resource.py
1
4364
# -*- coding: utf-8 -*- """ MediaProvider A device centric multimedia solution ---------------------------------------------------------------------------- (C) direct Netware Group - All rights reserved https://www.direct-netware.de/redirect?mp;core The following license agreement remains valid unless any additions o...
gpl-2.0
-6,159,975,037,988,921,000
29.096552
177
0.648946
false
3.834798
false
false
false
tensorflow/benchmarks
scripts/tf_cnn_benchmarks/preprocessing.py
1
56044
# 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
1,081,204,721,335,464,200
40.855116
140
0.632878
false
3.828665
false
false
false
thauser/pnc-cli
pnc_cli/swagger_client/models/support_level_page.py
1
4946
# coding: utf-8 """ Copyright 2015 SmartBear Software 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
-2,762,409,763,896,486,000
25.735135
96
0.563486
false
4.396444
false
false
false
everware/everware
everware/spawner.py
1
20536
from tempfile import mkdtemp from datetime import timedelta from os.path import join as pjoin from shutil import rmtree, copyfile from pprint import pformat from concurrent.futures import ThreadPoolExecutor from docker.errors import APIError from smtplib import SMTPException from jupyterhub.utils import wait_for_http...
bsd-3-clause
6,901,660,651,349,622,000
34.164384
131
0.55186
false
4.154562
false
false
false
dpressel/baseline
baseline/tf/lm/training/eager.py
1
11597
import os import numpy as np import time import tensorflow as tf from eight_mile.utils import listify, get_version from eight_mile.tf.layers import SET_TRAIN_FLAG, get_shape_as_list from eight_mile.tf.optz import EagerOptimizer from baseline.utils import get_model_file, get_metric_cmp from baseline.model import create_...
apache-2.0
1,264,471,993,665,761,800
37.400662
113
0.605588
false
3.646855
true
false
false
cjbrasher/LipidFinder
LipidFinder/PeakFilter/MassReassignment.py
1
2149
# Copyright (c) 2019 J. Alvarez-Jarreta and C.J. Brasher # # This file is part of the LipidFinder software tool and governed by the # 'MIT License'. Please see the LICENSE file that should have been # included as part of this software. """Set of methods aimed to reassign a m/z value to every feature in a cluster: >...
mit
4,125,501,935,627,933,000
40.326923
76
0.661703
false
4.222004
false
false
false
lmazuel/azure-sdk-for-python
azure-mgmt-monitor/azure/mgmt/monitor/models/autoscale_notification_py3.py
1
1700
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-8,262,930,130,224,323,000
35.170213
77
0.618235
false
4.557641
false
false
false
IDragonfire/modular-client
src/galacticWar/galaxy/galaxy.py
1
18527
from PyQt4 import QtCore, QtGui import random from voronoi import Site, computeVoronoiDiagram import math import copy class Galaxy(object): def __init__(self, parent): self.parent = parent sizex = 2000 sizey = 2000 self.space_size = QtGui.QVector3D(sizex, s...
gpl-3.0
6,576,569,260,846,398,000
33.022684
255
0.470395
false
4.130881
false
false
false
NickrenREN/kubernetes
hack/verify-publishing-bot.py
1
4023
#!/usr/bin/env python # Copyright 2019 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
-2,821,874,619,000,023,000
36.95283
156
0.594581
false
4.266172
false
false
false
slek120/param_fit
plot.py
1
2014
import numpy as np import matplotlib import matplotlib.pyplot as plt def plot(params): # Extract parameters t1 = 1. t2, mu, x1, x2, epsf, V = params # Format filename filename = 't1_%.2f_t2_%.2f_mu_%.2f_x1_%.2f_x2_%.2f_epsf_%.2f_V_%.2f.png'%(t1,t2,mu,x1,x2,epsf,V) # Define function to plo...
mit
-8,066,709,127,629,451,000
28.202899
120
0.559086
false
2.394768
false
false
false
fabsx00/chucky-old
tools/AttackSurfaceRanker.py
1
7803
from tools.functionAnomaly.RankingEntry import RankingEntry from tools.functionAnomaly.Ranker import Ranker from sourceutils.misc.NameToDictMap import NameToDictMap from mlutils.anomalyDetection.anomalyCalculator import AnomalyCalculator import pickle import numpy import sys def determineUncheckedIdentifiers(): ...
gpl-3.0
1,255,731,039,337,383,700
34.153153
112
0.609125
false
3.921106
false
false
false
sdelaughter/SmartHome
v0.3/resources/bulb.py
1
3442
# Samuel DeLaughter # 5/8/15 from SimpleXMLRPCServer import SimpleXMLRPCServer from threading import Thread import logging import time import iot class bulb(iot.device): def __init__(self): iot.device.__init__(self) self.name = 'bulb' self.state = 0 self.category = 'device' self.last_on = time.time() se...
gpl-2.0
-1,670,638,216,775,200,500
30.587156
147
0.687101
false
3.024605
false
false
false
MissionCriticalCloud/marvin
marvin/cloudstackAPI/createTags.py
1
1232
"""Creates resource tag(s)""" from baseCmd import * from baseResponse import * class createTagsCmd (baseCmd): typeInfo = {} def __init__(self): self.isAsync = "true" """list of resources to create the tags for""" """Required""" self.resourceids = [] self.typeInfo['reso...
apache-2.0
7,633,278,320,166,446,000
30.589744
125
0.586851
false
4.204778
false
false
false
Penguin7z/docx
settings.py
1
9271
# -*- coding: utf-8 -*- """ eve-demo settings ~~~~~~~~~~~~~~~~~ Settings file for our little demo. PLEASE NOTE: We don't need to create the two collections in MongoDB. Actually, we don't even need to create the database: GET requests on an empty/non-existant DB will be served correctly ('200' O...
mit
4,056,091,271,714,653,000
23.947368
81
0.466408
false
3.552268
false
false
false
LitleCo/litle-sdk-for-python
litleSdkPythonTest/unit/TestCreateFromDom.py
1
4937
#Copyright (c) 2017 Vantiv eCommerce # #Permission is hereby granted, free of charge, to any person #obtaining a copy of this software and associated documentation #files (the "Software"), to deal in the Software without #restriction, including without limitation the rights to use, #copy, modify, merge, publish, distri...
mit
1,783,835,340,079,371,500
58.493976
120
0.710553
false
3.96865
true
false
false
Z-Tool/ztool-backhend-mongo
app/models.py
1
2961
#!/usr/bin/env python # -*- coding: utf-8 -*- # author: Kun Jia # date: 2/23/17 # email: me@jarrekk.com from datetime import datetime from bson import ObjectId from flask import current_app from flask_login import UserMixin, AnonymousUserMixin from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from...
mit
7,437,980,100,336,140,000
28.61
79
0.66464
false
3.673697
false
false
false
sillydan1/WhatEverEngine
openglcsharp/Lib/xml/etree/ElementTree.py
1
56165
# # ElementTree # $Id: ElementTree.py 3440 2008-07-18 14:45:01Z fredrik $ # # light-weight XML support for Python 2.3 and later. # # history (since 1.2.6): # 2005-11-12 fl added tostringlist/fromstringlist helpers # 2006-07-05 fl merged in selected changes from the 1.3 sandbox # 2006-07-05 fl removed support for ...
apache-2.0
-2,277,228,194,437,559,800
32.916063
90
0.589887
false
4.216908
false
false
false
justintweaver/mtchi-cert-game
makahiki/apps/managers/score_mgr/score_mgr.py
1
16356
"""The manager for defining and managing scores.""" import datetime from django.db.models import Q from django.core.exceptions import ObjectDoesNotExist from django.db.models.aggregates import Sum, Max from apps.managers.challenge_mgr import challenge_mgr from apps.managers.score_mgr.models import ScoreboardEntry, Poi...
gpl-3.0
2,256,365,725,695,180,500
33.146138
99
0.657129
false
3.914792
false
false
false
nitely/Spirit
spirit/comment/tags.py
1
2310
# -*- coding: utf-8 -*- from django.utils.translation import gettext_lazy as _ from django.utils.html import mark_safe, format_html from django.contrib.humanize.templatetags import humanize from django.template.defaultfilters import date as date_format from spirit.core.conf import settings from spirit.core.tags.regis...
mit
-5,524,012,494,408,355,000
30.643836
79
0.649351
false
3.442623
false
false
false
DemocracyClub/UK-Polling-Stations
polling_stations/apps/data_importers/management/commands/import_bolton.py
1
2487
from data_importers.management.commands import BaseXpressDemocracyClubCsvImporter class Command(BaseXpressDemocracyClubCsvImporter): council_id = "BOL" addresses_name = "2021-05-01T18:52:07.783562/Democracy_Club__06May2021.CSV" stations_name = "2021-05-01T18:52:07.783562/Democracy_Club__06May2021.CSV" ...
bsd-3-clause
5,023,162,688,096,483,000
30.884615
119
0.524729
false
3.160102
false
false
false
Micronaet/micronaet-bom
order_bom/report/bom_status_parser.py
1
4509
#!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2010-2012 Associazione OpenERP Italia # (<http://www.openerp-italia.org>). # Copyright(c)2008-2010 SIA "KN dati".(http://kndati.lv) All Rights Reserved. # Ge...
agpl-3.0
4,114,346,447,587,470,300
35.362903
79
0.550676
false
4.433628
false
false
false
cloudify-cosmo/softlayer-python
SoftLayer/managers/ssl.py
1
2128
""" SoftLayer.ssl ~~~~~~~~~~~~~ SSL Manager/helpers :license: MIT, see LICENSE for more details. """ class SSLManager(object): """Manages SSL certificates. :param SoftLayer.API.Client client: an API client instance """ def __init__(self, client): self.client = client ...
mit
1,883,408,280,363,804,700
28.150685
78
0.609492
false
4.636166
false
false
false
q2apro/graph-padowan
Plugins/Statistics.py
1
2105
# Example plugin for Graph for showing statistics information for a point series. # The plugin creates an action and adds it to the main menu and the context menu of the function list. # The plugin hooks into the function list. Every time a new element is selected, the action is updated to be enabled if the element is ...
gpl-2.0
683,708,309,037,313,500
52.974359
151
0.675059
false
3.068513
false
false
false
claudep/pootle
tests/views/tp.py
1
10456
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. from collections import OrderedDict import ...
gpl-3.0
8,016,228,546,327,207,000
37.021818
80
0.672533
false
3.630556
true
false
false
bigfatnoob/optima
measures/hypervolume.py
1
9397
# Original Author : Simon Wessing # From : TU Dortmund University # # 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 l...
mit
-6,270,421,406,375,879,000
28.550314
94
0.601362
false
3.396097
false
false
false
Dih5/physdata
tests/TestStar.py
1
1839
#!/usr/bin/env python # -*- coding: utf-8 -*- """ TestStar.py: Tests for the `star` module. """ import unittest from physdata import star class TestStar(unittest.TestCase): def test_fetch_star_type(self): # Test type of return for data in [star.fetch_estar(13), star.fetch_astar(13), star.fetch_...
lgpl-3.0
6,090,021,977,719,950,000
35.78
99
0.557368
false
3.52975
true
false
false
flyhigher139/mayblog
blog/main/views.py
1
25917
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.http import HttpResponse, Http404, HttpResponseForbidden from django.views.generic import View from django.shortcuts import render, redirect from django.core.urlresolvers import reverse from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger fr...
gpl-2.0
-1,485,444,318,215,554,600
33.056505
133
0.574681
false
3.971345
false
false
false
datastreaming/mflow_nodes
mflow_nodes/config.py
1
1687
# Configuration for the m_manage.py, where to look for config files. MANAGE_MACHINE_FILENAME = "/etc/mflow_nodes.json" MANAGE_USER_FILENAME = "~/.mflow_nodes_rc.json" MANAGE_PWD_FILENAME = "mflow_nodes.json" LOG_MACHINE_FILENAME = "/etc/mflow_nodes_logging.json" LOG_USER_FILENAME = "~/.mflow_nodes_rc_logging.json" LOG...
gpl-3.0
-4,524,829,192,184,026,600
34.893617
119
0.75163
false
3.118299
false
false
false
tensorflow/probability
tensorflow_probability/python/internal/backend/numpy/test_lib.py
1
2890
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
6,533,194,326,772,202,000
28.191919
79
0.659862
false
4.030683
true
false
false
apdjustino/DRCOG_Urbansim
src/opus_core/ndimage.py
1
12168
# Opus/UrbanSim urban simulation software. # Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington # See opus_core/LICENSE # Functions to work around numpy/scipy bug -- need to fix the char and num attributes of arrays with dtype==int32 # to get them to work with ndimage.sum ...
agpl-3.0
-6,871,191,045,195,117,000
32.428571
142
0.629849
false
3.523892
true
false
false
jucimarjr/IPC_2017-1
lista06/lista06_lista01_questao20.py
1
2874
#--------------------------------------------------------------------------- # Introdução a Programação de Computadores - IPC # Universidade do Estado do Amazonas - UEA # Prof. Jucimar Jr # # Ulisses Antonio Antonino da Costa 1515090555 # Walter Nobre da Silva conceição 1715310057 # Jandinne Duarte de Oliveira ...
apache-2.0
4,224,848,726,915,924,000
56.428571
693
0.702203
false
2.708373
false
false
false
MSeifert04/nddata
nddata/nddata/mixins/ndfilter.py
1
10473
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from ..nduncertainty_var import VarianceUncertainty from ..nduncertainty_stddev import StdDevUncertainty from ...utils.numbau...
bsd-3-clause
8,424,937,322,362,398,000
35.747368
79
0.537191
false
3.931306
false
false
false
rwl/PyCIM
CIM14/CDPSM/GIS_Connectivity/IEC61970/Wires/Junction.py
1
1604
# Copyright (C) 2010-2011 Richard Lincoln # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish...
mit
5,917,236,307,994,077,000
40.128205
94
0.727556
false
4.091837
false
false
false
bracket/ratchet
examples/005_voice.py
1
5114
from math import pi import numpy as np import pyaudio import time from ratchet.scales import * from functools import lru_cache memoize = lru_cache() CHANNELS = 1 RATE = 44100 def make_ramp(time): return np.linspace(0., time, time * RATE, dtype=np.float32) def read_sample(): with open('data/test.dat', 'rb'...
mit
2,182,637,683,714,768,600
19.538153
89
0.551623
false
3.13166
false
false
false
materialsproject/MPContribs
mpcontribs-api/mpcontribs/api/notebooks/__init__.py
1
2672
# -*- coding: utf-8 -*- import os from tornado.escape import json_encode, json_decode, url_escape from websocket import create_connection from notebook.utils import url_path_join from notebook.gateway.managers import GatewayClient def run_cells(kernel_id, cid, cells): print(f"running {cid} on {kernel_id}") gw...
mit
-2,232,988,239,722,105,000
38.294118
88
0.421781
false
4.831826
false
false
false
solus-project/evolve-sc
xng/plugins/os_release.py
2
2969
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # This file is part of solus-sc # # Copyright © 2017-2018 Ikey Doherty <ikey@solus-project.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 Founda...
gpl-2.0
-1,150,402,107,070,261,200
28.386139
76
0.528639
false
4.168539
false
false
false
aldeka/herring
herring/puzzles/tasks.py
1
3926
import celery from celery import shared_task from puzzles.models import Puzzle from puzzles.spreadsheets import make_sheet import slacker import time import sys import logging try: from herring.secrets import SECRETS # A token logged in as a legitimate user. Turns out that "bots" can't # do the things we w...
mit
1,425,608,479,827,831,800
34.053571
132
0.662506
false
3.29639
false
false
false
david-hoffman/scripts
mip.py
1
2599
# ! /usr/bin/env python # -*- coding: utf-8 -*- """mip.py A utility to call mip from the command line Usage: mip.py <myfile> [--PDF --log] mip.py -h | --help Options: -h --help Show this screen. --PDF Print PDF to current directory --log Take log of data first """ from docopt import d...
apache-2.0
-1,941,892,218,879,892,500
31.4875
86
0.565987
false
4.118859
false
false
false
gregpechiro/dndtools
dndtools/dnd/skills/views.py
1
5380
# -*- coding: utf-8 -*- from django.shortcuts import get_object_or_404, render_to_response from django.template.context import RequestContext from dndtools.dnd.menu import MenuItem, menu_item, submenu_item from dndtools.dnd.views import permanent_redirect_object, permanent_redirect_view, is_3e_edition from dndtools.dnd...
mit
-8,548,592,003,951,022,000
41.706349
96
0.565985
false
4.23622
false
false
false
tsybulkin/dor
dor.py
1
11481
#!/usr/bin/python # # dor-bug robot # # ####################################################### from math import sin,cos,radians,degrees,pi,asin,atan,sqrt import numpy as np from tools import * from time import sleep alpha_max = pi/2 beta_max = pi phi_max = pi/5 small_angles = [-0.01, 0.0, 0.01 ] big_angles = ...
apache-2.0
7,863,833,608,741,897,000
23.221519
99
0.587579
false
2.355077
false
false
false
h-friederich/lpm
run-server.py
1
3227
#!/usr/bin/env python import sys import os from flask import Flask, redirect, url_for # ensure lpm is found and can be directly imported from this file sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import lpm app = Flask(__name__) app.config.update( DEBUG=True, S...
bsd-3-clause
508,047,208,766,367,200
31.27
93
0.438798
false
4.296937
false
false
false
bmihelac/django-cruds
setup.py
1
1592
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import cruds try: from setuptools import setup except ImportError: from distutils.core import setup version = cruds.__version__ if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') print("You probably want to also...
bsd-3-clause
-6,656,825,327,990,374,000
27.428571
114
0.608668
false
3.754717
false
false
false
akx/shoop
shoop/core/methods/base.py
1
7131
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from decimal import Decimal import...
agpl-3.0
6,226,013,237,256,783,000
33.616505
115
0.615902
false
4.249702
false
false
false
j-towns/pymanopt
pymanopt/tools/autodiff/_autograd.py
1
2575
""" Module containing functions to differentiate functions using autograd. """ try: import autograd.numpy as np from autograd.core import grad except ImportError: np = None grad = None from ._backend import Backend, assert_backend_available class AutogradBackend(Backend): def __str__(self): ...
bsd-3-clause
5,524,637,587,608,100,000
31.1875
79
0.599612
false
4.153226
false
false
false
npawelek/rpc-maas
playbooks/files/rax-maas/plugins/disk_utilisation.py
1
2054
#!/usr/bin/env python # Copyright 2014, Rackspace US, 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 applicabl...
apache-2.0
1,663,741,820,486,070,800
35.035088
79
0.621227
false
3.934866
false
false
false
rochacbruno/dynaconf
tests/test_json_loader.py
1
5842
import json import pytest from dynaconf import LazySettings from dynaconf.loaders.json_loader import DynaconfEncoder from dynaconf.loaders.json_loader import load settings = LazySettings(environments=True, ENV_FOR_DYNACONF="PRODUCTION") JSON = """ { "a": "a,b", "default": { "password": "@int 99999...
mit
-7,556,519,038,617,148,000
26.299065
73
0.625471
false
3.562195
true
false
false
Microvellum/Fluid-Designer
win64-vc/2.78/Python/bin/2.78/scripts/modules/rna_prop_ui.py
1
5611
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
gpl-3.0
6,176,873,088,856,123,000
26.10628
115
0.586705
false
3.509068
false
false
false
vallemrv/tpvB3
tpv/controllers/pedido.py
1
12375
# -*- coding: utf-8 -*- # @Author: Manuel Rodriguez <valle> # @Date: 10-May-2017 # @Email: valle.mrv@gmail.com # @Last modified by: valle # @Last modified time: 12-Feb-2018 # @License: Apache license vesion 2.0 from kivy.uix.boxlayout import BoxLayout from kivy.storage.jsonstore import JsonStore from kivy.propert...
apache-2.0
-6,857,285,848,387,114,000
34.548851
80
0.509579
false
3.395828
false
false
false
valentin-krasontovitsch/ansible
lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway_facts.py
1
6089
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
gpl-3.0
-9,125,704,389,823,794,000
30.066327
136
0.572672
false
4.409124
false
false
false
gitcoinco/web
app/gas/management/commands/output_gas_viz.py
1
5506
import datetime import os from django.conf import settings from django.core.management.base import BaseCommand from django.utils import timezone import boto from boto.s3.key import Key from gas.models import GasProfile from numpy import array from perftools.models import JSONStore def convert_to_movie(): comman...
agpl-3.0
-7,824,083,365,066,125,000
35.95302
183
0.560298
false
3.330913
false
false
false
projectatomic/atomic-reactor
atomic_reactor/plugins/build_source_container.py
1
3923
""" Copyright (c) 2019 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import print_function, unicode_literals, absolute_import import os import subprocess import tempfile from atomic_reactor.bui...
bsd-3-clause
-2,101,025,110,635,851,300
36.721154
99
0.641091
false
3.842311
false
false
false
ericholscher/pinax
pinax/apps/tagging_utils/widgets.py
1
1693
from django import forms from django.utils.safestring import mark_safe from django.core.urlresolvers import reverse from django.conf import settings class TagAutoCompleteInput(forms.TextInput): class Media: css = { 'all': (settings.STATIC_URL + 'pinax/css/jquery.autocomplete.css',) } ...
mit
-465,793,748,839,148,160
35.021277
79
0.502067
false
4.363402
false
false
false
tjanez/ansible
lib/ansible/modules/cloud/openstack/os_stack.py
1
9095
#!/usr/bin/python #coding: utf-8 -*- # (c) 2016, Mathieu Bultel <mbultel@redhat.com> # (c) 2016, Steve Baker <sbaker@redhat.com> # # This module 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
5,956,852,945,441,309,000
32.936567
109
0.587026
false
4.162471
false
false
false
craighiller/serendipity
imgur.py
1
1275
#!/usr/bin/env python3 import json, sys, time as dt, pprint, math import urllib import imgur_config from Imgur.Factory import Factory from Imgur.Auth.Expired import Expired try: from urllib.request import urlopen as UrlLibOpen from urllib.request import HTTPError except ImportError: from urllib2 import ur...
mit
-5,959,340,610,859,695,000
28
77
0.644706
false
3.219697
false
false
false
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/pwd.py
1
4787
# encoding: utf-8 # module pwd # from (built-in) # by generator 1.135 """ This module provides access to the Unix password database. It is available on all Unix versions. Password database entries are reported as 7-tuples containing the following items from the password database (see `<pwd.h>'), in order: pw_name, pw_...
gpl-2.0
-8,021,968,845,025,423,000
24.875676
101
0.607061
false
4.005858
false
false
false
4thgen/DCGAN-CIFAR10
main.py
1
5341
import os from GAN import GAN ''' from CGAN import CGAN from infoGAN import infoGAN from ACGAN import ACGAN from EBGAN import EBGAN from WGAN import WGAN from DRAGAN import DRAGAN from LSGAN import LSGAN from BEGAN import BEGAN ''' from utils import show_all_variables import tensorflow as tf import argparse """pars...
apache-2.0
5,915,934,955,121,080,000
41.055118
132
0.604568
false
3.594213
false
false
false
josephmfaulkner/stoqs
stoqs/loaders/MolecularEcology/loadSIMZ_oct2014.py
1
5630
#!/usr/bin/env python __author__ = 'Mike McCann' __copyright__ = '2013' __license__ = 'GPL v3' __contact__ = 'mccann at mbari.org' __doc__ = ''' Master loader for all October 2013 SIMZ activities. Mike McCann MBARI 24 October 2013 @var __date__: Date of last svn commit @undocumented: __doc__ parser @status...
gpl-3.0
6,166,183,970,358,253,000
39.214286
118
0.594849
false
2.844871
false
false
false
voidpp/vcp
vcp/project.py
1
12036
import os import shutil import logging from voidpp_tools.terminal import get_size from collections import OrderedDict import re from datetime import timedelta, datetime from .repository_command_result_box import RepositoryCommandResultBox from .exceptions import ProjectException, RepositoryCommandException from .proje...
mit
7,502,242,462,261,825,000
32.34072
148
0.558657
false
4.280228
false
false
false
windskyer/nova
nova/tests/functional/api_sample_tests/test_instance_usage_audit_log.py
1
1995
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # 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...
gpl-2.0
5,870,727,372,018,153,000
38.9
78
0.653634
false
3.8
true
false
false
mwillsey/crossbot
crossbot/migrations/0011_manage_predictor.py
1
4482
# Generated by Django 2.1.2 on 2018-11-04 20:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crossbot', '0010_fix_time_model'), ] operations = [ migrations.AlterModelOptions( name='MiniCrosswordModel', options...
gpl-3.0
4,466,042,734,457,438,000
32.447761
58
0.404284
false
5.760925
false
false
false
concrete-mixer/concrete-mixer
soundcloud-fetch.py
1
3207
import random import re import sys import os import shutil from multiprocessing import Pool import requests import soundcloud from pydub import AudioSegment import OSC streams = [] filename = 'concrete.conf' lines = open(filename, 'r').read().split('\n') for line in lines: matches = re.match(r'^stream(\d+)Url...
gpl-2.0
5,974,928,612,801,205,000
23.860465
75
0.566573
false
3.636054
false
false
false
CitrineInformatics/refkit
util/arxivid.py
1
5282
""" Functions for working with arXiv identifier strings. """ import re from sets import Set def extract(value): """ Attempt to extract an arXiv identifier from a string. :param value: String to extract arXiv identifier from :raises ValueError: If value does not contain an arXiv identifier :re...
mit
-8,739,828,537,139,025,000
45.743363
117
0.633283
false
3.174279
false
false
false
schets/scikit-learn
sklearn/manifold/spectral_embedding_.py
1
19647
"""Spectral Embedding""" # Author: Gael Varoquaux <gael.varoquaux@normalesup.org> # Wei LI <kuantkid@gmail.com> # License: BSD 3 clause import warnings import numpy as np from scipy import sparse from scipy.linalg import eigh from scipy.sparse.linalg import lobpcg from ..base import BaseEstimator from ..ext...
bsd-3-clause
-3,809,747,056,958,255,600
39.509278
79
0.616532
false
4.301007
false
false
false
pannal/Subliminal.bundle
Contents/Code/support/activities.py
2
5022
# coding=utf-8 from wraptor.decorators import throttle from config import config from items import get_item, get_item_kind_from_item, refresh_item Activity = None try: from plex_activity import Activity except ImportError: pass class PlexActivityManager(object): def start(self): activity_sources_...
mit
-1,330,420,517,494,388,200
37.045455
120
0.521705
false
4.38986
true
false
false
dongweiming/flask_reveal
social/strategies/webpy_strategy.py
1
2142
import web from social.strategies.base import BaseStrategy, BaseTemplateStrategy class WebpyTemplateStrategy(BaseTemplateStrategy): def render_template(self, tpl, context): return web.template.render(tpl)(**context) def render_string(self, html, context): return web.template.Template(html)(*...
bsd-3-clause
-1,485,324,687,506,974,500
29.169014
69
0.617647
false
3.959335
false
false
false
lttng/lttng-scope
ttt/src/main/python/debuginfo_synth_exec.py
2
1472
from debuginfo_trace_writer import DebugInfoTraceWriter import sys ''' Generate a trace simulating an exec. When an exec happens, the address space of the process is reset (previously loaded libraries are not there anymore, and the main executable is replaced), so any know mapping should be forgotten. In the trace, t...
epl-1.0
5,882,135,464,082,170,000
31.711111
92
0.726902
false
2.819923
false
false
false
PeterRochford/SkillMetrics
skill_metrics/write_taylor_stats.py
1
5287
import os import xlsxwriter def write_taylor_stats(filename,data,**kwargs): ''' Write statistics used in a target diagram to an Excel file. This function writes to an Excel file FILENAME the statistics used to create a Taylor diagram for each of the dictionaries contained in DATA. The first ...
gpl-3.0
-8,094,325,165,340,151,000
30.658683
79
0.611122
false
4.172849
false
false
false
josiah-wolf-oberholtzer/consort
test/test_DependentTimespanMaker.py
1
57277
import abjad import consort import collections from abjad.tools import systemtools from abjad.tools import timespantools def _make_timespan_inventory(): timespan_inventory = abjad.TimespanList([ consort.PerformedTimespan( start_offset=0, stop_offset=20, voice_name='A', ...
mit
-452,016,342,722,227,500
36.534076
65
0.441696
false
4.37563
false
false
false
lscsoft/ligotimegps
docs/conf.py
1
2535
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # http://www.sphinx-doc.org/en/master/config import os.path from urllib.request import urlretrieve from ligotimegps import __version__ as VERSION # ...
gpl-3.0
5,281,640,337,460,886,000
28.476744
94
0.668245
false
3.637016
true
false
false
baohaojun/ibus-sdim
engine/table.py
1
10818
# -*- coding: utf-8 -*- # vim:et sts=4 sw=4 # # ibus-sdim - The Tables engine for IBus # # Copyright (c) 2008-2009 Yu Yuwei <acevery@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Found...
lgpl-2.1
8,023,913,865,966,862,000
29.732955
95
0.509983
false
3.873255
true
false
false
Stargrazer82301/CAAPR
CAAPR/CAAPR_AstroMagic/PTS/pts/evolve/Crossovers.py
1
22844
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
mit
-3,296,907,227,072,843,000
25.779601
133
0.550366
false
3.21009
false
false
false
spaceone/tehbot
tehbot/plugins/xkcd/__init__.py
1
1749
from tehbot.plugins import * import urllib2 import urllib import lxml.html import lxml.etree import json # patch XPath 2.0 function into XPath 1.0 API oO etree_funcs = lxml.etree.FunctionNamespace(None) etree_funcs["lower-case"] = lambda ctx, x: x[0].text_content().lower() if x else "" url = "http://xkcd.com%s" # ht...
mit
3,080,110,359,981,649,000
32.634615
154
0.568897
false
3.363462
false
false
false
vintasoftware/django-role-permissions
rolepermissions/roles.py
1
7914
from __future__ import unicode_literals import inspect from six import add_metaclass from django.contrib.auth.models import Group, Permission from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from rolepermissions.utils import camelToSnake, camel_or_snake_to_ti...
mit
-2,105,976,347,229,885,400
31.040486
124
0.633687
false
4.2208
false
false
false
romanalexander/opendota
dotastats/tasks.py
1
4185
import traceback from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.core.cache import cache from djcelery import celery from dotastats.models import MatchHistoryQueue, MatchDetails, SteamPlayer from dotastats.json.steamapi import GetMatchDetails, GetMatchHistory, GetPlaye...
mit
-4,770,386,650,370,292,000
38.11215
114
0.624851
false
4.244422
false
false
false
drallensmith/neat-python
examples/picture2d/evolve_interactive.py
1
9101
""" This is an example that amounts to an offline picbreeder.org without any nice features. :) Left-click on thumbnails to pick images to breed for next generation, right-click to render a high-resolution version of an image. Genomes and images chosen for breeding and rendering are saved to disk. This example also d...
bsd-3-clause
7,536,118,259,714,346,000
37.400844
111
0.59466
false
3.982932
true
false
false
bitmovin/bitmovin-python
bitmovin/bitmovin.py
1
1234
from .bitmovin_object import BitmovinObject from .rest import BitmovinHttpClient from .services import InputService, OutputService, FilterService, CodecConfigurationService, EncodingService, \ ManifestService, InfrastructureService, AnalyticsService class Bitmovin(BitmovinObject): def __init__(self, api_key, ...
unlicense
7,958,707,509,641,524,000
57.761905
133
0.726094
false
3.618768
false
false
false
apache/allura
Allura/allura/model/timeline.py
2
4850
# 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 (t...
apache-2.0
6,539,335,614,294,883,000
31.77027
90
0.643505
false
4.246935
false
false
false
ZeitOnline/zeit.today
src/zeit/today/clickimport.py
1
1330
from cStringIO import StringIO import argparse import gocept.runner import logging import os.path import requests import zeit.connector.interfaces import zeit.connector.resource import zope.app.appsetup.product import zope.component log = logging.getLogger(__name__) @gocept.runner.once(principal=gocept.runner.from_...
bsd-3-clause
-5,760,793,349,174,709,000
32.25
79
0.718045
false
3.866279
false
false
false
emiller/terminal.sublime-package
Terminal/open_terminal.py
1
1066
""" @author emiller @date 01/22/2013 @description Simple Sublime plugin that enables the familiar Open Terminal Here support within the editor. """ import sublime, sublime_plugin, os, sys class OpenTerminalCommand(sublime_plugin.TextCommand): def run(self, edit): path = os.path.dirn...
mit
-2,399,296,585,747,105,000
29.457143
92
0.65197
false
3.638225
false
false
false
talha81/TACTIC-DEV
src/pyasm/security/security.py
1
62804
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
-4,296,692,532,009,081,000
30.528112
156
0.568244
false
4.030548
false
false
false
yingchi/fastai-notes
deeplearning1/nbs/vgg16.py
1
8793
from __future__ import division, print_function import os, json from glob import glob import numpy as np from scipy import misc, ndimage from scipy.ndimage.interpolation import zoom from keras import backend as K from keras.layers.normalization import BatchNormalization from keras.utils.data_utils import get_file fro...
apache-2.0
-1,971,491,146,242,214,100
36.738197
144
0.607984
false
4.110799
true
false
false
googlearchive/simian
src/tests/simian/mac/common/util_test.py
1
3717
#!/usr/bin/env python # # Copyright 2018 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
apache-2.0
6,284,869,909,259,407,000
33.416667
75
0.719666
false
3.808402
true
false
false
Cadasta/django-jsonattrs
example/exampleapp/views.py
1
10512
import django.views.generic as generic import django.views.generic.edit as edit from django.shortcuts import redirect from django.core.urlresolvers import reverse_lazy from django.forms import ModelChoiceField from django.contrib.contenttypes.models import ContentType from django.db import IntegrityError import django....
agpl-3.0
1,201,420,258,175,254,500
28.611268
75
0.582097
false
4.191388
false
false
false
flohorovicic/pynoddy
VisualizationExample.py
1
1198
""" Created on Wed Apr 15 19:33:09 2020 @author: ahinoamp@gmail.com This script shows how to generate a 3d visualization of a pynoddy model in a vtk popup window. note: every time the window pops out, you need to close it to free the terminal There is another ipynb file which shows how to visualize such models in...
gpl-2.0
-2,734,801,834,425,218,600
33.228571
90
0.724541
false
3.502924
false
true
false
achimnol/aiotools
src/aiotools/func.py
1
3631
import collections import functools from .compat import get_running_loop __all__ = ( 'apartial', 'lru_cache', ) _CacheEntry = collections.namedtuple('_CacheEntry', 'value expire_at') def apartial(coro, *args, **kwargs): """ Wraps a coroutine function with pre-defined arguments (including keyword ...
mit
2,900,340,229,955,730,000
32.934579
84
0.613054
false
4.411908
false
false
false
MikhailMS/Final_Project
music_generation_module/shift_key.py
1
8953
# Import packages import music21 from os import listdir from os.path import isfile, join # Import modules #from utils import * #== Main class ==# # Main tonics for key shifting c_tonic = dict([("G#", 4),("A-", 4),("A", 3),("A#", 2),("B-", 2),("B", 1),("C", 0),("C#", -1),("D-", -1),("D", -2),("D#", -3), ...
bsd-2-clause
4,652,851,743,536,483,000
48.192308
131
0.418296
false
2.525529
false
false
false
ernw/dizzy
dizzy/log.py
1
3465
# log.py # # Copyright 2017 Daniel Mende <mail@c0decafe.de> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # ...
bsd-3-clause
5,154,322,660,538,338,000
34
80
0.620202
false
4.066901
false
false
false
0x1306e6d/Baekjoon
snippets/sort/heap.py
1
1136
from random import shuffle n = int(input()) arr = list(range(n)) shuffle(arr) print(arr) heap = [0] * n heap_size = 0 def heap_insert(i): global heap global heap_size index = heap_size next_index = (index - 1) // 2 heap[index] = i heap_size += 1 while (next_index >= 0) and (i > heap[n...
gpl-2.0
-4,637,286,306,008,387,000
18.254237
88
0.544014
false
3.138122
false
false
false
davidswelt/dmvccm
lq-nlp-commons/wsj.py
1
5072
# Copyright (C) 2007-2011 Franco M. Luque # URL: <http://www.cs.famaf.unc.edu.ar/~francolq/> # For license information, see LICENSE.txt import codecs import itertools import os from nltk.corpus.reader.util import read_sexpr_block from nltk.corpus.reader import bracket_parse from nltk import tree from nltk import Tree...
gpl-3.0
7,973,924,912,216,270,000
32.368421
134
0.568612
false
3.232632
false
false
false
canvasnetworks/canvas
website/canvas/details_models.py
1
11765
from django.conf import settings from apps.client_details.models import ClientDetailsBase from apps.tags.models import Tag from canvas import stickers from canvas.cache_patterns import CachedCall from canvas.redis_models import RealtimeChannel from canvas.util import base36encode, strip_template_chars class ContentD...
bsd-3-clause
-5,271,667,882,162,043,000
29.012755
119
0.573311
false
3.846028
false
false
false
cernops/keystone
keystone/resource/backends/base.py
1
22834
# Copyright 2012 OpenStack Foundation # # 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...
apache-2.0
-2,394,938,092,894,301,000
35.07267
79
0.616055
false
4.613861
false
false
false
Kouhia/pyyttoni
denymanage.py
1
6830
#! /usr/bin/python # coding=UTF-8 # Denyhosts managements script v. 0.4a # Works only with ipv4 addresses. # You can search and remove IP addresses from denyhosts ban. # # NOTE! You should test the script first without real "TargetPaths". # If you use other system than Debian then paths might be completely different. ...
gpl-3.0
5,685,310,551,976,530,000
26.429719
122
0.664275
false
3.697888
false
false
false
zzrcxb/Pugoo
GoGame/circle.py
1
1081
class Circle: def __init__(self, members, enclosed, color, key, range=None, type='normal'): # type = 'normal', 'internal', 'dual' self.members = set(members) self.enclosed = set(enclosed) self.color = color self.range = range self.type = type self.key = key def ...
gpl-3.0
-1,687,486,913,983,174,400
24.761905
120
0.531915
false
3.740484
false
false
false
whereaswhile/DLSR
convnet-folk_master/shownet_bbx_bcfp.py
1
23553
# Copyright (c) 2011, Alex Krizhevsky (akrizhevsky@gmail.com) # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # - Redistributions of source code must retain the above copyright notice, # this ...
gpl-2.0
6,005,349,874,969,878,000
46.774848
208
0.587399
false
3.394293
true
false
false
puttarajubr/commcare-hq
corehq/apps/twilio/models.py
1
2143
import logging from corehq.apps.sms.mixin import SMSBackend, SMSLoadBalancingMixin from corehq.apps.sms.util import clean_phone_number from corehq.apps.twilio.forms import TwilioBackendForm from dimagi.ext.couchdbkit import * from twilio.rest import TwilioRestClient from django.conf import settings class TwilioBackend...
bsd-3-clause
-5,999,389,994,968,135,000
29.614286
75
0.642091
false
3.786219
false
false
false
GabMus/lithium-projman
server/lithium/settings.py
1
4701
# This file is part of Lithium-Projman. # # Lithium-Projman 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. # # Lithi...
gpl-3.0
-6,743,733,827,809,564,000
28.198758
91
0.707722
false
3.477071
false
false
false