text
stringlengths
3.07k
22.1k
import tkinter as tk from tkinter import filedialog from urllib.request import urlopen from pathlib import Path from tkinter import ttk import numpy as np import base64 import io import re from src.theme import theme from src.algorithm import blosum from src.utils import RichText def qopen(path:str): '''Opens and...
# -*- coding: utf-8 -*- # # ***** BEGIN GPL LICENSE BLOCK ***** # # -------------------------------------------------------------------------- # Blender 2.5 Extensions Framework # -------------------------------------------------------------------------- # # Authors: # <NAME> # # This program is free software; you can ...
# pylint: disable=invalid-name ''' Pytests for the common utilities included in this package. Includes: - conversions.py - specs.py - utils.py To run the tests, type the following in the top level repo directory: python -m pytest --nat-file [path/to/gribfile] --prs-file [path/to/gribfile] ''' from...
import boto3 from botocore.exceptions import ClientError import datetime import pytest from moto import mock_sagemaker from moto.sts.models import ACCOUNT_ID FAKE_ROLE_ARN = "arn:aws:iam::{}:role/FakeRole".format(ACCOUNT_ID) TEST_REGION_NAME = "us-east-1" class MyProcessingJobModel(object): def __init__( ...
# -*- coding: utf-8 -*- import os import torch from torch.autograd import Variable import numpy as np import scipy import matplotlib.pyplot as plt import cv2 import scipy.ndimage import shutil import scipy.misc as misc from PIL import Image def mkdirs(folders, erase=False): if type(folders) is not list: ...
import pybullet_data import pybullet as p import time import numpy as np from src.utils_geom import * from src.utils_depth import * from src.panda import Panda def full_jacob_pb(jac_t, jac_r): return np.vstack((jac_t[0], jac_t[1], jac_t[2], jac_r[0], jac_r[1], jac_r[2])) class pandaEnv(): def __init__(self, ...
# -*- coding:utf-8 -*- from django.db import models import django.utils.timezone as timezone # 用户登录信息表(服务器、虚拟机) class ConnectionInfo(models.Model): # 用户连接相关信息 ssh_username = models.CharField(max_length=10, default='', verbose_name=u'ssh用户名', null=True) ssh_userpasswd = models.CharField(max_length=40, defa...
import json import multiprocessing import os import requests from requests_oauthlib import OAuth1 from time import sleep import tweepy def get_users_single(x,auth,output_folder): while(True): url=f"https://api.twitter.com/1.1/users/lookup.json?user_id={','.join([str(i) for i in x])}" if(type...
import numpy as np import scipy import scipy.linalg as linalg import scipy.spatial import scipy.special import scipy.optimize import sklearn def bases(name): if name == 'linear': f = lambda x: x elif name == 'cubic': f = lambda x: x**3 elif name == 'multiquadric': f = lambda x, s: ...
from __future__ import absolute_import import argparse import logging import multiprocessing import os import sys import uuid from os.path import join, exists import yaml from phigaro.context import Context from phigaro.batch.runner import run_tasks_chain from phigaro.batch.task.path import sample_name from phigaro....
from typing import Dict import numpy as np import torch from torch.nn.functional import linear, log_softmax, embedding from torch.nn import Dropout, LogSoftmax, NLLLoss from allennlp.common import Params from allennlp.models.model import Model from allennlp.data.vocabulary import Vocabulary, DEFAULT_PADDING_TOKEN from...
""" MIT License Copyright (c) 2020-present noaione 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, merge, publis...
"""Association mining -- apriori algo""" __author__ = 'thor' from numpy import * # Modified from: # <NAME> & <NAME> (https://github.com/cse40647/cse40647/blob/sp.14/10%20-%20Apriori.ipynb) # # Itself Modified from: # <NAME> (https://gist.github.com/marcelcaraciolo/1423287) # # Functions to compute and extract associ...
#!/usr/bin/env python from datapackage_pipelines.wrapper import ingest, spew import logging, collections from pipeline_params import get_pipeline_param_rows from google.cloud import storage from contextlib import contextmanager from tempfile import mkdtemp import os import pywikibot import time from pywikibot.pagegener...
from __future__ import print_function import pkgutil import stream_decoders # this module decodes stream based protocols. # and resolves retransmissions. decoders= [] # __path__ is used to find the location of all decoder submodules for impimp, name, ii in pkgutil.iter_modules(stream_decoders.__path__): impload= ...
import inspect import os from collections import Callable from asyncorm.application.configure import get_model from asyncorm.exceptions import AsyncOrmFieldError, AsyncOrmModelDoesNotExist, AsyncOrmModelError from asyncorm.manager import ModelManager from asyncorm.models.fields import AutoField, Field, ForeignKey, Man...
from __future__ import annotations import re from typing import Union import warp.yul.ast as ast from warp.yul.AstVisitor import AstVisitor from warp.yul.WarpException import WarpException class AstParser: def __init__(self, text: str): self.lines = text.splitlines() if len(self.lines) == 0: ...
"""Module containing session and auth logic.""" import collections.abc as abc_collections import datetime from contextlib import contextmanager from logging import getLogger import dateutil.parser import requests from . import __version__ from . import exceptions as exc __url_cache__ = {} __logs__ = getLogger(__pac...
""" Automatic speech recognition scenario """ import logging from typing import Optional from tqdm import tqdm import numpy as np from art.preprocessing.audio import LFilter, LFilterPyTorch from armory.utils.config_loading import ( load_dataset, load_model, load_attack, load_adversarial_dataset, ...
# -*- coding: utf-8 -*- # Copyright (c) 2021 The HERA Collaboration # Licensed under the MIT License """Utilities for dealing with galaxy/QSO catalogs.""" import numpy as np import matplotlib.pyplot as plt from astropy.coordinates import SkyCoord from .util import deg_per_hr _xshooter_ref = "https://ui.adsabs.harva...
# # Defines data that is consumed by the header2whatever hooks/templates # to modify the generated files # import enum from typing import Dict, List, Tuple, Optional from pydantic import validator from .util import Model, _generating_documentation class ParamData(Model): """Various ways to modify parameters""" ...
import os.path as op from urllib.request import urlretrieve import matplotlib import numpy as np from numpy.testing import assert_allclose import pytest import hnn_core from hnn_core import read_params, read_dipole, average_dipoles from hnn_core import Network, jones_2009_model from hnn_core.viz import plot_dipole fr...
#!/usr/bin/env python """ Southern California Earthquake Center Broadband Platform Copyright 2010-2017 Southern California Earthquake Center These are acceptance tests for the broadband platforms $Id: AcceptTests.py 1795 2017-02-09 16:23:34Z fsilva $ """ from __future__ import division, print_function # Import Python...
#!/usr/bin/env python """Command line interface for the compact ACME library.""" import acme_lib import argparse import sys import textwrap def _gen_account_key(account_key, key_length, algorithm): key = acme_lib.create_key(key_length=key_length, algorithm=algorithm) acme_lib.write_file(account_key, key) d...
from CHECLabPy.plotting.setup import Plotter from CHECLabPy.plotting.camera import CameraImage from CHECLabPy.utils.files import create_directory from CHECLabPy.utils.mapping import get_ctapipe_camera_geometry from sstcam_sandbox import get_plot, get_data from os.path import join from matplotlib import pyplot as plt fr...
#!/usr/bin/env python import argparse import os import platform import re import shutil import subprocess import sys SUPPORTED_VERSIONS = ('3.6', '3.7') IS_DEBIAN = platform.system() == 'Linux' and os.path.exists('/etc/debian_version') IS_OLD_UBUNTU = (IS_DEBIAN and os.path.exists('/etc/lsb-release') ...
from collections import OrderedDict from asyncio import TimeoutError, wait from concurrent.futures import FIRST_COMPLETED import time from discord import TextChannel, DMChannel from discord.errors import Forbidden, NotFound from objects.context import Context class PaginatorABC: def __init__(self, bot, looped...
print("\n") print("PythonExercises-v2 by <NAME>") print("\n") print("=== EXERCISE 1 ===") print("\n") print("(a) 5 / 3 = " + str(5 / 3)) print("=> with python3 you can receive a float even if you divide two \ integers") print("\n") print("(b) 5 % 3 = " + str(5 % 3)) print("=> % is the modulus which divides left hand...
import dash import dash_core_components as dcc import dash_bootstrap_components as dbc import dash_html_components as html import pandas as pd import plotly.express as px import plotly.graph_objs as go from datetime import date import dash_loading_spinners as dls from dash.dependencies import Input, Output, ClientsideF...
# Copyright 2021 Touca, Inc. Subject to Apache-2.0 License. from ._types import IntegerType, VectorType, ToucaType from datetime import datetime, timedelta from enum import Enum from typing import Dict, Tuple class ResultCategory(Enum): """ """ Check = 1 Assert = 2 class ResultEntry: """ Wrapp...
"""*********************************************************** *** Copyright Tektronix, Inc. *** *** See www.tek.com/sample-license for licensing terms. *** ***********************************************************""" import socket import struct import math import time import sys echo_cmd =...
#!/usr/bin/env python import drmaa import shlex from optparse import OptionParser from sys import stderr, stdin, exit from datetime import datetime import traceback def Stop(pool, jt, info): '''Job failure function that stops synchronization.''' pool.shall_stop = True pool.all_done = False pool.failed...
import os import requests import urllib3.util.retry import logging import subprocess import re import pprint from datetime import datetime, timedelta import pygit2 from github import Github from github.GithubException import UnknownObjectException # Create logger with logging level set to all LOGGER = logging.getLogg...
import os class Material: def __init__(self, name, color, outputs): self.name = name self.color = color self.outputs = outputs materials = [Material("dilithium", 0xddcecb, ("DUST", "GEM")), Material("iron", 0xafafaf, ("SHEET", "STICK", "DUST", "PLATE")), Material("gold", 0xffff5d, ("D...
import os import sys import json import argparse import progressbar from pathlib import Path from random import shuffle from time import time import torch from cpc.dataset import findAllSeqs from cpc.feature_loader import buildFeature, FeatureModule, loadModel, buildFeature_batch from cpc.criterion.clustering import kM...
# Example of Naive Bayes implemented from Scratch in Python import csv import random import math import xgboost as xgb import matplotlib.pyplot as plt import numpy as np def loadCsv(filename): lines = csv.reader(open(filename, "r")) dataset = list(lines) for i in range(len(dataset)): dataset[i] = [flo...
import sys import gtk from datetime import datetime import gobject from threading import Thread class uiSignalHelpers(object): def __init__(self, *args, **kwargs): super(uiSignalHelpers, self).__init__(*args, **kwargs) #print 'signal helpers __init__' def callback(self, *args, **kwargs): ...
# -*- coding: utf-8 -*- # Copyright (C) 2010-2014 <NAME> <<EMAIL>> # # 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 appl...
import re import cv2 import json import base64 import logging import requests import numpy as np from datetime import datetime import pytz import gridfs import pymongo from pymongo import MongoClient from pymongo.errors import ServerSelectionTimeoutError as MongoServerSelectionTimeoutError import image...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import numpy as np import time import sys import functools import math import paddle import paddle.fluid as fluid import paddle.dataset.flowers as flowers import models import reader import argparse fr...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import copy import contextlib import torch import torch.nn.functional as F from typing import List, Tuple, Dict, Optional from transformers imp...
import pytest from dnaio import Sequence from cutadapt.adapters import Adapter, Match, Where, LinkedAdapter def test_issue_52(): adapter = Adapter( sequence='GAACTCCAGTCACNNNNN', where=Where.BACK, remove='suffix', max_error_rate=0.12, min_overlap=5, read_wildcards=...
#! /usr/bin/env python3 import argparse import atexit import json import os import subprocess import sys import time import unittest from test_device import ( Bitcoind, DeviceEmulator, DeviceTestCase, TestDeviceConnect, TestGetKeypool, TestGetDescriptors, TestSignTx, ) from hwilib.devices...
from .alexnet import alexnet_V2 import tensorflow.compat.v1 as tf import tensorflow.contrib.slim as slim from utils import montage_tf from .lci_nets import patch_inpainter, patch_discriminator import tensorflow.contrib as contrib # Average pooling params for imagenet linear classifier experiments AVG_POOL_PARAMS = {'...
from django.views.generic import ListView, CreateView, UpdateView from django.utils.decorators import method_decorator from django.contrib.admin.views.decorators import staff_member_required from django.shortcuts import get_object_or_404, redirect, reverse from django.urls import reverse_lazy from django.contrib import...
# turingmachine.py - implementation of the Turing machine model # # Copyright 2014 <NAME>. # # This file is part of turingmachine. # # turingmachine 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 versi...
#!/usr/bin/python # vim: set fileencoding=utf-8 : # Copyright 2019 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/LIC...
import re import pprint pp = pprint.PrettyPrinter(indent=4) from sys import version_info # py3, for checking type of input def combine_messages(messages): """ Combines messages that have one or more integers in them, such as "trial001" "trial002", into a single message like "trial# (#=1-2)". Thi...
import numpy as np import unittest from itertools import product from ml_techniques.svm import * class PermutationDataTest(unittest.TestCase): def testpropershape(self): data = np.random.random((10, 4)) labels = np.random.randint(0, 2, 10)*2-1 data_per = permut_data(data) self.a...
from taurex.log import Logger class LinesReader: def __init__(self, lines): self._lines = lines self._count = 0 def skip(self, num=1): self._count += num def read_int(self, skip=1): val = int(self._lines[self._count]) self.skip(skip) return val ...
import os from qaviton.utils import filer from qaviton.utils import path from qaviton.utils.operating_system import s from qaviton.version import __version__ cwd = os.getcwd() examples = path.of(__file__)('examples') def initial_msg(f): def dec(*args, **kwargs): print(""" QAVITON VERSION {} ...
"""dRest core API connection library.""" import re from . import interface, resource, request, serialization, meta, exc from . import response class API(meta.MetaMixin): """ The API class acts as a high level 'wrapper' around multiple lower level handlers. Most of the meta arguments are optionally passed...
#!/usr/bin/env python import os import sys import sqlite3 import pandas as pd import numpy as np from scraper import create_data_folder, read_config from collections import OrderedDict def main(): """ Mainly for debugging purposes. """ config_file = read_config() # Pick a file try: c...
import logging import sys import os from logging.handlers import RotatingFileHandler from multiprocessing.pool import ThreadPool from optparse import OptionParser import requests from requests.packages import urllib3 urllib3.disable_warnings() # Workers configurations ASYNC_WORKERS_COUNT = 100 # How many threads wi...
import contextlib import datetime import json import StringIO from django.contrib.auth import logout as logout_user from django.contrib import messages from django.core.urlresolvers import reverse from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponseRedirect, JsonResponse, Http404,...
# -*- coding: utf-8 -*- """ Created on Mon Jun 29 14:14:45 2020 @author: Nikki """ import numpy as np import cv2 import transform as tform import sys import math import scipy.spatial import markers ###--------------------------------------------------------------------------- # Allows video to be initialized usin...
import re import string import numpy as np from tqdm import tqdm from typing import List from docqa.triviaqa.read_data import TriviaQaQuestion from docqa.triviaqa.trivia_qa_eval import normalize_answer, f1_score from docqa.utils import flatten_iterable, split """ Tools for turning the aliases and answer strings from...
import itertools import os import random import numpy as np import pandas as pd from tqdm import tqdm def _get_steps(): hdf_subdir = "augmentation/" steps = {"step_name": ["prototypical", "single_sources", "mixtures"]} steps_df = pd.DataFrame(steps) steps_df["hdf_path"] = hdf_subdir + steps_df["step_...
from copy import deepcopy import numpy as np def complete_mol(self, labels): """ Take a cell and complete certain molecules The objective is to end up with a unit cell where the molecules of interest are complete. The rest of the atoms of the cell must remain intact. Note that the input atoms are...
"""Tests for aiopvpc.""" import logging from asyncio import TimeoutError from datetime import datetime, timedelta from unittest.mock import patch import pytest from aiohttp import ClientError from aiopvpc import ESIOS_TARIFFS, PVPCData, REFERENCE_TZ from .conftest import MockAsyncSession, TZ_TEST @pytest.mark.param...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# -*- coding: utf-8 -*- import json import os import time import psutil import pyautogui pubg_url = 'steam://rungameid/578080' PROCNAME = "TslGame.exe" CRASH_PROCNAME = "BroCrashReporter.exe" debug_directory = "debug_screenshots" start_state = "HELLO" play_state = "PLAYING" play_timer_max = 60 * 3 matching_state = ...
#! C:\bin\Python35\python.exe # -*- coding: utf-8 -*- ''' Modified for python3 on 2012/04/29 original python2 version is Created on 2011/10/30 @author: tyama ''' import poplib import email.header import string import re import urllib.request import urllib.error import urllib.parse import http.cookiejar import socket ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Parse the FRC drive station logs which are packed binary data # Notes on comparison to DSLog-Parse: # D-P has packet_loss as a *signed* integer, which makes no sense. Unsigned looks sensible. import datetime import math import re import struct import bitstring MAX_...
# pylint: disable=no-self-use import re import pytest from . import AbstractViewsTests, factory_build_layers, get_test_default_layers @pytest.fixture(scope="function") @pytest.mark.usefixtures("dbsession", "transact") def layer_vectortiles_test_data(dbsession, transact): del transact from c2cgeoportal_com...
# -*- coding: utf-8 -*- # Functions and Script to extract data import blocksci import pandas as pd import numpy as np import networkx as nx import multiprocessing as mp import itertools import random import time import string import pickle import csv import gc import os, sys from functools import partial #********...
#!/usr/bin/python # R2D2 Python source code to control the Sphero R2D2 droic # Author: <NAME> # Version: 1.0 # Date: Sept, 2019 # License: LGPL 3.0 # # Based on the reverse engineering work # "Scripting Sphero's Star Wars Droids" # by ~bbraun. # # Thanks to <NAME> who inspired the live chroma key # methodological appro...
import numpy as np from scipy.misc import toimage from scipy.ndimage.filters import gaussian_filter from os import mkdir from os.path import dirname, join from time import time from keras.models import Model from keras.layers import Dense from keras import backend as K from keras.applications.vgg16 import VGG16 # de...
#!/usr/bin/env python3 """ Advent of Code 2020 Day 20: Jurassic Jigsaw https://adventofcode.com/2020/day/20 Solution by <NAME> """ import re from functools import reduce SEA_MONSTER_PROFILE = """ ..................#. #....##....##....### .#..#..#..#..#..#...""" class Tile: def __init__(self, id: int, content)...
import torch.nn as nn import torch from function import normal from function import calc_mean_std decoder = nn.Sequential( nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(512, 256, (3, 3)), nn.ReLU(), nn.Upsample(scale_factor=2, mode='nearest'), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(256, 256,...
# Copyright (c) 2018 <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, merge, publish, distribute,...
import numpy as np import cvxpy as cvx import util def set_contains_array(S, a): """ :param S: list of np.ndarray :param a: np.ndarray :return: contains, 0 or 1 """ contains = 0 for b in S: if not (a - b).any(): # if a contained in S contains = 1 return contains ...
#!/usr/bin/env python # coding=utf-8 import os as os import sys as sys import traceback as trb import argparse as argp import csv as csv import functools as fnt import collections as col import multiprocessing as mp import numpy as np import pandas as pd import intervaltree as ivt def parse_command_line(): """ ...
######################################################################## # Copyright 2021, UChicago Argonne, LLC # # Licensed under the BSD-3 License (the "License"); you may not use # this file except in compliance with the License. You may obtain a # copy of the License at # # https://opensource.org/licenses/BSD-...
from textx.exceptions import TextXSemanticError from cid.parser.model import ParameterCliValue, BoolWithPositivePattern from cid.common.utils import get_cli_pattern_count, is_iterable, element_type # ------------------------------- HELPER FUNCTIONS ------------------------------- def contains_duplicate_names(lst):...
#!/usr/bin/env python """ configuration for faps Provides the Options class that will transparently handle the different option sources through the .get() method. Pulls in defaults, site and job options plus command line customisation. Instantiating Options will set up the logging for the particular job. """ __all_...
import random, pygame import tkinter as tk from tkinter import messagebox pygame.init() def text_format(message, textFont, textSize, textColor): newFont=pygame.font.Font(textFont, textSize) newText=newFont.render(message, 0, textColor) return newText font = "Retro.ttf" class cube(object): rows = 5...
from builtins import range from builtins import object import numpy as np from comp411.layers import * from comp411.layer_utils import * class ThreeLayerNet(object): """ A three-layer fully-connected neural network with Leaky ReLU nonlinearity and softmax loss that uses a modular layer design. We assume ...
"""Support for OPCUA""" import logging import voluptuous as vol from opcua import Client, ua from homeassistant.const import ( ATTR_STATE, CONF_URL, CONF_NAME, CONF_TIMEOUT, CONF_USERNAME, CONF_PASSWORD, EVENT_HOMEASSISTANT_STOP, EVENT_HOMEASSISTANT_START, ) import homeassistant.hel...
#! /usr/bin/python3 # # Copyright (c) 2020 <NAME> <<EMAIL>> # # 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, or (at your option) any later version. #...
import os import re import argparse from collections import defaultdict _AFR_COMPONENTS = [ 'demos', 'freertos_kernel', os.path.join('libraries','abstractions','ble_hal'), os.path.join('libraries','abstractions','common_io'), os.path.join('libraries','abstractions','pkcs11'), os.path.join('lib...
#!/usr/bin/env python # # Copyright (c) 2017 10X Genomics, Inc. All rights reserved. # import cellranger.analysis.io as analysis_io import cellranger.analysis.constants as analysis_constants import cellranger.h5_constants as h5_constants import cellranger.io as cr_io import cellranger.analysis.stats as analysis_stats ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import gg from ggconfig import config ############################################################################## # CONTENT SNIPPETS ############################################################################## def test_logo_url(): assert gg.logo_url(config) == 'h...
# udi dataset process module # modiflied from nuscenes_dataset.py import json import pickle import time import random from copy import deepcopy from functools import partial from pathlib import Path import subprocess import fire import numpy as np import os from second.core import box_np_ops from second.core import...
from .utils import draw_first_k_couples, batch_2x2_inv, batch_2x2_ellipse, arange_sequence, piecewise_arange import torch def stable_sort_residuals(residuals, ransidx): logres = torch.log(residuals + 1e-10) minlogres = torch.min(logres) maxlogres = torch.max(logres) sorting_score = ransidx.unsqueeze(...
import sys, os import time import getopt import pprint try: # doesn't exist on macos from shmem import PyShmemClient except: pass from psana import dgram from psana.event import Event from psana.detector import detectors from psana.psexp.event_manager import TransitionId import numpy as np def dumpDict(di...
import enum import pdb import functools import pathlib from typing import Any, Dict, List, Optional, Tuple, BinaryIO, cast, Union from xml.etree import ElementTree from torchdata.datapipes.iter import ( IterDataPipe, Mapper, Filter, Demultiplexer, IterKeyZipper, LineReader, ) from torchvision.d...
# Copyright (c) 2021 <NAME>. All Rights Reserved. import pymel.core as pm import piper_config as pcfg import piper.mayapy.util as myu import piper.mayapy.convert as convert import piper.mayapy.attribute as attribute from .rig import curve # must do relative import in python 2 def get(node_type, ignore=None, search...
import pandas as pd import json import os import os.path as osp import numpy as np """ python -m spinup.run hyper_search <files> -ae <start from which epoch> make a file that can order the experiments in terms of their performance use this to easily find good hyperparameters when doing hyperparameter search upload thi...
#!/usr/bin/python3 import sys import cut from box import Box from reactor import Reactor from termcolor import colored # -- assert helper def check(what,output,f=None): try: assert(what) except: print("Assert failed, debug output: ",end="") print(output) if f is not None: ...
import time import asyncio import random import pyee import logging from plugins.input_fsx import fsx_pb2 from hexi.service import event _logger = logging.getLogger(__name__) class UDPServer(asyncio.DatagramProtocol): def __init__(self, manager, token): super().__init__() self.manager = manager self...
import argparse from collections import defaultdict import pickle import re import lightgbm as lgb import pandas as pd import numpy as np import xgboost as xgb from ..data_utils import SEG_FP, get_encoded_classes from ..utils import print_metrics from ..metric import get_metrics from .blend import ( score_predict...
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
#!/usr/bin/env python # ------------------------------------------------------------------------------------------------------% # Created by "Thieu" at 17:12, 09/07/2021 % # ...
# # This file is part of snmpsim software. # # Copyright (c) 2010-2017, <NAME> <<EMAIL>> # License: http://snmpsim.sf.net/license.html # # Managed value variation module: simulate a live Agent using # a series of snapshots. # import os, time, bisect from pyasn1.compat.octets import str2octs from pysnmp.proto import rfc...
#encoding: UTF-8 # Copyright (C) 2016 <NAME> # This file is distributed under the terms of the # MIT License. # See the file `License' in the root directory of the present distribution. """ An earlier and now oblosete implementation of functions for computing the thermal expansion tensor as a function of temperatur...
""" The input widgets generally allow entering arbitrary information into a text field or similar. """ from __future__ import absolute_import, division, unicode_literals import ast from base64 import b64decode, b64encode from datetime import datetime from six import string_types import param from bokeh.models.widge...
""" This file is part of pynadc https://github.com/rmvanhees/pynadc Methods to query the NADC Sciamachy SQLite database Copyright (c) 2012-2021 SRON - Netherlands Institute for Space Research All Rights Reserved License: BSD-3-Clause """ from pathlib import Path import sqlite3 # ------------------------------...
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this software and rel...
# Copyright (c) 2015-2017 <NAME> # License: MIT """ nbrun - Run an Jupyter/IPython notebook, optionally passing arguments. USAGE ----- Copy this file in the folder containing the master notebook used to execute the other notebooks. Then use `run_notebook()` to execute notebooks. """ import time from pathlib import P...