repo_name
stringlengths
6
90
path
stringlengths
4
230
copies
stringlengths
1
4
size
stringlengths
4
7
content
stringlengths
734
985k
license
stringclasses
15 values
hash
int64
-9,223,303,126,770,100,000
9,223,233,360B
line_mean
float64
3.79
99.6
line_max
int64
19
999
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
8.06
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
amidvidy/mongo-orchestration
mongo_orchestration/apps/sharded_clusters.py
5
12776
#!/usr/bin/python # coding=utf-8 # Copyright 2012-2014 MongoDB, 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 appl...
apache-2.0
2,684,174,877,211,954,700
35.192635
79
0.628992
false
3.507
true
false
false
RSNA-QIBA-US-SWS/QIBA-DigitalPhantoms
abaqus/elastic/Foc30mmF2p0_E30k_T167/Parse3DNode.py
2
3223
import sys from odbAccess import * from abaqusConstants import * from odbMaterial import * from odbSection import * from array import array odbFile = str(sys.argv[1]) instance = str(sys.argv[2]) nodeset = str(sys.argv[3]) variable = str(sys.argv[4]) step = str(sys.argv[5]) precision = str(sys.argv[6]) resultFile = od...
mit
2,889,451,001,326,018,600
27.27193
81
0.737822
false
3.126091
false
false
false
ixc/django-fluent-contents
fluent_contents/plugins/oembeditem/migrations/0001_initial.py
2
2604
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import fluent_contents.plugins.oembeditem.fields class Migration(migrations.Migration): dependencies = [ ('fluent_contents', '0001_initial'), ] operations = [ migrations.CreateModel(...
apache-2.0
9,144,975,955,147,169,000
58.181818
239
0.61828
false
4.062402
false
false
false
rlworkgroup/metaworld
metaworld/policies/policy.py
1
1890
import abc import warnings import numpy as np def assert_fully_parsed(func): """Decorator function to ensure observations are fully parsed Args: func (Callable): The function to check Returns: (Callable): The input function, decorated to assert full parsing """ def inner(obs): ...
mit
-8,277,970,854,632,743,000
25.619718
91
0.628571
false
4.295455
false
false
false
allinpaybusiness/ACS
TLSW_pred/fyzpred02/fyz_pred_02.py
1
4127
# -*- coding: utf-8 -*- """ Spyder Editor 生产模型:creditscore_TLSW_fyz.creditscore_randomforest """ import sys import time import pandas as pd import numpy as np from sklearn.externals import joblib """ parameters = {'idCard':'530125198606102726', 'mobileNum':'13619662783', 'education':'高中', 'maritalStatus':'22', ...
apache-2.0
-4,635,145,961,327,491,000
39.181818
115
0.557455
false
2.569121
true
false
false
buhanec/cloudify-flexiant-plugin
fcoclient/clients.py
1
12306
# coding=UTF-8 """Provides FCO API Client and decorator.""" from functools import wraps from fcoclient.exceptions import (NonRecoverableError, RecoverableError) import requests import json from requests import codes as rsc from time import sleep # REST Client default settings REST_RETRY_COUNT = 5 REST_RETRY_DELAY...
apache-2.0
-8,531,881,016,703,894,000
35.300885
79
0.573054
false
4.31638
false
false
false
google/binja-hexagon
plugin/gen_il_funcs.py
1
65595
#!/usr/bin/env python3 # # Copyright (C) 2020 Google LLC # # 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 prog...
gpl-2.0
-2,695,213,028,867,132,400
28.788828
88
0.577193
false
2.940557
false
false
false
Thestars3/pyufp
ufp/pyqt4/QNetworkCookie.py
1
1239
#!/usr/bin/env python #-*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import, division, print_function import cookielib def toPyCookie(QtCookie): """ qt 쿠키를 python 쿠키로 바꿉니다. .. 참조: http://pyqt.sourceforge.net/Docs/PyQt4/qnetworkcookie.html https://github.com/jeanphix/Ghost.py/blob/d...
gpl-3.0
2,633,191,108,423,727,600
31.621622
174
0.714167
false
2.730769
false
false
false
Harvard-ATG/HarmonyLab
lab/urls.py
1
1866
from django.conf.urls import patterns, url import views from views import PlayView, ExerciseView, ManageView from views import APIView, APIExerciseView, APIGroupView from lti.views import LTIToolConfigView, LTILaunchView urlpatterns = patterns( '', url(r'^$', PlayView.as_view(), name='index'), # Course Ex...
bsd-3-clause
-2,156,511,373,292,303,600
53.882353
156
0.658092
false
2.933962
false
false
false
JElchison/Numberjack
examples/MagicWater.py
1
6918
from Numberjack import * # Magic Square Water Retention # The goal of the Magic Square Water Retention problem is to retain the maximum # amount of water in a N x N magic square. def model_magic_square(N): sum_val = N * (N * N + 1) / 2 # The magic number square = Matrix(N, N, 1, N * N) water = Matrix(...
lgpl-2.1
-5,352,092,650,890,970,000
31.632075
115
0.566927
false
3.182153
false
false
false
CraftSpider/CraftBin
Python/minecraft/model.py
1
9160
""" Classes and methods to help with minecraft Model objects """ import json import copy import spidertools.math as math import PIL.Image as Image import PIL.ImageEnhance as Enhance from . import state, enums class Rotation: __slots__ = ("origin", "axis", "angle", "rescale") def __init__(self, data): ...
apache-2.0
167,093,477,900,380,320
31.253521
112
0.547817
false
3.535315
true
false
false
pyohio/symposion
symposion/utils/anonymous_review.py
1
1719
class ProposalProxy(object): ''' Proxy object that allows for proposals to have their speaker redacted. ''' def __init__(self, proposal): self.__proposal__ = proposal def __getattr__(self, attr): ''' Overridden getattr to anonymize speaker data ''' if attr == "speaker": ...
bsd-3-clause
-312,555,850,870,368,500
27.180328
76
0.566027
false
4.308271
false
false
false
jayshonzs/UFLDL
DeepNetworks/checkStackedAECost.py
1
1480
__author__ = 'xiajie' import numpy as np from stackedAECost import stacked_cost from MNISThelper import loader EPSILON = 1e-4 def theta_plus(theta, i): global EPSILON ret = np.zeros(len(theta)) ret[i] += EPSILON return ret+theta def theta_minus(theta, i): global EPSILON ret = np.zeros(len...
mit
282,801,505,806,119,460
23.262295
81
0.599324
false
3.064182
false
false
false
emd/digidemod
tests/sample_tests.py
1
2086
from nose import tools import numpy as np from digidemod.sample import decimate def test_decimate_valueErrors(): # Attempts to decimate by a *negative* value should fail tools.assert_raises(ValueError, decimate, np.array([1]), -1) # Attempts to decimate by anything other than an int should fail tools...
gpl-2.0
-5,604,851,629,237,103,000
36.25
74
0.627996
false
3.348315
false
false
false
orione7/Italorione
channels/hokutonoken.py
2
2616
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # streamondemand.- XBMC Plugin # Canale per I Cavalieri Dello Zodiaco # http://blog.tvalacarta.info/plugin-xbmc/streamondemand. # ------------------------------------------------------------ import re from core import config from co...
gpl-3.0
-1,446,722,806,904,513,300
30.518072
113
0.578746
false
3.774892
false
false
false
SungJinYoo/BookShare
bookshare/apps/books/models.py
1
2243
#-*- coding:utf-8 -*- import itertools from urlparse import urlparse from django.db import models from django.conf import settings from django.core.files import File from django.core.files.base import ContentFile from django.core.validators import RegexValidator from django.utils.translation import ugettext_lazy as ...
gpl-2.0
8,852,736,179,945,465,000
27.392405
96
0.66206
false
3.738333
false
false
false
dataplumber/nexus
analysis/webservice/algorithms/TimeSeriesSolr.py
1
13351
""" Copyright (c) 2016 Jet Propulsion Laboratory, California Institute of Technology. All rights reserved """ import sys import traceback import logging from cStringIO import StringIO from datetime import datetime from multiprocessing.dummy import Pool, Manager import matplotlib.dates as mdates import matplotlib.pypl...
apache-2.0
-2,488,258,949,957,449,700
38.038012
128
0.556438
false
3.936026
false
false
false
ahvigil/picklr
picklr/expression.py
1
4584
# Copyright 2015 Arthur Vigil # This file is part of picklr. # # picklr 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. # # picklr is d...
gpl-3.0
-4,009,108,798,210,872,000
25.807018
75
0.584206
false
3.664269
false
false
false
bkochendorfer/reviewboard
reviewboard/scmtools/hg.py
4
10700
from __future__ import unicode_literals import logging from django.utils import six from django.utils.six.moves.urllib.parse import quote as urllib_quote from djblets.util.filesystem import is_exe_in_path from reviewboard.diffviewer.parser import DiffParser, DiffParserError from reviewboard.scmtools.git import GitDi...
mit
-277,891,175,870,648,600
33.405145
76
0.553551
false
4.115385
true
false
false
hobson/pyexiv2
test/gps_coordinate.py
5
3452
# -*- coding: utf-8 -*- # ****************************************************************************** # # Copyright (C) 2010 Olivier Tilloy <olivier@tilloy.net> # # This file is part of the pyexiv2 distribution. # # pyexiv2 is free software; you can redistribute it and/or # modify it under the terms of the GNU Gene...
gpl-2.0
-2,260,321,921,689,911,800
36.51087
80
0.601275
false
3.821705
true
false
false
wangjiezhe/kwplayer
kuwo/DES.py
4
8201
# Copyright (C) 2014 LiuLang <gsushzhsosgsu@gmail.com> # Use of this source code is governed by GPLv3 license that can be found # in http://www.gnu.org/licenses/gpl-3.0.html import base64 arrayE = [ 31, 0, 1, 2, 3, 4, -1, -1, 3, 4, 5, 6, 7, 8, -1, -1, 7, 8, 9, 10, 11, 12, -1, -1, 11, 12...
gpl-3.0
-6,006,508,041,075,456,000
32.257261
73
0.367062
false
2.266686
false
false
false
erKURITA/elections-data-scraper
lib/directories.py
1
4858
#!/user/bin/python # # This file is part of elections-data-scraper. # # elections-data-scraper 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...
gpl-3.0
-487,010,034,330,952,300
33.7
104
0.557431
false
4.412352
false
false
false
buzzsurfr/lbm
ltm/migrations/0001_initial.py
1
3488
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-17 13:40 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Creat...
mit
-1,679,544,959,354,980,400
46.780822
323
0.553326
false
4.089097
false
false
false
dannykopping/mysql-utilities
doc/intro/examples/copy_server.py
1
5727
#!/usr/bin/env python # # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is d...
gpl-2.0
-6,376,954,009,356,227,000
31.174157
75
0.639602
false
3.752949
false
false
false
sojo21/ToughRADIUS
toughradius/console/admin/passwd.py
5
1937
#!/usr/bin/env python #coding=utf-8 import sys, os from bottle import Bottle from bottle import request from bottle import response from bottle import redirect from bottle import MakoTemplate from bottle import static_file from bottle import abort from beaker.cache import cache_managers from toughradius.console.libs.p...
agpl-3.0
-3,611,221,305,581,693,000
29.790323
92
0.667365
false
3.477231
false
false
false
josdaza/deep-toolbox
TensorFlow/seq2seq_estimator/Main_attention_2.py
1
7559
import logging import numpy as np import tensorflow as tf from tensorflow.contrib import layers GO_TOKEN = 0 END_TOKEN = 1 UNK_TOKEN = 2 def seq2seq(mode, features, labels, params): vocab_size = params['vocab_size'] embed_dim = params['embed_dim'] num_units = params['num_units'] input_max_length = ...
mit
9,181,544,564,297,914,000
35.346154
125
0.606429
false
3.535547
false
false
false
soundsilence/CSE250B
assign3/code/assign3.py
1
4056
import numpy as np import scipy as sp import matplotlib.pyplot as plt from MINSTLoader import * import scipy.io as sio def PlotBivGaussian(mean, cov_matrix): samples = np.random.multivariate_normal(mean, cov_matrix, 100) fig = plt.figure() fig.suptitle('Problem 2-b', fontsize=20, fontweight='bold') ax...
mit
8,897,605,173,247,564,000
28.823529
128
0.567801
false
3.139319
false
false
false
Rapptz/git-utils
bootstrap.py
1
1870
#!/usr/bin/env python # script to install the git utils import os, sys, argparse import shutil from distutils.spawn import find_executable # default variables default_install = os.path.dirname(find_executable('git')) default_generator = 'html' if sys.platform == 'win32' else 'man' actions = ['install', 'uninstall', ...
cc0-1.0
-8,791,548,975,753,381,000
36.4
126
0.713904
false
3.800813
false
false
false
pandaoknight/leetcode
neo_easy/the_n_sum_problems/two-sum-ii-input-array-is-sorted/main.py
1
3663
#!/usr/bin/python # -*- encoding: utf-8 -*- class Solution(object): def binarySearch(self, needle, numbers): """ :type needle: int :type numbers: List[int] # :type showSearchCount: boolean :rtype: List[found,before,after,searchCount] """ searchCount = 0 ...
gpl-2.0
-8,720,958,222,264,413,000
32.490741
84
0.548521
false
3.595427
false
false
false
zebpalmer/MongoElector
mongoelector/locker.py
1
10055
import uuid from os import getpid from socket import getfqdn from time import sleep from datetime import datetime, timedelta from pymongo import ReturnDocument from pymongo.database import Database from pymongo.errors import DuplicateKeyError, OperationFailure class LockExists(Exception): """Raise when a lock exi...
lgpl-3.0
4,182,311,168,287,357,400
37.822394
113
0.533366
false
4.811005
false
false
false
kshedstrom/pyroms
examples/Palau_HYCOM/make_bdry_file.py
1
2689
import matplotlib matplotlib.use('Agg') import subprocess import os import sys from multiprocessing import Pool from functools import partial import numpy as np #import pdb #increase the maximum number of open files allowed #import resource #resource.setrlimit(resource.RLIMIT_NOFILE, (3000,-1)) import pyroms import ...
bsd-3-clause
1,469,847,717,373,595,400
32.197531
89
0.631833
false
2.59556
false
false
false
laurent-george/weboob
modules/edf/pages.py
3
6513
# -*- coding: utf-8 -*- # Copyright(C) 2013 Christophe Gouiran # # This file is part of weboob. # # weboob 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 # (a...
agpl-3.0
4,746,408,715,379,276,000
36.848837
537
0.595392
false
3.610649
false
false
false
lowrie/pyRouterJig
qt_config.py
1
46193
########################################################################### # # Copyright 2015-2018 Robert B. Lowrie (http://github.com/lowrie) # # This file is part of pyRouterJig. # # pyRouterJig is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as publishe...
gpl-3.0
-2,520,688,071,795,121,000
40.765823
100
0.600914
false
3.628387
true
false
false
brezerk/q4wine-web
xmlexport/xmlview.py
1
1690
# -*- coding: utf-8 -*- from stripogram import html2safehtml from HTMLParser import HTMLParser import cgi def openHeader(action): xml_view="""<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<appdb_export version=\"1.0\" action=\"%s\">""" % action return xml_view def prepareString(string, lenght = 0, strip_html = ...
gpl-3.0
-2,342,163,891,619,318,000
23.492754
150
0.556213
false
3.427992
false
false
false
ipsod/python_stringhelpers
stringhelpers/__init__.py
1
8736
""" stringhelpers ~~~~~~~~~~~~~ A set of various string helpers. :copyright: (c) 2013 by Thomas Skaflem. :license: MIT, see LICENSE for more details. """ __version__ = '1.2.1' import re import os import random def upcase(string): """Returns a copy of `string` with all the alphabetic charac...
mit
-1,163,583,858,776,925,200
30.537906
79
0.629579
false
3.831579
false
false
false
jszopi/repESP
repESP/util.py
1
5529
"""Constants and convenience functions for interacting with the library""" from typing import Dict, List, TypeVar, Union """ Attributes ---------- """ angstrom_per_bohr = 0.5291772086 """float : The conversion factor from Bohr radii (a₀) to angstrom (Å) Value used by Gaussian 09, based on: P. J. Mohr, B. N. Taylor,...
gpl-3.0
-4,782,206,237,301,016,000
38.156028
117
0.660388
false
3.85007
false
false
false
anthill-platform/anthill-social
anthill/social/model/social/__init__.py
1
6244
from tornado.gen import multi from anthill.common.internal import Internal from anthill.common.social import APIError from anthill.common import cached from .. token import SocialTokensError import time import datetime import hashlib class SocialAuthenticationRequired(Exception): def __init__(self, credential...
mit
-5,923,486,915,509,928,000
30.376884
115
0.572389
false
4.719577
false
false
false
heurezjusz/Athenet
demo/indicators.py
2
6320
""" Runs chosen algorithm on chosen type of network and prints results. With -p flag displays results on the plot. By default runs simple_neuron_deleter algorithm on LeNet network on one configuration case. More information with -h option. """ import argparse from argparse import RawTextHelpForma...
bsd-2-clause
-3,498,944,269,529,316,400
39.254777
79
0.545253
false
4.308112
false
false
false
swquinn/smarterer
app/controller/question.py
1
2807
# Copyright (c) 2015 Sean Quinn # # Licensed under the MIT License (http://opensource.org/licenses/MIT) # # 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 with...
mit
1,174,858,722,366,339,600
37.986111
97
0.726042
false
4.127941
false
false
false
opentext/storyteller
docplatform/distribution/py/pfdesigns/docbuilder/stl2html/stl2html.py
1
1271
import docapi import docbuilder from utils_dump import OptionsHook g_data = __file__.replace('.py', '.dat') g_html = __file__.replace('.py', '.htm') g_settings = { "JSFILTER_PATH" : "wd:/stl2html.js", "JSFILTER_STREAM_data" : "<data/>", "JSFILTER_CFG_stl" : "wd:/stl2html.xml", "JSFILTER_CFG_template" ...
apache-2.0
1,701,561,215,794,020,900
29.261905
89
0.645161
false
3.033413
false
false
false
aluttik/pizzapi
setup.py
1
4369
#!/usr/bin/env python # -*- coding: utf-8 -*- """ A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject https://github.com/kennethreitz/setup.py Note: To use the 'upload' functionality of this file, you must: $ pip install twine """ fro...
mit
-2,934,051,436,390,503,000
28.869863
83
0.639532
false
4.015654
true
false
false
PressLabs/lithium
lithium/exceptions.py
1
2172
from werkzeug.exceptions import HTTPException from werkzeug.utils import escape from lithium.views.base import serialize_response, get_request_type class BaseHttpException(HTTPException): _template = { 'json': { 'description': lambda description: description, 'headers': ('Content-Type', 'applicatio...
apache-2.0
-6,052,442,455,754,342,000
30.028571
113
0.64825
false
3.934783
false
false
false
postmarketOS/pmbootstrap
pmb/chroot/mount.py
1
4110
""" Copyright 2018 Oliver Smith This file is part of pmbootstrap. pmbootstrap 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. pmbootstrap ...
gpl-3.0
3,741,999,145,340,402,000
37.055556
79
0.589051
false
3.978703
false
false
false
mschmittfull/nbodykit
nbodykit/core/algorithms/ExampleAlgorithm.py
1
4015
from nbodykit.core import Algorithm, Source, DataSource import numpy from pmesh.pm import ParticleMesh class Play(Algorithm): """ A simple example Algorithm that plays the 'read' interface of a Source and does min/max on selected columns """ plugin_name = "Play" def __init__(self, source, colu...
gpl-3.0
2,962,685,098,669,043,000
33.316239
99
0.571606
false
3.842105
false
false
false
forseti-security/forseti-security
google/cloud/forseti/scanner/scanners/config_validator_util/validator_pb2_grpc.py
1
7042
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from . import validator_pb2 as validator__pb2 class ValidatorStub(object): """Missing associated documentation comment in .proto file.""" def __init__...
apache-2.0
7,562,749,866,877,825,000
40.423529
132
0.625959
false
4.924476
false
false
false
rev22/svgl
scripts/makeParseAttribute.py
1
9631
import parse_idl import enum_map import parse_attr import parse_dtd import mapDtdIdl from make_cpp_string_name import * import string import mapAttributeType import config import GenFile # idl #if len(parse_idl.class_decls): # for (classname, classdecl) in parse_idl.class_decls.items(): # for enum in classde...
lgpl-2.1
-8,580,911,245,772,489,000
24.080729
121
0.583117
false
3.32218
false
false
false
oberstet/autobahn-python
autobahn/asyncio/util.py
3
3994
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # 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 ...
mit
8,585,635,531,999,651,000
41.042105
122
0.685779
false
4.257996
false
false
false
jamesaud/se1-group4
jmatcher/students/forms.py
1
2442
from django import forms from .models import Student, WorkExperience, Education, Project from django.forms.models import inlineformset_factory from django.utils.translation import ugettext_lazy as _ import datetime from django.conf import settings from django import forms from .models import Student from django.utils....
mit
3,397,613,385,660,423,700
39.7
123
0.714988
false
3.762712
false
false
false
openstack/taskflow
taskflow/atom.py
1
17482
# -*- coding: utf-8 -*- # Copyright (C) 2013 Rackspace Hosting Inc. All Rights Reserved. # Copyright (C) 2013 Yahoo! 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...
apache-2.0
-4,710,353,856,961,573,000
44.056701
79
0.637799
false
4.509157
false
false
false
magnusnissel/reddit-nba-corpus
aggregate_metadata.py
1
3911
import os import glob import logging import pandas as pd try: from config import DIR, PATH except ImportError as e: print(e) print("Please make sure to (copy &) rename 'sample_config.py' to " "'config.py'.") """ This file is part of reddit-nba-corpus. reddit-nba-corpus is free softwar...
gpl-3.0
-1,429,547,216,021,183,200
38.505051
78
0.581948
false
3.853202
false
false
false
rosettatype/random-scripts
get_all_google_fonts.py
1
3862
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Downloads all the fonts from Google Fonts using the API (you will need an API key). The script is borrowing a lot from: https://github.com/googlefonts/fontbakery/blob/master/fontbakery-metadata-vs-api.py """ import json import optparse import os import sys import urll...
mit
6,422,752,252,094,501,000
36.495146
211
0.605904
false
3.924797
false
false
false
MarkusWET/secure_password_website
app.py
1
5544
from flask import Flask, render_template, request from flask_sqlalchemy import SQLAlchemy from sqlalchemy.dialects.postgresql import UUID as pgUUID, TEXT import uuid import os import hashlib import base64 app = Flask(__name__) app.debug = True app.config["SQLALCHEMY_DATABASE_URI"] = "postgresql://dbadmin@localhost:543...
mit
6,984,400,508,647,929,000
35.235294
117
0.576659
false
4.125
false
false
false
cleinias/Homeo
src/Simulator/HomeoMinimalGui.py
1
15709
''' Provides a minimal interface to control a Homeostat simulation. It can start and stop a simulation from a GUI, as well as save and graph the simulation's data. Created on May 5, 2013 @author: stefano ''' from PyQt4.QtCore import * from PyQt4.QtGui import * from Core.Homeostat import * from Helpers.QtSeparator im...
gpl-3.0
-5,956,981,567,056,860,000
42.760446
160
0.616589
false
4.344303
false
false
false
pirhoo/rss2wp
parser.py
1
3624
# -*- coding: utf-8 -*- from colors import red, green from wordpress_xmlrpc import Client, WordPressPost, WordPressUser, WordPressTerm from wordpress_xmlrpc.methods.posts import GetPosts, NewPost from wordpress_xmlrpc.methods.users import GetUsers import argparse import feedparser import os __all__ = ["Client"] def e...
gpl-3.0
-3,017,516,011,180,738,600
35.565657
145
0.603591
false
3.716632
false
false
false
vesellov/bitdust.devel
raid/rebuild.py
1
6927
#!/usr/bin/env python # rebuild.py # # Copyright (C) 2008-2018 Veselin Penev, https://bitdust.io # # This file (rebuild.py) is part of BitDust Software. # # BitDust 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 F...
agpl-3.0
6,291,154,811,090,514,000
49.195652
147
0.630576
false
4.024985
false
false
false
cyrus0824/biothings.api-1
biothings/bin/biothings-admin.py
1
2254
#!/usr/bin/env python import os import re import sys import biothings from string import Template from shutil import copytree def usage(): return "Usage: biothings-admin.py < path to project directory > < object name > < OPTIONAL key=value pairs to override template variables >" def main(args): try: p...
apache-2.0
-5,604,481,666,142,505,000
33.151515
144
0.611358
false
3.527387
false
false
false
DOAJ/doaj
portality/migrate/p1p2/remove-0000-issns.py
1
2040
from portality import models # first thing to do is delete suggestions which are marked "waiting for answer" q = { "query" : { "bool" : { "must" : [ {"term" : {"admin.application_status.exact" : "waiting for answer"}} ] } } } batch_size = 1000 total=0 ...
apache-2.0
-5,566,156,307,891,635,000
27.333333
109
0.586275
false
3.227848
false
false
false
westernx/sgpublish
sgpublish/actions/promote_to_version.py
1
1147
import os import subprocess from sgfs import SGFS from sgactions.utils import notify from sgpublish import versions def run(entity_type, selected_ids, **kwargs): sgfs = SGFS() for id_ in selected_ids: entity = sgfs.session.merge({'type': entity_type, 'id': id_}) task, code, ver...
bsd-3-clause
-2,869,538,744,323,075,600
33.757576
143
0.571927
false
3.688103
false
false
false
ted-ross/octo-nemesis
agent/agent.py
1
11686
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "...
apache-2.0
3,226,328,912,274,491,400
36.335463
126
0.619545
false
4.124956
false
false
false
doge-search/webdoge
xiaoqiqi/UCSB/scrap_research.py
1
1583
#coding=utf-8 #!~/python2.7.10/bin/python import urllib import urllib2 import re import os import sys from bs4 import BeautifulSoup import xml.dom.minidom as minidom import time import socket reload(sys) sys.setdefaultencoding('utf-8') fout_xml = file('UCSB_research.xml', 'w') doc = minidom.Documen...
unlicense
2,913,476,371,791,530,000
32.413043
81
0.657612
false
3.411638
false
false
false
Scalr/pecha
scalrctl/commands/server.py
2
11256
__author__ = 'Dmitriy Korsakov' __doc__ = 'Server management' import copy import json import time from scalrctl import commands from scalrctl import click class RebootServer(commands.PolledAction): epilog = "Example: scalr-ctl servers reboot --serverId <ID> --hard --nowait" post_template = { "server...
apache-2.0
4,327,081,301,438,371,300
39.930909
110
0.567253
false
4
false
false
false
lydgate/pytc
pytc.py
1
13598
#!/usr/bin/env python2 # TODO: Incorporate the below warning into a message when # you run the app without a proper ~/.pytc # # This file is part of pytc. # # pytc 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 Foundatio...
gpl-3.0
-4,404,356,210,337,074,000
34.784211
90
0.589278
false
3.58408
false
false
false
smc/silpa
src/silpa/modules/fortune/fortune.py
3
2435
#! /usr/bin/env python # -*- coding: utf-8 -*- # Fortune program # Copyright 2008 Santhosh Thottingal <santhosh.thottingal@gmail.com> # http://www.smc.org.in # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free ...
agpl-3.0
-8,509,322,392,713,816,000
34.808824
87
0.626283
false
3.914791
false
false
false
fluxer/spm
nuitka/nuitka/freezer/BytecodeModuleFreezer.py
1
2436
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
gpl-2.0
3,752,651,796,718,298,600
34.304348
78
0.694171
false
4.107926
false
false
false
ethertricity/bluesky
bluesky/tools/plotter.py
1
3043
''' Sim-side implementation of graphical data plotter in BlueSky.''' from numbers import Number from collections import OrderedDict import re import numpy as np import bluesky as bs # Globals # The variable lists and their corresponding sources varlist = OrderedDict() # The list of plots plots = list() def init(): ...
gpl-3.0
-4,747,656,295,144,859,000
33.977011
90
0.59185
false
3.847029
false
false
false
benthomasson/netshow-linux-lib
netshowlib/linux/ip_address.py
2
3215
# http://pylint-messages.wikidot.com/all-codes # pylint: disable=R0903 """ This module is responsible for getting IP address (ipv4 and ipv6) information from a linux system. It currently has one provider, i.e information from the `ip addr show` output """ import io import netshowlib.linux.common as common import re d...
gpl-2.0
-8,962,078,057,502,151,000
29.913462
77
0.585381
false
3.82283
false
false
false
fake-name/ReadableWebProxy
WebMirror/OfflineFilters/offline_filters.py
1
5647
import queue import pprint import time import datetime import traceback from sqlalchemy.orm import joinedload from sqlalchemy import not_ import runStatus import common.database as db import common.RunManager import common.get_rpyc import WebRequest from WebMirror.JobUtils import buildjob from WebMirror.OutputFilter...
bsd-3-clause
9,014,227,650,845,251,000
22.143443
91
0.683726
false
3.109581
false
false
false
godaddy/django_transaction_barrier
django_transaction_barrier/celery.py
1
3068
from __future__ import absolute_import import random from celery.task import Task from celery.exceptions import MaxRetriesExceededError from django_transaction_barrier import delete_transaction_barrier from django_transaction_barrier import get_debug_info from django_transaction_barrier import new_transaction_barrier...
mit
9,132,611,722,435,551,000
35.963855
77
0.690678
false
3.859119
false
false
false
lukovnikov/qelos
qelos/scripts/webqa/preprocessing/getflrepdata.py
1
7222
import qelos as q import re, time, pickle from SPARQLWrapper import SPARQLWrapper, JSON from SPARQLWrapper.SPARQLExceptions import EndPointNotFound, EndPointInternalError from qelos.scripts.webqa.preprocessing.buildvnt import category, ARGOPT, VAR, RETURN, JOIN, ENT, REL, BRANCH, fbfy, unfbfy ########################...
mit
6,195,174,601,967,289,000
41.239766
150
0.557186
false
3.950766
false
false
false
mice-software/maus
bin/scifi/tracker_resolution_plots.py
1
62748
#!/usr/bin/env python # This file is part of MAUS: http://micewww.pp.rl.ac.uk/projects/maus # # MAUS 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...
gpl-3.0
613,079,123,222,821,500
41.483412
80
0.549133
false
3.229107
false
false
false
jameslittle/python-social-auth
social/apps/flask_app/routes.py
1
1615
from flask import g, Blueprint, request, current_app from flask.ext.login import login_required, login_user from social.actions import do_auth, do_complete, do_disconnect from social.apps.flask_app.utils import psa social_auth = Blueprint('social', __name__) @social_auth.route('/login/<string:backend>/', methods=(...
bsd-3-clause
-4,250,440,627,590,483,000
37.452381
94
0.64644
false
3.854415
false
false
false
GoogleCloudPlatform/django-cloud-deploy
django_cloud_deploy/tests/cleanup/resource_cleanup.py
1
6191
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-7,169,494,775,671,168,000
44.189781
79
0.603941
false
4.700835
true
false
false
quintusdias/glymur
glymur/version.py
1
1033
""" This file is part of glymur, a Python interface for accessing JPEG 2000. http://glymur.readthedocs.org Copyright 2013 John Evans License: MIT """ # Standard library imports ... import sys # Third party library imports ... from distutils.version import LooseVersion import numpy as np # Local imports ... from ...
mit
-3,182,741,465,915,465,000
20.081633
72
0.675702
false
3.258675
false
false
false
mozilla/firefox-flicks
flicks/videos/admin.py
1
4041
from django.contrib import admin from django.db.models import Count from flicks.base.admin import BaseModelAdmin, NumVotesFilter from flicks.videos import models from flicks.videos.tasks import process_video class SelectRelatedFieldListFilter(admin.filters.RelatedFieldListFilter): template = 'admin/filters_selec...
bsd-3-clause
-3,395,001,769,263,568,400
35.405405
98
0.636476
false
4.004955
false
false
false
stackforge/networking-nec
networking_nec/nwa/nwalib/client_l2.py
2
5579
# Copyright 2016 NEC Corporation. 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 ...
apache-2.0
7,332,504,505,328,443,000
36.695946
78
0.585589
false
3.970819
false
false
false
ParadropLabs/Paradrop
tests/paradrop/core/update/test_update_object.py
1
2053
from paradrop.core.chute.chute import Chute from paradrop.core.update import update_object from mock import patch, MagicMock @patch('paradrop.core.update.update_object.ChuteStorage') @patch('paradrop.core.update.update_object.out') @patch('paradrop.core.update.update_object.executionplan') def test_update_object(execu...
apache-2.0
-1,751,057,218,735,121,200
30.584615
72
0.689722
false
3.564236
true
false
false
nickchurch/linkedlist
server/test/list_test.py
1
2401
""" create list, get all lists, get specific list """ import requests import json import datetime headers = {'content-type': 'application/json'} url = 'http://127.0.0.1:5000' login_user_route='/user/login' create_list_route='/list/create' get_lists_route='/lists' add_user_to_list_route='/list/adduser' remove_user_fr...
mit
9,004,523,457,450,750,000
53.568182
192
0.715535
false
3.039241
false
true
false
derwentx/WooGenerator
tests/test_config.py
1
2351
import os import re from collections import OrderedDict import unittest import configargparse from pprint import pformat from context import TESTS_DATA_DIR from woogenerator.conf.parser import ArgumentParserUser, ArgumentParserProd from woogenerator.utils import Registrar # from woogenerator import config class TestC...
gpl-2.0
-8,419,801,930,392,826,000
36.919355
100
0.641004
false
3.7616
true
false
false
Mitali-Sodhi/CodeLingo
Dataset/python/exceptions (2).py
4
5345
# Copyright 2010 Jacob Kaplan-Moss """ Exception definitions. """ class UnsupportedVersion(Exception): """Indicates that the user is trying to use an unsupported version of the API""" pass class CommandError(Exception): pass class AuthorizationFailure(Exception): pass class NoUniqueMatch(Exc...
mit
345,037,588,459,064,500
23.631336
79
0.620954
false
4.067732
false
false
false
kaishui/mlh_spider
py_mlh_scrapy/spiders/arch_news_detail_page.py
1
2559
from scrapy_redis.spiders import RedisSpider from py_mlh_scrapy.helper.chineseDateUtil import ChineseDateUtil from py_mlh_scrapy.items import DetailItem, ImageItem """ class name represent the collection name in mongodb author:kaishui """ class arch_news_detail_page(RedisSpider): name = "arch_news_detai...
mit
-129,669,526,252,320,800
33.041096
118
0.581489
false
3.367209
false
false
false
catalla/AYDABTU
feature_analyzer/legacy/make_scattersLegacy.py
1
5080
import vizQuery as vq import pandas as pd import numpy as np import matplotlib.pyplot as plt import sys import json from sklearn import preprocessing import itertools as it from scipy.stats import linregress from sklearn.cross_validation import train_test_split #Read Query File query_file = open(sys.argv[1], "r") #Ge...
mit
-6,212,985,084,605,060,000
28.028571
131
0.710827
false
2.956927
true
false
false
eProsima/Fast-DDS
tools/fastdds/discovery/parser.py
2
3600
# Copyright 2020 Proyectos y Sistemas de Mantenimiento SL (eProsima). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
apache-2.0
-6,807,669,601,808,058,000
31.142857
77
0.563889
false
4.171495
false
false
false
pombredanne/PyGithub
github/CommitCombinedStatus.py
1
4590
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
-2,814,629,955,525,746,700
40.351351
121
0.515251
false
5.043956
false
false
false
WHenderson/HashDb
setup.py
1
1124
from setuptools import setup def readme(): with open('README.rst') as f: return f.read() setup( name='hashdb2', version='1.1', description='HashDb2 provides a simple method for executing commands based on matched files', long_description=readme(), classifiers=[ 'Development Stat...
apache-2.0
5,636,840,548,232,912,000
31.114286
97
0.6121
false
3.957746
false
false
false
dbrattli/RxPY
tests/test_core/test_priorityqueue.py
1
3768
import unittest from rx.internal import PriorityQueue class TestItem(): def __init__(self, value, label=None): self.value = value self.label = label def __str__(self): if self.label: return "%s (%s)" % (self.value, self.label) else: return "%s" % self.v...
apache-2.0
-5,681,240,452,629,682,000
25.723404
74
0.543259
false
3.554717
true
false
false
apache/beam
sdks/python/apache_beam/io/gcp/tests/utils_test.py
5
9777
# # 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
-6,122,914,190,690,418,000
36.174905
80
0.677304
false
3.527056
true
false
false
luserazo/OracleReloaded
bot/models/dfa.py
1
5569
""" File: state_machine.py Desc: Abstraction of the bot. Bot is essentially a finite state machine Note: building a state machine is very clean in Python since the language follows a 'first class functions' paradigm. """ __author__ = 'Luis F. Serazo' __email__ = 'lserazo.projects@gmail.com' from collections i...
apache-2.0
3,369,670,099,835,928,600
31.952663
149
0.617885
false
4.08884
false
false
false
ruibarreira/linuxtrail
usr/lib/python2.7/dist-packages/pyatspi/image.py
2
4774
#Copyright (C) 2008 Codethink Ltd #Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. #This library is free software; you can redistribute it and/or #modify it under the terms of the GNU Lesser General Public #License version 2 as published by the Free Software Foundation. #This program is distributed i...
gpl-3.0
-2,596,354,256,030,969,300
44.903846
89
0.596774
false
4.957425
false
false
false
mverleg/svsite
source/base/views.py
1
1409
from django.contrib.messages import add_message, DEBUG, INFO, SUCCESS, WARNING, ERROR from django.shortcuts import redirect, render def render_cms_special(request, template, context=None, **kwargs): """ Special render function to render special pages integrated into the cms (apphooks). It renders `template` in pl...
bsd-3-clause
7,783,430,924,390,426,000
35.128205
117
0.723208
false
3.540201
false
false
false
CWRoos/msp430-python-raspberry-pi
msp430/gdb/target.py
1
2896
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2010 Chris Liechti <cliechti@gmx.net> # All Rights Reserved. # Simplified BSD License (see LICENSE.txt for full text) """\ Remote GDB programmer for the MSP430 embedded processor. """ import sys import logging from msp430.gdb import gdb from optparse im...
bsd-3-clause
-9,218,305,421,894,905,000
24.628319
89
0.596685
false
3.756161
false
false
false
yliu120/dbsystem
HW1/dbsys-hw1/Storage/BufferPool.py
1
4751
import io, math, struct from collections import OrderedDict from struct import Struct from Catalog.Identifiers import PageId, FileId, TupleId from Catalog.Schema import DBSchema import Storage.FileManager class BufferPool: """ A buffer pool implementation. Since the buffer pool is a cache, we do no...
apache-2.0
1,655,855,162,974,191,600
31.101351
98
0.626815
false
3.8008
false
false
false
abyssxsy/gnuradio
gnuradio-runtime/python/pmt/pmt_to_python.py
36
5712
# Copyright 2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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. ...
gpl-3.0
3,423,606,141,642,587,000
41.311111
153
0.67437
false
2.950413
false
false
false
CTSNE/NodeDefender
NodeDefender/db/data/heat.py
1
5210
from datetime import datetime, timedelta from NodeDefender.db.sql import SQL, HeatModel, GroupModel, iCPEModel from sqlalchemy import func from sqlalchemy.sql import label from itertools import groupby def current(*groups): groups = GroupModel.query.filter(GroupModel.name.in_(*[groups])).all() if not len(group...
mit
-2,704,201,969,117,407,700
35.690141
76
0.535893
false
3.873606
false
false
false
Freso/listenbrainz-server
listenbrainz/db/missing_musicbrainz_data.py
2
5171
# listenbrainz-server - Server for the ListenBrainz project. # # Copyright (C) 2020 MetaBrainz Foundation Inc. # # 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...
gpl-2.0
-7,656,430,070,728,892,000
41.385246
126
0.563527
false
3.983821
false
false
false
digidotcom/python-wvalib
wva/grapher.py
1
2764
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (c) 2015 Digi International Inc. All Rights Reserved. import collections import datetime import threading ...
mpl-2.0
5,977,684,139,628,752,000
36.863014
92
0.579595
false
4.082718
false
false
false
arnaud-morvan/QGIS
python/plugins/processing/algs/gdal/fillnodata.py
5
5880
# -*- coding: utf-8 -*- """ *************************************************************************** fillnodata.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ****************************...
gpl-2.0
-6,561,482,773,085,989,000
41.302158
135
0.52551
false
5.321267
false
false
false
facetothefate/contrail-controller
src/opserver/test/utils/util.py
6
2095
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import math import subprocess import os import time # Code borrowed from http://wiki.python.org/moin/PythonDecoratorLibrary#Retry def retry(tries=5, delay=3): '''Retries a function or method until it returns True. delay sets the initial de...
apache-2.0
-1,640,704,003,483,171,600
25.858974
77
0.568496
false
3.844037
false
false
false
wy65701436/harbor
tools/migrate_chart/migrate_chart.py
2
3988
#!/usr/local/bin/python3 import subprocess import signal import sys from pathlib import Path import click import requests MIGRATE_CHART_SCRIPT = '/migrate_chart.sh' HELM_CMD = '/linux-amd64/helm' CA_UPDATE_CMD = 'update-ca-certificates' CHART_URL_PATTERN = "https://{host}/api/v2.0/projects/{project}/repositories/{na...
apache-2.0
4,742,686,772,963,088,000
36.271028
144
0.591023
false
3.805344
false
false
false
boundlessgeo/qgis-webappbuilder-plugin
webappbuilder/popupeditor.py
1
2395
# -*- coding: utf-8 -*- # # (c) 2016 Boundless, http://boundlessgeo.com # This code is licensed under the GPL 2.0 license. # from PyQt4 import QtGui, QtCore from qgis.core import * from settings import * class PopupEditorDialog(QtGui.QDialog): def __init__(self, text, fields): super(PopupEditorDialog, sel...
gpl-3.0
-5,560,311,013,781,915,000
34.220588
117
0.612944
false
3.932677
false
false
false
milq/scripts-ubuntu-debian
learn/prog/06/06.py
5
4059
class Point(object): def __init__(self, x, y): self._x = x self._y = y def get_x(self): return self._x def set_x(self, x): self._x = x def get_y(self): return self._y def set_y(self, y): self._y = y class Character(object): ...
mit
-7,971,465,068,816,267,000
15.567347
113
0.580931
false
3.084347
false
false
false