text
stringlengths
6.04k
39.5k
""" Mask R-CNN Train on the bubble dataset and show color mask. Copyright (c) 2018 Matterport, Inc. Licensed under the MIT License (see LICENSE for details) Written by <NAME> ------------------------------------------------------------ 2020. 12. Modified by <NAME> ------------------------------------------------------...
import sys from dataclasses import dataclass import logging import curses from tx.functional.either import Left, Right from coloredtext import ColoredText, toColoredText logging.basicConfig(filename="qctool.log", filemode='a', format='%(asctime)s,%(msecs)d %(name...
import time import multiprocessing from pathlib import Path from .main_utils.dict_util import Tuning_dict from .main_utils.utils import Timer import numpy as np from .Sampling.gp import util from .Sampling.test_common import Tester from .Sampling.BO_common import random_hypersphere from .Sampling.gp.GP_models import G...
#****************************************************# # This file is part of OPTALG. # # # # Copyright (c) 2019, <NAME>. # # # # OPTALG is released under the BSD 2-clause license. # #*****...
#!/usr/bin/python2 from datetime import datetime import pcbnew import wx import os import re import json import logging import sys sys.path.append(os.path.dirname(__file__)) import units logging.basicConfig(level=logging.INFO, stream=sys.stdout, format="%(asctime)-15s %(levelna...
""" PFHub Benchmark 1: Spinodal Decomposition Implemented using FEniCS by <NAME> (@tkphd, <<EMAIL>>) with substantial optimization from Nana Ofori-Opoku (@noforiopoku) 𝓕 = ∫{𝐹 + ½⋅𝜅⋅|∇𝑐|²}⋅d𝛀 𝐹 = 𝜌⋅(𝑐 - 𝛼)²⋅(𝛽 - 𝑐)² 𝜕𝑐/𝜕𝑡= ∇⋅{𝑀 ∇(𝑓 - 𝜅∇²𝑐)} 𝛀 = [0,200) × [0,200) Endpoint detectio...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Use GitLab API to: 1) list gitlab users info 2) automate user account creation/deletion """ from __future__ import print_function from builtins import super, str, input try: from itertools import zip_longest # python3 except ImportError: from itertools...
""" * Author : <NAME> * Project : Server Password Managment System * AppName : PROFFER * Date : 24-May-2018 * Version : 1.0.0 * Database: PostgreSQL """ from django.shortcuts import render, redirect from django.contrib.auth import logout from django.db import IntegrityError from portal.models import * import sys, os...
import asyncio import discord from discord.ext import commands from discord.ext.commands import command, Cog from py_cord_components import ( Button, ButtonStyle, Select, SelectOption, Interaction ) from tools.database_tool import economy_caching,dump_economy_caching,challenge_caching,dump_challeng...
from __future__ import print_function """ ovm.py TODO: Define a VM that doens't use exceptions for control flow! """ import operator # for + - * / etc. import os import sys import repr as repr_lib from .pyvm2 import debug1 from ..lib import dis # Create a repr that won't overflow. repr_obj = repr_lib.Repr() rep...
# Copyright 2021 Cortex Labs, 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 wri...
#!/usr/bin/python3 # -*- coding: utf-8 -*- """Cisco ACIのスイッチにSSH接続して実行したshow ip route vrf allの結果をパースします 2021/07/03 初版 """ __author__ = '<NAME>' __version__ = '0.1' __date__ = '2021/07/03' # # 標準ライブラリのインポート # import re import os import sys from typing import Text import typing # # 外部ライブラリのインポート # HAS_TEXTFSM = True...
import sys import asyncio import contextlib import datetime import json import pathlib import re import subprocess import lazyjson # https://github.com/fenhl/lazyjson from racetime_bot import RaceHandler, monitor_cmd, can_moderate, can_monitor DATA = lazyjson.File('/usr/local/share/fenhl/ootr-web.json') GEN_LOCK = ...
import os import logging import multiprocessing import traceback from collections import deque from multiprocessing import Process try: from Queue import Empty as QueueEmpty except ImportError: from queue import Empty as QueueEmpty import ms_deisotope from ms_deisotope.processor import ( ScanProcessor, M...
"""Problems related to graphs such as Conway's 99 problem, finding [cliques](https://en.wikipedia.org/wiki/Clique_(graph_theory)) of various sizes, shortest path (Dijkstra) """ from puzzle_generator import PuzzleGenerator from typing import List # See https://github.com/microsoft/PythonProgrammingPuzzles/wiki/How-to...
#!/usr/bin/env python # -*- coding:UTF-8 -*- # File Name : data_preprocess.py # Purpose : # Creation Date : 03-01-2019 # Author : <NAME> [sli[at]informatik[dot]uni-hamburg[dot]com] # Author : <NAME> [liang[at]informatik[dot]uni-hamburg[dot]com] from __future__ import division from __future__ imp...
import pandas as pd import numpy as np import os import csv import pickle import h5sparse import scipy.sparse as ss from itertools import compress def write_gvm(gvm, output_fname, fmt='h5'): ''' Writes a gvm to a .csv or .h5 file. Parameters: gvm (h5sparse): gvm to write output_fname (str): file path to save to ...
import bisect import numpy as np import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from typing import Dict, Iterator, List, Tuple, Union import warnings from .base_viewer import BaseViewer def get_top_values(values, top_number): """ Returns top_number top values from the matrix ...
import api import logging logger = logging.getLogger(__name__) from tornado import httpclient import hashlib import urllib import api.support.decompose import api.handlers.ws_domains as ws_domains import api.jsonh import json __MIN_LSR_VERSION__ = 6 class LobsterDomain(object): """Docstring for LobsterDomai...
import math import torch __all__ = [ 'scale', 'pad_trim', 'downmix_mono', 'LC2CL', 'istft', 'spectrogram', 'create_fb_matrix', 'spectrogram_to_DB', 'create_dct', 'BLC2CBL', 'mu_law_encoding', 'mu_law_expanding' ] @torch.jit.script def scale(tensor, factor): # type...
import astropy.io.fits as fits import copy import numpy as np from astropy import units as u from astropy.modeling.fitting import LevMarLSQFitter from astropy.nddata import NDData, CCDData from astropy.stats import gaussian_sigma_to_fwhm, sigma_clipped_stats from astropy.table import Table from astropy.wcs import WCS f...
####################################################### # ## BPDA +EOT PGD WHITEBOX ATTACK FOR SAVED NETS ## # ####################################################### import torch as t import torch.nn.functional as F from torch.utils.data import DataLoader import matplotlib.pyplot as plt import json import datetime ...
''' Created on 30-Dec-2018 @author: vijay ''' import wx from src.view.other.debounce import debounce from wx import TreeCtrl from wx.lib.mixins.treemixin import ExpansionState from src.view.util.FileOperationsUtil import FileOperations from src.logic.resource.search.ResourceSearch import ResourceSearchLogic import lo...
#!/usr/bin/env python3 from multiprocessing.pool import ThreadPool import os, time, subprocess, sys import numpy as np from numpy import pi import os.path of = False def calculate_error(_params, _erads, _eres, log=None): ''' _params -- vector of results 0: na in control sample (Noggin2 production) ...
""" NOTE: these functions are copied from "gpu_extract.py" in the hackathon branch; the pieces have not yet been put together into a working GPU extraction in this branch. """ import math import numpy as np import cupy as cp import cupyx.scipy.special from numba import cuda from ..io import native_endian from ..util...
# -*- encoding: utf-8 -*- # Author: hushukai import os import functools import threading import numpy as np import tensorflow as tf from PIL import Image from config import CHAR_RECOG_BATCH_SIZE, CHAR_IMG_SIZE from config import CHAR_RECOG_FEAT_STRIDE, COMPO_SEQ_LENGTH from config import CHAR_STRUC_TO_ID, ID_TO_CHAR_...
import numpy as np import neworder as no import platform from utils import assert_throws def test_mc_property(): model = no.Model(no.NoTimeline(), no.MonteCarlo.deterministic_identical_stream) #model.mc = model.mc not allowed model.mc.ustream(1) model.mc.reset() def test_mc(): model = no.Model(no.NoTi...
#****************************************************************************** # (C) 2018, <NAME>, Austria * # * # The Space Python Library is free software; you can redistribute it and/or * # m...
import cv2 import os import sys import pcl from math import copysign, log10 import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from scipy.spatial import ConvexHull import random import math import itertools from sklearn.mixture import GaussianMixture from sklearn.neighbors import...
# coding=utf-8 from __future__ import print_function, unicode_literals, division import json import math import os import random import threading from itertools import chain, product from logger import logger from PIL import Image try: import Queue import urlparse from urllib import urlencode except Impo...
#!/usr/bin/env python # encoding: utf-8 from argparse import ArgumentParser from collections import defaultdict from gym import spaces from gym.utils import seeding from paretoset import paretoset from pathlib import Path from ray.tune.registry import register_env from sklearn.cluster import KMeans from sklearn.impute...
# @Time : 2021/8/13 # @Author : <NAME> # @Email : <EMAIL> import torch from torch import nn import torch.nn.functional as F from textbox.model.abstract_generator import Seq2SeqGenerator class FieldGateLstmUnit(nn.Module): r"""FieldGateLstmUnit Args: - hidden_size(int): size of hidden stat...
# -*- coding: utf-8 -*- # Copyright 2017-2019 ControlScan, Inc. # # This file is part of Cyphon Engine. # # Cyphon Engine 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, version 3 of the License. # # Cyphon En...
# 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 # distributed under the...
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Pelix remote services: Common dispatcher Calls services according to the given method name and parameters :author: <NAME> :copyright: Copyright 2020, <NAME> :license: Apache License 2.0 :version: 1.0.1 .. Copyright 2020 <NAME> Licensed under the Apa...
# The MIT License (MIT) # # Copyright (c) 2015 <NAME> # Copyright (c) 2015 <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 right...
import numpy as np import os import numpy as np import imageio from collections import namedtuple from skimage import transform as tf import pandas as pd import importlib.machinery import imagehash from PIL import Image from collections import Counter df_train_cl = pd.read_csv('/mnt/data/jupyter/ddata_fish/data_train_...
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """Base Widget class. Allows user to create widgets in the back-end that render in the IPython notebook front-end. """ from contextlib import contextmanager import collections import sys from IPython.core.getipython...
# -*- coding: utf-8 -*- """OBO Readers.""" import logging from datetime import datetime from pathlib import Path from typing import Any, Iterable, List, Mapping, Optional, Tuple, Union import networkx as nx from more_itertools import pairwise from tqdm import tqdm from .constants import DATE_FORMAT, PROVENANCE_PREF...
import threading from sqlalchemy import Column, String, UnicodeText, func, distinct, Integer, Boolean from gotti.modules.sql import SESSION, BASE class Federations(BASE): __tablename__ = "feds" owner_id = Column(String(14)) fed_name = Column(UnicodeText) fed_id = Column(UnicodeText, primary_key=True) fed_rules...
import base64 import json import logging from collections import defaultdict from collections.abc import AsyncIterator, Iterable, Sequence from contextlib import asynccontextmanager from dataclasses import dataclass, replace from datetime import datetime, timedelta from decimal import Decimal from typing import Optiona...
# Copyright 2021 <NAME> All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# --- Revised 3-Clause BSD License --- # Copyright (C) 2016-2019, SEMTECH (International) AG. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # * Redistributions of source code must retain t...
# -*- coding: utf-8 -*- ''' raeting module provides constants and values for the RAET protocol Packet Data Format. The data used to initialize a packet is an ordered dict with several fields most of the fields are shared with the header data format below so only the unique fields are shown here. Unique Packet data f...
import os import sys import copy import numpy import weakref from astropy.coordinates import EarthLocation import astropy.units as u __all__ = ['OVRO_CONFIG_FILENAME', 'Station', 'Antenna', 'parse_config', 'ovro'] OVRO_CONFIG_FILENAME = os.path.join(os.path.dirname(__file__), 'ovro.txt') def _smart_int(s, positiv...
import argparse import os import sys print(os.path.abspath(os.curdir)) sys.path.append('./') from collections import defaultdict from CodeBook.Config import FAULT_TYPE import json from CodeBook.Utils.isKilled import is_diff_sts from CodeBook.Utils.analysis_utils import parse_fault_str, convert_bool2int, extract_feature...
# 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 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
# # Copyright (c) 2020-2021 The Board of Trustees of the Leland Stanford Junior University # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the abov...
#!/usr/bin/env python3 # # Copyright 2021 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
import logging import os from datetime import datetime from flask import Flask, redirect, render_template, request as http_request from markdown import markdown from uuid import uuid1 import sentry_sdk from sentry_sdk.integrations.flask import FlaskIntegration from sentry_sdk.integrations.gnu_backtrace import GnuBackt...
""" Created on 2019-08-23 Updated on 2019-08-23 Company: DOSIsoft Author: Jiacheng """ # =================Library============================== # ====Basic librairie======= import time import os import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable # =====Pour Neur...
# -*- coding: utf-8 -*- # import statements from scipy.constants import milli, hour, minute, femto from matplotlib import pyplot from pprint import pprint from datetime import date from sigfig import round from numpy import log10, nan from math import inf import cobra import pandas import warnings, json, re, os ...
# Copyright 2019 The FATE Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from __future__ import print_function, division, absolute_import, unicode_literals import os import importlib.util import time import pickle import shutil import pdb import torch import gym import logging import numpy as np import random import sys import argparse import errno import h5py from tqdm impo...
#!/usr/bin/env python """ strfile, unstr - create a random access file for storing strings License: 3-clause BSD (see https://opensource.org/licenses/BSD-3-Clause) Author: <NAME> """ import getopt import logging import os import random import re import struct import sys # Version string used by the what(1) and ident(...
#Constants- probably shouldn't just be copied from C code, but so be it #How much money each player starts with STARTING_CASH = (6000) #How many tiles are in a player's hand HAND_SIZE = (6) #How many units of stock are available for each chain NUM_STOCKS = (25) #Maximum number of players MAX_PLAYERS = (4) #How many...
import os from flask import Flask, flash, request, redirect, url_for, jsonify from werkzeug.utils import secure_filename from flask import send_from_directory from flask_cors import CORS, cross_origin import json import zipfile from augmentations import * from sample import * from modelStats import * from train import ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This file contains a class definition for a wrapper for the suite of scalar deconvolution methods supported by mspass. It demonstrates the concept of a processing object created by wrapping C code. Created on Fri Jul 31 06:24:10 2020 @author: <NAME> """ import mspa...
import pandas as pd import argparse import numpy as np import random import matplotlib.pyplot as plt from sklearn import linear_model class Portfolio(object): def __init__(self, sec1mean, sec2mean, sec1vol, sec2vol, corr, rebalance_threshold): self.numberOfStocks = 2 self.initprices = np.asarray([...
""" Various column classes @author: <NAME>, <NAME> @organization: Space Telescope - European Coordinating Facility (ST-ECF) @license: Gnu Public Licence @contact: <EMAIL> $LastChangedBy: mkuemmel $ $LastChangedDate: 2008-07-03 10:27:47 +0200 (Thu, 03 Jul 2008) $ $HeadURL: http://astropy.scipy.org/svn/astrolib/trunk/as...
import unittest import calendar import math import re import sys sys.path[0:0] = [ '../src' ] from guts import * class SamplePat(StringPattern): pattern = r'[a-z]{3}' class SampleChoice(StringChoice): choices = [ 'a', 'bcd', 'efg' ] basic_types = (Bool, Int, Float, String, Unicode, Complex, Timestamp, ...
# -*- coding: utf-8 -*- # # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: <NAME> 0xA3ADB67A2CDB8B35 <<EMAIL>> # please also see AUTHORS file # :copyright: (c) 2013, Isis Lovecruft # (c) 2007-2013, The Tor Project, Inc. # (c) 2007-2013, all entities with...
"""General quirk tests.""" from unittest import mock import pytest import zigpy.device import zigpy.endpoint import zigpy.profiles import zigpy.quirks as zq import zigpy.types import zigpy.zcl as zcl import zigpy.zdo.types import zhaquirks from zhaquirks.const import ( DEVICE_TYPE, ENDPOINTS, INPUT_CLUST...
import torch import math degs = [1, 2, 4, 8, 12, 18] thetas_dict = {"single": [1.192092800768788e-07, # m_vals = 1 5.978858893805233e-04, # m_vals = 2 #1.123386473528671e-02, 5.116619363445086e-02, # m_vals = 4 #1...
"""Contains the definition for inception v2 (TSN) classification network.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from tensorflow.python.ops import init_ops from tensorflow.python.platform import tf_logging as logging sli...
#!/usr/bin/python3 # -*- coding: utf-8 -*- __author__ = '<NAME>' VERSION = "0.98 (2021-10-15)" # This script is part of my plot management set of tools. This # script is used to move plots from one location to another on # the same physical machine. # # If you are using a drive as a temp drive that falls within your...
import os import sys import numpy as np import scipy as sp import scipy.constants as sc import constants as c import utils import scipy.interpolate as spi import time import taurex_ggchem import progressbar libdir = os.path.dirname(os.path.realpath(__file__)) moddir = os.path.join(libdir, 'modules') ratedir = os.path....
#!/usr/bin/python3 # -*- coding: utf-8 -*- ''' RENDER_MODEL_VIEWS_KEYPOINTS.py brief: render projections of a 3D model from viewpoints specified by an input parameter file also output list of keypoint locations and occlusion stats usage: blender blank.blend --background --python render_model_views_keypoin...
import numpy as np import ast def compute_freq(doc, exclude_set, label_to_find, dis_cui_map): """Computes frequency of entities of label 'label to find', excluding entities from exlude set and mapping entities to dis_cui_map Args: doc (Doc): nlp model applied on text exclude_set (set): entiti...
import argparse import csv from decimal import Decimal import distutils.spawn import glob import json import logging import os import shutil from subprocess import call import sys import tempfile import numpy import pandas import pydicom from radiomics import featureextractor scriptlogger = logging.getLogger('radiom...
r""" This module provides the main preprocessor engine. """ import sys import os import os.path import shutil #import re import datetime import importlib import logging from pylatexenc import latexwalker from . import __version__ logger = logging.getLogger(__name__) from .fixes.builtin.remaining_pragmas import...
from multiprocessing import Pool from typing import Union, List, Dict, Set import copy import itertools class SemaphoreState: count: int queue: Union[None, tuple['Node', int]] def __init__(self, count: int): self.count = count self.queue = None # Class signifying one of semaphore operat...
# # Copyright 2017 Red Hat Inc. # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2....
import copy import sys import numpy as np from envs import make_env from envs.utils import goal_distance from algorithm.replay_buffer import Trajectory, goal_concat from utils.gcc_utils import gcc_load_lib, c_double, c_int from envs.distance_graph import DistanceGraph from PIL import Image #TODO: replaced goal_dista...
import hashlib import os import random import sqlite3 import string import sys import threading import time from typing import List, Dict, Tuple import cv2 import numpy as np from pdf2image import convert_from_path from pytesseract import pytesseract, Output import api_interface class IndexJob(api_interface.IndexJo...
# Copyright (c) 2016 Uber Technologies, Inc. # # 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, publ...
#!/usr/bin/env python3 # Software License Agreement (BSD License) # # Copyright (c) 2021, UFACTORY, Inc. # All rights reserved. # # Author: Vinman <<EMAIL>> <<EMAIL>> import os from ament_index_python import get_package_share_directory from launch.launch_description_sources import load_python_launch_file_as_module fro...
import vb2py.vbparser from vb2py.config import VB2PYConfig Config = VB2PYConfig() from vb2py import logger # For logging output and debugging log = logger.getLogger("vb2py.PythonCardControls") twips_per_pixel = 15 # << Events >> # << EventSupport >> class ControlEvent: """Represents a control event mapping fr...
"""Script for single-gpu/multi-gpu demo.""" import argparse import os import platform import sys import time import numpy as np import torch from tqdm import tqdm import joblib import json import pandas as pd import cv2 import math from detector.apis import get_detector from alphapose.models import builder from alpha...
# # Copyright (c) 2017-2021 AutoDeployAI # # 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 w...
from read_spec import * from read_spec import Inst # Instrument parameters name = 'CARM_NIR' obsname = 'ca' iomax = 28 iomax *= 2 # reshaping maskfile = 'telluric_mask_carm_short.dat' maskfile = 'telluric_mask_nir4.dat' def scan(self, s, pfits=True): """ SYNTAX: read_carm_nir(filename) OUTPUT: namedtuple('...
""" Copyright (C) 2018-2021 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 applicable law or agreed to in w...
""" __author__ = "<NAME>" __copyright__ = "Copyright 2020, Pomfort GmbH" __license__ = "MIT" __maintainer__ = "<NAME>, <NAME>" __email__ = "<EMAIL>" """ import difflib import filecmp import glob import os import shutil from importlib import reload from typing import List import pytest from click.testing import CliRun...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function import io from glob import glob from os.path import basename from os.path import dirname from os.path import join from os.path import splitext try: from pathlib import Path except: from p...
# Copyright 2017 CodiLime # # 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, softwar...
import os, pytest, subprocess, datetime full_context = { "full_name": "<NAME>", "email": "<EMAIL>", "github_username": "JDoe", "project_name": "Django Reusable App", "repo_name": "dj-reusable", "app_name": "dj_reusable", "app_config_name": "DjangoReusableAppConf...
# coding: utf-8 # In[3]: ''' Possibility road map(PRM) is used for avoiding forbidden areas in path planning, the steps are as follows: 1. sampling(): create sample points 2. generate_roadmap(): create road map base on sample points 3. dijkstra(): find shortest path between two nodes base on roadmap 4. PRM(): cre...
# -*- coding: utf-8 -*- # Problem Set 5: Experimental Analysis # Name: # Collaborators (discussion): # Time: import pylab import re # cities in our weather data CITIES = [ "BOSTON", "SEATTLE", "<NAME>", "PHILADELPHIA", "PHOENIX", "<NAME>", "CHARLOTTE", "DALLAS", "BALTIMORE", "<...
""" brief: aggregate original 294 kps to 81 kps author: lzhbrian date: 2020.3.31 """ category_name = ['short_sleeved_shirt', 'long_sleeved_shirt', 'short_sleeved_outwear', 'long_sleeved_outwear', 'vest', 'sling', 'shorts', 'trousers', 'skirt', 'short_sleeved_dress', '...
import matplotlib.pyplot as plt import numpy as np from numpy import cross, eye from scipy.linalg import expm, norm import pandas as pd from scipy.spatial.transform import Rotation as R from pyts.decomposition import SingularSpectrumAnalysis def modeshape_sync_lstsq(mode_shape_vec): """ Creates a straight lin...
import argparse import enum import logging import time import math import pathlib import random import os from types import resolve_bases from typing import Callable, Union, List, Tuple, Literal import numpy as np from nvidia.dali.plugin.base_iterator import LastBatchPolicy import utils from nvidia.dali.pipeline i...
import logs import matches Holders = {} Widths = [] class holderClass: def __init__(self,Path,Module): self.DB = {} self.SRC = {} self.Path = Path self.Module = Module def help_main(Env): if 'clk' in Env.params: Clocks = Env.params['clk'] else: Clocks = ...
import pytest from zhinst.labber.generator.quants import Quant, NodeQuant, QuantGenerator @pytest.fixture def node_info(): return { "Node": "/DEV12018/QACHANNELS/0/CENTERFREQ", "Description": "The Center Frequency of the analysis band.", "Properties": "Read, Write, Setting", "Type...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import json from django.shortcuts import render from django.contrib import messages from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.template.response import TemplateResp...
import logging import warnings import platform import unittest import gc import json import weakref import threading try: from Queue import Queue, Full, Empty except ImportError: from queue import Queue, Full, Empty try: from io import StringIO except ImportError: from cString import StringIO from .u...
#!/usr/bin/env python # coding: utf-8 """ __ __ _ _ _ \ \ / /__ _ __ | | _(_) |_ \ V / _ \ '_ \| |/ / | __| | | __/ |_) | <| | |_ |_|\___| .__/|_|\_\_|\__| |_| http://yepkit.com/ Yepkit YKUSH Python API and command line tool This application supports hidapi and hidapi-cffi, please choose...
# coding=utf-8 import os, sys import xbmc, xbmcaddon, xbmcgui, xbmcplugin, urllib, xbmcvfs import xml.etree.ElementTree as xmltree import cPickle as pickle import pstats import random import time import calendar import thread from time import gmtime, strftime from datetime import datetime from traceback import print_ex...
""" Implementation of a `Job` as callback function represention. Author: <NAME>, <NAME> """ from __future__ import annotations import datetime as dt import threading from typing import Any, Callable, Optional, Union, cast import typeguard as tg from scheduler.util import ( TZ_ERROR_MSG, AbstractJob, Job...
import math import json import sqlite3 import datetime from flask import request, jsonify, render_template, redirect, flash, \ Blueprint, send_from_directory, abort, session, current_app import requests from auth.indieauth import requires_indieauth from config import ROOT_DIRECTORY, RSS_DIRECTORY, SHOW_SETUP, \ ...
""" This module contains objects to characterize the pure-component adsorption loading surface from experimental or simulated data. These will be fed into the IAST functions in pyiast.py. A loading surface is a function of both temperature and pressure where an isotherm is only a function of pressure. """ from __future...