text
stringlengths
3.07k
22.1k
# -*- coding: utf-8 -*- """ models.py Provides the various model wrapper objects for scrapbook """ from __future__ import unicode_literals import os import copy import nbformat import collections import pandas as pd from six import string_types from collections import OrderedDict from IPython.display import display a...
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
# -*- coding: utf-8 -*- """ Created on Tue Oct 19 12:08:47 2021 @author: Kaneki """ # -*- coding: utf-8 -*- """ Created on Mon Oct 18 17:28:36 2021 @author: Kaneki """ import numpy as np import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation def Periodicity(pos,l): if...
"""Tests sopel.tools""" from __future__ import generator_stop import re import pytest from sopel import tools TMP_CONFIG = """ [core] owner = testnick nick = TestBot enable = coretasks """ @pytest.fixture def nick(): return 'Sopel' @pytest.fixture def alias_nicks(): return ['Soap', 'Pie'] @pytest.fix...
from functools import wraps, partial from inspect import iscoroutinefunction import trio import asyncpg import trio_asyncio from async_generator import asynccontextmanager def _shielded(f): @wraps(f) async def wrapper(*args, **kwargs): with trio.CancelScope(shield=True): return await f(*ar...
import json import os import base64 from urllib.parse import quote from tornado import web from tornado.httpclient import AsyncHTTPClient, HTTPRequest from traitlets import Unicode, default from traitlets.config import LoggingConfigurable __all__ = ( "Authenticator", "KerberosAuthenticator", "DummyAuthent...
"""HAProxy plugin constants. Operation system specific constants are saved in this module as dictionaries, e.g.: `CLI_DEFAULTS_DEBIAN_JESSIE`. Currently these are defined for: - Debian Jessie (8) - Debian Wheezy (7) - Ubuntu Trusty (14.04) - Ubuntu Utopic (14.10) - Ubuntu Vivid (15.04) - Ubuntu Wily (15.1...
""" PyTeapot module for drawing rotating cube using OpenGL as per quaternion or yaw, pitch, roll angles received over serial port. """ #original code from https://github.com/thecountoftuscany/PyTeapot-Quaternion-Euler-cube-rotation #modified to use data from redis import pygame import math from OpenGL.GL import * fro...
from keras.models import Sequential, Model from keras.layers.embeddings import Embedding from keras.layers import Input, Activation, Dense, Permute, Dropout, add, dot, concatenate from keras.layers import LSTM, TimeDistributed from keras.layers import Conv1D, MaxPool1D from keras.layers.wrappers import Bidirectional c...
import sys import numpy as np from flatland.core.grid.grid4 import Grid4TransitionsEnum from flatland.envs.observations import GlobalObsForRailEnv from flatland.envs.rail_env import RailEnv from flatland.envs.rail_env_shortest_paths import get_shortest_paths, get_k_shortest_paths from flatland.envs.rail_env_utils imp...
import os import pytest def test_basic(alice, bob, wait_until): alice.entry.insert(0, "Hello there") alice.on_enter_pressed() wait_until(lambda: "Hello there\n" in bob.text()) def test_textwidget_tags(alice, bob, wait_until): alice.entry.insert( "end", "\x0311,4cyan on red\x0f \x02b...
import numpy as np from functools import partial import os import datetime import matplotlib.pyplot as plt import h5py import bokeh from small_lab_gui.helper import bokeh_gui_helper as bgh from small_lab_gui.helper import bokeh_plot_helper as bph from small_lab_gui.helper import measurement testing = Tr...
#!/usr/bin/python import os import copy import numpy as np from scipy.interpolate import UnivariateSpline from larch import Group, param_value, Parameter, Interpreter from larch_plugins.xrf import MCA, ROI def str2floats(s, delim='&'): s = s.replace('&', ' ') return [float(i) for i in s.split()] def str2in...
import pandas as pd import numpy as np import os from datetime import * from collections import defaultdict try: from lib_o_.o_fn import * from lib_o_.o_rpadef import * from lib_o_.o_rpafn import * import lib_o_.o_time as oT except: from o_fn import * from o_rpadef import * from o_rpafn imp...
""" Config interface to ml-params-tensorflow. Expected to be bootstrapped by ml-params, as well as internally. """ from typing import ( AnyStr, Callable, Dict, Iterable, Iterator, List, Optional, Tuple, Union, ) import numpy as np import tensorflow as tf import tensorflow_datasets a...
import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm from matplotlib.ticker import FormatStrFormatter as FSF from matplotlib.ticker import MultipleLocator from scipy.interpolate import InterpolatedUnivariateSpline as spline from grids import DartmouthPMS, PISA, Baraffe15, Seiss # Functon lift...
from typing import Any, Dict, List, Optional, Tuple from fastapi import Depends from pydantic import BaseModel, Field from rubrix.server.commons.errors import ( EntityAlreadyExistsError, EntityNotFoundError, ) from rubrix.server.commons.es_helpers import filters from rubrix.server.datasets.dao import Datasets...
import argparse import functools import sys from collections import OrderedDict from typing import Any, Callable, Dict, List, Optional, TypeVar from .custom_types import Switch, is_choices, is_enum, is_optional, unwrap_optional, unwrap_choices __all__ = [ "Arguments", ] T = TypeVar('T') ConversionFn = Callable[[...
# coding: utf-8 # # TF neural net with normalized ISO spectra # In[1]: # TensorFlow and tf.keras import tensorflow as tf from tensorflow import keras # Helper libraries import glob import matplotlib.pyplot as plt import numpy as np import pandas as pd from concurrent.futures import ProcessPoolExecutor from IPytho...
# -*- coding: utf-8 -*- r""" Parser for Jupyter notebooks ============================ Class that holds the Jupyter notebook information """ # Author: <NAME> # License: 3-clause BSD from __future__ import division, absolute_import, print_function from collections import defaultdict from functools import partial from...
# global import ivy import pytest import numpy as np import ivy.numpy as ivy_np try: import tensorflow as tf except ImportError: pass import ivy_tests.helpers as helpers # local from ivy_vision_tests.data import TestData from ivy_vision import optical_flow as ivy_flow class OpticalFlowTestData(TestData): ...
import os import numpy as np def findMatchForImage(annotationsFolder, imgName): """ Tries to find the matching annotation file. Returns either the path to the annotation file or None """ parts = imgName.rsplit('.', 1) base = parts[0] ext = parts[1] if len(base) is 0: # skip, hid...
""" Unofficial implementation of Copy-Paste for semantic segmentation https://arxiv.org/pdf/2012.07177.pdf 这个是将VOC数据集进行增强 """ from PIL import Image import imgviz import cv2 import argparse import os import numpy as np import tqdm def save_colored_mask(mask, save_path): lbl_pil = Image.fromarray(mask.astype(np.ui...
#!/usr/bin/env python ''' Classes and methods for managing the render pipeline <NAME> Jun 2017 - created ALL UNITS ARE IN METRIC ie 1 cm = .01 www.qenops.com ''' __author__ = ('<NAME>') __version__ = '0.1' __all__ = [] import OpenGL.GL as GL from OpenGL.GL import * import math import numpy as np import dGraph....
# the relation consensus module by Bolei import numpy as np import torch import torch.nn as nn from torch.autograd import Variable class RelationModule(torch.nn.Module): # this is the naive implementation of the n-frame relation module, as num_frames == num_frames_relation def __init__(self, img_feature_dim, ...
import os import sys import math import traceback from amuse.units import units from amuse.units import constants from amuse.community.sse.interface import SSE from amuse.community.evtwin.interface import EVtwin from amuse.community.cachedse.interface import CachedStellarEvolution, ParticlesTimeseries from amuse imp...
""" SQS for CloudWedge Provides implementation details for sqs service. It follows contract outlined in cloudwedge.models.AWSService """ from os import environ from typing import Any, Dict, List, Optional, Tuple import boto3 from cloudwedge.models import AWSResource, AWSService from cloudwedge.utils.arnparse import ...
# # Author: <NAME> # Provided as part of the Chunkmogrify project, 2021. # import numpy as np from qtutil import * from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import * from time import perf_counter as time from _C_canvas import canvas_to_masks # This is inefficient, but it was ...
import pdb import random import numpy as np import os import torch from torch.utils.data import Dataset, DataLoader from torch.utils.data.sampler import BatchSampler from .augmentation.randaugment import RandAugment from .data_utils import get_sampler_by_name, get_data_loader, get_onehot, split_ssl_data from .dataset ...
from __future__ import print_function # ------------------------------------------------------------------------------------------------ # Copyright (c) 2016 Microsoft Corporation # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and # associated documentation files (the...
""" This module contains all the methods to perform Gauss Jordan Elimination. Functions: For pre process columns_state_to_matrix -- Transform the state of columns to a single matrix including the parity column xor_columns -- Perform xor operation of a single column to the parity column For GJE perform_ga...
import numpy as np import time import scipy.sparse as sp import networkx as nx from revop import * import sys import time from joblib import Parallel, delayed from multiprocessing import Process, Manager DATA_PATH = '/media/chundi/3b6b0f74-0ac7-42c7-b76b-00c65f5b3673/revisitop/cnnimageretrieval-pytorch/data/test/matla...
from __future__ import print_function from datetime import datetime import functools import os import pytz import re import matplotlib matplotlib.use('Agg') import pylab pylab.rcParams['figure.figsize'] = (35.0, 12.0) import pandas as pd from bcbio import utils from bcbiovm.graph.collectl import load_collectl from b...
from snovault import upgrade_step from .shared import ENCODE2_AWARDS, REFERENCES_UUID from pyramid.traversal import find_root import re @upgrade_step('antibody_characterization', '', '3') @upgrade_step('biosample_characterization', '', '3') def characterization_0_3(value, system): # http://redmine.encodedcc.org/i...
# -*- coding: utf-8 -*- """ Note that this benchmark also supports a multi-GPU setup. If you run it on a system with multiple GPUs make sure that you kill all the processes when killing the application. Due to the way we setup this benchmark the distributed processes might continue the benchmark if one of the nodes is ...
#========================================================================== # # The PyRISC Project # # SNURISC: A RISC-V ISA Simulator # # Classes for program loading, disassembling, logging, and run-time stats. # # <NAME> # Systems Software and Architecture Laboratory # Seoul National University # http:/...
import pygame #import pygame.init() #initialization win = pygame.display.set_mode((500,480)) #rendering the game screen with dimensions 500,500 pygame.display.set_caption("Goblin Shooter") #Title of the game walkRight = [pygame.image.load('R1.png'),pygame.image.load('R2.png'), pygame.image.load('R3.png'...
# Copyright 2008 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 writing, ...
"""Window: The zygrader window manager and input handling""" import curses import inspect import typing from zygrader.ui import themes, colors from zygrader.config import preferences from . import events from .events import Event from .layers import ComponentLayer from .utils import add_str, resize_window def get_s...
# -*- coding: utf-8 -*- """ Created on Wed Jan 27 23:29:38 2016 @author: lei unit test for sdp.model.wave.Propagator """ import time import numpy as np import model.lightbeam as lb import sdp.model.wave.propagator as prop import sdp.plasma.analytic.testparameter as tp import sdp.plasma.dielectensor as dt from sdp.s...
from __future__ import annotations from ..typecheck import * from ..import core from ..import ui from ..import dap from ..terminal import Terminal, Line from ..autocomplete import Autocomplete from .variable import VariableComponent from .tabbed_panel import Panel from .import css import re import webbrowser import...
from typing import List import numpy as np import pandas as pd import torch from catalyst.dl import Callback, RunnerState, CallbackOrder from pytorch_toolbelt.utils.catalyst import get_tensorboard_logger from pytorch_toolbelt.utils.torch_utils import to_numpy from pytorch_toolbelt.utils.visualization import render_fig...
import pandas as pd import re import sys from datetime import datetime def check_header(input_df,expected_list,check_file,error_log): check = all(item in list(input_df.columns.values) for item in expected_list) if check is False: error_log.append("The file {} does not include all required elements:{...
from collections import defaultdict from re import split from pycparser.ply.yacc import token import torch import jieba import tqdm import numpy as np import lmdb import pickle import os import shutil import struct import random class TextGroupDataset(torch.utils.data.Dataset): def __init__(self, data_file, min_t...
#!/usr/bin/env python2 from __future__ import print_function import base64 import json import logging import os import os.path import socket import ssl import subprocess import sys import time import urllib2 # FROM plugins/inventory/terraform.py sys.path += [os.getcwd() + "/plugins/inventory"] # PYTHON_PATH is added ...
import atexit import os import shutil import subprocess import tempfile import time from typing import Any, Dict, List, Optional, Union import psycopg2 from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from qcfractal.storage_sockets.models import Base, VersionsORM from .config import Fract...
from __future__ import absolute_import import os import re import urllib import urlparse from .. import idiokit, socket, ssl from ..dns import host_lookup from .server import write_headers, read_headers, normalized_headers, get_header_single, get_header_list, get_content_length, _LimitedWriter, _ChunkedWriter, _Buffe...
import os from shlex import quote from colorama import Fore import multiprocessing as mp from pathlib import Path from shutil import copyfile from .utils import * from .printing import * from .compatibility import * from .config import get_config def backup_dotfiles(backup_dest_path: str, dry_run: bool = False, verbo...
import csv import logging import os import shutil import sys import urllib.request from os import listdir from urllib.request import urlretrieve import pandas as pd import requests from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.chrome.options import Options pd.set_...
from __future__ import absolute_import from ...extern.six.moves import range from ...extern.six import string_types __all__ = [ 'plot_corrcoef_matrix', 'corrcoef', 'cov', ] def plot_corrcoef_matrix(matrix, names=None, cmap=None, cmap_text=None, fontsize=...
import re import os import argparse import sys import errno import optparse import sqlite3 import uuid import email import email.utils from email.message import EmailMessage from email.parser import BytesParser, Parser from email.policy import default from datetime import datetime import hashlib import notesdb impo...
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib from datetime import datetime, timedelta import logging from operator import attrgetter import sys import time # project from checks.check_status import ForwarderStatus from util import get_tornado_ioloo...
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
__author__ = 'J4IR0' __doc__ = "Xintesis manager, contains global variables and singletons objects used" import os import sys import errno import logging import configparser from shutil import copyfile from logging.handlers import RotatingFileHandler import xintesis # TODO: review unused functions to erase it conf...
import datetime # import logging import io import logging import zipfile from collections import OrderedDict import numpy as np from django.conf import settings from django.core.mail import send_mail from django.http import HttpResponse, HttpResponseRedirect from django.views.generic.base import TemplateView from dja...
#!/usr/bin/env python # encoding: utf-8 from __future__ import division """ 2D shallow water equations. """ #=========================================================================== # Import libraries #=========================================================================== import numpy as np def qinit(state,...
# drivers license by <NAME> from the Noun Project import cv2 import numpy as np from PIL import Image, ImageTk, ImageEnhance from pdf417decoder import PDF417Decoder import json import tkinter as Tk from tkinter import PhotoImage, ttk, messagebox from time import sleep from datetime import datetime as time with open("...
# Copyright 2021 Alibaba Group Holding Limited. 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 ...
# Utilities for preloading data from different datasets into some # common format import os from collections import namedtuple import numpy as np from tqdm import tqdm # An object to hold information for a single trial. Trial = namedtuple( "Trial", ( "trial_features", # Input features for the input...
# Copyright 2021 The TensorFlow 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...
# -*- coding: utf-8 -*- """ .. module:: citationanalysis :synopsis: Set of functions for typical bibliometric citation analysis .. moduleauthor:: <NAME> <<EMAIL>> """ import os import sys import itertools from functools import reduce import pandas as pd import numpy as np # determine if we are loading from a jup...
# This file is Copyright 2019 Volatility Foundation and licensed under the Volatility Software License 1.0 # which is available at https://www.volatilityfoundation.org/license/vsl-v1.0 # import math from typing import Optional, Dict, Any, List, Iterable, Tuple from volatility.framework import interfaces, constants, ex...
# -*- coding: utf-8 -*- from __future__ import print_function from collections import Counter import click import os import re import face_recognition.api as face_recognition import face_recognition.config as config import face_recognition.model as model import multiprocessing import itertools import sys import PIL...
import sys import os import argparse import yaml import pprint sys.path.append(os.path.join(sys.path[0], "../..")) # enable package import from parent directory from KicadModTree import * # NOQA from bump import * from corners import * from chamfers import * class Dimensions(object): def __init__(self, base,...
import streamlit as st import streamlit.components.v1 as components from streamlit_player import st_player def show_presentation(): st.title("Notre proposition") """ ## 🎮 Furi, un jeu : * **visuel** - un boss rush centré sur l’apprentissage de patterns, la quintessence du jeu d’action exigeant ...
#! /usr/bin/env python # ______________________________________________________________________ from __future__ import absolute_import import dis import opcode from .bytecode_visitor import BasicBlockVisitor from . import opcode_util # ______________________________________________________________________ class Byte...
__author__ = 'shikun' import xlsxwriter from common.variable import Constants as gv class OperateReport: def __init__(self, wd, data): self.wd = wd self.data = data def init(self, worksheet): # 设置列行的宽高 worksheet.set_column("A:A", 25) worksheet.set_column("B:B", 20) ...
import argparse import os import pandas as pd import torch import torch.optim as optim from thop import profile, clever_format from torch.utils.data import DataLoader from tqdm import tqdm import utils from model import Model import torchvision if torch.cuda.is_available(): torch.backends.cudnn.benchmark = True...
#!/usr/bin/env python3 import numpy as np import networkx as nx import itertools, qiskit from qiskit.circuit.library.standard_gates import XGate from qiskit.circuit import ControlledGate import utils.graph_funcs as graph_funcs import utils.helper_funcs as helper_funcs ###############################################...
# -------------------------------------------------------- # Fast/er R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> # -------------------------------------------------------- import os,sys #import cPickle import _pickle as cPickle import numpy as np sys.path.append("stats") from e...
""" Python Character Mapping Codec generated from 'ROMAN.TXT' with gencodec.py. Written by <NAME> (<EMAIL>). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. (c) Copyright 2000 <NAME>. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return c...
#!/usr/bin/env python """ Script used BLED112 usb dongle to receive Ostur packets over BLE. The received data is printed out and optionally saved to a csv file. The data can then be plotted by plot_data.py """ import argparse import serial import struct import time import datetime import os.path import sqlite3 import...
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2017 SML 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...
#------------------------------------------------------------------------------- # # Project: EOxServer <http://eoxserver.org> # Authors: <NAME> <<EMAIL>> # #------------------------------------------------------------------------------- # Copyright (C) 2017 EOX IT Services GmbH # # Permission is hereby granted, free o...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ The program's entry point """ from __future__ import unicode_literals, print_function import json import locale import logging import platform from argparse import ArgumentParser from datetime import datetime from threading import Thread try: import curses except...
from future.backports.urllib.parse import parse_qs import copy import logging import requests from aatest import Break from aatest.events import EV_HTTP_RESPONSE from aatest.events import EV_PROTOCOL_RESPONSE from aatest.events import EV_REDIRECT_URL from aatest.events import EV_REQUEST from aatest.events import EV_R...
# Copyright 2013 Taobao 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 by a...
############# ## IMPORTS ## ############# from tqdm import tqdm, trange from modules.rpgsrc import world, worldToImage, typeloader from modules.rpgsrc.datatypes import Location from libs import modutil import sys, random import argparse ################# ## DEFINITIONS ## ################# def placeLocation(x : int, y...
import inspect from copy import deepcopy import numpy as np import torch from torch.optim import Adam import gym import time import spinup.algos.pytorch.acdf_cuda.core as core from spinup.utils.logx import EpochLogger from spinup.utils.mpi_pytorch_cuda import setup_pytorch_for_mpi, sync_params, mpi_avg_grads from spi...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import uuid from datetime import datetime, timedelta from odoo import api, fields, models, _ from odoo.tools.translate import html_translate import odoo.addons.decimal_precision as dp class SaleOrderLine(models.Model)...
def IsExecutingOnWindows(): import sys, os if sys.platform.startswith('win') or os.name == 'nt': return True return False def GetWindowsStdSysEnvVarList(path=False, temp=True, user=True, os=True, shell=True, cpu=True): ret = [] if os: ret += 'OS WINDIR SYSTEMDRIVE SYSTEMROOT ALLUSERSPROFILE Public ProgramData Com...
""" Input preparation functions; GUI input; tfrecords preparation; weight calculation. Created on 01/21/2020 @author: RH """ import os import pandas as pd import tensorflow as tf import cv2 import numpy as np import staintools import panoptes.data_input as data_input import panoptes.Slicer as Slicer import panoptes.s...
# Created by rahman at 11:06 2020-02-22 using PyCharm import logging import math import keras from keras.layers import Dropout, Dense, Conv1D, MaxPooling1D, Flatten, Reshape, LSTM from keras import Sequential, utils, Input, Model from keras.utils.vis_utils import plot_model #if tf.__version__ != '2.1.0': #import...
#!/usr/bin/python2.7 # -*- coding:utf-8 -*- # Author: NetworkRanger # Date: 2018/12/20 下午11:16 # 9.3 用TensorFlow实现LSTM模型 # 1. 导入必要的编程库 import os import re import string import requests import numpy as np import collections import random import pickle import matplotlib.pyplot as plt import tensorflow as tf # 2. 开始计算...
# imports - standard import os import numpy as np # imports - custom from .pySNIDutils import exec_SNID, read_output_file def SNID_type(fname, z = None, rlap = 10, z_tol = 0.02): ''' runs SNID on spectrum with appropriate args, reads SNID output file, determines SN type SN type is determined if type of be...
from __future__ import print_function import os, sys from django.db import models from django.apps import apps from subprocess import call from pygithub3 import Github import urllib, operator, time from JobTrak import settings from mmg.jobtrak import * class GenerateWiki(): WIKI_DIR = os.path.dirname(os.path.dirn...
# -*- coding: utf-8 -*- """ Created on Sat Mar 28 15:36:42 2020 @author: nikbakht """ #--------------------------------- import tensorflow as tf #import socket GPU_mode=0 # set this value one if you have proper GPU setup in your computer #The easiet way for using the GPU is docker if GPU_mode: num_GPU = 0 # choo...
from git import Repo from github import Github import os.path import git, os, shutil from dxc.ai.global_variables import globals_file import pickle import pandas as pd from getpass import getpass def create_git_repo(github_design, pat_key): gitrepo = Github(pat_key) user = gitrepo.get_user() git_repo_create = us...
# -*- coding: utf-8 -*- """ Implements the PRO of functions on tuples with cartesian product as tensor. We have access to Swap, Copy and Discard maps, generated by: >>> COPY = Box('copy', 1, 2, lambda *x: x + x) >>> SWAP = Box('swap', 2, 2, lambda x, y: (y, x)) >>> DISCARD = Box('discard', 1, 0, lambda *x: ()) >>> as...
from __future__ import print_function, absolute_import, division, unicode_literals # This file is part of the ISIS IBEX application. # Copyright (C) 2012-2016 Science & Technology Facilities Council. # All rights reserved. # # This program is distributed in the hope that it will be useful. # This program and the accomp...
import numpy as np from suite2p.run_s2p import run_s2p import os import shutil import glob from ScanImageTiffReader import ScanImageTiffReader # data location and inputs animalid = 'w32_2' date = '20210419' expt_ids = ['2','3','5'] result_base = 'E:/functional connectivity' diameter = 10 # changed from 11... 1/9/18 #...
import numpy as np import pytest from .utils import create_signal_with_known_waveforms import spikeextractors as se from spiketoolkit.postprocessing import get_unit_waveforms, get_unit_templates, get_unit_amplitudes, \ get_unit_max_channels, set_unit_properties_by_max_channel_properties, compute_unit_pca_scores, ex...
from sarna.model.base import Base, db from sarna.model.enums import Score, WSTG, MSTG, OWISAMCategory, FindingType, Language, CWE, ASVS, MASVS from sarna.model.sql_types import Enum from flask_wtf import FlaskForm __all__ = ['FindingTemplateMobileTest', 'FindingTemplateWebTest', 'FindingTemplateMobileRequirement', ...
#!/usr/bin/env python # Python script for fast text file searching using keyword index on disk. # # Author: <NAME> <<EMAIL>> # Last Change: November 1, 2015 # URL: http://peterodding.com/code/vim/notes/ # License: MIT # # This Python script can be used by the notes.vim plug-in to perform fast # keyword searches in the...
"""The goal of this script is to calculate the proceeds from crypto transactions from 2020, given a list ot transactions. This website was helpful https://cryptotrader.tax/blog/the-traders-guide-to-cryptocurrency-taxes """ from typing import List, Tuple from dataclasses import dataclass import logging im...
# Copyright 2021 <NAME> & <NAME> & <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 applicabl...
""" Python 3 SDK for the KATANA(tm) Framework (http://katana.kusanagi.io) Copyright (c) 2016-2018 KUSANAGI S.L. All rights reserved. Distributed under the MIT license. For the full copyright and license information, please view the LICENSE file that was distributed with this source code. """ import asyncio import ...
import warnings warnings.filterwarnings("ignore") import logging from logging import basicConfig, exception, debug, error, info, warning, getLogger import argparse import numpy as np from itertools import count from pathlib import Path from tqdm import tqdm from datetime import date import os from rich...
from __future__ import print_function import os import sys import cv2 import copy import numpy as np from imutils import contours import matplotlib.pyplot as plt sys.dont_write_bytecode = True import utils # Pixels with intensities below this value are ignored IGNORE_THRESH = 50 # Bins and Range BINS = 256 RANGE_MI...
#!/usr/bin/env python3 import asyncio, json, logging, random from enum import Enum from typing import List, Dict, Tuple import websockets import gomoku class Player: class State(Enum): INIT=0 INGAME=1 def __init__(self, ws): self.ws = ws self.id = -1 self.state = Pla...