text
stringlengths
3.07k
22.1k
#!env python3 import os import sys import time import json import random import threading import socketserver from enum import Enum import pygame import config import assets import utils LADYBUGS_ORDERS = ('N', 'S', 'W', 'E', 'X') MEADOW_SIZE = int(config.SERVER_WINDOW_SIZE[0] * 0.75), int(config.SERVER_WINDOW_SIZ...
# -*- coding: utf-8 -*- #Figure 8.1 class IntSet(object): """An intSet is a set of integers""" #Information about the implementation (not the abstraction) #Value of the set is represented by a list of ints, self.vals. #Each int in the set occurs in self.vals exactly once. def __init__(self): ...
""" Convert an image sequence to a PLY point cloud. Installation ============ Using pip :: pip install img2ply If you prefer to install from source code use :: cd img2ply/ python setup.py install Usage ===== From the command line :: img2ply -h img2ply [-h] -o PLY -bb BOUNDINGBOX B...
import logging import os import shutil from functools import partial from multiprocessing.pool import ThreadPool from descriptions.descriptions_downloader import (check_and_get_checker, download_from_wikipedia_tags, dow...
"""Functions to compute traits at the single-region level.""" import numpy as np import skfmm from skimage.measure import find_contours, approximate_polygon from ..segment import interface_endpoints_coords, edge_between_neighbors from ..utils import points_to_angle def measure_one_hemijunction(cell_s, cell_r, interf...
import os import pandas as pd from grdb.database.v1_1_0 import ( sample, preparation_step, recipe, properties, raman_set, raman_file, raman_spectrum, sem_file, ) from sqlalchemy import String, Integer, Float sql_validator = { "int": lambda x: isinstance(x.property.columns[0].type, ...
# =============================================================================== # Copyright 2015 <NAME> # # 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/LI...
""" support module continaing tool functions for mosk """ __author__ = '3Peso' __all__ = ['get_userfolders', 'md5', 'run_terminal_command', 'str_to_bool', 'format_bytes', 'validate_file_signature'] import json import locale import logging import os import socket import sys import time import struct import...
""" ==================================================================================================== This script was developed to create a diagnostics report from the csv logfile generated during video recording with the synchFLIR RECtoBIN and BINtoAVI scripts. After recording hardware triggered, synchronized imag...
from __future__ import absolute_import, division, print_function # LIBTBX_SET_DISPATCHER_NAME phenix.emma # LIBTBX_SET_DISPATCHER_NAME iotbx.emma from iotbx import crystal_symmetry_from_any import iotbx.pdb from iotbx.cns import sdb_reader from iotbx.kriber import strudat from iotbx.option_parser import option_parser ...
import copy import os import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns import tensorflow as tf from tensorflow.core.util import event_pb2 import os.path as osp import tensorboard as tb from tensorboard.backend.event_processing import event_accumulator import json sns.set(st...
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function from __future__ import division from __future__ import absolute_import import collections import datetime import re f...
#!/usr/bin/python # Copyright (c) 2018-2021 Advanced Micro Devices, Inc. All rights reserved. # Utility Python Script to generate GPA projects on Windows and Linux import os import sys import shutil import subprocess import argparse # Specify the type of Build files to generate cmake_generator=None cmake_generator_pl...
from bisect import bisect from ..libmp.backend import xrange class ODEMethods(object): pass def ode_taylor(ctx, derivs, x0, y0, tol_prec, n): h = tol = ctx.ldexp(1, -tol_prec) dim = len(y0) xs = [x0] ys = [y0] x = x0 y = y0 orig = ctx.prec try: ctx.prec = orig*(1+n) ...
#!/usr/bin/env python3 import argparse import json import logging import os import shutil import signal import subprocess import sys import time # Hardcoded configuration values SYSTEM_INIT_BIN = "/usr/sbin/init" DETECT_PRIMARY_CARD_BIN = "/usr/local/bin/detect-primary-card" GLUON_JAVAFX_PATH = "/opt/javafx-sdk" JAVA_...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ IFC model and criterion classes. Modified by the authors of Video Instance Segmentation using Inter-Frame Communication Transformer. """ import torch import torch.nn.functional as F from torch import nn from ..util.misc import (NestedTensor, ne...
import logging import os import traceback import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Output, Input from dash.exceptions import PreventUpdate from plotly import graph_objects from .dash_app import DashApp from ._plotly_plots import plot_scalars from .player_con...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import os import time import numpy as np import torch import torch.optim as optim import torch.nn.functional as F import torch.nn as nn from torchvision import datasets, transforms import util.datas...
import datetime import pytest from taxi.exceptions import ParseError from taxi.timesheet import DateLine, Entry, TextLine from taxi.timesheet.parser import TimesheetParser, create_time_from_text, trim def test_extract_date_dot_separator(): assert TimesheetParser().create_date_from_text('1.1.2010') == datetime.d...
# # -*- coding: utf-8 -*- # # Copyright (c) 2019 Intel 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 app...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is a part of EM Media Handler # Copyright (c) 2014-2021 <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 restrictio...
# -*- coding: utf-8 -*- # Copyright (c) 2016-2017 by University of Kassel and Fraunhofer Institute for Wind Energy and # Energy System Technology (IWES), Kassel. All rights reserved. Use of this source code is governed # by a BSD-style license that can be found in the LICENSE file. from time import time from numpy ...
import numpy as np from .utils import * from .signal import * from .wavelets import * from .hilbert import * __all__ = ["mera1d", "mera2d"] class mera1d: """1D Gaussian MERA for approximate ground state of free-fermion Hamiltonian at half filling.""" def __init__(self, h, g): """The wavelet instance...
# Copyright 2020 The Flax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
import praw import re import sys import os import json import webbrowser import textwrap import spotipy from configparser import ConfigParser, RawConfigParser import argparse from constants import pun_dict from constants import ft_set from models import User import cutie def createUserConfig(user, config_path='.config...
import ctypes import os import pickle import threading import time from collections import deque import mh_z19 import Adafruit_DHT import RPi.GPIO as GPIO import matplotlib.pyplot as plt from PIL import Image, ImageDraw, ImageFont import io from ping3 import ping from PAJ7620U2 import PAJ7620U2 class StoppableThread...
import numpy as np import matplotlib.pyplot as plt import os import sys import cv2 import random import torch import torch.utils.data as data from math import sqrt from itertools import product import pandas as pd from torch.autograd import Function import torch.nn as nn import torch.nn.functional as F import torch....
import tensorflow as tf import numpy as np import tensorflow.contrib.eager as tfe import os from nalu import * import argparse import random tf.enable_eager_execution() parser = argparse.ArgumentParser(description='train and test setting') parser.add_argument('--train_size', default = 1000) parser.add_argument('--te...
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT General Asset Processor Batch Tests """ # Import builtin libraries import pytest import logging import os import r...
from flask import Flask, render_template, request import pandas as pd import folium import base64 from folium import IFrame app = Flask(__name__) @app.route('/') def index(): return render_template('index.html') # generate a new map folium_map = folium.Map(location=[39.21957070048458, -94.60270442968064], ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Flango: A simple WSGI based webframework for learning. Flango is a WSGI based webframework in pure Python, without any third-party dependency. flango include a simple router, which provide the request routing, a template engine for template rendering, a simple wrapper...
# coding=utf-8 # main codes, call functions at stokes_flow.py # <NAME>, 20160410 import sys import petsc4py petsc4py.init(sys.argv) import numpy as np from src import stokes_flow as sf from src.stokes_flow import problem_dic, obj_dic from petsc4py import PETSc from src.geo import * from time import time import pick...
import numpy as np import matplotlib.pyplot as plt import torch.nn.functional as F import torch.nn as nn import glob import os, sys import torch from torch.utils.data import Dataset, DataLoader from torchvision import transforms, utils import cv2 import json import argparse from scipy.stats import multivariate_normal f...
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
from algorithms.base import BaseEstimator from sklearn.neighbors import NearestNeighbors import psutil import numpy as np import sklearn.preprocessing import faiss import deann as kde import time import pandas as pd # This is a modified copy of the following file: # https://github.com/erikbern/ann-benchmarks/blob/ma...
import json import pytest import random from conftest import get_api_data from assemblyline.odm.models.service import Service from assemblyline.odm.randomizer import SERVICES from assemblyline.odm.random_data import create_users, wipe_users, create_services, wipe_services @pytest.fixture(scope="module") def datasto...
import os import random from enum import Enum from sys import platform import numpy as np import tensorflow_datasets as tfds import torch from tqdm import tqdm from modules.ExtendedMosesTokenizer import ExtendedMosesTokenizer class Splits(Enum): TRAIN = 1 VALID = 2 TEST = 3 class Corpus(object): d...
from osgeo import osr, gdal import numpy as np import struct from datetime import datetime, timedelta import statistics from utilities import * from constants import * from pyrate.configuration import Configuration import time import multiprocessing as mp import pathlib def convert_dem_interferogram(parameters): ...
import copy as cp import sys import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from sklearn import metrics from sklearn.metrics import mean_squared_error from sklearn.metrics import r2_score #import xlrd from sklearn.linear_model import LinearRegression from sklearn.pipeli...
import tensorflow as tf import numpy as np import functools def op_scope(fn, name=None): if name is None: name = fn.__name__ @functools.wraps(fn) def _fn(*args, **kwargs): with tf.name_scope(fn.__name__): return fn(*args, **kwargs) return _fn def pynum(u): return isinst...
from iminuit import util import pytest from argparse import Namespace from numpy.testing import assert_equal, assert_allclose import numpy as np from iminuit._core import MnUserParameterState def test_ndim(): ndim = util._ndim assert ndim(1) == 0 assert ndim([]) == 1 assert ndim([[]]) == 2 assert ...
from __future__ import unicode_literals from __future__ import absolute_import, division, print_function """ Annalist test initialization support """ __author__ = "<NAME> (<EMAIL>)" __copyright__ = "Copyright 2015, <NAME>" __license__ = "MIT (http://opensource.org/licenses/MIT)" import logging log = loggi...
#!/usr/bin/env python2 # # Copyright 2010 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Script to checkout the ChromeOS source. This script sets up the ChromeOS source in the given directory, matching a particular ...
# ProDy: A Python Package for Protein Dynamics Analysis # # Copyright (C) 2010-2012 <NAME> # # 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 opti...
import ssl from socketserver import ThreadingMixIn, TCPServer, BaseRequestHandler from threading import Lock import socket import platform, os, sys, getopt from rkclusterlock import RKClusterLock import rkutils import logging help_str = ''' helo : Welcome message from server reg <app_name> : Register a ne...
import torch import torch.nn as nn import torch.nn.functional as F from collections import OrderedDict __all__ = ['densenet'] def init_model(model): # Official init from torch repo. for m in model.modules(): if isinstance(m, nn.Conv2d): nn.init.kaiming_normal_(m.weight) elif isins...
# -*- coding: utf-8 -*- import sys import os sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from backend.dataset_hub.ecrec_datasets import ECRecDatasetLocal from backend.model_hub.ecrec_model import ECRec import torch from backend.task_backbone import task_dispatcher from onnx_test.ecrec_o...
import math from math import pi from typing import Iterator, Tuple, Union, Optional from dataclasses import dataclass from kerbal_utils import Body, bodies KERBIN_RADIUS: float = 600000 @dataclass class Scanner: min_alt: int best_alt: int max_alt: int fov: float SCANNERS = {'R-3B Radar Altimeter': ...
import numpy as np import tensorflow as tf import FLAGS import os import pickle import time import sys sys.path.append('./util/') import util.util_test_OULU_Protocol_1 as util_OULU from generate_data_test import input_fn_maker from generate_network import generate_network as model_fn flags=FLAGS.flags our_checkpoint_...
import json import logging import pytest from rasa.core import utils logger = logging.getLogger(__name__) def test_hangouts_channel(): from rasa.core.channels.hangouts import HangoutsInput import rasa.core input_channel = HangoutsInput( project_id="12345678901", # intent name for bot ...
__author__ = '<EMAIL>' import datetime from models import transforms from models.models import Student from models.models import EventEntity from models import utils as models_utils from models import jobs from models import event_transforms from models.models import QuestionDAO from models.models import QuestionGr...
#!/usr/bin/env python3 # # MIT License # # (C) Copyright 2022 Hewlett Packard Enterprise Development LP # # 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 withou...
# -*- coding:utf-8 -*- import re from flask_restful import Resource, reqparse, request from flask import g from common.log import loggers from common.audit_log import audit_log from common.db import DB from common.utility import uuid_prefix, salt_api_for_product from common.sso import access_required import json from...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Modbus TestKit: Implementation of Modbus protocol in python (C)2009 - <NAME> - <EMAIL> (C)2009 - Apidev - http://www.apidev.fr This is distributed under GNU LGPL license, see license.txt The modbus_tk simulator is a console application which is running...
#!/usr/bin/env python2.7 import sys sys.path.insert(0, 'buildlib/jinja2.egg') sys.path.insert(0, 'buildlib') import re import tarfile import os import shutil import subprocess import time import zipfile import jinja2 import configure import plat # If we have python 2.7, record the path to it. if sys.version_info.m...
# Copyright 2020 HTCondor Team, Computer Sciences Department, # University of Wisconsin-Madison, WI. # # 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/LICE...
import collections import sys from lark import Lark, Transformer, Tree, UnexpectedInput from asm import Assembler l = Lark(open("cpu_ah_16/zz.g").read()) class Variable: def __init__(self, name, addr, typename): self.name = name self.addr = addr self.signed = typename[0] == "i" ...
r""" Conecyl Data-Base (:mod:`desicos.conecylDB.conecylDB`) ====================================================== .. currentmodule:: desicos.conecylDB.conecylDB """ from __future__ import absolute_import import json import os from desicos.logger import * from .ccs import ccs as default_ccs from .ccs import include_...
"""Shacal-1 cipher.""" from arxpy.bitvector.core import Constant from arxpy.bitvector.operation import Operation, BvComp from arxpy.bitvector.extraop import PopCount from arxpy.bitvector.operation import RotateLeft as ROL from arxpy.differential.difference import XorDiff from arxpy.differential.derivative import Deriv...
# -*- coding: utf-8 -*- ''' Mrknow TV Add-on Copyright (C) 2016 mrknow 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) an...
# @license # Copyright 2016 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.autograd import Function from torch.utils.data import Dataset, DataLoader import time, os import argparse from gesture import celexEvalOnce step = 40 dt = 40 a = 0.5 aa = 0.25 # a /2 Vth = 0.3 tau =...
from datetime import datetime from os import getenv from bake import * from scheme import * from lattice.support.buildfile import BuildFile from lattice.tasks.component import ComponentAssembler class AssembleProfile(Task): name = 'lattice.profile.assemble' description = 'assembles a lattice profile' para...
""" This module contains implementation of evaluation of Silvera models. """ import os import warnings from collections import defaultdict from .registration import EvaluationDesc, FORMAT_STR, FORMAT_MD class Evaluator: """Performs evaluation of model based on following metrics: Weighted Service Interface Co...
# org_builder.py __version__ = '0.0.2' import argparse import logging import os import sys import org_config as cf import sfdx_cli_utils as sfdx # Set the working directory to the location of the file. # dir_path = os.path.dirname(os.path.realpath(__file__)) os.chdir(dir_path) # Set the Log level # logging.basicCon...
#!/usr/bin/env python """TcEx Framework LayoutJson.""" # standard library import json import logging import os from collections import OrderedDict class AppFeatureAdvanceRequest: """AdvancedRequest Module""" def __init__(self, lj, json_data, prefix): """Initialize Class properties.""" self.lj...
# -*- coding: utf-8 -*- """ Program to simulate waves on a string. """ import math as m import numpy as np import matplotlib.pyplot as plt # helping routines def bump_func(xs_arg, low, high, btype): """ Setup initial displacement distribution of a bump, either sine or triangular. """ # check the c...
# Copyright (c) 2013, 9T9IT and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from itertools import groupby from operator import itemgetter import json def execute(filters=None): columns = get_columns(filters) data = get_dat...
import io from functools import partial from os import path as osp from typing import Union, Type, Iterable from unittest import TestCase from pylinac.core.geometry import Point from pylinac.core.io import retrieve_demo_file from pylinac import DRGS, DRMLC from pylinac.vmat import VMATResult from tests_basic.utils im...
from django import forms from django.db.models import Q from django.utils.translation import ugettext_lazy as _ from django.core.exceptions import ValidationError, ImproperlyConfigured from django.urls import reverse from crispy_forms.layout import Field from accounts.forms import UserChoiceField, UserMultipleChoiceF...
"""Provides a high-level interface for metadata media providers.""" from abc import ABC, abstractmethod from datetime import date, datetime as dt from os import environ from typing import Generator, Optional from mnamer.endpoints import * from mnamer.exceptions import MnamerException, MnamerNotFoundException from mna...
# -*- coding: utf-8 -*- ''' @author: longxin @version: 1.0 @date: @changeVersion: @changeAuthor: @description: 所有任务实体 ''' import json class MyEncoder(json.JSONEncoder): def default(self, o): import numpy if isinstance(o, bytes): return str(o, encoding='utf-8') if isinstance(o,...
import os import numpy as np from sklearn.base import BaseEstimator, TransformerMixin from collections import Mapping class Formatter(TransformerMixin, BaseEstimator): def __init__(self, basis=None): """ Formatter allows to convert between the np.ndarray and the dictionary format of basis set rep...
# Copyright (c) testtools developers. See LICENSE for details. """Evil reactor-spinning logic for running Twisted tests. This code is highly experimental, liable to change and not to be trusted. If you couldn't write this yourself, you should not be using it. """ __all__ = [ 'NoResultError', 'not_reentrant'...
import os import sys import argparse import __main__ as main import pandas as pd import numpy as np import pysam import vcf from ast import literal_eval pd.options.mode.chained_assignment = None #+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+# # Parse SV input file to desired format ...
import argparse import os import sys import warnings import pandas as pd import torch import torch.nn as nn import torch.backends.cudnn as cudnn import torch.optim import torch.utils.data import torchvision.transforms as transforms import torchvision.models as models from simplified import Dataset_csv_test from shuff...
"""Linear Quadratic Regulator (LQR) utilities """ import numpy as np import scipy from termcolor import colored import matplotlib.pyplot as plt from matplotlib.ticker import FormatStrFormatter def get_arr_str(vector, str_format_arg=".2f"): str_format = "{:%s}" % str_format_arg vector_str = [str_format.format...
import argparse import sys import inspect import inflection import os import importlib.machinery from twisted.internet import defer import manof import manof.utils import core.update_manager class RootTarget(manof.Target): @property def name(self): # override default behavior of "root_target" ...
from django.conf import settings from django.utils import timezone from django.db import models from django_countries.fields import CountryField import eosapi import time import json import secrets import base58 import hashlib from django.db.models.signals import pre_save from django.dispatch import receiver from decim...
""" player.py --------- The player class handles pretty much everything involving players and their input/output. """ from libs.log import log import textwrap, glob, hashlib, datetime def hash(string): # Get the sha1 hash of the provided string. return hashlib.sha1(string.encode("utf8")).hexdigest() #...
# Copyright 2014 eBay Software Foundation # Copyright [2015] Hewlett-Packard Development Company, L.P. # 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 # # ...
#!/usr/bin/env python # Copyright 2014-2016 Open Source Robotics Foundation, Inc. # # 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 # # Unles...
import uuid import copy import logging import yaml from approxeng.task import register_task, Task, TaskStop from enum import Enum, unique from abc import abstractmethod LOG = logging.getLogger('approxeng.task.menu') @unique class MenuAction(Enum): select = 1 next = 2 previous = 3 up = 4 class MenuT...
import argparse import cProfile import json import os from time import time import numpy as np import joblib import sklearn import cv2 from sklearn.decomposition import PCA from sklearn.kernel_approximation import Nystroem from sklearn.svm import LinearSVC from sklearn.pipeline import Pipeline from sklearn.preprocessin...
import getpass import os class General: infinibandIp = { 'euler01': '192.168.0.11', 'euler02': '192.168.0.12', 'euler03': '192.168.0.13', 'euler04': '192.168.0.14', 'euler05': '192.168.0.15', 'euler06': '192.168.0.16', 'euler07': '...
#!/usr/bin/python3 import sys import subprocess from Bio import SeqIO import argparse import logging import os import csv import shutil import re import textwrap def run_blast(matchfile, inputfile, output_dir, identity='90' ): log = logging.getLogger('run_blast') if not os.path.exists(output_dir): ...
from django.core.files import File from .models import ReportTemplate from main.models import Attach, Proj, Vuln, RISK from docx import Document from docx.enum.text import WD_ALIGN_PARAGRAPH, WD_BREAK from docx.oxml import OxmlElement from docx.oxml.ns import qn from docx.shared import Inches, Pt, RGBColor import ma...
import os import traceback import discord import time import asyncio import sys TOKEN = os.environ['DISCORD_BOT_TOKEN'] # ローカルで実行する際は、上のTOKEN宣言をコメントアウトして、以下の'xxxxxxx'に自分のBotのアクセストークンに置き換えてください # TOKEN = '<KEY>' intents = discord.Intents.default() intents.members = True client = discord.Client(intents...
#<NAME>, November 11, 2020 #Server Version Two: #This program will connect to several clients at once and send data between them #When a new user connects to the server a new thread is created #The user can select from the following commands: # 1. who - server returns a list of logged in users # 2. send all - Server se...
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException import os import requests import time import hashlib size_options =...
""" Threading class for MIDI playback. We distinguish between simple Midi playback in the class `MidiThread` and performance rendering through the Basis Mixer in class `BMThread`. In both cases, the outputs will be Midi events. """ import threading import time import mido import numpy as np import json ...
from absl import app, flags import pdb flags.DEFINE_string('suffix', '', 'suffix to name') flags.DEFINE_boolean('kp', False, 'without kp') flags.DEFINE_string('parts_file', 'dcsm/part_files/bird.txt', 'parts file') flags.DEFINE_string('category', 'bird', 'bird') def birds_kp( name, parts_file, ): command ...
''' File: model_ml.py Project: model File Created: Monday, 17th August 2020 4:17:57 pm Author: <NAME> (<EMAIL>) ----- Last Modified: Tuesday, 18th August 2020 3:24:14 pm Modified By: <NAME> (<EMAIL>>) ----- Copyright 2020 <NAME> ''' from letcon.src.metrics.classification import ClassificationMetrics from letcon.src.met...
#!/usr/bin/python2.4 # # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
# coding=utf8 from __future__ import unicode_literals, absolute_import, division, print_function """ This is the SpiceBot Channels system. """ import sopel from sopel.tools import Identifier from sopel.config.types import StaticSection, ValidatedAttribute, ListAttribute import re import threading from .Config import ...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Mon Jun 11 12:50:13 2018 @author: madcas """ import math import numpy as np import h5py import matplotlib.pyplot as plt import scipy from PIL import Image from scipy import ndimage import tensorflow as tf from tensorflow.python.framework import ops from cn...
from .Battleships import Battleships from . import References from os import system, name import time # DONE move algorithm to set ship locations into cli, and remove from player class # TODO (low) change coord system in cli to use letters and then numbers # DONE move function to get shot coords from player into cli. ...
""" Types used on a per-build basis. """ __author__ = "<NAME>" __date__ = "2012-11-09" __all__ = [ "Context", "resolve", ] from _compat import * from collections import deque from functools import partial from itertools import product from itertools import starmap from mybuild.core import * from mybuild.p...
# -*- coding:utf-8 -*- - import rospy import math import time import numpy as np np.random.seed(1) from nav_msgs.msg import Odometry from tf_rl.envs import gazebo_env from geometry_msgs.msg import Twist, Pose, Quaternion, Vector3, Point from std_srvs.srv import Empty from gazebo_msgs.srv import SetModelState, GetMode...
#!/usr/bin/env python3 import sys import subprocess import argparse import os import re import glob args = None class RetCode(): OK, ERROR, ARG, WARNING = range(4) class Node(): def __init__(self, filename): self.name = '"{}"'.format(filename) self.filename = filename self.in...