text
stringlengths
3.07k
12.6k
import asyncio import time import pytest from ddtrace.context import Context from ddtrace.contrib.asyncio import context_provider from ddtrace.contrib.asyncio.helpers import set_call_context from ddtrace.contrib.asyncio.patch import patch from ddtrace.contrib.asyncio.patch import unpatch from ddtrace.internal.compat ...
""" Functions to generate midi sequences according to formulas """ import numpy as np import mido import config import midi from midi import encode from utils import utils LOWEST_F = 0.01 # 1/f = T: 1/0.01 = 100 s def example(c): mid = mido.MidiFile() track = mido.MidiTrack() t = 0 for i in range(...
#!/usr/bin/env python # use as little libraries as possible # read data.pm informations; implement equivalent functions import re import os import sys import subprocess #import threading if sys.version_info.major == 3: import builtins DATAPM = '/mnt/lustre/scriptsForClusterNew/data.pm' # include and excludes; sinc...
import os import threading from boto3.s3.transfer import MB, S3Transfer, TransferConfig from botocore.exceptions import ClientError from .base import WrongParameterTypeError class ProgressPercentage(object): def __init__(self, logger, filename): self._filename = filename self._bytes_to_transmit ...
import numpy as np import torch from torch.nn import Linear, ReLU, AdaptiveAvgPool1d, AdaptiveAvgPool2d from torch.utils.data import DataLoader import data class BaselineModel(torch.nn.Module): """ avg_pool() -> fc(300, 150) -> ReLU() -> fc(150, 150) -> ReLU() -> fc(150,1) """ def __init__(self, ...
import googleapiclient.discovery from oauth2client.client import GoogleCredentials from google.appengine.api import app_identity import json import base64 import webapp2 from webapp2_extras import jinja2 VERSION = 'v1' class BaseHandler(webapp2.RequestHandler): @webapp2.cached_property def jinja2(self): ...
import logging import string from random import choice from flask import (current_app) from pymongo.errors import DuplicateKeyError from werkzeug.exceptions import Unauthorized from pubgrade.errors.exceptions import ( RepositoryNotFound, URLNotFound, InternalServerError ) logger = logging.getLogger(__nam...
import pytest from django.contrib.auth.models import AnonymousUser from resources.enums import UnitAuthorizationLevel, UnitGroupAuthorizationLevel from resources.models import Resource, ResourceType, Unit from users.models import User from respa_admin import permissions as perm @pytest.mark.django_db @pytest.mark....
from primitiv import Parameter, Device, Model, Shape from primitiv import devices as D from primitiv import initializers as I from primitiv import tensor_functions as tF import numpy as np import unittest import tempfile class TestModel(Model): # NOTE(vbkaisetsu): # Custom models can be created without call...
import math import os import random import numpy as np from gym import utils from gym.envs.mujoco import mujoco_env from generate_maze import calc_lookat from run import c, n from utils import calc_corridors, corridor_number def mass_center(model, sim): mass = np.expand_dims(model.body_mass, 1) xpos = sim.d...
#!/usr/bin/env python # ===================================================================== # # ===================================================================== import os, sys, time import math, re, time import multiprocessing as mp import py3toolbox as tb import math_helper as mh import low_pass_filters as...
from typing import List import logging import numpy as np from .task import Task from rastervision.core.box import Box from rastervision.data.scene import Scene from rastervision.data.label import SemanticSegmentationLabels from rastervision.core.training_data import TrainingData TRAIN = 'train' VALIDATION = 'valida...
import os import hashlib import dateutil.parser import glob import six import sys import shutil import stat # pwd is for unix passwords only, so we shouldn't import it on # windows machines if sys.platform != 'win32': import pwd else: pwd = None def is_grade(cell): """Returns True if the cell is a grade ...
# coding: UTF-8 #Relevant functions are written # This is created 2020/04/17 by <NAME> # This is lastly modified 2020/05/20 by <NAME> import os import sys import math import numpy as np from modules.constants import * # def get_vxvGvGGvGGk(param): alpha = 5.0e-2 beta = 5.0e-2 gamma = 1.0e-1 vx = -param....
import asyncio import os import re from collections import Counter from datetime import datetime import aiofiles import aiohttp import discord import discord_argparse as da from discord.ext import commands from TaoFunc import params from TaoFunc.cartoonify import Cartoonify class Misc(commands.Cog): def __init_...
import logging import re import dns.zone import dns.name import dns.rdatatype import dns.tokenizer import dimcli RECORD = 25 class ParsedRR(object): __slots__ = ('src', 'args') def __init__(self, src, args): self.src = src self.args = args rdata_params = { 'A': lambda rdata: dict(ip=rdat...
import logging import socket from sys import stdout from synchrophasor.frame import * __author__ = "<NAME>" __copyright__ = "Copyright (c) 2016, <NAME>, <NAME>, <NAME>" __credits__ = [] __license__ = "BSD-3" __version__ = "1.0.0-alpha" class Pdc(object): logger = logging.getLogger(__name__) logger.setLevel...
# Run detection on a COCO-format dataset # Only at a fixed rate, not on every frame raise Exception('Not updated with new detection interface') import argparse, json, pickle from os.path import join, isfile, basename from glob import glob from tqdm import tqdm import numpy as np import torch import mmcv ...
# Copyright (c) 2016 MaxPoint Interactive, Inc. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the # following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this list of conditi...
# Copyright 2018 <NAME>, The University of Texas at Austin. # Modifications copyright 2018 <NAME>/<NAME> # We follow the object detection API of Tensorflow # # 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 t...
from django.shortcuts import render_to_response from django.http import HttpResponseRedirect from django.contrib import auth from django.core.context_processors import csrf from django.template import RequestContext from django.contrib.auth.decorators import login_required from django.contrib import messages from user...
import argparse import os import pathlib import pkgutil import sys import tempfile from typing import Optional, NoReturn import attr import fileperms import structlog import toml from passlib.apache import HtpasswdFile from . import exit_err CONFIG: Optional['Config'] = None logger = structlog.get_logger() ENV_SEND...
# ------------------------------------------------------------------------------ # # Project: EOxServer <http://eoxserver.org> # Authors: <NAME> <<EMAIL>> # # ------------------------------------------------------------------------------ # Copyright (C) 2017 EOX IT Services GmbH # # Permission is hereby granted, free o...
"""Main file of the app. Loaded once on server startup!""" import json from flask import Flask, render_template from flask_login import login_required, login_manager from src.controller.home import HomeController from src.controller.platforms import PlatformController from src.controller.games import GameController fro...
# encoding=utf-8 import logging import platform from pathlib import Path import pytest import requests from brunns.matchers.object import has_identical_properties_to from brunns.matchers.response import is_response from hamcrest import assert_that, contains_inanyorder from mbtest.imposters import Imposter, Predicate,...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # File name: vsh_stat.py """ Created on Sat Nov 28 13:04:20 2020 @author: Neo(<EMAIL>) """ import numpy as np from stats_func import (calc_mean, calc_wrms, calc_rse, calc_chi2_2d, calc_gof) # ----------------------------- MAIN ----------------------------- def residua...
import os import shlex import subprocess from typing import List, Optional import tempfile def generate_scp_command(source_files :List[str], destination :str, recursive :bool=False, port :int=22, key_path :str=None, ...
import imp import logging from typing import Optional from discord.ext import commands from discord.ext.commands import bot, Context, Cog import discord from discord import Embed from src.constants import Colours, Emojis from src.utils.time import time_since log = logging.getLogger(__name__) class Information(Cog)...
import math import random def get_nucleotide_count(dna): """ Count the number of each nucleotide in the given DNA string. :param dna: a string of DNA :return: the number of A's, C's, G's, and T's """ a, c, g, t = 0, 0, 0, 0 for i in range(len(dna)): val = dna[i].upper() ...
from abc import abstractmethod import aioreactive as rx import datetime as dt import asyncio import pandas as pd from asyncio import iscoroutinefunction from aioreactive.types import AsyncObserver, AsyncObservable from aioreactive.subject import AsyncMultiSubject from typing import TypeVar, Optional, Callable, Awaitabl...
# -*- coding: utf-8 -*- import random from typing import TYPE_CHECKING, Any, List, Optional import jaconv if TYPE_CHECKING: from .bot import Bot class CaseInsensitiveDict(dict): def __init__(self, v=None, **kwarg): super().__init__(self.casefold(v, **kwarg)) def casefold(self, v, ...
import torch import torch.nn.functional as F from torchvision import transforms import PIL from PIL import Image import numpy as np import matplotlib.pyplot as plt import argparse import os.path from pathlib import Path import glob import sys import pdb from modules.unet import UNet from modules.midas.dpt_depth imp...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright 2016-2018 by I3py Authors, see AUTHORS for more details. # # Distributed under the terms of the BSD license. # # The full license is in the file LICENCE, distributed with this software. # ----------------...
import os import numpy as np np.random.seed(1969) import tensorflow as tf tf.set_random_seed(1969) from scipy import signal from glob import glob import re import pandas as pd import gc from scipy.io import wavfile from keras import optimizers, losses, activations, models from keras.layers import GRU, LSTM, Convolut...
import time import logging import json from amara3 import iri from versa.util import duplicate_statements, OrderedJsonEncoder from versa import I, VERSA_BASEIRI, ORIGIN, RELATIONSHIP, TARGET, ATTRIBUTES from . import BL, BF_INIT_TASK, BF_INPUT_TASK, BF_INPUT_XREF_TASK, BF_MARCREC_TASK, BF_MATRES_TASK, BF_FINAL_TASK ...
import SPARQLWrapper import argparse from collections import defaultdict,OrderedDict import json import re def runQuery(query): endpoint = 'https://query.wikidata.org/sparql' sparql = SPARQLWrapper.SPARQLWrapper(endpoint, agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) C...
import numpy as np from layer import Layer from coder import Coder class Sequencer(object): def __init__(self, sequence_layer, input_layers): self.sequence_layer = sequence_layer self.input_layers = input_layers self.transits = [] def add_transit(self, new_state=None, **input_states):...
import os import torch import pickle import numpy as np from definitions import ROOT_DIR from data.tu_utils import load_data, S2V_to_PyG, get_fold_indices from data.utils import convert_graph_dataset_with_gudhi, convert_graph_dataset_with_rings from data.datasets import InMemoryComplexDataset def load_tu_graph_datas...
#encoding:utf-8 import word_util import numpy as np import codecs def transform_wordseq_to_phrase_weighted(word_seq,word2vec_map,word_weighted_value = None,word_keys = None): phrase_distributed = np.zeros(256) word_freq = {} for word in word_seq: #print("0") if not word_keys: if ...
""" Template code for COMP5623M CW1 Question 2 python explore.py --image_path XX --use_pre_trained True """ import argparse from os import mkdir import matplotlib.pyplot as plt import numpy as np import torch from torchsummary import summary # Set up training arguments and parse parser = argparse.ArgumentParser(...
# -*- coding: utf-8 -*- import traceback import numpy as np from scipy import sparse, spatial from pygsp import utils from pygsp.graphs import Graph # prevent circular import in Python < 3.5 _logger = utils.build_logger(__name__) def _import_pfl(): try: import pyflann as pfl except Exception as e...
import numpy as np import torch import torch.nn as nn from torch import optim from replay_buffer import Batch def get_net( num_in:int, num_out:int, final_activation, # e.g. nn.Tanh num_hidden_layers:int=6, num_neurons_per_hidden_layer:int=64 ) -> nn.Sequential: layers ...
# --- Day 14: Extended Polymerization --- # The incredible pressures at this depth are starting to put a strain on your submarine. The submarine has polymerization equipment that would produce suitable materials to reinforce the submarine, and the nearby volcanically-active caves should even have the necessary input el...
import hashlib from abc import ABCMeta, abstractmethod from itertools import islice from random import Random from tqdm import tqdm from .item_list import ItemList from .logging import logger __all__ = ['SeedGenerator', 'TohuBaseGenerator'] class TohuCloneError(Exception): """ Custom exception """ cla...
# # Copyright 2021 Ocean Protocol Foundation # SPDX-License-Identifier: Apache-2.0 # import json import uuid from datetime import datetime from typing import Any, Dict from eth_typing.encoding import HexStr from eth_typing.evm import HexAddress from ocean_provider.utils.basics import get_provider_wallet from ocean_pro...
import numpy as np import torch from helpers.utils import calculate_accuracy from helpers.constants import SEED_DEFAULT def get_noisy(model, device, test_loader): model.eval() # len_test_loader = len(test_loader) len_data = len(test_loader.dataset) accuracy = [] threshold1 = 0.1/100 #0.1% thr...
import sys sys.path.append('/global/project/projectdirs/openmsi/jupyterhub_libs/anaconda/lib/python2.7/site-packages') from rdkit import Chem from rdkit.Chem import AllChem from rdkit.Chem import Descriptors from rdkit.Chem import rdMolDescriptors """ contribution from <NAME> """ def _InitialiseNeutralisationReactions...
import itertools from enum import Enum from colorama import Fore, Back, Style from time import sleep class IntcodeComputer: def __init__(self, intcode): self.intcode = intcode self.relative_base = 0 self.idx = 0 self.mem_limit = len(self.intcode) def run(self): while True: instr = int(self.intcode[sel...
# import some modules import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # load <NAME>'s data judge = pd.read_csv('datasets/judge.csv') # load <NAME>'s data stanton = pd.read_csv('datasets/stanton.csv') # display all the columbns pd.set_option('display.max_columns', None) # display the las...
import json import datetime import time import boto3 import os import pandas as pd # from pandas.compat import StringIO from io import StringIO def get_job_type(job_type): # complex processing job_type_processed = job_type return job_type_processed def create_training_job(rows): print("In ...
import time import os import gc import sys import linecache import tracemalloc import threading import traceback from collections import defaultdict import objgraph from .server import BackdoorServer from .helper import format_number from .asyncio_tools import get_event_loops, format_async_stack, get_all_tasks _INI...
import numpy as np def recurrence_histogram(time_series, radius, max_distance): """Compute the recurrence histogram from a waveform, as per http://www.biomedical-engineering-online.com/content/6/1/23 Args: time_series (1D array-like): time series over which the recurrence histogram is ...
from typing import Union import datetime import json from bson.objectid import ObjectId class PackJobStatus: PLANNED = "PLANNED" RUNNING = "RINNING" COMPLETED = "COMPLETED" ON_HOLD = "ON HOLD" # hidden from display CLOSED = "CLOSED" # delete from db class Machine: GUSBI = "GUSBI" TIEN...
#!/usr/local/bin/python3 from kafka import KafkaProducer from kafka.errors import KafkaError from kafka.producer.future import RecordMetadata import sys import ssl import json import time import os import gzip from random import randint import datetime import time from collections import OrderedDict import loggin...
import six def check_predicted_evidence_format(instance): if 'predicted_evidence' in instance.keys() and len(instance['predicted_evidence']): assert all(isinstance(prediction, list) for prediction in instance["predicted_evidence"]), \ "Predicted evidence must be a list of (pa...
# -*- coding: utf-8 -*- import os #os.environ["CUDA_VISIBLE_DEVICES"] = "1" import tensorflow as tf import shutil tf.app.flags.DEFINE_string('mode', 'train', 'optional: train, save_pb, eval') tf.app.flags.DEFINE_string('multigpu', 'n','optional: y,n') # params for train tf.app.flags.DEFINE_string('restore_model_pat...
#!/usr/bin/env python3 # # Copyright 2014 Mendix # MIT license, see LICENSE import argparse import cmd import logging import sys import pmCommand import getpass class CLI(cmd.Cmd): def __init__(self, baseurl, username): cmd.Cmd.__init__(self) self._baseurl = baseurl self._username = usern...
from lxml.etree import HTML as LXHTML from lxml.etree import XML as LXML from xdict.jprint import pdir,pobj from nvhtml import txt from nvhtml import lvsrch from nvhtml import fs from nvhtml import engine from nvhtml import utils import lxml.sax import argparse from efdir import fs import elist.elist as elel import es...
# -*- coding: utf-8 -*- from threading import Thread, Event from Queue import Empty, Queue import lxml.html as parser from .functions import fetch_element_att, fetch_element_text, \ fetch_links, fetch_url, parse_content, parse_headers from .events import NewUrlEvent, NewURLDataEvent, NewNoteEvent, send_event from...
# -*- coding: utf-8 -*- # Created by <NAME> on 2019/9/24 import torch import torch.nn as nn from pytorch_transformers import (BertConfig, BertTokenizer, BertModel) from modules.layer_attention import LayerAttention from modules.transformer_layer impo...
#------------------------------------------------------------------------------+ # # <NAME> (<EMAIL> or <EMAIL>) # Racing Line Optimization with PSO # MIT License, Copyright (c) 2021 <NAME> # #------------------------------------------------------------------------------+ import random import time class Particle: de...
from __future__ import absolute_import, division, print_function import numpy as np import numbers import os from scipy.special import erf, erfc from sympy import Symbol, nsolve import tensorflow as tf from tensorflow.python.framework import ops from tensorflow.python.framework import tensor_shape from tensorflow.pyth...
from sys import argv, exit import math import csv import numpy as np from scipy.spatial.transform import Rotation as R import matplotlib.pyplot as plt import os import re from PIL import Image def readData(file): with open(file) as csvFile: csvReader = csv.reader(csvFile, delimiter=',') data = [] for i, row ...
import numpy as np import pandas as pd import matplotlib.pylab as plt import seaborn as sns from sklearn.metrics import roc_curve, auc, roc_auc_score from sklearn.preprocessing import label_binarize from itertools import cycle def missings_plot(df): missinvalues = df.isnull().sum(axis=0)/df.shape[0] missin...
# import keras import tensorflow as tf from tensorflow.keras.models import Model from tensorflow.keras import backend as K from tensorflow.keras.layers import Input, Conv2D, ZeroPadding2D, UpSampling2D, Dense, concatenate, Conv2DTranspose from tensorflow.keras.layers import MaxPooling2D, GlobalAveragePooling2D, MaxPool...
import numpy as np import pandas as pd class Indexer(object): """ Translates words to their respective indices and vice versa. """ def __init__(self, name): self.name = name self.word_to_index = dict() self.word_to_count = dict() # Specify start-and-end-of-sentence tokens ...
from daiquiri.core.renderers import XMLRenderer from daiquiri.core.utils import get_doi_url class AvailabilityRenderer(XMLRenderer): def render_document(self, data, accepted_media_type=None, renderer_context=None): self.start('vosi:availability', { 'xmlns:vosi': 'http://www.ivoa.net/xml/VOSIT...
#!/usr/bin/env python # -*- coding: utf-8 -*- import ecstasy import os import pyperclip import pytest import requests import threading try: from Queue import Queue except ImportError: from queue import Queue from collections import namedtuple import tests.paths import lnk.bitly.link VERSION = 3 API = 'https://ap...
from __future__ import print_function, division import json, time from collections import namedtuple from tqdm import tqdm from multiprocessing import Pool import torch as tr import matplotlib from dataloaders.custom_loader import CustomDataLoader from models.toy.gt.gnode import GNode from models.toy.gan import ToyGAN...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for ProjectsService.""" import pytest from requests import HTTPError from webodm import LOCAL_HOST from webodm.services import ProjectsService from webodm.models import Project class MockResponse: def __init__(self, json_data, status_code): self.jso...
#!/usr/bin/env python # coding: utf8 # # Copyright (c) 2022 Centre National d'Etudes Spatiales (CNES). # # This file is part of Shareloc # (see https://github.com/CNES/shareloc). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You ...
import numpy as np from scipy.io.wavfile import read, write from glob import glob from os.path import join from tqdm import tqdm as tq from utils import * from random import randint import pickle def preprocess(filename): base_array = read(filename)[1].astype(np.float64) array = (base_array[:, 0] + base_array...
from django.shortcuts import render from rest_framework import viewsets, mixins from rest_framework.authentication import TokenAuthentication from rest_framework.permissions import IsAuthenticated from rest_framework import generics from rest_framework import views from rest_framework.decorators import action from res...
from io import StringIO from phonopy import Phonopy from phonopy.structure.cells import get_supercell from phonopy.structure.dataset import forces_in_dataset from phonopy.interface.phonopy_yaml import PhonopyYaml from phonopy.file_IO import ( get_FORCE_SETS_lines, get_BORN_lines, get_FORCE_CONSTANTS_lines, ...
#!/usr/bin/env python3 import re import math import cmath from enum import Enum, auto from functools import reduce INDENT = " " DEFAULT_SPEED = 0.20 DISTANCE_TOL = 0.01 class Tag(Enum): POSITION = auto() MACRO = auto() VERBATIM = auto() class Position: def __init__(self, start, x, y, theta): self.type ...
DEFAULT_THEME = 'blue_dark' DEFAULT_FONT_FAMILY = 'Arial, Helvetica, sans-serif' DEFAULT_FONT_SIZE = 'medium' DEFAULT_TEXT_ALIGN = 'left' class ThemeColors: def __init__(self, header_fg_color, header_bg_color, border, odd_bg_color, even_bg_color): self.header_fg_color = header_fg_color self.header_...
# -*- coding: utf-8 -*- # @Time : 2021/2/10 11:24 上午 # @Author : <NAME> # @fileName: SaDE.py # @Software: PyCharm # @Blog :https://lesliewongcv.github.io/ import numpy as np import matplotlib.pyplot as plt import sys sys.path.append('../') import DifferenceEvolution as DE import GenericAlgorithm as GA NP = 50 ...
# Author: <NAME> <<EMAIL>> import os from warnings import catch_warnings, filterwarnings import mne from mne import pick_types import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from eelbrain import load from eelbrain.testing import assert_dataobj_equal, requires_mne_sample_da...
import os from typing import Dict, Any from fastapi import BackgroundTasks import logging from pydantic import BaseModel import json import csv import numpy as np import io import base64 import datetime from PIL import Image from src.constants import PLATFORM_ENUM, CONSTANTS from src.configurations import PlatformConf...
#!/usr/bin/env python ###################################################################### # Copyright (c) 2016 <NAME>. # All rights reserved. ###################################################################### from __future__ import print_function import sys import os fr...
# The MIT License (MIT) # # Copyright (c) 2013 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, me...
import os import tarfile import pandas as pd import argparse from pathlib import Path import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import seaborn as sns plt.style.use('ggplot') FIGURE_X = 6.0 FIGURE_Y = 4.0 def get_arguments(): parser = argparse.ArgumentParser( description=""...
#!/usr/bin/env python __author__ = "<EMAIL>" import re import sys from collections import Counter, defaultdict from csv import DictReader from pathlib import Path from typing import Any from typing import Counter as counter from typing import Dict, Optional, Set, Tuple, Union import typer from Bio import SeqIO from ...
import argparse import os import sys import unittest from MAPLEAF.SimulationRunners.Batch import main as runBatchSim #### Running Tests #### def _setupPath(): # Make sure we're running from the main MAPLEAF directory cwd = os.getcwd() if os.path.basename(cwd) == "test": os.chdir("..") # Make ...
import datetime import hashlib import random import string import time import flask import flask_login import jwt from personal_site import bcrypt, constants, db, login_manager, mail import personal_site.base.models as base_models import personal_site.profile.models as profile_models @login_manager.user_loader def...
"""This module contains the general information for QueryDependencyContext ManagedObject.""" from ...ucscentralmo import ManagedObject from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta from ...ucscentralmeta import VersionMeta class QueryDependencyContextConsts(): ADMIN_STATE_IDLE = "id...
from pseas.new_instance_selection.new_instance_selection import NewInstanceSelection from pseas.model import Model import numpy as np from typing import Callable, List from scipy import optimize def __compute_distance_matrix__(features: np.ndarray, distance: Callable[[np.ndarray, np.ndarray], float]) -> np.ndarray: ...
import cv2 import numpy as np from PIL import ImageGrab import time import pyautogui as ptg import chess import chess.engine import asyncio from glob import glob ''' Made by <NAME> This script is specifically designed for https://lichess.org, on Windows 10 PLEASE DO NOT USE THIS SCRIPT FOR RATED GAMES This script i...
import theano from theano import In from tqdm import tqdm from maprf.sampling.slice import EllipticalSliceSampling as ESS from maprf.utils import * from collections import OrderedDict class Inference: samplers = None def __init__(self, rf, emt): self.rf = rf flt = rf.filter self.filter = flt self.emt = em...
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. import dace.library import dace.properties import dace.sdfg.nodes from dace.transformation.transformation import ExpandTransformation from dace.libraries.blas import environments from dace import (config, data as dt, dtypes, memlet as mm, SDFG,...
# Decompiled by HTR-TECH | <NAME> # Github : https://github.com/htr-tech #--------------------------------------- # Auto Dis Parser 2.2.0 # Source File : patched.pyc # Bytecode Version : 2.7 # Time : Sat Aug 8 14:41:37 2020 #--------------------------------------- # waste of Time # -*- coding: utf-8 -*- import os,s...
# # Copyright (C) 2014-2019 S[&]T, The Netherlands. # from __future__ import absolute_import, division, print_function import argparse import fnmatch import glob import logging import os import sys import muninn from .utils import create_parser, parse_args_and_run class Error(muninn.Error): pass class Check...
# -*- coding: utf-8 -*- """ @author: <NAME> """ import os import sys import pydicom from pydicom.dataset import Dataset from pydicom.sequence import Sequence def generate_reference_segmentation_tags(dataset_segm, ReferencedSeriesInstanceUID_segm, ...
from abc import ABCMeta, abstractmethod from typing import Dict, Optional, List import re import codecs from collections import OrderedDict import yaml import xml.etree.ElementTree as XmlEt from util.annot_datasets import VocXmlDataset, Bndbox, Size from logging import getLogger, NullHandler logger = getLogger(__n...
import gym from gym import error, spaces, utils from gym.utils import seeding import numpy as np import socket from enum import Enum import math class Status(Enum): INIT = 0 RUNNING = 2 WAITING = 3 ERROR = 99 class GodotCarHelperClient(): def __init__(self): self._ip = '127.0.0.1' self._por...
#!/usr/bin/python # Tic-Tac-Toe # pyGame Demo # <NAME> # 13 May 2002 # import necessary modules import pygame from pygame.locals import * # declare our global variables for the game XO = "X" # track whose turn it is; X goes first grid = [ [ None, None, None ], \ [ None, None, None ], \ [ None, ...
from __future__ import print_function from six.moves import socketserver import getpass import logging import socket import struct import sys import os from six.moves import input from artemis.config import get_artemis_config_value ARTEMIS_LOGGER = logging.getLogger('artemis') def one_time_send_to(address, port, me...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import rospy from geometry_msgs.msg import Twist from nav_msgs.msg import Odometry from sensor_msgs.msg import LaserScan, Image import tf import cv2 import cv_bridge import math def sign(x): return math.copysign(1, x) class Point(object): def __init__(self, po...
import numpy as np import pandas as pd from sklearn.base import TransformerMixin, BaseEstimator from collections import Counter import eif class OutlierIQR(TransformerMixin, BaseEstimator): """ Documentation: --- Description: Identifies outliers using inter quartile range (IQR)...
import asyncio import concurrent.futures import math from dataclasses import asdict, dataclass from decimal import Decimal from typing import ( Any, Awaitable, Callable, Dict, Iterable, List, NamedTuple, NoReturn, Optional, TypeVar, Union, cast, ) import pandas as pd im...