content
stringlengths
5
1.05M
from copy import deepcopy from pprint import pprint DEFAULT_CLUB = { "days": "0", "description": "Time to show off your sexy body.", "id": "1", "imgUrl": "1381", "job1": "Wear nothing but panties and a bra while performing your task(s).", "job2": "In addition to Option 1 wear stockings and he...
import math from pyvolution.EvolutionManager import * from pyvolution.GeneLibrary import * """ This example attempts to find a solution to the following system of equations: a + b + c + d - 17 = 0 a^2 + b^2 - 5 = 0 sin(a) + c - d - 20 = 0 """ def fitnessFunction(chromosome): """ Given a "chromosome", this ...
#!/usr/bin/env python3 # Write a program that prints your full name and birthday as separate strings print("Ada Lovelace", "born on", 'November 27, 1852') print('Albert Einstein', 'born on', '14 March 1879') print(("John Smith"), ("born on"), ("14 March 1879"))
import os import fnmatch import numpy as np import glob import pandas as pd import matplotlib.pyplot as plt import pdb #First section is for user input #------------------------------------------------- #id_star1 - int: DAOPHOT ID# for first star. #id_star2 - int: DAOPHOT ID# for second star. #jack_img_num - int: Tota...
def skier_generator_process(env, arrivals): """ Implementation of the process that generates arriving customers to the facility. Arguments env -- simpy simulation environment object arrivals -- a list to hold the time of arrivals """ k = 0 # A counter to indicate th...
# coding: utf-8 from __future__ import unicode_literals from django.conf.urls import url from django.http import HttpResponse from django.shortcuts import get_object_or_404 from django.urls import path from .models import ExampleModel def test_view(request): return HttpResponse("OK") def test_model_view(reque...
from __future__ import print_function from __future__ import absolute_import import sys; sys.path.append('') from infogan.misc.distributions import Uniform, Categorical, Gaussian, MeanBernoulli import tensorflow as tf import os from infogan.misc.datasets import ShapeDataset from infogan.models.regularized_gan import R...
# Copyright (c) 2021 PaddlePaddle 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 appli...
from argparse import ArgumentParser import random import string from twisted.internet import reactor from twisted.internet.defer import Deferred from twisted.internet.endpoints import TCP4ClientEndpoint, connectProtocol from twisted.internet.task import deferLater from twisted.python.failure import Failure from divvy...
#!/usr/bin/env python from json import loads from ..common import * def interest_download(url, output_dir='.', merge=True, info_only=False, **kwargs): # http://ch.interest.me/zhtv/VOD/View/114789 # http://program.interest.me/zhtv/sonja/8/Vod/View/15794 html = get_content(url) # get title title =...
from .problem_316 import denominations
""" This module provides functions to get metadata from actions """ import os from os.path import splitext from .action_loader import get_action_metadata, load_actions_paths def get_actions_metadata(): """ Extract metadata from modules """ action_list = [] for action_path in load_actions_paths(): ...
# Count how many words occur in a list up to and including the first occurrence of the word “sam”. # (Write your unit tests for this case too. What if “sam” does not occur?) def words_until_sam(list): wordcount = 0 for i in list: wordcount += 1 if i == "sam": break print(wordco...
# Copyright (C) 2011 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
import torch import torch.nn as nn import torchvision import numpy as np from .BasicModule import BasicModule print("PyTorch Version: ",torch.__version__) print("Torchvision Version: ",torchvision.__version__) __all__ = ['ResNet50', 'ResNet101','ResNet152'] def Conv1(in_planes, places, stride=2): ret...
import os import unittest import json from flask_sqlalchemy import SQLAlchemy from flaskr import create_app from models import setup_db, Question, Category class TriviaTestCase(unittest.TestCase): """This class represents the trivia test case""" def setUp(self): """Define test variables and initiali...
import os THRESHOLD = 10485760 def get_disk_health(path): res = os.statvfs(path) if res.f_frsize*res.f_bavail < THRESHOLD: return { 'status': 'DOWN', 'details': { 'total': res.f_frsize * res.f_blocks, 'free': res.f_frsize * res.f_bavail, ...
# -*- coding: utf-8 -*- # Package placeholder import traceback def format_last_exception(prefix=" | "): """Format the last exception for display it in tests. This allows to raise custom exception, without loosing the context of what caused the problem in the first place: >>> def f(): ... r...
# EPA_NEI_Onroad.py (flowsa) # !/usr/bin/env python3 # coding=utf-8 """ Pulls EPA National Emissions Inventory (NEI) data for nonpoint sources """ import pandas as pd import numpy as np import zipfile import io def epa_nei_call(url, response_load, args): """ Takes the .zip archive returned from the url call an...
# -*- coding: utf-8 -*- from unittest import TestCase from app import create_app from app import db from app.configuration import TestConfiguration from app.userprofile.tokens import ChangeEmailAddressToken from app.userprofile.tokens import DeleteAccountToken from app.userprofile.tokens import ResetPasswordToken c...
class Solution: def isPerfectSquare(self, num: int) -> bool: import math helper_end = num helper_start = 0 helper_middle = math.ceil((helper_start + helper_end) / 2) while helper_middle * helper_middle != num: print(helper_start, helper_end, helper_middle) ...
"""Class definitions for training G2P models""" from __future__ import annotations import itertools import multiprocessing as mp import operator import os import queue import random import re import shutil import subprocess import time from typing import Any, List, NamedTuple, Optional, Set import tqdm from montreal...
from backend.common.sitevars.website_blacklist import WebsiteBlacklist def test_key(): assert WebsiteBlacklist.key() == "website_blacklist" def test_description(): assert ( WebsiteBlacklist.description() == "For blacklisting sketchy websites from team pages" ) def test_default_sitevar(...
import os import sys import unittest sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) from bot.config_reader import retrieve_default class TestConfigBasics(unittest.TestCase): @unittest.skipUnless( os.path.exists("./bot/config.ini"), "Configuration file not found" ) d...
import random from eth2spec.test.helpers.block import ( build_empty_block_for_next_slot, ) from eth2spec.test.helpers.block_processing import run_block_processing_to from eth2spec.test.helpers.state import ( state_transition_and_sign_block, transition_to, ) from eth2spec.test.helpers.constants import ( ...
# Generated by Django 2.0.9 on 2020-06-08 07:03 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
#This is a module with all the descriptions for the foes import random enemy1 = ("Small Milkey Way", "Directly from Mars, this small piece of chocolate and malt is having a bad nutday!") enemy2 = ("American Milkey Way", "450 calories of unadulterated milkey madness with nuts!") enemy3 = ("UK milkey Way", "Creamy, sm...
import os import setuptools def read(rel_path): base_path = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(base_path, rel_path), 'r') as f: return f.read() if __name__ == '__main__': setuptools.setup( name='pytorch_gan_metrics', version='0.4.1', author=...
import sounddevice as sd from scipy.io.wavfile import write def micStart(): print('start recording....') fs = 44100 # Sample rate seconds = 7 # Duration of recording myrecording = sd.rec(int(seconds * fs), samplerate=fs, channels=2) sd.wait() # Wait until recording is finished write('mp3/rec...
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-11-23 09:10 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('issue', '0021_auto_20171122_1420'), ] operations = [ migrations.AlterModelOpt...
from core import send, M from printing import printPlaylists import time ############################################################################### ## ### TODO: ## # show contents of a playlist # search adds song to playlist --> current song restarts ###########################################################...
import FWCore.ParameterSet.Config as cms # Reweight using constant herwigppReweightSettingsBlock = cms.PSet( hwpp_reweight_Constant = cms.vstring( 'mkdir /Herwig/Weights', 'create ThePEG::ReweightConstant /Herwig/Weights/reweightConstant ReweightConstant.so', 'set /Herwig/Weights/reweightConstant:C 1', 'ins...
def pil_compatible_bb(bb): if len(bb) != 4: raise ValueError( "The bounding box must be a list|tuple of length 4 (top, right, bottom, left)" ) top, right, bottom, left = bb return (left, top, right, bottom) def parse_face_id(id): "<timestamp>_<domain>_<account_name>_<img_n...
## Mel-filterbank mel_window_length = 50 # In milliseconds 25 mel_window_step = 10 # In milliseconds 10 mel_n_channels = 40 ## Audio sampling_rate = 16000 # Number of spectrogram frames in a partial utterance partials_n_frames = 160 # 1600 ms # Number of spectrogram frames at inference inference_n...
# -*- coding: utf-8 -*- from __future__ import division, print_function __all__ = ["PSF"] import numpy as np from ._kpsf import compute_psf class PSF(object): def __init__(self, var_x, var_y, var_xy=0.0): self.var_x = var_x self.var_y = var_y self.var_xy = var_xy self.componen...
# Xlib.ext.xinerama -- Xinerama extension module # # Copyright (C) 2006 Mike Meyer <mwm@mired.org> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version 2.1 # of the License...
# -*- coding: utf-8 -*- """materialtools.materialtesting.bending.plot Reads in a text file from the Phoenix rig (Thor) from a four point bending test and plots load v stroke todo: export in materialtools xlsx format Created on Thu Oct 26 09:41:08 2017 @author: dhancock """ import matplotlib.pyplot as plt from . im...
import discord from config.config import Color, Config from discord import app_commands from discord.ext import commands from utils.abc import * class Commands(commands.Cog): def __init__(self, bot): self.bot: Langohrmarodeur = bot async def cog_load(self) -> None: context_menu = app_commands...
# Author : Guru prasad Raju ''' Accept a list of 5 float numbers as an input from the user''' floatNumbers = [] number = int(input("Enter the list size :")) for i in range(0, number): print("Enter number at location", i, ":") item = float(input()) floatNumbers.append(item) print("The user list is", float...
# Scraper for Iowa Appeals Court # CourtID: iowactapp # Court Short Name: iowactapp from . import iowa from juriscraper.AbstractSite import logger class Site(iowa.Site): def __init__(self, *args, **kwargs): super(Site, self).__init__(*args, **kwargs) self.court_id = self.__module__ ...
import time import urllib.parse from typing import Optional, Dict, Any, List from requests import Request, Session, Response import hmac from ciso8601 import parse_datetime class FtxClient: _ENDPOINT = 'https://ftx.com/api/' def __init__(self, api_key=None, api_secret=None, subaccount_name=None) -> None: ...
""" Abstract cog definition. """ import inspect import typing import discord.ext.commands as commands from neko.other import log __all__ = ['Cog', 'inject_setup'] class Cog(log.Loggable): """Cog class definition.""" permissions = 0 @property def name(self): """Gets the cog name.""" ...
from x_rebirth_station_calculator.station_data.station_base import Ware names = {'L044': 'Energy Cells', 'L049': 'Energiezellen'} EnergyCells = Ware(names)
# This Python file uses the following encoding: utf-8 import codecs import sys import getopt import os from learning.PageManager import PageManager import logging from extraction.ExtractionCheck import run_extraction_check import json import urllib2 import chardet from learning.DivListLearner import DivListLearner lo...
""" Various auxliary functions and classes. """ from enum import Enum, auto import numpy as np import speechbrain as sb import torch import torch.nn as nn import torchaudio from speechbrain.dataio.batch import PaddedBatch # noqa from speechbrain.dataio.preprocess import AudioNormalizer from speechbrain.pretrained im...
import torch from torch.nn import Module from torch.nn import init from torch.nn.parameter import Parameter # Acknowledgements: https://github.com/wohlert/semi-supervised-pytorch class Standardize(Module): """ Applies (element-wise) standardization with trainable translation parameter μ and scale p...
##~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~## ## ## ## This file forms part of the Underworld geophysics modelling application. ## ## ...
import datetime from unittest import TestCase from pydisco import utils class UtilsTest(TestCase): def test_snowflake(self): self.assertEqual(utils.DISCORD_EPOCH, 1420070400000) def test_converter(self): self.assertEqual(utils.convert_snowflake_to_datetime(919687180383830018), ...
from flask import Flask, render_template, url_for, request, send_file import scipy.io.wavfile import math from PIL import Image import numpy as np import matplotlib.pyplot as plt import os import sys app = Flask(__name__) os.makedirs(os.path.join(app.instance_path, 'htmlfi'), exist_ok=True) @app.route('/') def index...
"""Support for Sure PetCare Flaps locks.""" from __future__ import annotations from typing import Any from surepy.entities import SurepyEntity from surepy.enums import EntityType, LockState from homeassistant.components.lock import LockEntity from homeassistant.config_entries import ConfigEntry from homeassistant.co...
# СОРТИРОВКА ПУЗЫРЬКОМ nums = [2,5,1,8,7,3,4,6,9] print(nums) for i in range(len(nums)): for j in range(len(nums)-i-1): if nums[j] > nums[j+1]: nums[j], nums[j+1] = nums[j+1], nums[j] print(nums)
"""A Bayesian conjugate gradient method.""" from typing import Callable, Optional def bayescg( A, b, x0=None, maxiter: Optional[int] = None, atol: float = 1e-5, rtol: float = 1e-5, callback: Optional[Callable] = None, ): r"""Bayesian Conjugate Gradient Method. In the setting wher...
def leap_year(year): return (year % 100 != 0 and year % 4 == 0) or year % 400 == 0
import pickle import datetime from google.appengine.ext import db from google.appengine.api import memcache # If you use a datastore model to uniquely identify each user, # let it inherit from this class, like so... # # class UserData(GAEBingoIdentityModel, db.Model) # # ...this will let gae_bingo automatically...
import os os.system('mcrl22lps -v trains.mcrl2 trains.lps') os.system('lps2pbes -v -f nodeadlock.mcf trains.lps trains.nodeadlock.pbes') os.system('pbes2bool -v trains.nodeadlock.pbes') os.system('lps2pbes -v -f infinitely_often_enabled_then_infinitely_often_taken_enter.mcf trains.lps trains.infinitely_often_enabled...
import textwrap as tw from collections import Counter, deque, defaultdict import re from itertools import product def d24(inp): p1, p2 = 0, 0 directions = [(1,0),(1,-1), (0,-1),(-1,0), (-1,1), (0,1)] assert len(directions) == len({*directions,}) inp = inp.replace('ne','0').replace('se','2').replace('s...
import sys import grpc import requests # import the generated classes import services.service_spec.segmentation_pb2_grpc as grpc_bt_grpc import services.service_spec.segmentation_pb2 as grpc_bt_pb2 from services import registry TEST_URL = "https://raw.githubusercontent.com/singnet/dnn-model-services/master/docs/asse...
# -*- coding: utf-8 -*- """Unit test package for tmscc."""
#!/usr/bin/env python # -*- coding:utf-8 -*- """ Time: 2021-04-01 8:32 下午 Author: huayang Subject: my toolkits """
""" Question Source: https://leetcode.com/problems/stone-game-iv/ Level: Hard Topic: Dynamic Programming Solver: Tayyrov Date: 01.22.2022 """ def winnerSquareGame(n: int) -> bool: dp = [False] * (n + 1) for i in range(1, n + 1): j = 1 # check whether it is possible to make a next mo...
from fastapi import APIRouter, Request, Query from typing import List from app.models import CommInfo, GuildInformation, CommentatorProfile, CreateCommentatorProfile, CustomCommands router = APIRouter() def live_mock(num_comms: str): return_list = [] try: num = int(num_comms) except ValueError: ...
# Generated by Django 3.0.8 on 2021-03-17 13:26 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('smart_meter', '0018_auto_20210310_1823'), ] operations = [ migrations.RemoveField( model_name='smartmeter', name='pu...
a = input("Inserire un numero intero a:\n") if a < 0: a = -a print "Il valore assoluto di a e' ", a
import signal from datetime import datetime from tqdm import tqdm import yticker terminate = False def signal_handling(signum, frame): global terminate if terminate: exit(1) else: print("Terminate gracefully...") terminate = True def main(saved='YahooTickerDownloader.pickle'):...
""" Some util functions to plot the figures that appear on the ISMIR paper. ############# 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 lat...
from core.terraform.resources.aws import iam from core.config import Settings from resources.data.aws_info import AwsAccount class ECSRolePolicyDocument(iam.IAMPolicyDocumentData): statement = [ { 'actions': ["sts:AssumeRole"], 'principals': { 'type': "Service", ...
from .devices import data_parallel, empty_cache, find, move_to_device, CPU, GPU
from typing import (Sequence, Optional) import pysweep.databackends.base as base import qcodes.utils.metadata STUPIDAXES = ['None1', 'None2', 'None3'] class DataBackend(base.DataBackend, base.DataSaver): def __init__(self, meas): self.meas = meas # The qcodes measurement object self.runner = None...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 11 2020 Corrects the mobile-ion center of mass trajectory to be in the reference frame of the host lattice. Following Marcolongo & Marzari (2017) Command-line options required: - atoms : crystal structure - template : prefix to the filenam...
#!/usr/bin/env python3 import os import itertools import asyncio from pybricksdev.connections import PybricksHub from pybricksdev.ble import find_device async def main(): # Get all script paths. scripts = [] for (dirpath, dirnames, filenames) in os.walk("."): if dirpath != ".": scr...
""" This file is a part of the source code for the KithscordBot. This project has been licensed under the MIT license. Copyright (c) 2021-present Kithare Organization This file is the main file of kithscord subdir """ import io import signal import sys import discord from kithscord import commands, common, routine ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('channels', '0001_initial'), ] op...
import unittest from splinter import Browser from .fake_webapp import EXAMPLE_APP from .base import WebDriverTests class PhantomJSBrowserTest(WebDriverTests, unittest.TestCase): @classmethod def setUpClass(cls): cls.browser = Browser("phantomjs") @classmethod def tearDownClass(cls): ...
############################################################################### # Copyright 2015-2019 University of Florida. All rights reserved. # This file is part of UF CTS-IT's NACCulator project. # Use of this source code is governed by the license found in the LICENSE file. #######################################...
from dbt.api import APIObject from dbt.logger import GLOBAL_LOGGER as logger from dbt.utils import deep_merge from dbt.contracts.graph.parsed import PARSED_NODE_CONTRACT, \ PARSED_MACRO_CONTRACT COMPILED_NODE_CONTRACT = deep_merge( PARSED_NODE_CONTRACT, { # TODO: when we add 'extra_ctes' back in, ...
import pytest from flaky import flaky import datetime from datetime import * from telegram import Update, User, Message, Chat, InlineKeyboardMarkup, InlineKeyboardButton from ..owepaybot import getCreditors from ..HELPME.bot_sql_integration import * from ..HELPME.helperFunctions import * date = datetime.now().replace...
from pathlib import Path from setuptools import find_packages, setup PACKAGE_ROOT = Path(__file__).parent VERSION = PACKAGE_ROOT / "version.txt" def read_requirements(name: str): p = PACKAGE_ROOT.joinpath(name) reqs = [] for line in p.read_text().splitlines(): if not line or line.startswith("#")...
def EmptyListAsParam(my_list=None): my_list = [] # its better to show empty list here my_list.append('$') return my_list r = EmptyListAsParam() print('returned output 1st iteration: ', r) r1 = EmptyListAsParam() print('returned output 2nd iteration: ', r1) r2 = EmptyListAsParam() print(...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @version: v1.0 @author: Evan @time: 2019/12/5 14:23 """ import torndb conn = torndb.Connection( host='127.0.0.1', database='tornado_20191203', user='root', password='123456', time_zone="+8:00" # 设置时区,不然有8小时的时差 ) # 插入单条记录 def insert_user(u_name, ...
import numpy as np from .aggregate import _aggregate def mask_aggregation(grid, field, mask, method, **kwds): """Aggregate a field value masked by a boolean field. ``mask_aggregation`` calculates aggregate values on a field masked by a second, boolean field. It supports all methods in the `numpy`_ names...
from .config import get_cfg_defaults, save_all_cfg
from arm.logicnode.arm_nodes import * class OnContactArrayNode(ArmLogicTreeNode): """Activates the output when the given rigid body make contact with other given rigid bodies.""" bl_idname = 'LNOnContactArrayNode' bl_label = 'On Contact Array' arm_section = 'contact' arm_version = 1 property0:...
from django.contrib import admin from .models import * @admin.register(Location) class LocationAdmin(admin.ModelAdmin): search_fields = ["interests"] pass @admin.register(Category) class CategoryAdmin(admin.ModelAdmin): search_fields = ["topics"] pass @admin.register(Tag) class TagAdmin(admin.Mode...
""" TASKS: Contiene las tareas que ejecutará la cola de tareas de la aplicación. """ ################################################################################################################################## import pandas as pd import os from flask import render_template, request, redirect, jsonify, make_respon...
""" SEMI-PASSIVE Plugin for Testing for Session Management Schema (OWASP-SM-001) https://www.owasp.org/index.php/Testing_for_Session_Management_Schema_%28OWASP-SM-001%29 """ from framework.dependency_management.dependency_resolver import ServiceLocator DESCRIPTION = "Normal requests to gather session managament info...
# -*- coding: utf-8 -*- """ Created on Tue Feb 14 15:59:11 2017 @author: af5u13 """ #exec(open("/home/andi/dev/visr/src/python/scripts/instantiateCoreRenderer.py").read()) import visr import rcl import panning import pml import rrl import objectmodel import numpy as np; import matplotlib.pyplot as plt blockSize =...
#This file is part of ElectricEye. #SPDX-License-Identifier: Apache-2.0 #Licensed to the Apache Software Foundation (ASF) under one #or more contributor license agreements. See the NOTICE file #distributed with this work for additional information #regarding copyright ownership. The ASF licenses this file #to you un...
import numpy as np from time import gmtime, strftime, localtime import csv import os from os import path import shutil import pandas as pd from pandas.io.parsers import csv from functools import reduce def prep_out_path(out_path): if path.exists(out_path): shutil.rmtree(out_path) os.mkdir(...
#!/usr/bin/env python import pika import json import base64 import time import os import logging import msgpack global connection import msgpack import zlib from web_support_py3.web_access_py3 import Web_Client_Interface() from rabbitmq_support.rabbitmq_rpc_server import Rabbitmq_RPC_Server class Remote_Interface_s...
#!/usr/bin/env python #_*_ coding:utf-8 _*_ from django.shortcuts import render,render_to_response,redirect,HttpResponse from django.http import HttpResponseNotFound from blogweb.models import Article,AboutMe,TagInfo,Toys from django.template.context import RequestContext from common import Page,page_div,article_div,...
from dbio.dss import DSSClient dss = DSSClient() dss.create_version()
# # Copyright (c) 2013-2018 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:...
# -*- coding: utf-8 -*- from flask import Flask app = Flask(__name__) from myapp import views
import fileinput import itertools contents = [int(line.strip()) for line in fileinput.input()] preamble = 25 for number in contents[preamble:]: to_check = itertools.combinations(contents[:preamble], 2) to_check_list = list(to_check) for item in to_check_list: if sum(item) == number: ...
from __future__ import unicode_literals import sys if sys.version_info.major < 3: from unittest2 import TestCase else: from unittest import TestCase from io import IOBase import responses from six.moves.urllib_parse import parse_qs from osctiny import Osc class CallbackFactory: """ Wrapper for call...
#!/usr/bin/python import cv2 import sys from PyQt5.QtWidgets import QWidget, QLabel, QApplication, QPushButton, QListWidget, QProgressBar, QStatusBar, QTabWidget, QTableWidget, QTableWidgetItem, QVBoxLayout, QMainWindow, QAbstractItemView, QLineEdit, QShortcut, QMessageBox from PyQt5.QtCore import QThread, Qt, pyqtSig...
from pathlib import Path from unittest.mock import patch import pytest from click.testing import CliRunner from asphalt.core import cli, Component, Context class DummyComponent(Component): def __init__(self, dummyval1=None, dummyval2=None): self.dummyval1 = dummyval1 self.dummyval2 = dummyval2 ...
#! /usr/bin/env python3 import math import sys import time import ssc32 import spider_body ssc = ssc32.SSC32('/dev/rfcomm0', 9600, count=32) body = spider_body.SpiderBody(ssc) # for i in range(4): # body.stand_up() # time.sleep(1) # body.sit_down() # time.sleep(1) for i in range(4): body.shift_we...
"""This module contains the general information for AdaptorEthGenProfile ManagedObject.""" from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class AdaptorEthGenProfileConsts: ARFS_DISABLED = "Disabled" ARFS_ENABLED = "Enabled" _ARFS_DI...
# -*- coding: utf-8 -*- ''' Convert original recordings to gazelib/common/v1 Execute: $ cd tools/ $ python build-gazelib-common.py ''' import gazelib from gazelib.conversion.icl.gazelibfixtures import common trials = '../original-recordings/recording-001-trials.gazedata' fixation = '../original-recordings/re...