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
rr-/ida-images
rgb-ida.py
1
3099
import idaapi import librgb from librgb.qt_shims import QtGui # important for PySide legacy IDA from librgb.qt_shims import QtWidgets try: MAJOR, MINOR = map(int, idaapi.get_kernel_version().split(".")) except AttributeError: MAJOR, MINOR = 6, 6 USING_IDA7API = MAJOR > 6 USING_PYQT5 = USING_IDA7API or (MAJOR ...
mit
-2,430,317,480,103,620,600
29.683168
79
0.595999
false
3.663121
false
false
false
zencore-dobetter/zencore-utils
src/zencore/utils/redis.py
1
3995
import uuid import math import time import logging import redis as engine from zencore.errors import WrongParameterTypeError from .types import smart_force_to_string logger = logging.getLogger(__name__) class RedisLock(object): def __init__(self, url, name=None, app_name=None, expire=None, prefix="zencore:lock...
mit
3,164,183,319,776,613,000
29.929688
109
0.558474
false
3.9749
true
false
false
p/webracer
tests/request_via_form_test.py
1
1451
import webracer import nose.plugins.attrib from . import utils from .apps import form_app utils.app_runner_setup(__name__, form_app.app, 8059) @nose.plugins.attrib.attr('client') @webracer.config(host='localhost', port=8059) class RequestViaFormTest(webracer.WebTestCase): def test_get_form_as_url(self): s...
bsd-2-clause
4,729,082,334,174,765,000
28.02
57
0.598897
false
3.818421
true
false
false
Ichag/django-timelinejs3
timeline/migrations/0009_auto_20150819_0648.py
1
3020
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('timeline', '0008_auto_20150818_2241'), ] operations = [ migrations.AlterField( model_name='options', ...
bsd-3-clause
4,725,792,827,878,784,000
31.12766
61
0.54404
false
4.596651
false
false
false
whiteshield/EHScripter
EHScripter/netsparker.py
1
6143
##!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import re import string from io import StringIO from lxml import etree try: from .util import * except Exception as e: from util import * class NetsparkerToMarkdown: def __init__(self, options): self.options=options self....
gpl-2.0
4,605,033,301,372,981,000
44.503704
196
0.496988
false
4.122819
false
false
false
swcurran/tfrs
backend/api/models/UserViewModel.py
1
1507
""" REST API Documentation for the NRS TFRS Credit Trading Application The Transportation Fuels Reporting System is being designed to streamline compliance reporting for transportation fuel suppliers in accordance with the Renewable & Low Carbon Fuel Requirements Regulation. OpenAPI spec version: v1 ...
apache-2.0
9,088,370,143,756,785,000
40.861111
208
0.704048
false
4.406433
false
false
false
vanesa/kid-o
kido/admin/utils.py
1
3921
# -*- coding: utf-8 -*- """ Flask-Admin utilities.""" from flask import abort, redirect, request, url_for from flask_admin import AdminIndexView, expose from flask_admin.base import MenuLink from flask_admin.contrib.sqla import ModelView from flask_login import current_user from functools import wraps from kido impo...
bsd-3-clause
-352,002,768,738,183,740
28.931298
86
0.61872
false
4.193583
false
false
false
eepgwde/pyeg0
gmus/GMus0.py
1
1699
## @file GMus0.py # @brief Application support class for the Unofficial Google Music API. # @author weaves # # @details # This class uses @c gmusicapi. # # @note # An application support class is one that uses a set of driver classes # to provide a set of higher-level application specific methods. # # @see # https://g...
gpl-3.0
6,076,076,360,128,342,000
30.462963
74
0.656857
false
3.23619
false
false
false
mdmueller/ascii-profiling
parallel.py
1
4245
import timeit import time from astropy.io import ascii import pandas import numpy as np from astropy.table import Table, Column from tempfile import NamedTemporaryFile import random import string import matplotlib.pyplot as plt import webbrowser def make_table(table, size=10000, n_floats=10, n_ints=0, n_strs=0, float_...
mit
-9,088,434,750,835,889,000
45.141304
122
0.623793
false
2.983134
false
false
false
patriciohc/carga-de-xls-a-MySQL
Choose_file.py
1
3639
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'Choose_file.ui' # # Created: Sat Oct 17 15:55:19 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except At...
apache-2.0
-8,237,645,389,629,048,000
46.25974
82
0.718054
false
4.206936
false
false
false
c0cky/mediathread
mediathread/djangosherd/api.py
1
4549
# pylint: disable-msg=R0904 from tastypie import fields from tastypie.resources import ModelResource from mediathread.api import UserResource, TagResource from mediathread.assetmgr.models import Asset from mediathread.djangosherd.models import SherdNote, DiscussionIndex from mediathread.projects.models import ProjectN...
gpl-2.0
-7,704,276,080,529,471,000
41.915094
79
0.56386
false
4.275376
false
false
false
fdslight/fdslight
freenet/handlers/tundev.py
1
5566
#!/usr/bin/env python3 import os, sys import pywind.evtframework.handlers.handler as handler import freenet.lib.fn_utils as fn_utils import freenet.lib.simple_qos as simple_qos try: import fcntl except ImportError: pass class tun_base(handler.handler): __creator_fd = None # 要写入到tun的IP包 ___ip_pac...
bsd-2-clause
794,198,108,318,362,000
23.490741
84
0.567864
false
3.099004
false
false
false
vesellov/bitdust.devel
customer/data_sender.py
1
14665
#!/usr/bin/python # data_sender.py # # Copyright (C) 2008-2018 Veselin Penev, https://bitdust.io # # This file (data_sender.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 Softwa...
agpl-3.0
4,224,043,803,797,804,000
38.422043
170
0.512104
false
4.385467
false
false
false
agacek/camkes-tool
camkes/internal/version.py
1
1813
# # Copyright 2014, NICTA # # This software may be distributed and modified according to the terms of # the BSD 2-Clause license. Note that NO WARRANTY is provided. # See "LICENSE_BSD2.txt" for details. # # @TAG(NICTA_BSD) # '''Versioning functionality. This computes a version identifier based on the current source co...
bsd-2-clause
-41,992,440,657,990,110
35.26
79
0.656922
false
3.832981
false
false
false
ibrica/universe-server
play.py
1
1073
from multiprocessing import Process import time import gym import universe from universe.spaces.vnc_event import keycode from envs import create_env def start_game(model, env_name): """regular Python process, not using torch""" p = Process(target=play_game, args=(model,env_name)) p.start() # Don't wa...
mit
-6,093,060,618,181,687,000
33.645161
130
0.630941
false
3.764912
false
false
false
droundy/deft
talks/colloquium/figs/plot-walls.py
1
3242
#!/usr/bin/python # We need the following two lines in order for matplotlib to work # without access to an X server. from __future__ import division import matplotlib matplotlib.use('Agg') import pylab, numpy, sys xmax = 2.5 xmin = -0.4 def plotit(dftdata, mcdata): dft_len = len(dftdata[:,0]) dft_dr = dftda...
gpl-2.0
-4,687,526,299,663,627,000
33.489362
99
0.637569
false
2.515128
false
false
false
AprilBrother/esptool
esptool.py
1
28432
#!/usr/bin/env python # # ESP8266 ROM Bootloader Utility # https://github.com/themadinventor/esptool # # Copyright (C) 2014 Fredrik Ahlberg # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; eith...
gpl-2.0
1,992,661,783,218,690,600
38.709497
152
0.573579
false
3.507958
false
false
false
eharney/cinder
cinder/api/v3/attachments.py
1
11362
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
-5,867,306,877,933,996,000
38.451389
79
0.58106
false
4.6
false
false
false
turbokongen/home-assistant
homeassistant/components/plex/config_flow.py
1
15991
"""Config flow for Plex.""" import copy import logging from aiohttp import web_response import plexapi.exceptions from plexapi.gdm import GDM from plexauth import PlexAuth import requests.exceptions import voluptuous as vol from homeassistant import config_entries from homeassistant.components.http.view import HomeAs...
apache-2.0
1,489,924,755,053,045,500
36.36215
85
0.598837
false
4.022893
true
false
false
italomaia/turtle-linux
games/Dynamite/pgu/test.py
1
1624
import pygame from pygame.locals import * import gui screen = pygame.display.set_mode( (640, 480), FULLSCREEN ) # try adding DOUBLEBUF | HWSURFACE # pygame.mouse.set_visible(0) app = gui.App() c = gui.Container(width=640,height=480) ## ## dialog 1 ## t1 = gui.Table() t1.tr() t1.add(gui.Label("Gal Test")) ...
gpl-3.0
4,685,452,212,621,695,000
14.037037
68
0.589286
false
2.47561
false
false
false
wfx/epack
epack/libarchive/ffi.py
1
7623
# This file is part of a program licensed under the terms of the GNU Lesser # General Public License version 2 (or at your option any later version) # as published by the Free Software Foundation: http://www.gnu.org/licenses/ from __future__ import division, print_function, unicode_literals from ctypes import ( ...
gpl-3.0
-946,142,099,526,545,800
30.114286
79
0.647908
false
2.710882
false
false
false
chintak/scikit-image
skimage/feature/util.py
1
4726
import numpy as np from skimage.util import img_as_float class FeatureDetector(object): def __init__(self): self.keypoints_ = np.array([]) def detect(self, image): """Detect keypoints in image. Parameters ---------- image : 2D array Input image. ...
bsd-3-clause
973,310,001,294,730,000
28.354037
79
0.585485
false
3.71249
false
false
false
pavlov99/jsonapi
jsonapi/utils.py
1
2220
""" JSON:API utils.""" class _classproperty(property): """ Implement property behaviour for classes. class A(): @_classproperty @classmethod def name(cls): return cls.__name__ """ def __get__(self, obj, type_): return self.fget.__get__(None, type_)() ...
mit
-3,830,283,769,636,155,400
23.94382
79
0.530631
false
4.157303
false
false
false
NicWayand/xray
xarray/plot/utils.py
1
6442
import pkg_resources import numpy as np import pandas as pd from ..core.pycompat import basestring def _load_default_cmap(fname='default_colormap.csv'): """ Returns viridis color map """ from matplotlib.colors import LinearSegmentedColormap # Not sure what the first arg here should be f = p...
apache-2.0
5,193,884,461,763,979,000
28.686636
78
0.603695
false
3.789412
false
false
false
xozzo/pyfootball
setup.py
1
1257
from setuptools import setup, find_packages import os if os.path.exists('README.rst'): readme_path = 'README.rst' else: readme_path = 'README.md' setup( name='pyfootball', version='1.0.1', description='A client library for the football-data.org REST API', long_description=open(readme_path).re...
mit
-1,856,567,441,525,745,200
27.568182
73
0.6428
false
3.797583
false
false
false
frankk00/realtor
oauth_provider/oauth.py
1
23473
""" The MIT License Copyright (c) 2007 Leah Culver 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, publis...
bsd-3-clause
-6,451,250,116,917,315,000
34.35241
105
0.615388
false
4.342831
false
false
false
foursquare/pants
contrib/go/src/python/pants/contrib/go/tasks/go_test.py
1
2117
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals from builtins import filter from pants.base.exceptions import TaskError from pants.base....
apache-2.0
-9,153,807,366,505,908,000
38.943396
99
0.683042
false
4.00189
true
false
false
bodylabs/blmath
blmath/geometry/transform/correspondence.py
1
2095
# FIXME -- move back to core def apply_correspondence(correspondence_src, correspondence_dst, vertices): """ Apply a correspondence defined between two vertex sets to a new set. Identifies a correspondence between `correspondence_src` and `correspondence_dst` then applies that correspondence to `verti...
bsd-2-clause
-4,415,321,806,514,047,000
36.410714
79
0.705967
false
4.052224
false
false
false
lepinkainen/pyfibot
pyfibot/modules/module_geoip.py
1
1389
from __future__ import unicode_literals, print_function, division import pygeoip import os.path import sys import socket try: from modules.module_usertrack import get_table user_track_available = True except ImportError: user_track_available = False # http://dev.maxmind.com/geoip/legacy/geolite/ DATAFIL...
bsd-3-clause
-4,394,593,471,870,656,500
26.78
90
0.636429
false
3.412776
false
false
false
llou/panopticon
panopticon/core/database.py
1
7145
# database.py is part of Panopticon. # Panopticon 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. # Panopticon is distributed in the ...
gpl-3.0
3,336,946,915,647,172,000
31.775229
123
0.626312
false
3.581454
false
false
false
i-namekawa/TopSideMonitor
plotting.py
1
37323
import os, sys, time from glob import glob import cv2 from pylab import * from mpl_toolkits.mplot3d import Axes3D from matplotlib.backends.backend_pdf import PdfPages matplotlib.rcParams['figure.facecolor'] = 'w' from scipy.signal import argrelextrema import scipy.stats as stats import scipy.io as sio from scipy imp...
bsd-3-clause
4,991,329,245,887,673,000
36.435306
124
0.567291
false
2.972286
false
false
false
jkunimune15/Map-Projections
src/zupplemental/compose_maps.py
1
5115
#compose_maps.py #make ALL the maps import math from generate_borders import generate_borders from generate_graticule import generate_graticule, generate_backdrop from generate_indicatrices import generate_indicatrices from generate_orthodromes import generate_orthodromes from generate_shape import plot_shapes from g...
mit
-1,186,010,880,348,605,000
32.874172
124
0.657869
false
2.37355
false
false
false
francisco-dlp/hyperspy
hyperspy/drawing/utils.py
1
57321
# -*- coding: utf-8 -*- # Copyright 2007-2016 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
gpl-3.0
685,807,880,072,156,300
36.986083
82
0.581131
false
4.057262
false
false
false
rg3915/django-experience
djexperience/settings.py
1
3763
import os from decouple import config, Csv from dj_database_url import parse as dburl # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.django...
mit
-8,715,243,961,084,812,000
25.687943
91
0.687749
false
3.520112
true
false
false
shoyer/xray
xarray/backends/locks.py
1
5397
import multiprocessing import threading import weakref from typing import Any, MutableMapping try: from dask.utils import SerializableLock except ImportError: # no need to worry about serializing the lock SerializableLock = threading.Lock try: from dask.distributed import Lock as DistributedLock excep...
apache-2.0
-7,480,206,169,277,232,000
24.578199
96
0.631277
false
4.119847
false
false
false
brahle/eval2
scripts/haski/actions/reviewaction.py
1
1578
#!/usr/bin/env python3.2 # Copyright 2011 Bruno Rahle # # This file is part of Evaluator. # # Evaluator is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your opt...
agpl-3.0
-8,740,087,895,962,332,000
31.204082
73
0.665399
false
3.905941
false
false
false
pelodelfuego/word2vec-toolbox
toolbox/mlLib/conceptPairFeature.py
1
4358
#!/usr/bin/env python # -*- coding: utf-8 -*- import __init__ import numpy as np from scipy.weave import inline from sklearn.ensemble import RandomForestClassifier import cpLib.concept as cp import utils.skUtils as sku # PROJECTION def projCosSim(c1, c2): v1 = c1.vect v2 = c2.vect dimCount = len(v1) ...
gpl-3.0
-1,004,693,826,859,406,600
26.2375
91
0.562184
false
3.228148
false
false
false
skodapetr/lbvs-environment
scripts/libs/core.py
1
1664
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import csv import os import logging import gzip __license__ = "X11" def init_logging(): logging.basicConfig( level=logging.DEBUG, format='%(asctime)s [%(levelname)s] - %(message)s', datefmt='%H:%M:%S') def create_directory(path...
mit
453,216,932,470,209,800
23.470588
75
0.590144
false
3.570815
false
false
false
kaniblu/hangul-utils
hangul_utils/unicode.py
1
8775
__all__ = ["split_syllable_char", "split_syllables", "join_jamos", "join_jamos_char", "CHAR_INITIALS", "CHAR_MEDIALS", "CHAR_FINALS"] import itertools INITIAL = 0x001 MEDIAL = 0x010 FINAL = 0x100 CHAR_LISTS = { INITIAL: list(map(chr, [ 0x3131, 0x3132, 0x3134, 0x3137, 0x3138, 0x3139, ...
gpl-3.0
3,778,202,042,101,361,700
29.820789
79
0.551227
false
2.954983
false
false
false
drnextgis/QGIS
python/plugins/processing/core/parameters.py
1
55397
# -*- coding: utf-8 -*- """ *************************************************************************** Parameters.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ****************************...
gpl-2.0
6,668,968,050,453,547,000
34.083597
116
0.573605
false
4.626054
false
false
false
andrewk1/Climb-Bot
climb-bot.py
1
3083
import praw import requests import json import time import re # Function iterates over each submission title and checks if the title contains route syntax that indicates the post is about a route def parse_titles(bot, subreddit): start_time = time.time() for submission in subreddit.stream.submissions(): if (submi...
mit
-518,196,464,358,046,460
38.525641
343
0.67337
false
3.019589
false
false
false
yuxng/Deep_ISM
ISM/lib/setup.py
1
6351
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- import os from os.path import join as pjoin import numpy as np from dis...
mit
-73,697,840,488,066,960
37.490909
91
0.587781
false
3.905904
false
false
false
gamechanger/kafka-python
kafka/protocol/admin.py
1
1182
from .struct import Struct from .types import Array, Bytes, Int16, Schema, String class ListGroupsResponse(Struct): SCHEMA = Schema( ('error_code', Int16), ('groups', Array( ('group', String('utf-8')), ('protocol_type', String('utf-8')))) ) class ListGroupsRequest(Str...
apache-2.0
-8,683,488,429,018,159,000
25.863636
54
0.526227
false
3.953177
false
false
false
UTSA-ICS/keystone-SID
keystone/tests/test_auth.py
1
44678
# 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
159,340,296,657,682,560
39.839122
79
0.575406
false
4.143758
true
false
false
kritak/textdungeon
Internal/pricerandomtester.py
1
1114
"""testing random frequency of items based on price for item. a cheap item is more common, a expensive item is very rare""" import random d = {"healing":50, "berserk":60, "clever":100, "swiftness":100, "might":100, "awesomeness":500, } # reverse d dr = [[1/b,a] for [a,b] in d....
gpl-2.0
-7,916,032,930,120,072,000
24.906977
66
0.561939
false
3.375758
false
false
false
unt-libraries/django-name
name/api/serializers.py
1
6208
"""Serializers for the Name App Models. This module leverages the Django Rest Framework's Serializer components to build JSON representations of the models defined in this app. These JSON representations are designed to be backwards compatible with the API documented in previous versions. For documentation regarding...
bsd-3-clause
-1,052,281,697,192,771,800
31.502618
78
0.6875
false
4.568065
false
false
false
mithron/opendatahack
web/main.py
1
1805
from datetime import datetime import json import os from urlparse import urlparse from pymongo.connection import Connection import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web from tornado.options import define, options MONGO_URL = "" # found with $>heroku config we_live = True...
mit
941,218,873,183,261,400
26.363636
104
0.628255
false
3.752599
false
false
false
CloudBoltSoftware/cloudbolt-forge
ui_extensions/veeam_admin_extension/restore_backup.py
1
1717
import requests import time from xml.dom import minidom from common.methods import set_progress from xui.veeam.veeam_admin import VeeamManager def run(server, *args, **kwargs): set_progress(f"Starting Veeam Backup restoration... ") veeam = VeeamManager() server_ci = veeam.get_connection_info(...
apache-2.0
4,563,522,579,595,640,300
38.022727
83
0.630169
false
4.127404
false
false
false
ArchiveTeam/spuf-grab
pipeline.py
1
11245
# encoding=utf8 import datetime from distutils.version import StrictVersion import hashlib import os.path import random from seesaw.config import realize, NumberConfigValue from seesaw.externalprocess import ExternalProcess from seesaw.item import ItemInterpolation, ItemValue from seesaw.task import SimpleTask, LimitCo...
unlicense
-1,336,016,031,714,418,700
35.868852
432
0.574033
false
3.543965
false
false
false
Encrylize/flask-blogger
app/utils/helpers.py
1
1218
from urllib.parse import urljoin, urlparse from flask import request def get_or_create(model, **kwargs): """ Gets or creates an instance of model. Args: model: SQLAlchemy model **kwargs: Model properties Returns: An instance of model and True if it was created, False if it w...
mit
7,296,754,981,301,055,000
20
77
0.591954
false
4.2
false
false
false
Azure/azure-sdk-for-python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/aio/operations/_images_operations.py
1
29335
# 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 may ...
mit
-7,266,428,311,589,017,000
47.407591
181
0.634907
false
4.309534
true
false
false
pradyu1993/scikit-learn
sklearn/gaussian_process/gaussian_process.py
1
34415
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: Vincent Dubourg <vincent.dubourg@gmail.com> # (mostly translation, see implementation details) # License: BSD style import numpy as np from scipy import linalg, optimize, rand from ..base import BaseEstimator, RegressorMixin from ..metrics.pairwise import m...
bsd-3-clause
-5,101,911,511,660,186,000
37.366778
79
0.555165
false
4.222181
false
false
false
bdh1011/wau
venv/lib/python2.7/site-packages/pandas/core/internals.py
1
151884
import copy import itertools import re import operator from datetime import datetime, timedelta from collections import defaultdict import numpy as np from pandas.core.base import PandasObject from pandas.core.common import (_possibly_downcast_to_dtype, isnull, _NS_DTYPE, _TD_DTYPE, AB...
mit
1,726,036,148,876,224,800
32.963327
134
0.537957
false
4.163943
false
false
false
ludbb/secp256k1-py
tests/test_schnorr.py
1
1732
import pytest import secp256k1 def test_schnorr_simple(): if not secp256k1.HAS_SCHNORR: pytest.skip('secp256k1_schnorr not enabled, skipping') return inst = secp256k1.PrivateKey() raw_sig = inst.schnorr_sign(b'hello') assert inst.pubkey.schnorr_verify(b'hello', raw_sig) key2 = se...
mit
3,662,207,017,736,819,700
35.083333
76
0.711894
false
3.166362
true
false
false
Youwotma/portia
slybot/slybot/pageactions.py
1
1528
import json import re LUA_SOURCE = """ function main(splash) assert(splash:go(splash.args.url)) assert(splash:runjs(splash.args.js_source)) assert(splash:wait_for_resume(splash.args.slybot_actions_source)) splash:set_result_content_type("text/html") return splash.html() end """ JS_SOURCE = """ fun...
bsd-3-clause
-9,078,013,978,702,002,000
26.781818
74
0.590314
false
3.570093
false
false
false
jimmycallin/master-thesis
architectures/nn_discourse_parser/nets/data_reader.py
1
6857
import json import codecs class DRelation(object): """Implicit discourse relation object The object is created from the CoNLL-json formatted data. The format can be a bit clunky to get certain information. So convenient methods should be implemented here mostly to be used by the feature functions ...
mit
4,789,138,021,986,704,000
35.473404
122
0.589616
false
3.503832
false
false
false
rwl/openpowersystem
cdpsm/iec61970/core/voltage_level.py
1
2591
#------------------------------------------------------------------------------ # Copyright (C) 2009 Richard Lincoln # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation; version 2 dated June...
agpl-3.0
-1,730,218,190,851,964,200
38.861538
235
0.677345
false
4.421502
false
false
false
ganga-devs/ganga
ganga/GangaDirac/Lib/Server/DiracCommands.py
1
18300
# Dirac commands #/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ @diracCommand def getJobGroupJobs(jg): ''' Return jobs in a group''' return dirac.selectJobs(jobGroup=jg) @diracCommand def kill(id): ''' Kill a given DIRAC Job ID within DIRAC ''' return dirac.deleteJob(id) ...
gpl-2.0
-7,655,071,968,776,760,000
35.094675
139
0.640109
false
3.670277
false
false
false
rafaelvieiras/script.pseudotv.live
resources/lib/ChannelListThread.py
1
9795
# Copyright (C) 2011 Jason Anderson # # # This file is part of PseudoTV. # # PseudoTV 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....
gpl-3.0
-5,893,234,249,640,738,000
44.347222
164
0.54099
false
4.709135
false
false
false
AnoopAlias/nDeploy
scripts/update_cluster_ipmap.py
1
1898
#!/usr/bin/env python import yaml import argparse import os __author__ = "Anoop P Alias" __copyright__ = "Copyright 2014, PiServe Technologies Pvt Ltd , India" __license__ = "GPL" __email__ = "anoop.alias@piserve.com" installation_path = "/opt/nDeploy" # Absolute Installation Path cluster_config_file = installat...
gpl-3.0
6,655,193,397,231,080,000
34.148148
94
0.674921
false
3.278066
true
false
false
letouriste001/SmartForest_2.0
python3.4Smartforest/lib/python3.4/site-packages/django/db/migrations/recorder.py
1
2868
from __future__ import unicode_literals from django.apps.registry import Apps from django.db import models from django.db.utils import DatabaseError from django.utils.encoding import python_2_unicode_compatible from django.utils.timezone import now from .exceptions import MigrationSchemaMissing class MigrationRecor...
mit
213,370,591,806,448,500
32.348837
112
0.642957
false
3.907357
false
false
false
staffanm/layeredconfig
layeredconfig/dictsource.py
1
1625
# this should possibly be a abstract class as well from . import ConfigSource class DictSource(ConfigSource): def __init__(self, **kwargs): """If your backend data is exposable as a python dict, you can subclass from this class to avoid implementing :py:meth:`has`, :py:meth:`get`, :py:meth...
bsd-3-clause
8,381,840,833,951,817,000
33.574468
85
0.580923
false
4.0625
false
false
false
samervin/arctic-scavengers-randomizer
arctic_cards/leaders.py
1
3619
# Fields NAME = 'name' SET = 'set' USES_REFUGEES = 'uses-refugees' TEXT = 'text' # Set values HQ_EXP = 'hq' RECON_EXP = 'recon' # Information not strictly contained on the card COMMENT = 'comment' class Leaders: ALL_LEADERS = [ { NAME: 'The Peacemaker', SET: HQ_EXP, U...
mit
6,301,782,325,497,952,000
37.913978
162
0.546284
false
3.604582
false
false
false
Samuel789/MediPi
MedManagementWeb/env/lib/python3.5/site-packages/Crypto/Cipher/DES.py
1
7100
# -*- coding: utf-8 -*- # # Cipher/DES.py : DES # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # n...
apache-2.0
-5,694,647,605,484,890,000
35.787565
79
0.613521
false
3.815153
false
false
false
harikishen/addons-server
src/olympia/amo/tasks.py
1
2584
import datetime from django.core.mail import EmailMessage, EmailMultiAlternatives import olympia.core.logger from olympia import amo from olympia.activity.models import ActivityLog from olympia.amo.celery import task from olympia.amo.utils import get_email_backend from olympia.bandwagon.models import Collection from ...
bsd-3-clause
7,679,414,389,111,565,000
33
76
0.64822
false
3.64457
false
false
false
sctjkc01/ofCourse
ofcourse/participants.py
1
3800
import os from datetime import datetime, date, timedelta from urlparse import urlparse import yaml from flask import Blueprint, redirect from flask.ext.mako import render_template import ofcourse from ofcourse.util import app_path, get_hw_keys participants_bp = Blueprint('participants_bp', ...
apache-2.0
3,540,628,806,068,801,000
28.6875
77
0.569737
false
4.231626
false
false
false
smurfix/DaBroker
dabroker/base/transport/__init__.py
1
4226
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division, unicode_literals ## ## This file is part of DaBroker, a distributed data access manager. ## ## DaBroker is Copyright © 2014 by Matthias Urlichs <matthias@urlichs.de>, ## it is licensed under the GPLv3. See the file `README.rst` fo...
gpl-3.0
-528,446,127,231,001,700
26.769737
103
0.689647
false
3.352661
false
false
false
MattFaus/CrowdTube-Connector
youtube.py
1
6824
import os import urlparse from lib import gdata import lib.gdata.youtube.client import secrets GDATA_API_CLIENT_ID = 'CrowdTube-Connector' class YouTubeCaptionEditor(object): def __init__(self, google_email, google_password, youtube_username): self.youtube_username = youtube_username self.youtub...
mit
-7,013,494,189,144,412,000
38.445087
120
0.651231
false
3.822969
false
false
false
rockfruit/bika.lims
bika/lims/browser/analysisrequest/results_not_requested.py
1
2747
# This file is part of Bika LIMS # # Copyright 2011-2016 by it's authors. # Some rights reserved. See LICENSE.txt, AUTHORS.txt. from AccessControl import getSecurityManager from bika.lims import bikaMessageFactory as _ from bika.lims.utils import t from bika.lims.permissions import * from bika.lims.browser.analysisreq...
agpl-3.0
3,269,595,701,656,959,500
46.362069
90
0.699672
false
4.174772
false
false
false
LongSeanSilvr/DC_Metro_Tracker
development_version/src/general_intents.py
1
1923
import build_response as br # ====================================================================================================================== # Skill Behavior: Welcome Response # ====================================================================================================================== class Welcome...
gpl-3.0
3,137,623,135,016,649,700
44.785714
120
0.411856
false
5.494286
false
false
false
dakrauth/picker
picker/forms.py
1
6144
from django import forms from django.utils import timezone from django.utils.module_loading import import_string from . import models as picker from . import utils _picker_widget = None encoded_game_key = 'game_{}'.format TIE_KEY = '__TIE__' def decoded_game_key(value): return int(value.replace('game_', '')) ...
mit
-7,155,869,303,144,028,000
30.187817
98
0.57487
false
3.719128
false
false
false
amerlyq/piony
piony/config/argparser.py
1
2747
from argparse import ArgumentParser, RawDescriptionHelpFormatter import piony from piony.common.exceptions import InputError class ArgParser(object): def __init__(self): self.ps = ArgumentParser(prog=piony.__appname__, formatter_class=RawDescriptionHelpFormatter, ...
gpl-3.0
114,584,023,838,943,360
41.261538
80
0.560612
false
4.004373
false
false
false
strahlc/exaile
xlgui/main.py
1
43837
# Copyright (C) 2008-2010 Adam Olsen # # 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, or (at your option) # any later version. # # This program is distributed in the hope that...
gpl-2.0
-6,720,579,076,938,104,000
35.930918
105
0.589593
false
3.948212
false
false
false
amw2104/fireplace
fireplace/cards/classic/paladin.py
1
2853
from ..utils import * ## # Hero Powers # Reinforce (Uther Lightbringer) class CS2_101: activate = Summon(CONTROLLER, "CS2_101t") # Reinforce (Uther Skin 1) class CS2_101_H1: activate = CS2_101.activate ## # Minions # Guardian of Kings class CS2_088: play = Heal(FRIENDLY_HERO, 6) # Argent Protector class EX1...
agpl-3.0
-3,566,954,898,071,706,600
14.256684
79
0.685594
false
2.196305
false
false
false
renyi533/tensorflow
tensorflow/python/keras/mixed_precision/experimental/policy.py
1
25763
# Copyright 2019 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
4,548,425,901,872,756,700
39.958665
102
0.695843
false
3.929083
true
false
false
googleapis/googleapis-gen
google/cloud/networkmanagement/v1/networkmanagement-v1-py/google/cloud/network_management_v1/services/reachability_service/transports/grpc.py
1
21150
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
3,437,077,281,151,357,400
45.792035
96
0.636359
false
4.8947
true
false
false
VlachosGroup/VlachosGroupAdditivity
pgradd/DrawMol.py
1
2230
""" ========================================= Defenition to draw RDKIT mol object (:mod:`pgradd.DrawMol`) ========================================= Coverts a rdkit mol object to a svg image and display. """ from rdkit import Chem from rdkit.Chem import rdDepictor from rdkit.Chem.Draw import rdMolDraw2D from IPython....
mit
5,404,241,152,769,177,000
32.283582
75
0.58296
false
3.506289
false
false
false
aldebaran/qibuild
python/qitest/parsers.py
1
7334
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved. # Use of this source code is governed by a BSD-style license (see the COPYING file). """ Collection of parser fonctions for qitests actions """ from __future__ import absolute_import from __future__ import un...
bsd-3-clause
6,434,639,803,409,143,000
43.993865
94
0.637715
false
3.890716
true
false
false
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractCurrentlyTLingBuniMi.py
1
1148
def extractCurrentlyTLingBuniMi(item): """ """ vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol or frag) or 'preview' in item['title'].lower(): return None if item['title'].startswith('[BNM]'): return buildReleaseMessageWithType(item, 'Bu ni Mi wo Sasagete Hyaku to ...
bsd-3-clause
-392,690,096,227,605,250
44.96
151
0.690767
false
3.045093
false
false
false
Froff/TFY4115-Simulering
python/Simulation.py
1
1185
from math import sqrt import Slope class Simulation: SIM_STEP_SIZE = 0.0001 const_g = -981 def __init__ (self, slope, **kwargs): self.slope = slope self.t = [0] self.x = [Simulation.SIM_STEP_SIZE] self.mom_inertia_coefficient = 0 for name, value in kwargs.items(): ...
mit
6,737,321,104,293,273,000
30.184211
88
0.533333
false
3.395415
false
false
false
googleapis/googleapis-gen
google/cloud/gkehub/v1alpha2/gkehub-v1alpha2-py/google/cloud/gkehub_v1alpha2/services/gke_hub/pagers.py
1
5811
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-1,709,948,911,245,092,900
40.507143
95
0.660816
false
4.473441
false
false
false
erccarls/vectorsearch
vectorsearch/word2vec.py
1
4242
from __future__ import division # py3 "true division" import logging import sys import os import heapq from timeit import default_timer from copy import deepcopy from collections import defaultdict import threading import itertools import gensim from gensim.utils import keep_vocab_item try: from queue import Qu...
apache-2.0
-2,757,497,388,881,234,400
38.654206
116
0.656294
false
4.055449
false
false
false
CloudBreadPaPa/azure-ml-python-seminar
code/python/ml-Iris.py
1
1412
import urllib2 # If you are using Python 3+, import urllib instead of urllib2 import json data = { "Inputs": { "input1": { "ColumnNames": ["Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", "Species"], "Values": [ [ "1", "...
mit
-7,397,852,236,911,984,000
30.377778
173
0.626771
false
3.49505
false
false
false
wisechengyi/pants
src/python/pants/util/collections.py
1
3201
# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import collections import collections.abc from typing import Any, Callable, DefaultDict, Iterable, List, MutableMapping, Type, TypeVar, Union _K = TypeVar("_K") _V = TypeVar("_V") def f...
apache-2.0
1,141,446,506,871,677,600
32.34375
99
0.621993
false
4.046776
false
false
false
devdelay/home-assistant
homeassistant/util/__init__.py
1
13534
"""Helper methods for various modules.""" from collections.abc import MutableSet from itertools import chain import threading import queue from datetime import datetime import re import enum import socket import random import string from functools import wraps from types import MappingProxyType from typing import Any,...
mit
-2,104,050,902,340,730,000
30.328704
79
0.570637
false
4.208333
false
false
false
bxlab/bx-python
lib/bx/align/epo.py
1
11523
"""Classes and utilities for mutliple alignments from the EPO pipeline""" import logging import os import pickle as cPickle import re from collections import namedtuple from ._epo import ( # noqa: F401 bed_union, cummulative_intervals, fastLoadChain, rem_dash ) log = logging.getLogger(__name__) ...
mit
7,633,953,274,690,669,000
38.462329
144
0.540484
false
3.350683
false
false
false
Arcensoth/cogbot
cogbot/cogs/join_leave/join_leave_server_state.py
1
2346
from discord import Member, Role from discord.ext.commands import Context from cogbot.cogs.abc.base_cog import BaseCogServerState from cogbot.cogs.join_leave.join_leave_options import JoinLeaveOptions class JoinLeaveServerState(BaseCogServerState[JoinLeaveOptions]): async def create_options(self) -> JoinLeaveOpt...
mit
4,599,399,970,453,194,000
45.92
88
0.6185
false
3.581679
false
false
false
mypinballs/whirlwind
effects.py
1
8263
# Top Rollover Lanes __author__="jim" __date__ ="$Jan 18, 2011 1:36:37 PM$" import procgame import locale from procgame import * base_path = config.value_for_key_path('base_path') game_path = base_path+"games/whirlwind/" class Effects(game.Mode): def __init__(self, game, priority): super(Effects, sel...
gpl-3.0
1,920,861,269,690,406,000
44.15847
148
0.563839
false
3.418701
false
false
false
lilmuck/lilmuck
plugin.video.szenestreams/default.py
1
6874
#!/usr/bin/python # -*- coding: utf-8 -*- import urllib,urllib2,re,xbmcaddon,xbmcplugin,xbmcgui,xbmc,HTMLParser from stream import * htmlparser = HTMLParser.HTMLParser() pluginhandle = int(sys.argv[1]) itemcnt = 0 baseurl = 'http://www.szene-streams.com' settings = xbmcaddon.Addon(id='plugin.video.szene-streams') maxi...
gpl-2.0
-6,652,518,995,713,558,000
40.167665
181
0.608816
false
2.818368
false
false
false
Skyeouyang/Text-Analytics-Project
lexicon analysis.py
1
2398
####################################### ##Author Skye Ouyang ##Date 19th Apr. ####################################### import glob import os def IsNotNull(value): return value is not None and len(value) > 0 #create weapon list dict_weapon = [] weapons = open('D:/1. msba/Trimester II Jan.2017-May.2017...
apache-2.0
-6,619,393,933,516,462,000
27.604938
149
0.582569
false
2.960494
false
false
false
gandalfcode/gandalf
examples/example09.py
1
1749
#============================================================================== # example09.py # Create initial conditions for pure N-body simulation inside the python # script, and then run the simulation to completion while plotting results. #===========================================================================...
gpl-2.0
-2,850,669,717,202,946,000
29.684211
79
0.63522
false
2.867213
false
false
false
Sjc1000/PyRC
UI/Disabled/FriendsList.py
1
2227
#!/usr/bin/env python3 from gi.repository import Gtk, Gdk import json class FriendsList(): servers = {} active_server = None def __init__(self, MainWindow): self.MainWindow = MainWindow self.position = [8, 5, 1, 4] def prebuild(self): self.MainWindow.ui_plugins['UserList']...
gpl-2.0
-5,208,045,553,747,212,000
32.253731
94
0.619668
false
3.955595
false
false
false
wujuguang/sqlalchemy
lib/sqlalchemy/dialects/postgresql/pygresql.py
1
8129
# postgresql/pygresql.py # Copyright (C) 2005-2019 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: postgresql+pygresql :name: pygresql :dbapi: pgdb ...
mit
-2,064,211,738,100,849,400
29.56015
97
0.570058
false
4.282929
false
false
false
LockScreen/Backend
venv/lib/python2.7/site-packages/botocore/docs/sharedexample.py
1
9129
# Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
mit
-1,774,796,653,096,055,800
40.684932
80
0.614197
false
4.212737
false
false
false
disqus/zumanji
src/zumanji/views.py
1
6969
from django.conf import settings from django.core.urlresolvers import reverse from django.db import transaction from django.http import HttpResponseRedirect, HttpResponseForbidden from django.shortcuts import render, get_object_or_404 from django.utils import simplejson from django.views.decorators.csrf import csrf_pro...
apache-2.0
3,989,766,211,965,808,000
31.565421
126
0.627924
false
3.656348
true
false
false
ZwEin27/phone-number-matcher
dig_phone_extractor.py
1
23737
# -*- coding: utf-8 -*- # @Author: ZwEin # @Date: 2016-06-21 12:36:47 # @Last Modified by: ZwEin # @Last Modified time: 2016-09-29 21:54:12 import os import re import sys import json import copy import types import string import collections import phonenumbers from datetime import datetime from crf_tokenizer imp...
apache-2.0
-8,800,745,410,716,933,000
34.694737
433
0.532376
false
3.109786
false
false
false
kobejean/tensorflow
tensorflow/contrib/distribute/python/tpu_strategy.py
1
20404
# Copyright 2018 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
6,564,893,554,403,699,000
40.897331
111
0.680259
false
3.88944
false
false
false
ladybug-tools/honeybee
honeybee_plus/utilcol.py
1
1078
"""A collection of useful utilities for Honeybee""" import uuid import re def random_name(shorten=True): """Generate a random name as a string using uuid. Args: shorten: If True the name will be the first to segment of uuid. """ if shorten: return '-'.join(str(uuid.uuid4()).split('-')...
gpl-3.0
1,852,447,149,315,065,000
24.069767
71
0.56308
false
3.511401
false
false
false
zjj/trac_hack
sample-plugins/HelloWorld.py
1
2140
"""Example macro.""" revision = "$Rev: 6326 $" url = "$URL: https://svn.edgewall.org/repos/trac/tags/trac-0.12.2/sample-plugins/HelloWorld.py $" # # The following shows the code for macro, old-style. # # The `execute` function serves no purpose other than to illustrate # the example, it will not be used anymore. # # ...
bsd-3-clause
5,799,304,578,152,899,000
31.923077
97
0.649533
false
3.721739
false
false
false
rymate1234/rymate-blog
migrations/versions/413f129e8b07_.py
1
1535
"""empty message Revision ID: 413f129e8b07 Revises: None Create Date: 2014-05-02 08:09:09.906725 """ # revision identifiers, used by Alembic. revision = '413f129e8b07' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please adjust! ###...
bsd-3-clause
5,584,822,916,619,234,000
30.979167
65
0.663192
false
3.449438
false
false
false