text
stringlengths
8.04k
46.5k
import numpy as np import random from scipy import interpolate as spi from matplotlib import pyplot as plt from matplotlib import animation from memoize import memoized class Results(object): # TODO: improve docs def __init__(self, shape=None, fname=None, nsigma=1.): """Blalbalba Parameters...
# Internal import os import time from sys import exit from tkinter import * import tkinter.ttk as ttk # External import keyboard import requests # ---------------------------------------------------------------- # Var and methods from screen_translate.Public import CreateToolTip, TextWithVar, fJson, _StoredGlobal fro...
from __future__ import absolute_import __author__ = u'<NAME>' # Changed: <NAME> (Added logging to ospy log instead of logger. Added support for sensors.) from .utils import * from ospy import version from ospy.stations import stations from ospy.options import options, level_adjustments from ospy.programs import prog...
# -*- coding: utf-8 -*- # loadlimit/cli.py # Copyright (C) 2016 authors and contributors (see AUTHORS file) # # This module is released under the MIT License. """Define CLI""" # ============================================================================ # Imports # ===================================================...
#%% """imports""" import itertools import os import pickle import random import time import matplotlib.pyplot as plt import networkx as nx import numpy as np import pandas as pd from openne.models import gae, gf, grarep, lap, line, lle, node2vec, sdne, vgae from tqdm import tqdm from evalne.evaluation....
#!/usr/bin/python # Project : diafuzzer # Copyright (C) 2017 Orange # All rights reserved. # This software is distributed under the terms and conditions of the 'BSD 3-Clause' # license which can be found in the file 'LICENSE' in this package distribution. from struct import pack, unpack from cStringIO import Stri...
import numpy as np import matplotlib.pyplot as plt import seaborn as sns import random import copy import uuid import scipy.stats as stat from math import log, gamma, exp, factorial, pi, sqrt, erf, atan from scipy.special import gammainc from scipy.interpolate import interp1d import os,sys def Exponential_rate(t,rat...
import datetime import json from urllib.request import urlopen, Request import urllib.parse from bs4 import BeautifulSoup from random import uniform, choice from time import sleep import re from urllib.error import URLError, HTTPError import os from imgdb.imdb_data_handler import ( imdb_get_data_from_datasets, ...
# coding: utf-8 from sqlalchemy import (BigInteger, Column, DateTime, Enum, Float, Index, Integer, SmallInteger, String, text, Text) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext.automap import automap_base from collections import namedtuple ...
import json import pandas as pd import matplotlib.pyplot as plt import math import seaborn as sns import numpy as np ### LOAD DATA INTO DATAFRAME versions = ['1.0','1.1','1.2','1.3'] df = pd.DataFrame() # Open the json file and loads with open('factorsAttraction.json') as json_data: obj = json.load(json_data) ...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torchvision.models.vgg import vgg19 from models.backbones.residualconv import Residual_Conv from models.backbones.resnet import ResNet_Backbone from models.base_net import Base_of_Network from models.decoders.upsample import UpS...
# -*- coding: utf-8 -*- #!/usr/bin/env python from data_iterator import * from state import * from dialog_encdec import * from utils import * import time import traceback import sys import argparse import cPickle import logging import search import pprint import numpy import collections import signal import math impo...
""" Unit tests for the deliver commands """ import json # noinspection PyPackageRequirements import mock import os import shutil import signal import taca_ngi_pipeline.utils.filesystem import tempfile import unittest from ngi_pipeline.database import classes as db from taca_ngi_pipeline.deliver import deliver from ta...
""" Magic Link. pymdownx.magiclink An extension for Python Markdown. Find http|ftp links and email address and turn them to actual links MIT license. Copyright (c) 2014 - 2017 <NAME> <<EMAIL>> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation ...
#!/usr/bin/env python # vimspector - A multi-language debugging system for Vim # Copyright 2019 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
# imports import sys import os import logging import pickle from PyQt5 import QtCore, QtGui, uic, QtWidgets import numpy as np import cv2 # project imports import Annotation import AnnotationToolGS # remember last annotation tool was used for CURRENT_ANNOTATION_FILENAME = '.current.p' # log _filename...
# this file contains all of the Chalice routing logic to implement the AWS Data API as a REST JSON Endpoint using IAM # authentication. The Data API can also be accessed natively as a python library using aws_data_api.py from chalice import Chalice, CORSConfig, Response, IAMAuthorizer, CognitoUserPoolAuthorizer, AuthRe...
""" Code by <NAME>: - https://github.com/dougalsutherland/igms - https://github.com/dougalsutherland/mlss-testing - https://github.com/dougalsutherland/ds3-kernels/ Apache License Version 2.0, January 2004 http://www.apache.org/licens...
#!/usr/bin/env python3 # # Modified by <NAME> # # Copyright (c) Facebook, Inc. and its affiliates. """ Panoptic-DeepLab Training Script. This script is a simplified version of the training script in detectron2/tools. """ # tensorboard --logdir="d:/Segmentacija/panoptic-deeplab-master/tools_d2/output/" # python train_p...
# # This file is part of the ErlotinibGefitinib repository # (https://github.com/DavAug/ErlotinibGefitinib/) which is released under the # BSD 3-clause license. See accompanying LICENSE.md for copyright notice and # full license details. # import collections as cs import myokit import numpy as np import pints class...
#!/usr/bin/env python3 # # phase-deuce # https://github.com/gregkrsak/phase-deuce # # Automatically populates a random daily log of customers for businesses offering table service. # Inspired by Phase 2 of WA State Governor Inslee's COVID-19 reopening plan. Of course, this is # to be used for testing purposes only! # #...
from manimlib import * import numpy.linalg as LA def get_coords_from_csvdata(file_name): import csv coords = [] with open(f'{file_name}.csv', 'r', encoding='UTF-8') as csvFile: reader = csv.reader(csvFile) for row in reader: coords.append(row) csvFile.close() ...
import json import re import sys from collections import defaultdict from functools import partial from itertools import chain from pprint import pprint, pformat from typing import Iterable from conllu.serializer import serialize_field from conllulex.config import get_config from conllulex.mwe_render import render fr...
# imports # ----------------------------------------------------------------------------- # pip-installable imports from __future__ import print_function, division import luigi import cPickle as pickle from math import ceil, floor import numpy as np import scipy as sp import os import logging import copy import datetim...
#!/usr/bin/env python3 SCHEMA = r""" create table log ( id integer primary key , date datetime , title text , map text , duration integer -- INFO , supplemental bool , ha...
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021 # by the softwar...
# -*- coding: utf-8 -*- # Copyright (c) 2020, Warehouseman and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe import os import errno import requests, time, datetime import json import re from datetime import datetime from pathlib import Path from ...
""" This module extracts course information from the HESA XML dataset and writes it in JSON format to Cosmos DB.x To fit with the recent architecture update this may require refactoring. Currently, we handle unexpected exceptions by letting them bubble up. This should help flush out problems during development and tes...
from profess.Http_commands import Http_commands import json import copy import os import yaml import matplotlib.pyplot as plt import datetime import time domain = "http://localhost:9090/se/" #dummyInputData = open('topologies\PVgridTest.json').read() dummyInputData = open('topologies\StorageGridBiggerESS.json').read() ...
from collections import Counter from collections import defaultdict import re import spacy en_nlp = spacy.load('en') P_HEDGES = set([ "think", "thought", "thinking", "almost", "apparent", "apparently", "appear", "appeared", "appears", "approximately", "around", "assume", "assumed", "certain amount", "cert...
from datetime import timedelta import numpy as np from scipy import signal from slider.beatmap import Circle, Slider, Spinner as SliderSpinner from circleguard.mod import Mod from circleguard.utils import KEY_MASK from circleguard import utils from circleguard.game_version import GameVersion from circleguard.hitobjec...
from rest_framework.views import APIView from rest_framework.response import Response from . import models, serializers from space_manager.rooms import models as rooms_models from space_manager.membership import models as membership_models from space_manager.branches import models as branch_models from space_manager.us...
import tinygfx.g3d.primitives as primitives import numpy as np import unittest from tinygfx import g3d as cg class TestHomogeneousCoordinate(unittest.TestCase): def setUp(self): self.coord = primitives.HomogeneousCoordinate(3, 4, 5, 6) def test_getting_object_values(self): getters = [getattr...
import pyredner import torch import math import redner import os from shared_functions import getGaussianFilter import torch.nn.functional as F # Use GPU if available pyredner.set_use_gpu(torch.cuda.is_available()) radius = 1.5*math.sqrt(2) radius2 = 0.8*math.sqrt(2) lightIntensity = 100.0 path = "results/shadow_ar...
# Colorama module: pip install colorama from colorama import init, Fore, Style # Selenium module imports: pip install selenium from selenium import webdriver from selenium.common.exceptions import TimeoutException as TE from selenium.common.exceptions import ElementClickInterceptedException as ECIE from selenium.webdr...
#!/usr/bin/env python """ lib.py General ROMS utils Written by <NAME> on 05/24/13 Copyright (c)2010--2021 University of Hawaii under the MIT-License. """ import numpy as np import seapy from seapy.lib import default_epoch, secs2day import netCDF4 from warnings import warn fields = {"zeta": {"grid": "rho", "...
# -*- coding: utf-8 -*- from django.contrib.auth.models import User from django import forms import datetime from django.forms.extras.widgets import SelectDateWidget from .models import * class UserForm(forms.ModelForm): password = forms.CharField( required = True, label = 'Senha', max_leng...
#!/usr/bin/env python import sys, os, time import logging import struct, socket from optparse import OptionParser parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ppparent_dir = os.path.dirname(os.path.dirname(parent_dir)) py_third_dir = os.path.join(ppparent_dir, 'py_third') sys.path = [parent_...
# SPDX-FileCopyrightText: 2021 <NAME> # # SPDX-License-Identifier: MIT # A MIDI step sequencer, with four tracks and eight steps per track. # The eight steps are on the top two rows of keys. Steps can be toggled on by # tapping a step's key. Active steps are indicated with a brighter LED, and the # currently playing...
from cffi import FFI import logging import os import sys import re logging.getLogger().setLevel(logging.INFO) from shared.utils import file_path_from try: import mpmath as math except ImportError: import math LOG_10 = 2.3025 LOG_2 = 0.3010 class gvcfGenerator(object): def __init__(self, ref_path, samtoo...
# This Python file uses the following encoding: utf-8 import io import os from dataclasses import dataclass from typing import Generator, List, Tuple, Union import numpy as np from bcachefs.c_bcachefs import ( PyBcachefs as _Bcachefs, PyBcachefs_iterator as _Bcachefs_iterator, ) EXTENT_TYPE = 0 INODE_TYPE ...
# Copyright 2019 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...
#! /usr/bin/env python # -*- coding: utf-8 -*- #################### # Copyright (c) 2020 neilk # # Based on the sample dimmer plugin ################################################################################ # Imports ################################################################################ import indigo ...
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- from copy import copy from enum import Enum from math import log2, ceil from operator import le, ge, gt, lt, ne, eq, and_, or_, xor, sub, add from typing import Union, Optional from pyMathBitPrecise.array3t import Array3t from pyMathBitPrecise.bit_utils import mask, get_...
""" ############################################################################## # # Parser for the snakemake config template. # Generates the real config.yml file for the MAPP pipeline. # # AUTHOR: Maciej_Bak # AFFILIATION: University_of_Basel # AFFILIATION: Swiss_Institute_of_Bioinformatics # CONTACT: <...
# # Copyright (C) 2011 <NAME>, <NAME> # # This file is part of virtualsmartcard. # # virtualsmartcard is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # ...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F class BCELoss(nn.Module): def __init__(self, weight=None, ignore_index=-100, reduce=None, reduction='mean'): super(BCELoss, self).__init__() self.reduction = reduction def forward(self, inputs, targets, mask)...
import matplotlib matplotlib.use('Agg') import argparse import json import logging import math import os import random import time import torch import torch.distributed as dist import torch.multiprocessing as mp from dateutil.relativedelta import relativedelta from shutil import copyfile from torch.nn.parallel impo...
from collections import Counter from django.shortcuts import render from django.apps import apps from nltk import word_tokenize from nltk.util import ngrams from statistics import median import datetime import re def search (request): ''' This function renders the natural language data for the corporate t...
#!/usr/bin/env python # Copyright (c) 2020 - for information on the respective copyright owner # see the NOTICE file and/or the repository # <https://github.com/boschresearch/amira-blender-rendering>. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance w...
from collections import namedtuple from django.conf import settings from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.mail import send_mail from django.urls import reverse from django.core.validators import RegexValidator from django.db import models from django....
import os, sys, time, argparse import math import random from easydict import EasyDict as edict import numpy as np import torch from torch import nn from tqdm import tqdm from pathlib import Path lib_dir = (Path(__file__).parent / 'lib').resolve() if str(lib_dir) not in sys.path: sys.path.insert(0, str(lib_dir)) from d...
import numpy as np import matplotlib.pyplot as plt import scipy.stats as st # from scipy.special import erf # Global variables that were just used in main number_of_iterations = 100 z_range = 8 r = 0.9 r_s = 0.9 mean_gen = 0 sd_gen = 1 k_val = -2 percent_step = 0.33 # Global variables that are used in here (the mod...
from cosymlib.molecule import Molecule from cosymlib.molecule.geometry import Geometry from cosymlib.molecule.electronic_structure import ElectronicStructure from cosymlib.file_io.tools import extract_geometries from cosymlib.tools import atomic_number_to_element, element_to_atomic_number from cosymlib.file_io import e...
r"""Investigate certain orbits of 2A axes of the monster group The functions in this module are used to find the orbits of 2A axes of the subgroup :math:`G_{x0}` (of structure :math:`2^{1+24}.\mbox{Co}_1`) of the monster group. According to |Nor98| there are 12 such orbits. """ import sys import os import time from...
""" aggregates coins data by time intervals (specified in INTERVALS) Data saved in separate collections: coins_1h coins_24h Each entry in the collection has the following keys: "coin", "rank", "price_usd", "24h_volume_usd", "market_cap_usd", "available_supply", "total_supply", ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import pandas as pd import numpy as np ''' libraries for preprocessing the data ''' from sklearn import preprocessing from sklearn.utils import shuffle ''' libraries for feature manupulation ''' from sklea...
# Copyright 2021 DeepMind Technologies 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 ...
#!/usr/bin/env python2 """ Creates SRF files with perturbed variables. Call from the command line specifying a type. Type 1 is point source (create_ps_realisation) Type 2 is not currently available Type 3 is a finite fault Type 4 is multiple segment finite fault If run from the command line type 1 requires all argume...
# Generate conversion code from Unicode Code Point to Code Page 437, the IBM PC # CGA builtin character set. import sys zig_file = 'kernel/platform/code_point_437.zig' # Utilities ================================================================== class KeyValue: def __init__(self, key, value): self.key =...
import pygame import random import os import math import json import time import pandas as pd from itertools import cycle os.chdir(os.path.dirname(__file__)) # data importing for node weights weight_file = 'xy_weights.xlsx' df = pd.read_excel(io=weight_file) WEIGHT_LIST = [] for i, rows in df.iterrows(): WEIGHT_L...
#!/usr/bin/env python # Copyright 2018-2020 Arm Limited. # SPDX-License-Identifier: Apache-2.0 # # 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-...
import re import numpy as np import torch from torch.autograd import Variable def _truncate_seq_pair(tokens_a, tokens_b, max_length): """Truncates a sequence pair in place to the maximum length.""" # This is a simple heuristic which will always truncate the longer sequence # one token at a time. This ma...
# -*- coding: utf-8 -*- """ hss_app.utils ~~~~~~~~~~~~~ This module implements utility functions. :copyright: (c) 2021-present <NAME>. :license: MIT, see LICENSE for more details. """ import re import time from bromelia._internal_utils import convert_to_6_bytes from bromelia._internal_utils ...
# Copyright 2018 Jetperch 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
#!/usr/bin/env python # # Copyright 2012, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
from multiprocessing import Pool, cpu_count import numpy as np from colorama import Fore, Style, init from patterns import * from config import * import sys from pprint import pprint init() class Draw: block = '█' yellow_block = Fore.YELLOW + block blue_block = Fore.BLUE + block white_block = Fore.WH...
#!/usr/bin/python import sys, subprocess from path import path from BeautifulSoup import BeautifulSoup KARMAPTH = path('content/karma') truelist = ['{T}','{True}','{t}','{true}'] def scantxt(txt): screens = [] pos = txt.find('<hr />') while pos > -1: screens.append(txt[:pos]) txt = txt[po...
# coding: utf-8 import inspect import sys from datetime import timedelta from functools import wraps from django.contrib.auth import get_user_model from django.test import TransactionTestCase as Test from django.utils.text import slugify from django.utils.timezone import now from model_bakery.recipe import Recipe from...
import Magical import json import gdspy from device_generation import basic, Pin, switch from device_generation.glovar import tsmc40_glovar as glovar import ConstGenPy import copy import opensarroutePy # Give 0.21 spacing (reduct 0.1 spacing) PARA_SP = 210 # comparator blockage magin 5um COMP_SP = 5000 # shield dist...
import copy from functools import cmp_to_key import pytest from icupy import ( CollationElementIterator, CollationKey, Collator, Locale, RuleBasedCollator, StringCharacterIterator, StringEnumeration, UColAttribute, UColAttributeValue, UColBoundMode, UColReorderCode, UColRuleOption, UCollationResult, US...
import random import re import albumentations as albu import albumentations.augmentations.functional as F import cv2 import numpy as np import torch from albumentations import DualTransform from .registry import TRANSFORMS CV2_INTER = { 'bilinear': cv2.INTER_LINEAR, 'cubic': cv2.INTER_CUBIC, 'nearest': c...
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """I/O test cases.""" import os from subprocess import check_call from io import StringIO import filecmp import shutil import numpy as np import pytest from h5py import File as H5File import nibabel a...
# Copyright 2020 The IREE Authors # # Licensed under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception """Converter class for converting Bazel BUILD files to CMakeLists.txt files. See bazel_to_cmake.py for...
# Copyright (c) 2006-2013 Regents of the University of Minnesota. # For licensing terms, see the file LICENSE. import conf import g from grax.access_infer import Access_Infer from grax.access_level import Access_Level from grax.access_style import Access_Style from grax.new_item_profile import New_Item_Profile from i...
#! /usr/bin/python3 # -*- coding: utf-8 -*- #-------------------------------------------------------------------------------------------------- # Script to generate files to make an EPUB archive from the union dictionary # # Usage: # generate_union_epub.py [--input str] [--output str] [--quiet] # # Example: # ./gen...
import torch import numpy as np import matplotlib.pylab as plt from matplotlib import cm from time import time from os.path import join from Hessian.GAN_hessian_compute import get_full_hessian from GAN_utils import loadBigGAN #%% BGAN = loadBigGAN() L2dist_col = [] def Hess_hook(module, fea_in, fea_out): print("h...
""" ------------------------------ NOTICE ------------------------------ This software (or technical data) was produced for the U.S. Government under contract 2015-14120200002-002, and is subject to the Rights in Data-General Clause 52.227-14 , ALT IV (MAY 2014) or (DEC 2007). © 2019 The MITRE Corporation. All Right...
from HartreeParticleDSL.backends.Cabana_backend.Cabana_visitors import * from HartreeParticleDSL.backends.Cabana_backend.Cabana import * from HartreeParticleDSL.IO_modules.base_IO_module.IO_module import IO_Module from HartreeParticleDSL.IO_modules.random_IO.random_IO import * from HartreeParticleDSL.backends.Cabana_ba...
""" models module """ import numpy as np import scipy.integrate as sci import itertools from core import utils from core import fitting class Model(object): """ Parent Class for the charge carrier recombination models """ def __init__(self, ids, units, units_html, factors, fvalues, gvalues, gvalues_range, ...
import logging import multiprocessing import matplotlib.pyplot as plt import numpy as np import pandas as pd import scipy as sp import seaborn as sns from sklearn import ( cross_validation, ensemble, grid_search, learning_curve, linear_model, metrics, naive_bayes, pipeline, preprocessing) from imblearn.metri...
import os import sys import cv2 import numpy as np from copy import deepcopy from scipy.spatial.transform import Rotation as rot import torch, torchvision from time import time import math import h5py import json import random import argparse from const import KPTS_15, SMPL_KPTS_15 from data_utils import sample_projec...
#!/usr/bin/env python3 # we're using python 3.x style print but want it to work in python 2.x, from __future__ import print_function import os import argparse import sys import subprocess import shutil import threading # from collections import defaultdict # from subprocess import CalledProcessError # make sure scrip...
''' Author: <NAME> Main_utils script to run training and evaluation of a residual network model on chest x-ray images ''' import os from tqdm import tqdm, trange import logging from scipy.stats import logistic import numpy as np import sklearn from sklearn.metrics import precision_recall_fscore_support from sklearn....
#functions def open_save(): with open('savedata.sav','rb') as game_data: in_data = game_data.read() decomp = zlib.decompress(in_data) f = open('database.sqlite','wb') f.write(decomp) f.close() def teardown(): conn.close() os.remove('database.sqlite') sys.exit(0) def create_player(): stats ...
from __future__ import annotations from collections import OrderedDict from datetime import datetime from decimal import Decimal from typing import TYPE_CHECKING, Final, Iterable, List, Tuple import colors from nation import ALL_NATIONS, Nation from starship import Starship if TYPE_CHECKING: from game_data import...
import utils import os import random import pandas as pd import matplotlib.pyplot as plt from collections import defaultdict import jellyfish # for Levenshtein distance import re import math import nltk from nltk.tokenize import sent_tokenize # for sentence tokenization from nltk.tokenize import word_t...
""" Code references: https://github.com/HRNet/HRNet-Image-Classification/blob/master/lib/models/cls_hrnet.py https://github.com/HRNet/HRNet-Object-Detection/blob/master/configs/hrnet/faster_rcnn_hrnetv2p_w32_syncbn_mstrain_1x.py https://github.com/lyrgwlr/HRNet-Facial-Landmark-Detection-v1/blob/master/lib/m...
import numpy as np import pandas as pd from scipy.stats import truncnorm import os import copy X_LOW = -5 X_HIGH = 5 Y_HIGH = 2.5 Y_LOW = -2.5 PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) DATA_DIR = os.path.join(PROJECT_DIR, 'data') MNIST_DIR = os.path.join(DATA_DIR, 'mnist') PHYSIONET_...
import sys sys.path.append('/home/lanhai/Projects/second.pytorch') import json from pathlib import Path import pickle import time from datetime import datetime import re import fire import numpy as np import torch from google.protobuf import text_format import torchplus from second.builder import target_assigner_build...
import numpy as np from distutils.spawn import find_executable from string import Template import tempfile import subprocess import collections from .. import util from .. import visual from .. import grouping from .. import resources from ..geometry import triangulate_quads from ..constants import log # from ply ...
# coding: utf-8 import collections import logging import platform import subprocess import sys import time import unittest import numpy as np import pytest import ray from ray.internal.internal_api import memory_summary import ray.util.accelerators import ray.cluster_utils from ray._private.test_utils import fetch_pr...
"""Fallback pure Python implementation of msgpack""" import sys import array import struct if sys.version_info[0] == 3: PY3 = True int_types = int Unicode = str xrange = range def dict_iteritems(d): return d.items() else: PY3 = False int_types = (int, long) Unicode = unicode ...
import os import tkinter as tk import tkinter.messagebox as tkm import tkinter.ttk as ttk from tkinter import filedialog from uninas.main import Main from uninas.register import Register from uninas.utils.args import MetaArgument, Argument from uninas.utils.paths import standard_paths, replace_standard_paths, get_class...
import glob import logging import os import pickle import time import cv2 import matplotlib.pyplot as plt import numpy as np from moviepy.editor import VideoFileClip logging.basicConfig(level=logging.INFO, format='[%(levelname)5s]%(asctime)s - %(message)s \t\t@[%(filename)s:%(lineno)d] ', ...
import enum import itertools import solaredge_setapp.information import solaredge_setapp.maintenance import solaredge_setapp.status TARGET_VERSION = "1.4.10" _COUNTRIES = { -1: ["Not Set", "COUNTRY_NONE"], 0: ["General", "COUNTRY_GENERAL"], 1: ["Australia", "COUNTRY_AUSTRALIA"], 2: ["France", "COUN...
# -*- test-case-name: twisted.application.test.test_internet,twisted.test.test_application,twisted.test.test_cooperator -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Reactor-based Services Here are services to run clients, servers and periodic services using the reactor. If you want...
import traceback from django.core.exceptions import ObjectDoesNotExist from django.db.models import Q from django.http import Http404 from django_bulk_update.helper import bulk_update from django_filters.constants import EMPTY_VALUES from django_filters.rest_framework import DjangoFilterBackend from django_filters.res...
# 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...
import re from pprint import PrettyPrinter import numpy as np from sklearn.utils._pprint import _EstimatorPrettyPrinter from sklearn.linear_model import LogisticRegressionCV from sklearn.pipeline import make_pipeline from sklearn.base import BaseEstimator, TransformerMixin from sklearn.feature_selection import Select...