text
stringlengths
0
1.05M
meta
dict
from environment import GymEnvironment import numpy as np import sys import random import os import json from critic import SimpleCritic from policy import Policy from hallucinator import SimpleHallucinator from trainer import SimpleTrainer from policy_buffer import PolicyBuffer def main(): # Get the path to the c...
{ "repo_name": "fizz-ml/policybandit", "path": "main.py", "copies": "1", "size": "1727", "license": "mit", "hash": -1804289860037543000, "line_mean": 33.54, "line_max": 129, "alpha_frac": 0.6566299942, "autogenerated": false, "ratio": 3.333976833976834, "config_test": true, "has_no_keywords": ...
from environment import MinesweeperEnvironment if __name__ == "__main__": game = MinesweeperEnvironment(10, 10, 13, True) #game.env.printState() game.new_game() game.env.drawState() while True: inp = input("Enter input (ROW,COL)") row = int(1) col = int(1) print(ga...
{ "repo_name": "jakejhansen/minesweeper_solver", "path": "q_learning/test_minesweeper.py", "copies": "2", "size": "1750", "license": "mit", "hash": 1921279564104080600, "line_mean": 20.875, "line_max": 60, "alpha_frac": 0.5268571429, "autogenerated": false, "ratio": 3.1934306569343067, "config_t...
from environment import * from unipath import Path PROJECT_DIR = Path(__file__).ancestor(2) # Gets absolute project path for file creation et al DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'ENCODING': 'UTF-8', 'NAME': 'postgres', 'USER': 'postgre...
{ "repo_name": "DummyDivision/Tsune", "path": "tsune/settings/base.py", "copies": "1", "size": "9041", "license": "mit", "hash": 6491374398494269000, "line_mean": 34.31640625, "line_max": 120, "alpha_frac": 0.6689525495, "autogenerated": false, "ratio": 3.6573624595469254, "config_test": false, ...
from .environment import * from copy import deepcopy from typing import List, Mapping, Optional """ components: - stack of environments operations: - push a new environment - pop last environment - search environments - bind name in environment """ class EnvironmentStack(Mapping[str, Addr...
{ "repo_name": "pdarragh/Viper", "path": "viper/interpreter/environment_stack.py", "copies": "1", "size": "2010", "license": "apache-2.0", "hash": -6514654762623226000, "line_mean": 23.8148148148, "line_max": 71, "alpha_frac": 0.560199005, "autogenerated": false, "ratio": 4.00398406374502, "conf...
from environment import PROJECT_ROOT from os.path import join JOINER_VERSION = 3 NORMER_VERSION = 1 DATA_IN_ROOT = join(PROJECT_ROOT, "data") DATA_OUT_ROOT = DATA_IN_ROOT PARENT_FIELDS = ['alcohol', 'cigarettes', 'conception', 'edd_lmp', 'edd_us', 'edd', 'episode_lmp', 'ethnic_group', 'ethnic_gro...
{ "repo_name": "predictscan3/scan3", "path": "scan3/conf.py", "copies": "1", "size": "5125", "license": "mit", "hash": -1439496515838078000, "line_mean": 40, "line_max": 120, "alpha_frac": 0.5916097561, "autogenerated": false, "ratio": 2.822136563876652, "config_test": false, "has_no_keywords"...
from environment.robots.robot2d_base import Robot2dCircular from environment.robots.robot_utils import * class HumanSimple(Robot2dCircular): def __init__(self, size=0.3, max_vel=2.0, max_acc=5.0, uncertainty=0.0): super(HumanSimple, self).__init__(size) self.max_v = max_vel self.max_acc =...
{ "repo_name": "yuhangc/planning_algorithms", "path": "environment/robots/humans.py", "copies": "1", "size": "1684", "license": "mit", "hash": -3881632271751574000, "line_mean": 27.5423728814, "line_max": 76, "alpha_frac": 0.5279097387, "autogenerated": false, "ratio": 2.9805309734513274, "confi...
from .environment_stack import Address, EnvironmentStack from viper.lexer import Class from viper.parser.ast.nodes import AST, Parameter, FuncDef from inspect import signature from typing import Any, Callable, Dict, List, NamedTuple class InstantiatedField(NamedTuple): addr: Address class InstantiatedMethod(N...
{ "repo_name": "pdarragh/Viper", "path": "viper/interpreter/value.py", "copies": "1", "size": "4978", "license": "apache-2.0", "hash": 7300967621848594000, "line_mean": 23.3921568627, "line_max": 116, "alpha_frac": 0.5946543408, "autogenerated": false, "ratio": 3.6374269005847952, "config_test":...
from environs import Env from opwen_email_server.utils.string import urlsafe env = Env() STORAGE_PROVIDER = env('LOKOLE_STORAGE_PROVIDER', 'AZURE_BLOBS') BLOBS_ACCOUNT = env('LOKOLE_EMAIL_SERVER_AZURE_BLOBS_NAME', '') BLOBS_KEY = env('LOKOLE_EMAIL_SERVER_AZURE_BLOBS_KEY', '') BLOBS_HOST = env('LOKOLE_EMAIL_SERVER_A...
{ "repo_name": "ascoderu/opwen-cloudserver", "path": "opwen_email_server/config.py", "copies": "1", "size": "3189", "license": "apache-2.0", "hash": -7842171598936355000, "line_mean": 45.8970588235, "line_max": 96, "alpha_frac": 0.7453747256, "autogenerated": false, "ratio": 2.85496866606983, "c...
from envparse import env # Number of threads in executor # https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.ThreadPoolExecutor THREAD_POOL_SIZE = env.int('RAGE_SRV_THREAD_POOL_SIZE', default=4) # Redis connection settings REDIS_HOST = env.str('RAGE_SRV_REDIS_HOST', default='127.0.0.1') R...
{ "repo_name": "alexryabtsev/cover_rage_server", "path": "cover_rage_server/settings.py", "copies": "1", "size": "1669", "license": "mit", "hash": 3599165348323939000, "line_mean": 37.8139534884, "line_max": 113, "alpha_frac": 0.7441581786, "autogenerated": false, "ratio": 3.240776699029126, "co...
from env_setup import setup_django; setup_django() from django.db import models, connection from restler import decorators @decorators.django_serializer class Model1(models.Model): big_integer = models.BigIntegerField(null=True, default=1) boolean = models.BooleanField(default=False) char = models.CharF...
{ "repo_name": "xuru/restler", "path": "tests/django_models.py", "copies": "1", "size": "3184", "license": "mit", "hash": 414878959637755500, "line_mean": 37.3614457831, "line_max": 94, "alpha_frac": 0.7110552764, "autogenerated": false, "ratio": 3.799522673031026, "config_test": false, "has_n...
from .envs import available_envs_module def available_envs(): available_envs = [env_module.__name__.split('.')[-1] for env_module in available_envs_module] wip = ['realtime-v0'] return available_envs def make(env_id, obs_data_len, step_len, df, fee, deal_col_name='price', feature_names=...
{ "repo_name": "Yvictor/TradingGym", "path": "trading_env/__init__.py", "copies": "1", "size": "1265", "license": "mit", "hash": -1643913634324599600, "line_mean": 47.6538461538, "line_max": 151, "alpha_frac": 0.609486166, "autogenerated": false, "ratio": 3.553370786516854, "config_test": false,...
from envs import create_env from gym import wrappers import numpy as np import time import argparse def avg_err(a): avg = a.mean() trials = len(a) if trials == 1: err = 0.0 else: err = np.std(a) / (np.sqrt(trials) - 1) return avg, err def evaluate_loop(env, network, max_episodes,...
{ "repo_name": "pengsun/universe-starter-agent", "path": "evaluate.py", "copies": "1", "size": "3830", "license": "mit", "hash": 4127752536195550700, "line_mean": 32.3130434783, "line_max": 114, "alpha_frac": 0.6248041775, "autogenerated": false, "ratio": 3.6897880539499037, "config_test": false...
from envs import global_env, Env from scheme_types import Symbol, List class Procedure(object): """A user-defined Scheme procedure.""" def __init__(self, parms, body, env): self.parms, self.body, self.env = parms, body, env def __call__(self, *args): return evaluate(self.body, Env(self.p...
{ "repo_name": "mwjackson/pypyscheme", "path": "eval.py", "copies": "1", "size": "1399", "license": "mit", "hash": -4352311753848896500, "line_mean": 34, "line_max": 67, "alpha_frac": 0.5246604718, "autogenerated": false, "ratio": 3.506265664160401, "config_test": false, "has_no_keywords": fal...
from envs.mdp import StochasticMDPEnv import random import numpy as np from keras.models import Sequential from keras.layers import Dense, Activation from keras.optimizers import Adam import matplotlib.pyplot as plt plt.style.use('ggplot') def actor(): actor = Sequential() actor.add(Dense(6, init='lecun_unifor...
{ "repo_name": "EthanMacdonald/h-DQN", "path": "actor_critic.py", "copies": "1", "size": "3758", "license": "mit", "hash": 4149278019033312000, "line_mean": 28.359375, "line_max": 108, "alpha_frac": 0.5896753592, "autogenerated": false, "ratio": 3.1135045567522783, "config_test": false, "has_n...
from .EnvVarCondition import * from ....Helpers import logging_helper from ....Helpers.pbPlist import pbItem import objc import re from .EnvConstants import * class EnvVariable(object): def __init__(self, dictionary): self.added_after = False; self.mergedKeys = set(); self.parentValue...
{ "repo_name": "samdmarshall/xcparse", "path": "xcparse/Xcode/BuildSystem/Environment/EnvVariable.py", "copies": "1", "size": "13044", "license": "bsd-3-clause", "hash": -7459317779669551000, "line_mean": 46.9595588235, "line_max": 197, "alpha_frac": 0.531048758, "autogenerated": false, "ratio": 4...
from eot import Image image1 = Image(2,2, Image.CCV_8U | Image.CCV_C1) image2 = Image(2,2, Image.CCV_8U | Image.CCV_C1) image1.set_pixel(0,0,1) image1.set_pixel(0,1,2) image1.set_pixel(1,0,3) image1.set_pixel(1,1,4) image2.set_pixel(0,0,1) image2.set_pixel(0,1,2) image2.set_pixel(1,0,3) image2.set_pixel(1,1,4) print...
{ "repo_name": "EyesOfThings/Software", "path": "Platform Software/desktop/apps/EoT_Python_Desktop/Examples/EoT_Test_Image_Algebra.py", "copies": "1", "size": "1443", "license": "mit", "hash": 1884875386842016800, "line_mean": 20.8636363636, "line_max": 49, "alpha_frac": 0.7117117117, "autogenerated...
from epicduels.content.game_state import Card as Cd # Combat Cards COMBAT_5_1 = {'type': Cd.combat, 'name': 'combat', 'attack': 5, 'defense': 1, 'owner': ''} COMBAT_4_2 = {'type': Cd.combat, 'name': 'combat', 'attack': 4, 'defense': 2, 'owner': ''} COMBAT_4_1 = {'type': Cd.combat, 'name': '...
{ "repo_name": "aelkikhia/pyduels3.4", "path": "epicduels/content/cards.py", "copies": "1", "size": "20807", "license": "apache-2.0", "hash": -4598905643313320400, "line_mean": 55.849726776, "line_max": 80, "alpha_frac": 0.4798385159, "autogenerated": false, "ratio": 3.847448224852071, "config_t...
from epicduels.content import game_state as GS from epicduels.content import characters as CS from epicduels.content import game_state as GS from epicduels.content import boards as BS MOVE_MENU = {'question': 'Move to Square:', 'choices': None} ACTION_MENU = {'question': 'Choose an action:', 'choices':...
{ "repo_name": "aelkikhia/pyduels3.4", "path": "epicduels/content/menus.py", "copies": "1", "size": "1100", "license": "apache-2.0", "hash": 718538180889375900, "line_mean": 39.7407407407, "line_max": 79, "alpha_frac": 0.5754545455, "autogenerated": false, "ratio": 3.6184210526315788, "config_te...
from epicduels.content import game_state as GS from epicduels.rules import board_rules as BR from epicduels.content import characters as CS from epicduels.content import game_state as GS from epicduels.content import boards as BS MOVE_MENU = {'question': 'Move to Square:', 'choices': None} ACTION_MENU = ...
{ "repo_name": "aelkikhia/pyduels27", "path": "epicduels/content/menus.py", "copies": "1", "size": "1159", "license": "apache-2.0", "hash": -2220791894871478300, "line_mean": 38.9655172414, "line_max": 79, "alpha_frac": 0.5789473684, "autogenerated": false, "ratio": 3.633228840125392, "config_te...
from epicduels.content import menus class menu_loader: def __init__(self, menu, cursor='> '): self.menu = menu self.cursor = cursor def load_menu(self): while True: print (self.menu['question']) print (30 * '-') for index, choice in enumerate(self...
{ "repo_name": "aelkikhia/pyduels27", "path": "epicduels/model/menu.py", "copies": "1", "size": "1836", "license": "apache-2.0", "hash": 4504868400394264600, "line_mean": 30.6724137931, "line_max": 79, "alpha_frac": 0.4885620915, "autogenerated": false, "ratio": 4.488997555012225, "config_test":...
from epics import caget, caput, camonitor from time import sleep # Settings for the performance test # open: OPEN THRESHOLD - 75% # close: CLOSE THRESHOLD - 25% open = caget('CTRL-SUP-BOY:VC101-COH.VAL') + 15 close = caget('CTRL-SUP-BOY:VC101-COL.VAL') - 15 start = caget('CTRL-SUP-BOY:PERF-SRT.VAL') init = 40 firstVa...
{ "repo_name": "ControlSystemStudio/org.csstudio.iter", "path": "products/org.csstudio.iter.css.product/demo/m-TEST/src/main/boy/mimics/scripts/valve_control.py", "copies": "2", "size": "2794", "license": "epl-1.0", "hash": -6816675242629080000, "line_mean": 38.3521126761, "line_max": 65, "alpha_frac"...
### from epics import caput, caget def detector_distance(val, pvname='13IDE:m19.VAL', wait=True): """ Set Sample-detector distance in mm. Args: val (float): Sample-detector distance in mm. pvname (string): Epics PV for sample-detector distance ['13IDE:m19.VAL'] wait (True or False...
{ "repo_name": "newville/microprobe_docs", "path": "doc/macros/instruments.py", "copies": "1", "size": "3426", "license": "bsd-2-clause", "hash": 8406931117321160000, "line_mean": 26.1904761905, "line_max": 80, "alpha_frac": 0.6036193812, "autogenerated": false, "ratio": 3.355533790401567, "conf...
from epidag.factory import get_workshop import epidag.factory.arguments as vld from .trigger import * from .behaviour import * from .modbe import * from .lifebe import * from .publisher import * __author__ = 'TimeWz667' __all__ = ['PassiveModBehaviour', 'ActiveModBehaviour', 'TransitionTrigger', 'StateTrig...
{ "repo_name": "TimeWz667/Kamanian", "path": "complexism/agentbased/statespace/be/__init__.py", "copies": "1", "size": "4396", "license": "mit", "hash": 7175592948443763000, "line_mean": 47.8444444444, "line_max": 95, "alpha_frac": 0.5880345769, "autogenerated": false, "ratio": 3.322751322751323, ...
from epiphany.condition_codes import condition_passed from epiphany.test.machine import new_state import pytest def test_condition_passed(): state = new_state(AZ=1) assert condition_passed(state, 0b0000) state.AZ = 0 assert condition_passed(state, 0b0001) state.AZ = 0 state.AC = 1 assert ...
{ "repo_name": "moreati/revelation", "path": "epiphany/test/test_condition_passed.py", "copies": "1", "size": "1333", "license": "bsd-3-clause", "hash": 444603909170178370, "line_mean": 26.7708333333, "line_max": 53, "alpha_frac": 0.6669167292, "autogenerated": false, "ratio": 3.2832512315270934, ...
from epiphany.condition_codes import condition_passed from epiphany.utils import signed, sext_8, sext_24 from pydgin.utils import trim_32 import epiphany.isa #----------------------------------------------------------------------- # bcond16 and bcond32 - branch on condition. #-----------------------------------------...
{ "repo_name": "moreati/revelation", "path": "epiphany/execute_branch.py", "copies": "1", "size": "1415", "license": "bsd-3-clause", "hash": 7337548724680841000, "line_mean": 38.3055555556, "line_max": 91, "alpha_frac": 0.4798586572, "autogenerated": false, "ratio": 3.7433862433862433, "config_t...
from epiphany.condition_codes import condition_passed #----------------------------------------------------------------------- # movcond32 and movcond16 - move on condition. #----------------------------------------------------------------------- def make_movcond_executor(is16bit): def execute_movcond(s, inst): ...
{ "repo_name": "moreati/revelation", "path": "epiphany/execute_mov.py", "copies": "1", "size": "1883", "license": "bsd-3-clause", "hash": -3067177075931166700, "line_mean": 31.4655172414, "line_max": 84, "alpha_frac": 0.4163568773, "autogenerated": false, "ratio": 3.9642105263157896, "config_tes...
from epiphany.instruction import Instruction from epiphany.isa import decode from epiphany.machine import RESET_ADDR from epiphany.test.machine import StateChecker, new_state import opcode_factory import pytest @pytest.mark.parametrize('is16bit,val', [(True, 0b111), (False, 0b1111)]) def test_execute_movcond(is16bit...
{ "repo_name": "moreati/revelation", "path": "epiphany/test/test_execute_mov.py", "copies": "1", "size": "2851", "license": "bsd-3-clause", "hash": -5335254382832809000, "line_mean": 44.253968254, "line_max": 117, "alpha_frac": 0.6159242371, "autogenerated": false, "ratio": 3.2770114942528736, "...
from epiphany.instruction import Instruction from epiphany.isa import decode from epiphany.test.machine import StateChecker, new_state import opcode_factory import pytest @pytest.mark.parametrize('sub,new_rn', [(1, 8 - 4), (0, 8 + 4), (1...
{ "repo_name": "moreati/revelation", "path": "epiphany/test/test_execute_load_store.py", "copies": "1", "size": "6829", "license": "bsd-3-clause", "hash": 9097601338623097000, "line_mean": 39.6488095238, "line_max": 84, "alpha_frac": 0.6137062527, "autogenerated": false, "ratio": 2.824234904880066...
from epiphany.isa import reg_map def make_zero_operand_factory(opcode): def factory(): return opcode return factory gie16 = make_zero_operand_factory(0b0000000110010010) gid16 = make_zero_operand_factory(0b0000001110010010) nop16 = make_zero_operand_factory(0b0000000110100010) idle16 = make_ze...
{ "repo_name": "moreati/revelation", "path": "epiphany/test/opcode_factory.py", "copies": "1", "size": "13018", "license": "bsd-3-clause", "hash": 2162857860850713600, "line_mean": 31.7085427136, "line_max": 83, "alpha_frac": 0.5450914119, "autogenerated": false, "ratio": 3.021118588999768, "con...
from epiphany.machine import RESET_ADDR from epiphany.test.sim import MockEpiphany from epiphany.test.machine import StateChecker import opcode_factory def test_sim_bkpt16(): instructions = [(opcode_factory.bkpt16(), 16), # BKPT16 ] epiphany = MockEpiphany() epiphany.init_state(instruc...
{ "repo_name": "moreati/revelation", "path": "epiphany/test/test_sim.py", "copies": "1", "size": "5250", "license": "bsd-3-clause", "hash": 1585170702466966500, "line_mean": 37.0434782609, "line_max": 99, "alpha_frac": 0.6346666667, "autogenerated": false, "ratio": 3.289473684210526, "config_tes...
from epiphany.utils import bits2float, float2bits, get_exponent from pydgin.utils import trim_32 import math def make_farith_executor(name, is16bit, is_unary=False): def farith(s, inst): """ RD = RN <OP> RM BN = RD[31] if (RD[30:0] == 0) { BZ=1 } else { BZ=0 } if (Unbiased...
{ "repo_name": "moreati/revelation", "path": "epiphany/execute_farith.py", "copies": "1", "size": "2284", "license": "bsd-3-clause", "hash": -8588223266189860000, "line_mean": 34.1384615385, "line_max": 80, "alpha_frac": 0.4785464098, "autogenerated": false, "ratio": 3.065771812080537, "config_t...
from epnamer import * import tkinter from tkinter import ttk from tkinter import filedialog from tkinter import messagebox class Application(): def __init__(self): self.root = tkinter.Tk() self.root.title('gEpnamer') self.root.geometry('800x600') self.initialize() def initializ...
{ "repo_name": "louisswarren/epnamer", "path": "gepnamer.py", "copies": "1", "size": "6150", "license": "mit", "hash": -3211464429711139000, "line_mean": 35.1764705882, "line_max": 79, "alpha_frac": 0.5775609756, "autogenerated": false, "ratio": 3.6369012418687165, "config_test": false, "has_n...
from epnamer import * seinfeld_guide = tvmaze_guide('Seinfeld') def seinfeld_episodes(): print('Seinfeld episodes') episodes = list(seinfeld_guide.episodes) assert(len(episodes) == 180) assert(episodes[0] == Episode('Seinfeld', 1, 1, 'Good News, Bad News')) def epcodes(): print('Epcodes') fi...
{ "repo_name": "louisswarren/epnamer", "path": "test.py", "copies": "1", "size": "1513", "license": "mit", "hash": 8668145020546679000, "line_mean": 29.26, "line_max": 75, "alpha_frac": 0.6014540648, "autogenerated": false, "ratio": 2.8070500927643787, "config_test": false, "has_no_keywords": ...
from eppy.client import EppClient from eppy.exceptions import EppLoginError from eppy.doc import EppUpdateDomainCommand, EppResponse from django.conf import settings from src.logging.Logger import Logger logger = Logger().LOG # rename ds attributes to match EPP def remap_ds_keys(ds): ds['keyTag'] = ds.pop('key_tag...
{ "repo_name": "CIRALabs/DSAP", "path": "src/epp/eppclient.py", "copies": "1", "size": "2017", "license": "mit", "hash": 5719163903048073000, "line_mean": 27.4225352113, "line_max": 79, "alpha_frac": 0.5542885473, "autogenerated": false, "ratio": 3.5448154657293496, "config_test": false, "has_...
from eppy.client import EppClient class Connector(object): def __init__(self, ctx, behavior, host=None, port=None, ssl_key=None, ssl_cert=None, ssl_cacerts=None, logger=None, read_greeting=True): self.ctx = ctx self.host = host or ctx.host self.port = port or ctx.port ...
{ "repo_name": "cloudregistry/eppy", "path": "eppy/load_test/connector.py", "copies": "1", "size": "1449", "license": "mit", "hash": -284184513242031680, "line_mean": 32.6976744186, "line_max": 106, "alpha_frac": 0.5452035887, "autogenerated": false, "ratio": 3.843501326259947, "config_test": fa...
from eppy.iddcurrent import iddcurrent from eppy.modeleditor import IDF from six import StringIO iddsnippet = iddcurrent.iddtxt iddfhandle = StringIO(iddcurrent.iddtxt) IDF.setiddname(iddfhandle) idftxt = """ Version, 8.5; !- Version Identifier Building, ...
{ "repo_name": "jamiebull1/eppy", "path": "eppy/geometry/mcve.py", "copies": "2", "size": "16243", "license": "mit", "hash": -2822314397772765700, "line_mean": 45.9479768786, "line_max": 72, "alpha_frac": 0.4054054054, "autogenerated": false, "ratio": 4.262135922330097, "config_test": false, "...
from epsilon.extime import Time from axiom import attributes as A from axiom.item import Item def nowAttribute(allowNone=False, defaultFactory=Time): return A.timestamp(doc='Date the item was added.', allowNone=allowNone, defaultFactory=defaultFactory) class Auth...
{ "repo_name": "jsza/jump-map-list", "path": "jumpmaplist/items.py", "copies": "1", "size": "4408", "license": "mit", "hash": 5554161338656596000, "line_mean": 30.2624113475, "line_max": 85, "alpha_frac": 0.5583030853, "autogenerated": false, "ratio": 3.859894921190893, "config_test": false, "...
from epsilon.extime import Time from nevow.livetrial import testcase from nevow import tags, loaders from nevow.athena import expose from axiom.store import Store from axiom.userbase import LoginMethod from axiom.dependency import installOn from xmantissa.webtheme import getLoader from xmantissa.people import Person...
{ "repo_name": "twisted/quotient", "path": "xquotient/test/livetest_compose.py", "copies": "1", "size": "4363", "license": "mit", "hash": -8536286743216060000, "line_mean": 30.8467153285, "line_max": 78, "alpha_frac": 0.632592253, "autogenerated": false, "ratio": 4.127719962157048, "config_test"...
from epsilon.extime import Time from twisted.python.components import registerAdapter from twisted.python.filepath import FilePath from axiom.attributes import reference, text, timestamp from axiom.item import Item, transacted from renamer import logging from renamer.irenamer import IRenamingAction from renamer.plug...
{ "repo_name": "jonathanj/renamer", "path": "renamer/history.py", "copies": "1", "size": "6199", "license": "mit", "hash": -8943002975141985000, "line_mean": 24.5102880658, "line_max": 79, "alpha_frac": 0.5852556864, "autogenerated": false, "ratio": 4.231399317406144, "config_test": false, "ha...
from epsilon import Input from epsilon.logging import Logger from epsilon.math import Vector3, Quaternion, Vector2, Matrix4 from epsilon.render import Camera, Colour from epsilon.render.const import WIDTH, HEIGHT from epsilon.scene import TransformSpace from epsilon import util from epsilon import Gizmos from random ...
{ "repo_name": "freneticmonkey/epsilonc", "path": "resources/scripts/CameraBehaviour.py", "copies": "1", "size": "3275", "license": "mit", "hash": 6497201837403140000, "line_mean": 26.0661157025, "line_max": 74, "alpha_frac": 0.6848854962, "autogenerated": false, "ratio": 2.966485507246377, "con...
from epsilon import Input from epsilon.math import Vector3, Quaternion from epsilon import util class KeyboardControl(object): def __init__(self): self._speed = 10 self._angle_speed = 100.0 self._mouse_speed_x = 0.02 self._mouse_speed_y = 0.02 self._on = False def on_start(self): pass def on_upda...
{ "repo_name": "freneticmonkey/epsilonc", "path": "resources/scripts/KeyboardControl.py", "copies": "1", "size": "1464", "license": "mit", "hash": -3287472573248354300, "line_mean": 23.0163934426, "line_max": 73, "alpha_frac": 0.6728142077, "autogenerated": false, "ratio": 2.981670061099796, "co...
from epsilon import * import random from epsilon.scene import TransformSpace from epsilon.render import Colour from epsilon.math import Vector3 from CycleValue import CycleValue class OSXDebugging(object): def __init__(self): self._sphere_trans = None # Wow. Setting a const value here (Vector3.ZERO) crashes ...
{ "repo_name": "freneticmonkey/epsilonc", "path": "resources/scripts/OSXDebugging.py", "copies": "1", "size": "1700", "license": "mit", "hash": 6530883437156881000, "line_mean": 24.0147058824, "line_max": 108, "alpha_frac": 0.6847058824, "autogenerated": false, "ratio": 3.0575539568345325, "conf...
from epsilon import * import random from epsilon.scene import TransformSpace from epsilon.render import Colour from epsilon.math import Vector3, Vector2 from CycleValue import CycleValue from epsilon.ui import IMGUI, WindowOptions class MyBehaviour(object): def __init__(self): self._sphere_trans = None # Wow...
{ "repo_name": "freneticmonkey/epsilonc", "path": "resources/scripts/MyBehaviourClass.py", "copies": "1", "size": "2324", "license": "mit", "hash": -2790831767994951000, "line_mean": 26.0348837209, "line_max": 108, "alpha_frac": 0.6863166954, "autogenerated": false, "ratio": 3.053876478318003, "...
from epsilon import * from epsilon.render import Colour from epsilon.math import Vector3 from epsilon.render import MeshFactory, Renderer from CycleValue import CycleValue import sys class TestingMeshGeneration(object): def __init__(self): pass def on_start(self): #return #sm = SceneManager.get_instance()...
{ "repo_name": "freneticmonkey/epsilonc", "path": "resources/scripts/TestingFeatures.py", "copies": "1", "size": "1455", "license": "mit", "hash": -9183548715507288000, "line_mean": 26.4716981132, "line_max": 78, "alpha_frac": 0.7422680412, "autogenerated": false, "ratio": 3.2261640798226163, "c...
from epsilon import setuphelper from sine import version setuphelper.autosetup( name="Sine", version=version.short(), maintainer="Divmod, Inc.", maintainer_email="support@divmod.org", url="http://divmod.org/trac/wiki/DivmodSine", license="MIT", platforms=["any"], description= "...
{ "repo_name": "twisted/sine", "path": "setup.py", "copies": "2", "size": "1072", "license": "mit", "hash": 8334986243356446000, "line_mean": 32.5, "line_max": 74, "alpha_frac": 0.6156716418, "autogenerated": false, "ratio": 4.466666666666667, "config_test": false, "has_no_keywords": false, ...
from .epub import make_epub from .cover import make_cover from .cover import make_cover_from_url import datetime import requests import attr html_template = '''<?xml version="1.0" encoding="UTF-8" standalone="no"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"> <head> <title...
{ "repo_name": "Zomega/leech", "path": "ebook/__init__.py", "copies": "1", "size": "4701", "license": "mit", "hash": 6926358513883729000, "line_mean": 34.8854961832, "line_max": 161, "alpha_frac": 0.6434801106, "autogenerated": false, "ratio": 3.2398345968297724, "config_test": false, "has_no_...
from .epub import make_epub from .cover import make_cover from .cover import make_cover_from_url import html import unicodedata import datetime import requests import attr html_template = '''<?xml version="1.0" encoding="UTF-8" standalone="no"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.o...
{ "repo_name": "kemayo/leech", "path": "ebook/__init__.py", "copies": "1", "size": "5331", "license": "mit", "hash": -2513041016515584500, "line_mean": 35.0202702703, "line_max": 161, "alpha_frac": 0.6385293566, "autogenerated": false, "ratio": 3.329793878825734, "config_test": false, "has_no_...
from epub_tools import get_epub_info import os import readability from os import listdir from os.path import isfile, join def get_readability_api(api_key=None, api_secret=None, username=None, password=None): """ Authorise in Readability API""" if not api_key: api_key = os.environ.get('READABILITY_API_...
{ "repo_name": "Melevir/ReadabilitySync", "path": "sync.py", "copies": "1", "size": "2877", "license": "mit", "hash": -8335208131813143000, "line_mean": 35.417721519, "line_max": 107, "alpha_frac": 0.6576294751, "autogenerated": false, "ratio": 3.5606435643564356, "config_test": false, "has_no...
from epumgmt.api.actions import ACTIONS from epumgmt.main import ControlArg import optparse a = [] ALL_EC_ARGS_LIST = a ################################################################################ # EM ARGUMENTS # # The following cmdline arguments may be queried via Parameters, using either # the 'name' as the ar...
{ "repo_name": "nimbusproject/epumgmt", "path": "src/python/epumgmt/main/em_args.py", "copies": "1", "size": "3947", "license": "apache-2.0", "hash": 3589068608855274500, "line_mean": 45.9880952381, "line_max": 264, "alpha_frac": 0.7177603243, "autogenerated": false, "ratio": 3.444153577661431, ...
from epumgmt.api.exceptions import IncompatibleEnvironment, UnexpectedError from epumgmt.main import em_args import os FALSE_POSITIVES = ["site-packages", "python2.5", "python2.6", "bin", "plat-linux2", "app", "lib-old", "lib-tk", "lib-dynload", "lib", "pylib"] class VersionsNode: def __init__(...
{ "repo_name": "nimbusproject/epumgmt", "path": "src/python/epumgmt/main/em_core_versions.py", "copies": "1", "size": "4892", "license": "apache-2.0", "hash": 613674936828617100, "line_mean": 30.358974359, "line_max": 104, "alpha_frac": 0.5445625511, "autogenerated": false, "ratio": 3.552650689905...
from epumgmt.api.exceptions import InvalidConfig import os import epumgmt.main.em_core_load import epumgmt.defaults.child # used to fetch torque logs on torque headnode class TorqueLogs: def __init__(self, p, c, m, run_name): self.p = p self.c = c self.m = m self.run_name = run_na...
{ "repo_name": "nimbusproject/epumgmt", "path": "src/python/epumgmt/main/em_core_torquelogfetch.py", "copies": "1", "size": "2475", "license": "apache-2.0", "hash": 7306770853898032000, "line_mean": 32.904109589, "line_max": 84, "alpha_frac": 0.5705050505, "autogenerated": false, "ratio": 3.418508...
from epumgmt.api.exceptions import * from epumgmt.api import RunVM from epumgmt.main import em_args from epumgmt.main.em_core_logfetch import FetchThread import cloudyvents.cyvents as cyvents from epumgmt.main import em_core_status THREADS_PER_BATCH = 20 def fetch_kill(p, c, m, run_name, cloudinitd, controller_name=N...
{ "repo_name": "nimbusproject/epumgmt", "path": "src/python/epumgmt/main/em_core_fetchkill.py", "copies": "1", "size": "4929", "license": "apache-2.0", "hash": -8229357465227961000, "line_mean": 34.2071428571, "line_max": 148, "alpha_frac": 0.6488131467, "autogenerated": false, "ratio": 3.40871369...
from epumgmt.api.exceptions import * from epumgmt.main import em_core_status from epumgmt.main.em_core_load import get_cloudinit import epumgmt.defaults.epustates as epustates from em_core_status import _find_state_from_events as find_state_from_events from threading import Thread THREADS_PER_BATCH = 20 class FetchT...
{ "repo_name": "nimbusproject/epumgmt", "path": "src/python/epumgmt/main/em_core_logfetch.py", "copies": "1", "size": "5692", "license": "apache-2.0", "hash": -5329445517627897000, "line_mean": 34.1358024691, "line_max": 150, "alpha_frac": 0.596978215, "autogenerated": false, "ratio": 3.3462669018...
from epumgmt.defaults.cloudinitd_load import get_cloudinitd_service import os from epumgmt.api.exceptions import * import epumgmt.main.em_args as em_args import child class DefaultRunlogs: def __init__(self, params, common): self.p = params self.c = common self.validated = False ...
{ "repo_name": "nimbusproject/epumgmt", "path": "src/python/epumgmt/defaults/runlogs.py", "copies": "1", "size": "5720", "license": "apache-2.0", "hash": -8198349408494406000, "line_mean": 38.1780821918, "line_max": 168, "alpha_frac": 0.5972027972, "autogenerated": false, "ratio": 3.88851121685927...
from epynet import Network from nose.tools import assert_equal, assert_almost_equal import pandas as pd class TestNetwork(object): @classmethod def setup_class(self): self.network = Network(inputfile="tests/testnetwork.inp") self.network.solve() @classmethod def teadown(self): ...
{ "repo_name": "Vitens/epynet", "path": "tests/test_network.py", "copies": "1", "size": "6944", "license": "apache-2.0", "hash": 6653159686426438000, "line_mean": 34.4285714286, "line_max": 83, "alpha_frac": 0.6286002304, "autogenerated": false, "ratio": 3.5284552845528454, "config_test": true, ...
from epynet import Network from nose.tools import assert_equal, assert_almost_equal import pandas as pd class TestMultiplePumps(object): @classmethod def setup_class(self): self.network = Network() def test01_multiple_pumps(self): network = self.network network.add_reservoir("R...
{ "repo_name": "Vitens/epynet", "path": "tests/test_multiple_pumps.py", "copies": "2", "size": "1436", "license": "apache-2.0", "hash": -2926049703448968700, "line_mean": 27.1568627451, "line_max": 70, "alpha_frac": 0.5431754875, "autogenerated": false, "ratio": 2.8492063492063493, "config_test"...
from epyper.displayCOGProcess import Display from epyper import bsp #------------------------------------------------------------------------------- class DisplayController(): #------------------------------------------------------------------------------- def __init__(self, EPDType): bsp.init() ...
{ "repo_name": "mnowotka/epyper", "path": "epyper/displayController.py", "copies": "1", "size": "1823", "license": "mit", "hash": 4599228511539994000, "line_mean": 34.7450980392, "line_max": 80, "alpha_frac": 0.4185408667, "autogenerated": false, "ratio": 5.077994428969359, "config_test": false,...
from epyper.enum import enum from epyper import displayHardwareDriver as epd #------------------------------------------------------------------------------- class COG_Parameters(): def __init__(self, channelSelect, voltageLevel, horizontal, vertical, dataLineSize, frame...
{ "repo_name": "mnowotka/epyper", "path": "epyper/displayCOGProcess.py", "copies": "1", "size": "8944", "license": "mit", "hash": -5004241398297880000, "line_mean": 32.3731343284, "line_max": 88, "alpha_frac": 0.4402951699, "autogenerated": false, "ratio": 3.8222222222222224, "config_test": fals...
from epyper import bsp #------------------------------------------------------------------------------- # Public functions #------------------------------------------------------------------------------- def cs_high(): # CS_SET_HIGH; bsp.pinOut(bsp.pins.PIN_6, 1) #--------------------------------------------...
{ "repo_name": "mnowotka/epyper", "path": "epyper/displayHardwareDriver.py", "copies": "1", "size": "4393", "license": "mit", "hash": 7971417530893641000, "line_mean": 24.8411764706, "line_max": 80, "alpha_frac": 0.3546551332, "autogenerated": false, "ratio": 3.918822479928635, "config_test": fa...
from epython import * import array import math data=None data_p1=None define_on_device(data) define_on_device(data_p1) MAX_ITS=10000 @offload def initialise(global_size): num_local=global_size/(numcores()-1) if num_local * (numcores()-1) != global_size: if (coreid() < global_size-num_local*(numcores()-1)): n...
{ "repo_name": "mesham/epython", "path": "examples/jacobi_offload.py", "copies": "1", "size": "1248", "license": "bsd-2-clause", "hash": -7672559175914847000, "line_mean": 20.8947368421, "line_max": 89, "alpha_frac": 0.6322115385, "autogenerated": false, "ratio": 2.4046242774566475, "config_test...
from eqep.interpolation.pgvinterpolator import PGVInterpolator from scipy.interpolate import Rbf class RbfPGVInterpolator(PGVInterpolator): """A `Radial Basis Function` pgv interpolation algorithm implementation Attributes ---------- function : str the type of algebraic function to use for i...
{ "repo_name": "TGM-HIT/eqep-api", "path": "eqep/interpolation/rbf_pgvinterpolator.py", "copies": "1", "size": "1121", "license": "mit", "hash": -3811749071517783000, "line_mean": 29.2972972973, "line_max": 80, "alpha_frac": 0.6440677966, "autogenerated": false, "ratio": 4.328185328185328, "conf...
from eqep.shakemap.display.scales import * from matplotlib import pyplot import matplotlib as mpl colormaps = {'GreenSMScale': GreenSMScale().colorMap, 'RainbowSMScale': RainbowSMScale().colorMap, 'HardBoundsSMScale': HardBoundsSMScale().colorMap, 'SmoothBoundsSMScale': SmoothB...
{ "repo_name": "TGM-HIT/eqep-api", "path": "examples/colorbars.py", "copies": "1", "size": "1475", "license": "mit", "hash": 7018847790796205000, "line_mean": 37.8157894737, "line_max": 77, "alpha_frac": 0.6250847458, "autogenerated": false, "ratio": 2.7570093457943927, "config_test": false, "...
from eqep.shakemap.shakemap import ShakeMap class PreinitializedShakeMap(ShakeMap): """A ShakeMap which can be fully initialized on construction, so that a single call to `calculate()` is sufficient for computing the whole graphical image. Attributes ---------- longs_range, lats_range : tuple...
{ "repo_name": "TGM-HIT/eqep-api", "path": "eqep/shakemap/preinitialized_shakemap.py", "copies": "1", "size": "2606", "license": "mit", "hash": 2447486809884894700, "line_mean": 36.768115942, "line_max": 80, "alpha_frac": 0.6320030698, "autogenerated": false, "ratio": 4.661896243291592, "config_...
from equadratures.parameter import Parameter from equadratures.poly import Poly from equadratures.basis import Basis import numpy as np import scipy import scipy.io from scipy.linalg import orth, sqrtm from scipy.spatial import ConvexHull from scipy.special import comb from scipy.optimize import linprog from time impor...
{ "repo_name": "psesh/Effective-Quadratures", "path": "equadratures/subspaces.py", "copies": "1", "size": "25528", "license": "mit", "hash": -7645543442063385000, "line_mean": 40.9868421053, "line_max": 271, "alpha_frac": 0.5667894077, "autogenerated": false, "ratio": 3.427957566805425, "config_...
from equadratures.sampling_methods.sampling_template import Sampling import numpy as np from scipy.special import betaln import bisect from scipy.optimize import bisect as bisect_root_solve class Induced(Sampling): """ The class defines an Induced sampling object. :param list parameters: A list of parameter...
{ "repo_name": "psesh/Effective-Quadratures", "path": "equadratures/sampling_methods/induced.py", "copies": "1", "size": "18579", "license": "mit", "hash": -407941287007496100, "line_mean": 37.1519507187, "line_max": 89, "alpha_frac": 0.5341514613, "autogenerated": false, "ratio": 4.10585635359116...
from .equals_builder import EqualsBuilder from .hash_code_builder import HashCodeBuilder __all__ = [ 'hashable', 'equalable', ] def hashable(cls=None, attributes=None, methods=None): _validate_attributes_and_methods(attributes, methods) def decorator(cls): cls = equalable(cls, attributes, m...
{ "repo_name": "minmax/hashable", "path": "hashable/helpers.py", "copies": "1", "size": "1112", "license": "mit", "hash": -8014993471428533000, "line_mean": 30.7714285714, "line_max": 78, "alpha_frac": 0.7095323741, "autogenerated": false, "ratio": 4.028985507246377, "config_test": false, "has...
from equals import any_number class TestLessThan(object): test_obj = any_number.less_than(5) def test_equals_a_smaller_number(self): assert self.test_obj == 4 def test_does_not_equal_same_number(self): assert not self.test_obj == 5 def test_does_not_equal_larger_number(self): ...
{ "repo_name": "rygwdn/equals", "path": "test/number_test.py", "copies": "2", "size": "3652", "license": "mit", "hash": 1668848506414357500, "line_mean": 27.7559055118, "line_max": 68, "alpha_frac": 0.6081599124, "autogenerated": false, "ratio": 3.461611374407583, "config_test": true, "has_no_...
from equipment import Weapon class Unit(object): def __init__(self, health=100, mana=100, mana_regeneration_rate=2): self.health = health # current health self.mana = mana # current mana self.mana_regen_rate = mana_regeneration_rate self.__MAX_HEALTH = self.health self.__...
{ "repo_name": "int3l/dungeons-and-pythons", "path": "units.py", "copies": "1", "size": "2900", "license": "mit", "hash": -4762541464400511000, "line_mean": 27.431372549, "line_max": 71, "alpha_frac": 0.5393103448, "autogenerated": false, "ratio": 3.647798742138365, "config_test": false, "has_...
from .equivalence import Equivalence import itertools class Route(object): def __init__(self, rooms, spaces=None, **data): self.rooms = rooms self.spaces = spaces if spaces is not None else len(rooms) self.data = data def __repr__(self): data = dict(self.data) if self....
{ "repo_name": "kcsaff/maze-builder", "path": "maze_builder/mazes/maze.py", "copies": "1", "size": "3957", "license": "mit", "hash": -3773761508654756000, "line_mean": 30.656, "line_max": 107, "alpha_frac": 0.5549658832, "autogenerated": false, "ratio": 4.20510095642933, "config_test": false, ...
from eratosthenes import * primes = [] def initPrimesCache(limit): global primes primes = SOE(limit) def prime(num): return num in primes def factorize(num): amic = { 'number' : num, 'dividers' : [1], 'pair' : 0 } start = 0 stop = 0 step = 1 if num...
{ "repo_name": "herrniemand/ANPPC", "path": "amic.py", "copies": "1", "size": "1110", "license": "mit", "hash": 5864064578621238000, "line_mean": 20.3653846154, "line_max": 118, "alpha_frac": 0.4855855856, "autogenerated": false, "ratio": 3.4472049689440993, "config_test": false, "has_no_keywo...
from ER import ER import tensorflow as tf import common import numpy as np class MGAIL(object): def __init__(self, environment): self.env = environment self.do_keep_prob = tf.placeholder("float", shape=(), name='do_keep_prob') self.forward_model = __import__('forward_model').ForwardMod...
{ "repo_name": "bentzinir/Buffe", "path": "Applications/mgail/mgail.py", "copies": "1", "size": "11459", "license": "mit", "hash": 8101156917626142000, "line_mean": 54.3574879227, "line_max": 136, "alpha_frac": 0.5162754167, "autogenerated": false, "ratio": 3.856950521709862, "config_test": fals...
from eris.owner import Owner from eris.resource import Resource class AssignableResource(Resource): def __init__(self): self.owners = [] self.reserved = False self.suspended = False self.suspended_count = 0 self.owners_count = 0 self.total_owners_count = 0 s...
{ "repo_name": "jedisct1/eris", "path": "eris/assignableresources/assignableresource.py", "copies": "2", "size": "2561", "license": "bsd-2-clause", "hash": -7234994627510553000, "line_mean": 25.9578947368, "line_max": 61, "alpha_frac": 0.5611089418, "autogenerated": false, "ratio": 4.0715421303656...
from erlang_python import ErlangPythonServices from helper import get_host, get_port from os.path import basename from tfimpl import Model from thrift.protocol import TBinaryProtocol from thrift.server import TServer from thrift.transport import TSocket from thrift.transport import TTransport class Dbg(object): a...
{ "repo_name": "walter-weinmann/annlink_thrift", "path": "src_py/server.py", "copies": "1", "size": "8208", "license": "apache-2.0", "hash": 7118859220189022000, "line_mean": 31.5714285714, "line_max": 98, "alpha_frac": 0.4108187135, "autogenerated": false, "ratio": 5.3229571984435795, "config_t...
from erlang_python import ErlangPythonServices from helper import get_host, get_port from os.path import basename from thrift import Thrift from thrift.protocol import TBinaryProtocol from thrift.transport import TSocket from thrift.transport import TTransport class Dbg(object): active = False DEBUGGER = Dbg() ...
{ "repo_name": "walter-weinmann/annlink_thrift", "path": "src_py/test_client.py", "copies": "1", "size": "7195", "license": "apache-2.0", "hash": -549609106085616960, "line_mean": 33.5913461538, "line_max": 97, "alpha_frac": 0.3760945101, "autogenerated": false, "ratio": 5.038515406162465, "conf...
from erlpack import pack def test_small_tuple(): assert pack((1, 2, 3)) == '\x83h\x03a\x01a\x02a\x03' def test_large_tuple(): t = tuple(range(257)) assert pack(t) == '\x83i\x00\x00\x01\x01a\x00a\x01a\x02a\x03a\x04a\x05a\x06a\x07a\x08a\ta\na\x0ba\x0ca\ra\x0ea' \ '\x0fa\x10a\x11a\x12...
{ "repo_name": "bassmastry101/NutBot", "path": "node_modules/erlpack/py/tests/test_tuple.py", "copies": "4", "size": "1511", "license": "mit", "hash": 1993122326512448000, "line_mean": 70.9523809524, "line_max": 117, "alpha_frac": 0.619457313, "autogenerated": false, "ratio": 1.6958473625140291, ...
from erlport import Port, Protocol, String, Atom from erlport.erlterms import decode from django.template import Context, Template from django.conf import settings import types # Inherit custom protocol from erlport.Protocol class ErlydtlProtocol(Protocol): def handle_slice(self, command): list = comm...
{ "repo_name": "huangered/erlydtl", "path": "test/py/erlydtl_python_test.py", "copies": "18", "size": "1734", "license": "mit", "hash": -8794374431815938000, "line_mean": 34.387755102, "line_max": 100, "alpha_frac": 0.5974625144, "autogenerated": false, "ratio": 3.7777777777777777, "config_test"...
from errata_tool.erratum import Erratum def add_parser(subparsers): """Add our advisory parser to this top-level subparsers object. """ group = subparsers.add_parser('advisory', help='Get or create an advisory') # advisory-level subcommands: sub = group.add_subparsers(dest='advisory_subcommand') ...
{ "repo_name": "red-hat-storage/errata-tool", "path": "errata_tool/cli/advisory.py", "copies": "2", "size": "4450", "license": "mit", "hash": 4596543012492539000, "line_mean": 40.5887850467, "line_max": 79, "alpha_frac": 0.5350561798, "autogenerated": false, "ratio": 3.8662033014769763, "config_...
from errata_tool import ErrataConnector from errata_tool.cdn_repo import CdnRepo class Variant(ErrataConnector): """A Variant contains a "data" dict, for example:: { 'attributes': { 'buildroot': False, 'cpe': 'cpe:/a:redhat:ceph_storage:1.2::el7', 'description': 'Red...
{ "repo_name": "red-hat-storage/errata-tool", "path": "errata_tool/variant.py", "copies": "1", "size": "2849", "license": "mit", "hash": 3624071770773198300, "line_mean": 29.6344086022, "line_max": 72, "alpha_frac": 0.4124254124, "autogenerated": false, "ratio": 3.945983379501385, "config_test":...
from errata_tool import ErrataConnector from errata_tool import Erratum class Build(ErrataConnector): """Search ET for Details based on a build""" def __init__(self, nvr): """Find build information and advisories where the build is attached. :param nvr: build NVR (name-version-release) ...
{ "repo_name": "ktdreyer/errata-tool", "path": "errata_tool/build.py", "copies": "2", "size": "3885", "license": "mit", "hash": 4288237923711042600, "line_mean": 27.9925373134, "line_max": 79, "alpha_frac": 0.5359073359, "autogenerated": false, "ratio": 3.8163064833005893, "config_test": false, ...
from errata_tool import ErrataConnector from errata_tool.product_version import ProductVersion class Product(ErrataConnector): def __init__(self, name): self.name = name self.data = None self.url = self._url + '/products/%s' % self.name def product_versions(self): """Get the li...
{ "repo_name": "red-hat-storage/errata-tool", "path": "errata_tool/product.py", "copies": "1", "size": "2297", "license": "mit", "hash": -8141957931706640000, "line_mean": 33.2835820896, "line_max": 76, "alpha_frac": 0.5446234219, "autogenerated": false, "ratio": 4.2146788990825685, "config_test...
from errata_tool import ErrataConnector from errata_tool.variant import Variant class ProductVersion(ErrataConnector): def __init__(self, id_or_name, data=None): """Find a Product Version in the ET database. :param id_or_name: This can be an id number (int) or product version ...
{ "repo_name": "red-hat-storage/errata-tool", "path": "errata_tool/product_version.py", "copies": "1", "size": "3032", "license": "mit", "hash": -5051265394294923000, "line_mean": 35.9756097561, "line_max": 76, "alpha_frac": 0.5583773087, "autogenerated": false, "ratio": 3.799498746867168, "conf...
from errata_tool import ErrataConnector class CdnRepo(ErrataConnector): """A CdnRepo contains a dict, for example: { 'id': 12189, 'relationships': { 'arch': { 'id': 28, 'name': 'multi' }, 'packages': [ { ...
{ "repo_name": "red-hat-storage/errata-tool", "path": "errata_tool/cdn_repo.py", "copies": "1", "size": "2785", "license": "mit", "hash": 5499664310559405000, "line_mean": 28.9462365591, "line_max": 69, "alpha_frac": 0.3816876122, "autogenerated": false, "ratio": 4.4347133757961785, "config_test...
from errata_tool.products import ProductList class TestProductList(object): def test_instance(self, productlist): assert isinstance(productlist, ProductList) def test_export_name(self, productlist): result = productlist.export() assert result['name'] == 'errata_tool_products' de...
{ "repo_name": "ktdreyer/errata-tool", "path": "errata_tool/tests/test_products.py", "copies": "2", "size": "2610", "license": "mit", "hash": -2305626059831842000, "line_mean": 34.7534246575, "line_max": 78, "alpha_frac": 0.5068965517, "autogenerated": false, "ratio": 3.712660028449502, "config_...
from errator import narrate, get_narration, set_narration_options import timeit import platform def f1(borkfunc, catchfunc): if borkfunc == 1: raise Exception("bork1") else: try: f2(borkfunc, catchfunc) except Exception: if catchfunc == 1: _ = ge...
{ "repo_name": "haxsaw/errator", "path": "timing.py", "copies": "1", "size": "8155", "license": "mit", "hash": 31198972560109868, "line_mean": 23.3432835821, "line_max": 105, "alpha_frac": 0.5283874923, "autogenerated": false, "ratio": 3.675078864353312, "config_test": false, "has_no_keywords"...
from errbot.backends.test import FullStackTest from errbot.plugin_info import PluginInfo from errbot.templating import add_plugin_templates_path from pathlib import Path import logging class CoroboTestCase(FullStackTest): def setUp(self, klasses: tuple): super().setUp(loglevel=logging.ERROR, ...
{ "repo_name": "coala/corobo", "path": "tests/corobo_test_case.py", "copies": "1", "size": "1752", "license": "mit", "hash": -2806257529164631600, "line_mean": 34.7551020408, "line_max": 75, "alpha_frac": 0.600456621, "autogenerated": false, "ratio": 3.9548532731376973, "config_test": false, "...
from errbot import BotPlugin, botcmd from elasticsearch import Elasticsearch import plotly.plotly as py import plotly.graph_objs as go from plotly.offline import plot import random import uuid import json from plotly.offline import init_notebook_mode, plot_mpl from config import ES_HOST, METRIC_INDEX, HOST_URL class ...
{ "repo_name": "debojitkakoti/atraey", "path": "bot/plugins/err-metrics/metricsbot.py", "copies": "1", "size": "13941", "license": "mit", "hash": -4393054098204434400, "line_mean": 45.7818791946, "line_max": 127, "alpha_frac": 0.5131626139, "autogenerated": false, "ratio": 3.8963107881498042, "c...
from errbot import BotPlugin, botcmd from elasticsearch import Elasticsearch import plotly.plotly as py import plotly.graph_objs as go import random from config import ES_HOST, METRIC_INDEX class Metricsbot(BotPlugin): def es_request_metric(self, metric_value): res = es.search(index=METRIC_INDEX, body={ ...
{ "repo_name": "debojitkakoti/atraey", "path": "bot/err-metrics/metricsbot.py", "copies": "1", "size": "2336", "license": "mit", "hash": -3472599313982524000, "line_mean": 30.1466666667, "line_max": 81, "alpha_frac": 0.4982876712, "autogenerated": false, "ratio": 3.792207792207792, "config_test"...
from errbot import BotPlugin, botcmd from errbot.utils import get_sender_username import logging import time import datetime import csv class Entry: def __init__(self, title, creator): self.title = title self.creator = creator self.description = "No description. :(" self.timestamp = time.time() ...
{ "repo_name": "arrrrr/err-todolist", "path": "todolist.py", "copies": "1", "size": "5548", "license": "unlicense", "hash": 793850005007432600, "line_mean": 41.3511450382, "line_max": 156, "alpha_frac": 0.6086878154, "autogenerated": false, "ratio": 3.2925816023738874, "config_test": false, "h...
from errbot import BotPlugin, botcmd from jenkinsapi.jenkins import Jenkins from config import JENKINS_URL, JENKINS_USERNAME, JENKINS_PASSWORD class Jenkinsbot(BotPlugin): def connect_server(self): server = Jenkins(JENKINS_URL, JENKINS_USERNAME, JENKINS_PASSWORD) return server @botcmd de...
{ "repo_name": "debojitkakoti/atraey", "path": "bot/plugins/err-jenkinsbot/jenkinsbot.py", "copies": "1", "size": "2052", "license": "mit", "hash": 9010648272125337000, "line_mean": 40.8979591837, "line_max": 232, "alpha_frac": 0.5657894737, "autogenerated": false, "ratio": 3.670840787119857, "c...
from errbot import BotPlugin, botcmd from optparse import OptionParser import logging import socket import time import boto3 log = logging.getLogger(name='errbot.plugins.AWS') class AWS(BotPlugin): def _ec2_find_instance(self, name): ec2 = boto3.resource('ec2') for instance in ec2.instances.all():...
{ "repo_name": "projecthabile/errbot-aws", "path": "aws.py", "copies": "1", "size": "2408", "license": "mit", "hash": 6012177012305030000, "line_mean": 27.6785714286, "line_max": 77, "alpha_frac": 0.4937707641, "autogenerated": false, "ratio": 4.116239316239316, "config_test": false, "has_no_k...
from errbot import BotPlugin, botcmd from random import choice, randint, getrandbits import requests from lxml import html class MemeOn(BotPlugin): memes = { "devops": [ "http://1.bp.blogspot.com/_eGXMMWsE_7Y/SwJ1icDrkzI/AAAAAAAAATU/MO_NccQyQS0/s1600/samiad1.gif" ], "handoff":...
{ "repo_name": "drsm79/err-memeon", "path": "meme.py", "copies": "1", "size": "13322", "license": "apache-2.0", "hash": 1155539429864174800, "line_mean": 46.9208633094, "line_max": 149, "alpha_frac": 0.5853475454, "autogenerated": false, "ratio": 2.7372097801520443, "config_test": false, "has_...
from errbot import BotPlugin, botcmd import feedparser, re class ForumBot(BotPlugin): """An plugin recieving the liveticker from SV Darmstadt 98""" def activate(self): """Triggers on plugin activation You should delete it if you're not using it to override any default be...
{ "repo_name": "helo9/err_forum", "path": "forumbot.py", "copies": "1", "size": "2187", "license": "mit", "hash": -4473206877239377000, "line_mean": 32.1363636364, "line_max": 106, "alpha_frac": 0.4993141289, "autogenerated": false, "ratio": 4.673076923076923, "config_test": true, "has_no_keyw...
from errbot import BotPlugin from random import choice from apscheduler.scheduler import Scheduler from datetime import datetime, timedelta import logging class FreshPots(BotPlugin): pots = [ 'http://i.imgur.com/Q2b54vc.jpg', 'http://i.imgur.com/SYsdsew.jpg', 'http://i.imgur.com/caIbQMh.p...
{ "repo_name": "drsm79/err-freshpots", "path": "pots.py", "copies": "3", "size": "2049", "license": "apache-2.0", "hash": -3197740414107080000, "line_mean": 30.0454545455, "line_max": 70, "alpha_frac": 0.5470961445, "autogenerated": false, "ratio": 3.2472266244057053, "config_test": false, "ha...
from errno import EAGAIN, EINTR from subprocess import Popen, PIPE import color import cStringIO import fcntl import os import select import signal import sys import threading import time import traceback import Queue class BaseThread(threading.Thread): def __init__(self, host, port, cmd, flags, sem, stdin=None): ...
{ "repo_name": "unix1986/universe", "path": "tool/pssh-1.4.3/psshlib/basethread.py", "copies": "1", "size": "7105", "license": "bsd-2-clause", "hash": 5879149208361159000, "line_mean": 37.6141304348, "line_max": 79, "alpha_frac": 0.4945812808, "autogenerated": false, "ratio": 4.254491017964072, ...
from errno import EEXIST from logging import getLogger from os import getcwd, mkdir from os.path import join, realpath, isfile, isdir from shutil import rmtree from psutil import Process, NoSuchProcess from funcy import decorator from .exceptions import InvalidPidFileError, PidFileExistsError logger = getLogger(__na...
{ "repo_name": "chriscannon/highlander", "path": "highlander/highlander.py", "copies": "1", "size": "3780", "license": "mit", "hash": -9143853778060696000, "line_mean": 30.7647058824, "line_max": 98, "alpha_frac": 0.6830687831, "autogenerated": false, "ratio": 4.276018099547511, "config_test": f...
from errno import ENOENT as NoSuchFile from farmfs.keydb import KeyDB from farmfs.keydb import KeyDBWindow from farmfs.keydb import KeyDBFactory from farmfs.blobstore import FileBlobstore from farmfs.util import * from farmfs.fs import Path from farmfs.fs import ensure_absent, ensure_symlink, ensure_copy, ensure_dir, s...
{ "repo_name": "andrewguy9/farmfs", "path": "farmfs/volume.py", "copies": "1", "size": "10035", "license": "mit", "hash": -5868505078082202000, "line_mean": 32.2284768212, "line_max": 125, "alpha_frac": 0.6476332835, "autogenerated": false, "ratio": 3.376514131897712, "config_test": false, "ha...
from errno import ENOENT from stat import S_IFDIR, S_IFREG from sys import argv, exit import os import os.path from time import time, mktime from datetime import datetime import dateutil.parser from dateutil.tz import tzlocal # import gevent # from gevent import monkey # from gevent.pool import Pool from personal_inf...
{ "repo_name": "tjwei/AsusWebStorage", "path": "AsusFS.py", "copies": "1", "size": "4473", "license": "apache-2.0", "hash": 4305903337412552700, "line_mean": 34.792, "line_max": 120, "alpha_frac": 0.5580147552, "autogenerated": false, "ratio": 3.5220472440944883, "config_test": false, "has_no_...
from errno import ENOENT import logging import pickle import re from sys import argv from stat import S_IFDIR, S_IFLNK, S_IFREG from time import time from fuse import FUSE, FuseOSError, Operations, LoggingMixIn import helpers class GoogleMusic(LoggingMixIn, Operations): def __init__(self, email, password): ...
{ "repo_name": "jonjomckay/google-music-fuse", "path": "google-music.py", "copies": "1", "size": "1706", "license": "bsd-3-clause", "hash": 8141447989400741000, "line_mean": 37.7954545455, "line_max": 128, "alpha_frac": 0.5744431419, "autogenerated": false, "ratio": 3.5102880658436213, "config_t...
from errno import EPERM, EACCES from os import path import os import sys import subprocess from tempfile import mkdtemp import re import math def find_ffmpeg(binary_name='ffmpeg', skip_list=None, paths=None, silent=False): """ Function to find and return the full path to a suitable ffmpeg binary. If no su...
{ "repo_name": "zathras777/atavism", "path": "atavism/video.py", "copies": "1", "size": "8202", "license": "unlicense", "hash": -6178492867709249000, "line_mean": 35.4533333333, "line_max": 98, "alpha_frac": 0.5484028286, "autogenerated": false, "ratio": 3.6780269058295962, "config_test": false,...
from ErroNoHTTP import ErroNoHTTP import importlib import sys, traceback class Roteador(object): def __init__(self,variaveis_do_ambiente): self.variaveis_do_ambiente = variaveis_do_ambiente try: self.realizarChecagens() self.executar() except ErroNoHTTP as erro_no_http: self.resposta = erro_no_http ...
{ "repo_name": "AEDA-Solutions/matweb", "path": "backend/Framework/Roteador.py", "copies": "1", "size": "1989", "license": "mit", "hash": -5274751504532816000, "line_mean": 26.625, "line_max": 121, "alpha_frac": 0.72297637, "autogenerated": false, "ratio": 2.4495073891625614, "config_test": fals...