repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
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
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
raiden-network/raiden
raiden/utils/notifying_queue.py
1
1422
from typing import Generic, Iterable, List, TypeVar from gevent.event import Event from gevent.queue import Queue T = TypeVar("T") class NotifyingQueue(Event, Generic[T]): """This is not the same as a JoinableQueue. Here, instead of waiting for all the work to be processed, the wait is for work to be availa...
mit
7,711,695,073,187,145,000
28.020408
77
0.580169
false
pwarren/AGDeviceControl
agdevicecontrol/tests/test_aggregator.py
1
9428
# AGDeviceControl # Copyright (C) 2005 The Australian National University # # This file is part of AGDeviceControl. # # AGDeviceControl 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 L...
gpl-2.0
-369,536,809,628,326,600
30.851351
122
0.655176
false
vallemrv/tpvB3
tpv_for_eetop/valle_libs/valleorm/models/relatedfields.py
1
9703
# -*- coding: utf-8 -*- # @Author: Manuel Rodriguez <vallemrv> # @Date: 29-Aug-2017 # @Email: valle.mrv@gmail.com # @Last modified by: valle # @Last modified time: 18-Feb-2018 # @License: Apache license vesion 2.0 import sys import inspect import importlib from constant import constant class RelationShip(object...
apache-2.0
-2,517,989,328,502,603,300
37.351779
99
0.547356
false
sassoftware/saspy
saspy/sasiocom.py
1
37140
# # Copyright SAS Institute # # 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...
apache-2.0
6,462,494,287,132,911,000
38.135933
154
0.575229
false
CindyvdVries/News_Crawler
Sat2/sat/pipelines.py
1
2575
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html from scrapy.utils.conf import get_config from scrapy.exceptions import DropItem import pika.credentials import pika import json ...
gpl-3.0
1,274,635,759,553,769,500
30.024096
80
0.593398
false
ltn100/prompty
test/test_functionContainer.py
1
1265
#!/usr/bin/env python # vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import sys import os from test import prompty from test import UnitTestWrapper class My...
mit
-4,404,599,834,782,620,000
31.435897
78
0.705138
false
PieterMostert/Lipgloss
model/serializers/oxideserializer.py
1
2233
import json try: from lipgloss.core_data import Oxide except: from ..lipgloss.core_data import Oxide class OxideSerializer(object): """A class to support serializing/deserializing of a single oxide and dictionaries of oxides. Needs improvement""" @staticmethod def get_serializable_oxide(oxide): ...
gpl-3.0
1,879,315,643,800,368,000
39.6
119
0.653829
false
saginoam/RedisModuleTimeSeries
benchmark/redis_ts.py
1
1285
import random import redis import json client = redis.Redis() client.execute_command('TS.CREATEDOC', "tsdoctest", json.dumps({ "interval": "hour", "timestamp": "2016:01:01 00:00:00", "key_fields": ["userId", "deviceId"], "ts_fields": ["pagesVisited", "storageUsed", "trafficUsed"] ...
mit
-8,531,883,941,304,618,000
39.15625
98
0.627237
false
FelixLoether/blog-project
tests/posts/test_edit.py
1
3272
from tests.conftest import get_token def edit_post(postsetup, token, title='title', content='content', tags='', action='save', url='/1/edit'): return postsetup.app.post(url, data={ 'token': token, 'title': title, 'content': content, 'tags': tags, 'action': action ...
mit
-8,354,589,686,144,787,000
25.819672
74
0.648227
false
grammarware/slps
topics/recovery/hunter/getgrammar.py
1
4880
#!/Library/Frameworks/Python.framework/Versions/3.1/bin/python3 # -*- coding: utf-8 -*- import os, sys import xml.etree.ElementTree as ET sys.path.append(os.getcwd().split('projects')[0]+'projects/slps/shared/python') import BGF3 from functools import reduce debug = False #debug = True defaults = {'definition-separat...
bsd-3-clause
7,472,728,045,584,283,000
28.93865
195
0.665779
false
kulbirsaini/pdfrw-fork
examples/rl1/booklet.py
1
1588
#!/usr/bin/env python ''' usage: booklet.py my.pdf Uses Form XObjects and reportlab to create booklet.my.pdf. Demonstrates use of pdfrw with reportlab. ''' import sys import os from reportlab.pdfgen.canvas import Canvas import find_pdfrw from pdfrw import PdfReader from pdfrw.buildxobj import pagexobj from pd...
mit
5,298,639,258,305,954,000
22.014493
77
0.595718
false
varunarya10/oslo.utils
oslo_utils/tests/test_reflection.py
1
8493
# -*- coding: utf-8 -*- # Copyright (C) 2012 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 the License at # # http://www.apache.org/licenses/LICENSE-2...
apache-2.0
-899,403,400,105,379,200
29.44086
79
0.601554
false
yukaritan/qtbot3
qtbot3_service/plugins/achievements.py
1
2926
from util import irc from util.garbage import rainbow from util.handler_utils import prehook, get_value, set_value, get_target, cmdhook, fetch_all from qtbot3_common.types.message import Message disconnection_ladder = { 1: "Connection reset by peer", 5: "Connection reset by beer", 10: "Connection reset by...
gpl-3.0
-309,478,902,671,180,200
32.25
92
0.598086
false
CobwebOrg/cobweb-django
core/migrations/0014_auto_20181026_1019.py
1
1216
# Generated by Django 2.1.2 on 2018-10-26 17:19 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('core', '0013_user_terms_accepted'), ] operations = [ migrations.AddField( model_name='organization'...
mit
243,347,793,550,178,400
28.658537
93
0.570724
false
lmorchard/django-teamwork
teamwork/templatetags/teamwork_tags.py
1
3741
""" ``django-teamwork`` template tags, loaded like so: {% load teamwork_tags %} """ from __future__ import unicode_literals from django import template from django.contrib.auth import get_user_model from django.contrib.auth.models import Group, AnonymousUser from django.template import get_library from django.temp...
mpl-2.0
7,748,176,117,772,263,000
31.25
82
0.624967
false
summychou/TBTracker
src/TBTracker_Gui/TBTracker_Gui_Button.py
1
4941
# -*- coding: utf-8 -*- from PyQt5.QtCore import QCoreApplication from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QPushButton ''' @author : Zhou Jian @email : zhoujian@hust.edu.cn @version : V1.1 @date : 2018.04.22 ''' class BaseButton(QPushButton): ''' 基类按钮 ''' def __init__(self, name...
mit
4,804,963,411,780,969,000
17.836283
64
0.547099
false
AlexStarov/Shop
applications/discount/management/commands/processing_actions.py
1
6004
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand from applications.product.models import Category, Product from applications.discount.models import Action __author__ = 'Alex Starov' class Command(BaseCommand, ): def handle(self, *args, **options): try: action_cate...
apache-2.0
-2,092,252,847,127,148,000
51.525253
109
0.527115
false
alfredhq/alfred
alfred/__main__.py
1
1238
#!/usr/bin/env python import os from argh import arg, ArghParser from argh.exceptions import CommandError from functools import wraps CONFIG = os.environ.get('ALFRED_CONFIG') def with_app(func): @wraps(func) @arg('--config', help='path to config') def wrapper(args): from alfred import create_ap...
isc
8,186,954,873,750,227,000
22.358491
69
0.659128
false
javiroman/rlink
dbconnector/dbconnector_test.py
1
2705
#!/usr/bin/env python """ (C) 2008-2009 Javi Roman <javiroman@kernel-labs.org> $Id$ """ import sys import traceback import Ice import socket import signal import syslog import time import os # # Important sanity tests. # slice_dir = os.getenv('ICEPY_HOME', '') if len(slice_dir) == 0 or not os.path.exists(os.path.joi...
gpl-2.0
-4,307,590,568,236,622,300
26.886598
87
0.586691
false
pragmaticcoders/horse
tests/integration/recommendation/test_smart_service.py
1
3551
from horse.models import User, Movie import pytest @pytest.fixture def service(app): return app.ctx.recommendations.smart def assert_recommendations(result, expected): def readable(lst): return [(item.pk, item.title) for item in lst] result_movies = [movie for (movie, weight) in result] a...
mit
8,766,053,740,478,384,000
23.489655
74
0.666854
false
eliksir/mailmojo-python-sdk
test/test_newsletter_api.py
1
1774
# coding: utf-8 """ MailMojo API v1 of the MailMojo API # noqa: E501 OpenAPI spec version: 1.1.0 Contact: hjelp@mailmojo.no Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import mailmojo_sdk from mailmojo_sdk.api.ne...
apache-2.0
-50,909,709,508,085,050
20.373494
80
0.60372
false
d120/pyfeedback
src/feedback/migrations/0043_auto_20190618_2221.py
1
8403
# -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2019-06-18 22:21 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('feedback', '0042_auto_20180608_1423'), ] operatio...
agpl-3.0
591,802,522,073,656,600
58.992857
324
0.57233
false
mskala/birdie
birdieapp/utils/media.py
1
4300
# -*- coding: utf-8 -*- # Copyright (C) 2013-2014 Ivo Nunes/Vasco Nunes # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
gpl-3.0
2,320,095,578,948,772,000
33.126984
77
0.594651
false
wenxichen/tensorflow_yolo2
src/img_dataset/ilsvrc2017_cls.py
1
7175
"""ILSVRC 2017 Classicifation Dataset. DEPRECATED version. For the purpose of keeping history only. Use ilsvrc2017_cls_multithread.py instead. """ import os import cv2 import numpy as np import random import config as cfg class ilsvrc_cls: def __init__(self, image_set, rebuild=False, data_aug=True): se...
mit
-763,985,578,201,332,100
39.767045
90
0.522509
false
oss/rutgers-repository-utils
lib/repoclosure.py
1
11619
#!/usr/bin/python -t # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that i...
gpl-2.0
6,160,217,929,008,276,000
36.846906
192
0.560117
false
dominikgiermala/properties-editor
src/properties_editor.py
1
5314
import os import sublime import sublime_plugin from .lib.pyjavaproperties import Properties class AddEditPropertiesCommand(sublime_plugin.WindowCommand): def run(self, paths = []): # TODO: validate if *.properties file self.paths = paths self.window.show_input_panel("Properties to add/edit:", '', self.on...
mit
-4,607,190,421,713,108,000
38.664179
119
0.649417
false
SIPp/pysipp
pysipp/launch.py
1
5708
""" Launchers for invoking SIPp user agents """ import subprocess import os import shlex import select import threading import signal import time from . import utils from pprint import pformat from collections import OrderedDict, namedtuple log = utils.get_logger() Streams = namedtuple("Streams", "stdout stderr") c...
gpl-2.0
-7,029,735,260,306,038,000
32.576471
83
0.563595
false
Khan/pyobjc-framework-FSEvents
setup.py
1
1152
''' Wrappers for the "FSEvents" API in MacOS X. The functions in this framework allow you to reliably observe changes to the filesystem, even when your program is not running al the time. These wrappers don't include documentation, please check Apple's documention for information on how to use this framework and PyObj...
mit
-8,843,281,425,080,310,000
33.909091
76
0.684896
false
maxmind/GeoIP2-python
tests/webservice_test.py
1
12944
#!/usr/bin/env python # -*- coding: utf-8 -*- import asyncio import copy import ipaddress import json import sys from typing import cast, Dict import unittest sys.path.append("..") # httpretty currently doesn't work, but mocket with the compat interface # does. from mocket import Mocket # type: ignore from mocket.p...
apache-2.0
-4,090,489,454,764,451,300
32.020408
88
0.584518
false
pbl-cloud/paas-manager
paas_manager/app/util/gmail.py
1
1115
import sys import smtplib from email.mime.text import MIMEText from email.utils import formatdate from ... import config def create_message(from_addr, to_addr, subject, message, encoding): body = MIMEText(message, 'plain', encoding) body['Subject'] = subject body['From'] = from_addr body['To'] = to_add...
mit
-1,493,291,774,116,415,200
24.340909
76
0.612556
false
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_12_01/aio/operations/_bgp_service_communities_operations.py
1
5069
# 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
-1,186,094,966,996,550,100
45.935185
133
0.648846
false
jkomiyama/duelingbanditlib
gather.py
1
1151
#!/usr/bin/env python # coding:utf-8 #a tool for merging multiple simulation results import sys,os,re def avg(elems): return sum(elems)/float(len(elems)) def splitavg(splits): l = len(splits[0]) for sp in splits: if len(sp) != l: print "split size not match" sys.exit() sums = [0 for i in ran...
mit
-3,247,382,617,199,091,000
24.577778
94
0.591659
false
dofeldsc/vivo_uos
my_pump/test/test_vivopump.py
1
51767
#!/usr/bin/env/python # coding=utf-8 """ test_vivopump.py -- Test cases for vivopump """ import sys sys.path.insert(0, "/var/fis_data/vivo-pump") import unittest from pump.vivopump import new_uri, read_csv, write_csv, vivo_query, write_update_def, \ read_csv_fp, write_csv_fp, get_vivo_ufid, get_vivo_authors,...
gpl-3.0
-1,623,289,697,235,954,200
41.088835
142
0.548826
false
jadsonjs/DataScience
python/arrays_dimesion.py
1
2664
# Consider the case where you have one sequence of multiple time steps and one feature. from numpy import array data = array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]) # We can then use the reshape() function on the NumPy array to reshape this one-dimensional array # into a three-dimensional array with 1...
apache-2.0
-1,277,704,131,615,162,400
25.64
139
0.631381
false
aldebaran/qibuild
python/qisys/actions/__init__.py
1
1279
#!/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). """ Common tools for actions """ from __future__ import absolute_import from __future__ import unicode_literals from __futu...
bsd-3-clause
2,079,718,214,788,950,800
30.195122
84
0.632525
false
SegundoBob/GNXrepeats
hrngpS2.py
1
1831
#!/usr/bin/python #coding=utf-8 #@+leo-ver=5-thin #@+node:bob07.20140715160011.1575: * @file hrngpS2.py #@@first #@@first #@@language python #@@tabwidth -4 import os import sys import leo.core.leoBridge as leoBridge from leo_lib import lib_leo03 #@+others #@+node:bob07.20140715160011.1576: ** gnxRepeats() def gnxRe...
mit
6,549,371,217,770,367,000
27.609375
103
0.647187
false
SINGROUP/pycp2k
pycp2k/classes/_opt_ri_basis3.py
1
1543
from pycp2k.inputsection import InputSection class _opt_ri_basis3(InputSection): def __init__(self): InputSection.__init__(self) self.Delta_i_rel = None self.Delta_ri = None self.Eps_deriv = None self.Max_iter = None self.Num_func = None self.Basis_size = No...
lgpl-3.0
7,370,216,220,963,202,000
24.716667
181
0.552819
false
uglyfruitcake/Axelrod
axelrod/tests/unit/test_cooperator.py
1
1499
"""Test for the cooperator strategy.""" import axelrod from .test_player import TestPlayer C, D = axelrod.Actions.C, axelrod.Actions.D class TestCooperator(TestPlayer): name = "Cooperator" player = axelrod.Cooperator expected_classifier = { 'memory_depth': 0, 'stochastic': False, ...
mit
-220,543,415,429,763,360
27.283019
74
0.588392
false
souravbadami/oppia
core/storage/base_model/gae_models.py
1
36051
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
apache-2.0
8,921,728,561,893,953,000
38.100868
98
0.618596
false
pettarin/penelope
setup.py
1
2657
#!/usr/bin/env python # coding=utf-8 """ Set penelope package up """ from setuptools import Extension from setuptools import setup __author__ = "Alberto Pettarin" __copyright__ = "Copyright 2012-2016, Alberto Pettarin (www.albertopettarin.it)" __license__ = "MIT" __version__ = "3.1.3" __email__ = "alberto@albertopet...
mit
-1,803,094,169,845,251,800
31.012048
125
0.572074
false
DomainDrivenConsulting/dogen
projects/masd.dogen.dia/python/add_to_package.py
1
1625
# -*- mode: python; tab-width: 4; indent-tabs-mode: nil -*- # # Copyright (C) 2012-2015 Marco Craveiro <marco.craveiro@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version...
gpl-3.0
-5,694,978,738,083,802,000
37.690476
70
0.675077
false
kikocorreoso/mplutils
mplutils/axes.py
1
8516
# -*- coding: utf-8 -*- """ Created on Sun Feb 21 23:43:37 2016 @author: kiko """ from __future__ import division, absolute_import from .settings import RICH_DISPLAY import numpy as np if RICH_DISPLAY: from IPython.display import display def axes_set_better_defaults(ax, axes_color ...
mit
-877,875,270,445,470,800
36.685841
80
0.588539
false
ancafarcas/superdesk-core
superdesk/media/media_operations.py
1
5561
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import arro...
agpl-3.0
2,342,765,068,469,414,000
30.95977
115
0.660133
false
FirmlyReality/docklet
src/master/testTaskMgr.py
2
5417
import master.taskmgr from concurrent import futures import grpc from protos.rpc_pb2 import * from protos.rpc_pb2_grpc import * import threading, json, time, random from utils import env class SimulatedNodeMgr(): def get_batch_nodeips(self): return ['0.0.0.0'] class SimulatedMonitorFetcher(): def __init__(self,...
bsd-3-clause
-676,241,921,716,462,500
27.067358
149
0.690419
false
fastinetserver/portage-idfetch
pym/portage/cache/sql_template.py
1
9336
# Copyright: 2005 Gentoo Foundation # Author(s): Brian Harring (ferringb@gentoo.org) # License: GPL2 import sys from portage.cache import template, cache_errors from portage.cache.template import reconstruct_eclasses class SQLDatabase(template.database): """template class for RDBM based caches This class is desig...
gpl-2.0
8,476,169,925,880,248,000
30.434343
114
0.678877
false
Ryex/Rabbyt
rabbyt/sprites.py
1
6567
from rabbyt._sprites import cBaseSprite, cSprite from rabbyt._rabbyt import pick_texture_target from rabbyt.anims import anim_slot, swizzle, Animable from rabbyt.primitives import Quad class BaseSprite(cBaseSprite, Animable): """ ``BaseSprite(...)`` This class provides some basic functionality fo...
mit
-8,949,477,883,439,346,000
35.525714
78
0.559769
false
aronasorman/kolibri
kolibri/logger/serializers.py
1
2680
from kolibri.logger.models import AttemptLog, ContentRatingLog, ContentSessionLog, ContentSummaryLog, MasteryLog, UserSessionLog from rest_framework import serializers class ContentSessionLogSerializer(serializers.ModelSerializer): class Meta: model = ContentSessionLog fields = ('pk', 'user', 'co...
mit
401,927,789,942,079,940
39.606061
141
0.680597
false
SAAVY/magpie
client/blacklist.py
1
1546
from flask import current_app from netaddr import IPNetwork, IPAddress from netaddr.core import AddrFormatError bl_website_ip = [] # array of tuples (network mask, port) def build_website_blacklist(logger): with open("config/blacklist_website_ip.txt") as f: for line in f: network_address = ...
mit
-8,088,540,729,857,940,000
36.707317
108
0.574386
false
pycrystem/pycrystem
pyxem/tests/test_signals/test_power2d.py
1
3662
# -*- coding: utf-8 -*- # Copyright 2017-2019 The pyXem developers # # This file is part of pyXem. # # pyXem 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 optio...
gpl-3.0
3,197,397,849,401,754,000
35.62
77
0.647733
false
McGillX/edx_data_research
edx_data_research/parsing/parse_course_structure.py
1
4815
import json from edx_data_research.parsing.parse import Parse class CourseStructure(Parse): def __init__(self, args): super(CourseStructure, self).__init__(args) self.collections = ['course_structure'] self.course_structure_file = args.course_structure_file self.drop = a...
mit
5,415,329,089,375,148,000
46.636364
125
0.538525
false
lizardsystem/threedilib
threedilib/modeling/convert.py
1
8275
# (c) Nelen & Schuurmans. GPL licensed, see LICENSE.rst. # -*- coding: utf-8 -*- """ Convert shapefiles with z coordinates. Choose from the following formats: 'inp' to create an inp file, 'img' to create an image with a plot of the feature, or 'shp' to output a shapefile with the average height of a feature stored in ...
gpl-3.0
6,584,589,084,668,582,000
32.1
77
0.570997
false
holzenburg/feedshare
feedshare/feedlists/migrations/0002_auto__add_feedlistfeed__del_field_feed_feedlist__del_field_feed_tags__.py
1
8074
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'FeedListFeed' db.create_table(u'feedlists_feedlistfeed', ...
mit
8,905,969,177,572,606,000
56.269504
180
0.614194
false
RealP/Everpy
examples.py
1
1776
"""Some examples of how to use modules.""" # from everpy_extras import EverPyExtras from everpy_pro import EverPyPro import everpy_utilities PATH_TO_ENSCRIPT = r"C:\Program Files (x86)\Evernote\Evernote\ENScript.exe" def createnote(epy): """Example of how to make a note from python.""" content = open("READM...
gpl-3.0
-8,499,846,340,086,754,000
33.823529
169
0.662162
false
Stemer114/Reprap_KTY-84-130
repetier/KTY84-130_repetier.py
1
1879
# based on python script from # http://diyhpl.us/reprap/trunk/users/wizard23/python/lookupTables/KTY84-130.py # # adapted by Stemer114 for usage with 4.7k pull-up resistor # table format for repetier firmware # https://github.com/Stemer114/Reprap_KTY-84-130 # # generates a Lookuptable for the following termistor # KT...
mit
9,178,785,433,663,180,000
24.391892
109
0.722193
false
khushboo9293/Hyperkitty
hyperkitty/jobs/update_and_clean_index.py
1
1238
# -*- coding: utf-8 -*- # Copyright (C) 2014-2015 by the Free Software 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, or (at your option) ...
gpl-3.0
-4,215,776,349,076,174,000
32.459459
75
0.74475
false
cs411-entree-app/entree
entree_project/entree_project/urls.py
1
1445
"""entree_project URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Cl...
apache-2.0
-1,928,786,586,874,997,500
35.125
79
0.692734
false
Ruide/angr-dev
angr/angr/blade.py
1
12198
import networkx import pyvex from .slicer import SimSlicer class Blade(object): """ Blade is a light-weight program slicer that works with networkx DiGraph containing CFGNodes. It is meant to be used in angr for small or on-the-fly analyses. """ def __init__(self, graph, dst_run, dst_stmt_idx, d...
bsd-2-clause
6,807,302,043,918,270,000
34.876471
120
0.542712
false
blomquisg/heat
heat/common/client.py
1
21833
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010-2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache...
apache-2.0
-8,148,688,654,965,902,000
35.880068
79
0.573032
false
Kriechi/mitmproxy
mitmproxy/addons/tlsconfig.py
1
12516
import os from pathlib import Path from typing import List, Optional, TypedDict, Any from OpenSSL import SSL from mitmproxy import certs, ctx, exceptions, connection from mitmproxy.net import tls as net_tls from mitmproxy.options import CONF_BASENAME from mitmproxy.proxy import context from mitmproxy.proxy.layers impo...
mit
-6,556,963,244,387,718,000
42.762238
119
0.622803
false
Carreau/difflib2.py
examples/lcs_cutmodule.py
1
5199
from __future__ import print_function from array import array from itertools import islice def lcs_cut2(s1, s2, lcs_low_bound=0, bg=None, debug=False): """Compule the length of the LCS 2 sequences s1 and s2. lcs_low_bound : (int), hint of lower bound for the lenght of the lcs to search for. Default to...
bsd-3-clause
-6,169,857,475,565,440,000
36.956204
79
0.476053
false
kartvep/Combaine
combaine/common/configloader/config.py
1
2022
import yaml import json import os from functools import partial from combaine.common.loggers import CommonLogger from combaine.common import constants __all__ = ["FormatError", "MissingConfigError", "parse_agg_cfg", "parse_parsing_cfg", "parse_common_cfg"] class ConfigError(Exception): pass class FormatError(C...
lgpl-3.0
-3,035,238,920,399,240,700
25.25974
130
0.624135
false
edwards-lab/MVtest
tests/test_cmdline.py
1
17297
#!/usr/bin/env python import sys # For debug, preference local install over all else if "DEBUG" in sys.argv: sys.path.insert(0, "../") sys.path.insert(0, "../../") # For mvtest sys.path.insert(0, ".") sys.argv.remove("DEBUG") import numpy import os import mvtest import unittest import test_analyze_tped...
gpl-3.0
7,054,703,168,624,016,000
38.672018
109
0.543389
false
myriadrf/pyLMS7002M
pyLMS7002M/LimeSDRMini.py
1
11270
#*************************************************************** #* Name: LimeSDRMini.py #* Purpose: Class implementing LimeSDRMini functions #* Author: Lime Microsystems () #* Created: 2018-04-16 #* Copyright: Lime Microsystems (limemicro.com) #* License: #**************************************************...
apache-2.0
-7,336,002,023,781,494,000
34.329154
130
0.536823
false
rgblabs/rgbTools
rgbTools/utils/filesystem.py
1
2692
import maya.cmds as cmds def which (program): ''' If application is found, returns path. This works with both full application paths, and applications available within the OS's defined PATH ''' import os def is_exe (fpath): return os.path.isfile(fpath) and os.access(fpath, os.X_OK) ...
mit
-6,761,105,692,595,262,000
28.911111
81
0.635587
false
BarrelfishOS/barrelfish
tools/harness/tests/irqtest.py
1
2241
########################################################################## # Copyright (c) 2011, ETH Zurich. # All rights reserved. # # This file is distributed under the terms in the attached LICENSE file. # If you do not find this file, copies can be found by writing to: # ETH Zurich D-INFK, Universitaetstrasse 6, CH...
mit
-1,460,101,033,456,651,800
34.015625
81
0.62606
false
edvisees/sciDP
nn_passage_tagger.py
1
15369
import warnings import sys import codecs import numpy import argparse import theano import json import pickle from rep_reader import RepReader from util import read_passages, evaluate, make_folds from keras.models import Sequential, Graph, model_from_json from keras.layers.core import TimeDistributedDense, Dropout fr...
apache-2.0
1,109,917,934,340,406,700
47.48265
187
0.65515
false
sevagas/macro_pack
src/vbLib/Base64ToText.py
1
1559
VBA = \ r""" Function Base64ToText(ByVal vCode) Dim oXML, oNode Dim tempString As String tempString = "Msxm" tempString = tempString & "l2.DO" tempString = tempString & "MDoc" tempString = tempString & "ument.3.0" Set oXML = CreateObject(tempString) Set oNode = oXML.CreateElement("base6...
apache-2.0
-7,680,315,020,665,851,000
27.87037
62
0.695959
false
wevoice/wesub
apps/socialauth/views.py
1
12656
from django.shortcuts import render_to_response, redirect from django.contrib import messages from django.template import RequestContext from django.contrib.auth import authenticate, login from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.conf import set...
agpl-3.0
7,060,478,658,976,568,000
41.469799
145
0.656606
false
itu-oss-project-team/oss-github-analysis-project
github_analysis_tool/analyzer/tf-idf.py
1
3362
import os.path import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) from math import log10 import yaml from github_analysis_tool.services.database_service import DatabaseService class Tfidf: def __init__(self, secret_config): # Generate a github_reques...
mit
8,553,894,782,115,481,000
34.020833
120
0.594289
false
hirokihamasaki/irma
frontend/frontend/api/v1_1/controllers/files.py
1
7314
# Copyright (c) 2013-2016 Quarkslab. # This file is part of IRMA project. # # 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 in the top-level directory # of this distribution and at: # # http://...
apache-2.0
4,231,076,620,459,806,000
34.852941
101
0.613071
false
dmccloskey/SBaaS_quantification
template_scripts/import_MQResultsTable.py
1
3766
import sys sys.path.append('C:/Users/dmccloskey-sbrg/Google Drive/SBaaS_base') from SBaaS_base.postgresql_settings import postgresql_settings from SBaaS_base.postgresql_orm import postgresql_orm # read in the settings file filename = 'C:/Users/dmccloskey-sbrg/Google Drive/SBaaS_base/settings.ini'; pg_settings = postgr...
mit
-7,147,104,687,622,559,000
59.758065
172
0.827138
false
qisanstudio/qsapp-suibe
src/suibe/models/channel.py
1
3718
# -*- coding: utf-8 -*- from __future__ import unicode_literals from jinja2 import Markup from flask import url_for from studio.core.engines import db from sqlalchemy.ext.hybrid import hybrid_property from suibe.models.article import ArticleModel __all__ = [ 'NaviChannelModel', 'ChannelModel', 'ChannelSu...
mit
-6,052,231,150,220,093,000
31.060345
78
0.600861
false
martinohanlon/pgzero-pong
pong.py
1
3151
from math import sin, cos, radians from time import sleep #setup the constants WIDTH = 500 HEIGHT = 300 BALLSPEED = 10 PADDLESPEED = 5 MAXBOUNCEANGLE = 75 def reset_game(angle): #setup ball properties ball.pos = WIDTH / 2, HEIGHT / 2 ball.x_float = float(ball.x) ball.y_float = float(ball.y) ball....
mit
6,057,346,098,873,700,000
25.478992
87
0.569026
false
tensorflow/gan
tensorflow_gan/examples/mnist_estimator/train_test.py
1
1617
# coding=utf-8 # Copyright 2020 The TensorFlow GAN Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
apache-2.0
-7,609,691,693,671,442,000
30.096154
75
0.701917
false
zqqf16/SYM
SYM/Models/models.py
1
1880
#!/usr/bin/env python # -*- coding: UTF-8 -*- import re import sys import json import requests def get_raw(url): r = requests.get(url) if r.status_code != 200: return None return r.text def parse_models(regex, text): result = [] lastModel = "" model_regex = re.compile(r'.*\d,\d') ...
mit
1,235,590,171,324,613,600
22.5125
98
0.55
false
iamsteadman/bambu-api
bambu_api/__init__.py
1
1314
""" Quickly expose your models to a JSON or XML API, authenticated via HTTP or OAuth. """ __version__ = '2.0.1' from bambu_api.options import * from bambu_api.sites import APISite from bambu_api.exceptions import APIException from bambu_api.decorators import argument, returns, named from django.conf import settings f...
apache-2.0
-4,812,282,785,063,941,000
31.04878
100
0.690259
false
gpfei/python-acsmx2
acsmx2/test.py
1
3625
import unittest from acsmx2.search import Matcher, MatchedWord class MatchTestCase(unittest.TestCase): def setUp(self): self.matcher = Matcher(1024) def test_abc(self): for i, pattern in enumerate([ b'hello', b'world', b'ld', ]): ...
gpl-2.0
-8,894,289,022,924,483,000
29.211864
64
0.53324
false
azumimuo/family-xbmc-addon
plugin.video.bubbles/resources/lib/sources/german/hoster/open/moviesever.py
1
5229
# -*- coding: utf-8 -*- """ Bubbles Addon Copyright (C) 2016 Viper2k4 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any...
gpl-2.0
-8,893,008,589,265,289,000
40.84
174
0.552113
false
longmazhanfeng/automationlibrary
MobileLibrary/setup.py
1
2204
#!/usr/bin/env python import sys from os.path import join, dirname sys.path.append(join(dirname(__file__), 'src')) from ez_setup import use_setuptools use_setuptools() from setuptools import setup execfile(join(dirname(__file__), 'src', 'AppiumLibrary', 'version.py')) setup(name = 'robotframework-mobilelibr...
mit
-6,960,277,275,502,162,000
44.916667
120
0.500907
false
ShashaQin/frappe
frappe/email/bulk.py
1
11335
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import HTMLParser import smtplib from frappe import msgprint, throw, _ from frappe.email.smtp import SMTPServer, get_outgoing_email_account from frappe.email.email_b...
mit
8,331,891,317,508,942,000
34.870253
166
0.727305
false
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractMaddertranslatesCom.py
1
1779
def extractMaddertranslatesCom(item): ''' Parser for 'maddertranslates.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('Form A Slaves Only Harem Guild', 'An ...
bsd-3-clause
8,159,679,789,587,798,000
52.939394
217
0.589657
false
chincisan/google-python-exercises
basic/string1.py
1
3560
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Basic string exercises # Fill in the code for the functions below. main() is already se...
apache-2.0
-8,113,552,083,929,637,000
29.689655
78
0.666011
false
WillianPaiva/1flow
oneflow/base/templatetags/base_utils.py
1
6677
# -*- coding: utf-8 -*- """ Copyright 2012-2014 Olivier Cortès <oc@1flow.io> This file is part of the 1flow project. 1flow 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 versio...
agpl-3.0
7,640,967,080,721,701,000
27.279661
116
0.574318
false
rplevka/robottelo
tests/foreman/api/test_hostcollection.py
1
14852
"""Unit tests for host collections. :Requirement: Hostcollection :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: HostCollections :Assignee: swadeley :TestType: Functional :CaseImportance: High :Upstream: No """ from random import choice from random import randint import pytest from broker imp...
gpl-3.0
-3,255,145,031,037,407,000
31.077754
99
0.69903
false
qris/dynamo-demo
deploy/fablib.py
1
14547
import os, sys import getpass import time import shutil from fabric.api import * from fabric.contrib import files, console from fabric.contrib.files import exists from fabric import utils def _setup_path(): # TODO: something like # if not defined env.project_subdir: # env.project_subdir = env.project ...
gpl-3.0
-8,189,313,332,269,552,000
35.096774
126
0.612291
false
Keats/gutenberg
components/site/benches/gen.py
1
5070
""" Generates test sites for use in benchmark. Tested with python3 and probably does not work on Windows. """ import datetime import os import random import shutil TAGS = ["a", "b", "c", "d", "e", "f", "g"] CATEGORIES = ["c1", "c2", "c3", "c4"] PAGE = """ +++ title = "Hello" date = REPLACE_DATE [taxonomies] tags = ...
mit
-6,960,706,027,240,699,000
27.806818
121
0.641223
false
salcho/antares
ui/loggerWidget.py
1
1137
#!/usr/bin/env python import gtk import logging import time from ui.IWidget import IWidget from core.data import logger from core.log import addStreamHandler #TODO: Implement file-like thread to show logging! class loggerWidget(IWidget): def __init__(self): IWidget.__init__(self) self.frame = gtk.Frame('Logger...
mit
3,276,869,649,480,475,600
24.863636
59
0.737907
false
lightbase/WSCacicNeo
wscacicneo/test/blacklist/test_unit_blacklist.py
1
3125
#!/usr/env python # -*- coding: utf-8 -*- __author__ = 'adley' import unittest import os from .. import settings here = os.path.abspath(os.path.dirname(__file__)) data_path = os.path.join(here, "../fixtures/") data_file = os.path.join(data_path, 'users/admin.json') class TestAttributesBlacklist(unittest.TestCase): ...
gpl-2.0
-6,965,276,048,249,313,000
31.747368
86
0.619936
false
zestyr/lbry
lbrynet/dht/msgtypes.py
1
1593
#!/usr/bin/env python # # This library is free software, distributed under the terms of # the GNU Lesser General Public License Version 3, or any later version. # See the COPYING file included in this archive # # The docstrings in this module contain epytext markup; API documentation # may be created by processing this...
mit
4,668,161,594,579,503,000
32.1875
93
0.670433
false
shalzuth/BraveHaxvius
IDAScripts/GetNetworkKeys.py
1
2891
from idautils import * from idaapi import * def get_string(addr): out = "" while True: if Byte(addr) != 0: out += chr(Byte(addr)) else: break addr += 1 return out def get_string_from_head(head): refs = DataRefsFrom(head) for ref in refs: refs2 = DataRefsFrom(ref) for ref2 in refs2: stringval...
mit
-4,050,094,355,223,870,000
31.863636
101
0.684192
false
myarjunar/QGIS
tests/src/python/test_qgsatlascomposition.py
1
12477
# -*- coding: utf-8 -*- ''' test_qgsatlascomposition.py -------------------------------------- Date : Oct 2012 Copyright : (C) 2012 by Dr. Hugo Mercier email : hugo dot mercier at oslandia dot com **************...
gpl-2.0
1,783,056,050,084,386,300
38.484177
138
0.639256
false
XKNX/xknx
test/remote_value_tests/remote_value_dpt_value_1_ucount_test.py
1
3237
"""Unit test for RemoteValueDptValue1Ucount objects.""" import pytest from xknx import XKNX from xknx.dpt import DPTArray, DPTBinary from xknx.exceptions import ConversionError, CouldNotParseTelegram from xknx.remote_value import RemoteValueDptValue1Ucount from xknx.telegram import GroupAddress, Telegram from xknx.tele...
mit
-553,713,442,261,681,660
36.206897
66
0.624035
false
eRestin/MezzGIS
mezzanine/conf/forms.py
1
3040
from __future__ import unicode_literals from future.builtins import int from collections import defaultdict from django import forms from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from django.template.defaultfilters import urlize from mezzanine.conf import setti...
bsd-2-clause
8,096,700,865,729,011,000
35.190476
79
0.565789
false
volab/pyvorcv
setup.py
1
3971
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # VoR-CV # The MIT License # # Copyright (c) 2010,2015 Jeremie DECOCK (http://www.jdhp.org) # # 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 ...
mit
7,094,162,803,281,906,000
32.940171
123
0.684211
false
robertnishihara/ray
python/ray/dashboard/node_stats.py
1
13362
from collections import defaultdict from ray.dashboard.util import to_unix_time, format_reply_id from base64 import b64decode import ray import threading import json import traceback import copy import logging from datetime import datetime import time from typing import Dict import re from operator import itemgetter ...
apache-2.0
5,768,132,720,916,335,000
40.496894
79
0.503068
false
rdio/sentry
src/sentry/web/frontend/projects/plugins.py
1
5548
""" sentry.web.frontend.projects.plugins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from django.contrib import messages from django.core.context_processors import csrf from django.core.urlresolvers import ...
bsd-3-clause
-1,399,992,528,082,685,000
35.5
125
0.701154
false
0/realtimepork
realtimepork/gpu.py
1
1605
""" GPU utilities. """ from functools import wraps from math import ceil # Load everything we need in this module from PyCUDA (but don't autoinit until # requested). try: from pycuda.tools import DeviceData except ImportError: _pycuda_available = False else: _pycuda_available = True # Is this thing on? ...
mit
6,945,346,836,958,899,000
17.662791
78
0.640498
false
ronniel1/Voodoo-Mock
voodoo/unittests/test_c_parsing.py
1
16651
import unittest import savingiterator import pprint import tools class TestCParsing( unittest.TestCase ): def setUp( self ): self.maxDiff = None def _simpleTest( self, contents, expected ): tested = savingiterator.SavingIterator() with tools.temporaryFile( contents ) as contentsFile: ...
gpl-2.0
-3,396,596,157,572,860,400
54.688963
170
0.597141
false
hfercc/mese2014
lib/rest_framework/mixins.py
1
7228
""" Basic building blocks for generic class based views. We don't bind behaviour to http method handlers yet, which allows mixin classes to be composed in interesting ways. """ from __future__ import unicode_literals from django.core.exceptions import ValidationError from django.http import Http404 from res...
apache-2.0
8,436,068,386,180,543,000
34.505051
88
0.606945
false
aerostitch/nagios_checks
hdfs_datanode_balancing_status.py
1
4396
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Author: Joseph Herlant <herlantj@gmail.com> # File name: hdfs_datanode_balancing_status.py # Creation date: 2014-10-08 # # Distributed under terms of the GNU GPLv3 license. """ This nagios active check parses the Hadoop HDFS web interface url: http://<namenode>:<port>...
gpl-2.0
1,909,556,536,262,776,600
37.226087
97
0.619882
false