text
stringlengths
3.07k
22.1k
import math import random import time LINK = 'http://howdoyouplayit.com/farkle-dice-game-rules/' numplayer = int(input('How many players are there?\n')) while type(numplayer) is not int: numplayer = int(input('Please put a positive whole number. How many players are there?\n')) players = [0 for x in range(numplay...
from dataclasses import replace from hanzi_font_deconstructor.common.TransformedStroke import TransformedStroke from .generate_svg import generate_svg, get_stroke_attrs from .transform_stroke import transform_stroke from .transform_stroke import transform_stroke from .svg_to_pil import svg_to_pil from os import path fr...
from torch import nn import torch import torch.nn.functional as F def mean_channels(F): assert(F.dim() == 4) spatial_sum = F.sum(3, keepdim=True).sum(2, keepdim=True) return spatial_sum / (F.size(2) * F.size(3)) def stdv_channels(F): assert(F.dim() == 4) F_mean = mean_channels(F) ...
# coding: utf-8 from __future__ import absolute_import from __future__ import unicode_literals import io import shutil import sys import tempfile import time import unittest import uuid import smb.base import fs.errors import fs.path import fs.test from fs.enums import ResourceType from fs.subfs import ClosingSubFS ...
import numpy as np from scipy.sparse.linalg import LinearOperator from dgpy.operators import (compute_div, compute_mass, penalty, lift_flux, lift_deriv_flux) def apply_first_order_operator(x, domain, system, ...
# <NAME> # Loading polyps and corresponding mask and bounding box import os import cv2 import numpy as np import torch import sys sys.path.append("..") # from PIL import Image from torchvision import models, transforms from utils.utils import generate_checkerboard, get_tiled_ground_truth import imgaug as ia from im...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon May 10 10:42:17 2021 @author: jackreid """ import ee import geemap import folium from gee_custom_utilities import gee_custom_utilities as gcu import pandas as pd import matplotlib.pyplot as plt import pickle import numpy as np #%% 1 - SELECT AREAS OF...
""" Copyright 2013 Rackspace, 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, software...
import os from requests import RequestException from qubell.api.private import exceptions from qubell.api.private.manifest import Manifest from qubell.api.private.platform import QubellPlatform from qubell.api.provider.router import PrivatePath import argparse import logging import time import threading import tracebac...
import os import re from waflib import Errors, Options from waflib.Configure import conf from waflib.TaskGen import extension COMPILE_EXTENSIONS = ['cxx', 'cpp', 'cc', 'c', 'rc', 'm', 'mm', 'def', 'masm'] def safe_name(name): name = name.replace('-', '_') name = name.replace('+', 'x') return name @conf...
import menpo.io as mio import menpo.shape as msh import numpy as np import menpo.feature as mfeat import h5py from menpo.image import Image import tqdm import random import matplotlib.pyplot as plt from threading import Thread flip_id = [16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 26, 25, 24, 23, 22, 21,...
import torch from torchtext.datasets import AG_NEWS from torch.utils.data import DataLoader from torch import nn import time from multiprocessing.context import Process from multiprocessing import Process, Queue, set_start_method from utils.model import AG_NEWS_TEXT from utils.funcs import get_argument_parser, check...
#!/bin/env python3 import datetime, hashlib, os, re, shutil, subprocess, sys, glob, argparse COMPONENTS = [] supported_arches = ['all', 'arm', 'i686', 'aarch64', 'x86_64'] encountered_arches = set() hashes = ['md5', 'sha1', 'sha256', 'sha512'] def get_package_name(filename): # Expects the 'name_version_arch.deb'...
"""Movement controller""" __all__ = ["run", "clean_up"] import logging import time from functools import total_ordering import RPi.GPIO as GPIO from . import data STEP_INCREMENT = 5.08 / 400 # Lead screw pitch / steps per rev A_AXIS_STEP_INCREMENT = 4 / 170 CW = 1 # clockwise rotation CCW = 0 # counterclockwi...
#!/usr/bin/env python # Copyright notice: # Copyright Members of the EMI Collaboration, 2013. # # See www.eu-emi.eu for details on the copyright holders # # 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...
# 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 # # less required by applicable law or agr...
# -*- coding: utf-8 -*- """ Copyright 2018 Digital Media Professionals 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 U...
import pandas as pd import numpy as np from .helpers import NPI_COLS, ID_COLS, CASES_COL, DEATHS_COL, STATIC_COLS from .helpers import preprocess_npi from .helpers import DATA_PATH from collections import OrderedDict from os import path from typing import Union class Features(object): """Transform DataFrame into ...
import math from collections import OrderedDict import numpy import gym import gym.spaces as spaces import numpy from ltron.config import Config from ltron.gym.envs.ltron_env import LtronEnv from ltron.gym.components.scene import ( EmptySceneComponent, DatasetSceneComponent, SingleSceneComponent) from ltron.gym....
''' Test the helper functions Author: <NAME> - <EMAIL> 2019 ''' import pytest from numpy.random import randint, rand import numpy as np import scipy.io as sio from helpers import * @pytest.fixture(scope="module") def X_lighthouse(): '''Return the lighthouse image X''' return sio.loadmat('test_mat/lighthouse...
import os import time import datetime from app import app from flask import json, render_template, request, url_for, redirect, send_from_directory, jsonify from .logger import * import json import pandas as pd import sqlite3 import duckdb from .utils import predict_set, clf, pred_risk, latest_pred from .misc import con...
#!/usr/bin/env python3 # Copyright 2021 The KubeEdge Authors. # Copyright 2020 kubeflow.org. # # 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...
from math import ceil import numpy as np from utils import indices_of_ones class Field: """Abstract field class. Create rules of the field here.""" def __init__(self): pass def __str__(self): pass def get_legal_moves(self): pass def list_moves(self): pass def has_legal_move...
from typing import Tuple, Optional, Union, Iterable, List import math import datetime import numpy as np import pandas as pd from pandas.plotting import register_matplotlib_converters from scipy.integrate import odeint import matplotlib.pyplot as plt import config register_matplotlib_converters() # mean latent perio...
"""Adversarial CNN model. This model uses an RNN and CNN to encode the source into a vector `e`. Note that using the RNN is optional, and you can skip it (and have the CNN look directly at the word vectors) by setting the `encoder_layers` parameter to 0 in your config.yaml. This setting (without the RNN) appears to pe...
import datetime import json import random import time import discord from discord.ext import tasks , commands from sqlalchemy.orm import joinedload from src.model.chapter import Chapter from src.model.message import Message from src.model.project import Project from src.model.timer import Reminder from src.util.misc ...
#coding:utf-8 import numpy as np import matplotlib.pyplot as plt import os import math import cv2 def convolve(filter,mat,padding,strides): ''' :param filter:卷积核,必须为二维(2 x 1也算二维) 否则返回None :param mat:图片 :param padding:对齐 :param strides:移动步长 :return:返回卷积后的图片。(灰度图,彩图都适用) @author:bilibili-会飞的吴克...
import re import hashlib import json dict_macros = {'print': print, 'save': 'a{} b{}', 'query_testing': ['Query<char> query_{0};', 'query_{0}.OR_queries.' 'push_back(Query<char>::FromString("{0}"));',...
# ------------------------------------------------------------------------------ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 # ----------------------------------------- # Consuming sample, demonstrating how a device process would leverage the provisioning class....
from __future__ import unicode_literals import collections import functools import pprint import time import spotify from spotify import compat, ffi, lib, serialized class EventEmitter(object): """Mixin for adding event emitter functionality to a class.""" def __init__(self): self._listeners = col...
#!/usr/bin/env python # -*- coding: utf-8 -*- """First simple sklearn classifier""" from __future__ import division # 1/2 == 0.5, as in Py3 from __future__ import absolute_import # avoid hiding global modules with locals from __future__ import print_function # force use of print("hello") from __future__ import unico...
#! /usr/bin/env python3 """ ONTAP REST API Sample Scripts This script was developed by NetApp to help demonstrate NetApp technologies. This script is not officially supported as a standard NetApp product. Purpose: Script to create SVM, Volume and associate Export Policy using ONTAP REST API. usage: python3 create_...
"""This module provides the basic support for asynchronous communication and computation of secret-shared values. """ import struct import itertools import functools import typing from asyncio import Protocol, Future from mpyc.sectypes import Share class SharesExchanger(Protocol): """Send and receive shares. ...
import string, random from typing import List, Dict, Any, Sequence, BinaryIO, TextIO, ValuesView, Optional class UID: ndigits = 6 @staticmethod def randomId( length: int = 6 ) -> str: sample = string.ascii_lowercase+string.digits+string.ascii_uppercase return ''.join(random.choice(sample) ...
# -*- coding: utf-8 -*- import matplotlib.pyplot as plt import matplotlib import numpy as np from blue_noise_plot.lloyd_relax import blue_noise_single_class, blue_noise_multi_class, \ apply_jitter def __split_array_into_class_arrays(data, points_per_class): start_index = 0 points_for_class = [] for i...
import os import dotenv import time from utils.config import validatorToolbox from os import environ from dotenv import load_dotenv from colorama import Fore, Style from utils.shared import setAPIPaths, getShardMenu, getExpressStatus, setMainOrTest, getNodeType, setWalletEnv, firstRunMenu, printStars, loadVarFile, askY...
# Copyright (c) 2009 Google Inc. All rights reserved. # Copyright (c) 2009 Apple 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 abov...
"""Chipmunk.py is the interface module to Chipmunk for Merlin. Any functions chipmunk exposes are represented here as defined. New abstractions or higher level abstractions should be created in modules that import chipmunk.py. For maximum flexibility do not import chipmunk.py directly... inject it via a kernel or DI...
#!/usr/bin/ python3 # -*- coding: utf-8 -*- import re import time import sys """========================================================================================== Tokenisator for ngramleser (evt. parsing). ------------------------------------------- <NAME>, Nasjonalbiblioteket, juni 2014 Tokenisatorens opp...
import logging from .base import BaseReplyItem, AUTO_RESOLVE, SEND_TO_NONE, SEND_ONLY, SEND_AND_SAVE_COPY from .item import Item from ..fields import BooleanField, Base64Field, TextField, MailboxField, MailboxListField, CharField, EWSElementField from ..properties import ReferenceItemId, ReminderMessageData from ..uti...
import numpy as np import pandas as pd import os import glob import shutil from IPython.display import clear_output def get_top_summary(all_df, summary_iter_num=9999): def _helper_agg(col): if col.name == 'rf_id': return '-' elif col.name in ['hs_id', 'hs_group']: return col...
import torch import torch.nn as nn import gin @gin.configurable(module=__name__) class Encoder(nn.Module): def __init__(self, num_tokens, embedding_size=300, embedding_dropout=0.1, hidden_size=1024, bidirectional=False): super().__init__() self.num_tokens = num_tokens # include PAD, SOS and EO...
#!/usr/bin/env python ''' Makina-States Stage SourceToImage runner It will setup the env, then launch & wrap the stage0 -> 3 dance The stage scripts need: - python-six - rsync - python > 2.6 - acl (setfacl/getfacl) ''' # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ imp...
from abc import ABC import pandas as pd from scipy.integrate import cumtrapz import sidekick as sk from ..models import Model, ODEModel from ..utils import param_property, param_alias class ClinicalModel(Model, ABC): """ Base class for clinical models that track the infection curve and models the clinic...
import re import numpy as np from enum import Enum from cctk import File, Molecule, ConformationalEnsemble from cctk.helper_functions import get_symbol, get_corrected_free_energy import cctk.parse_orca as parse class OrcaJobType(Enum): """ Class representing allowed Orca job types. Not an exhaustive list, b...
# # spyne - Copyright (C) Spyne contributors. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This libra...
import pygame BLACK = (0, 0, 0) WHITE = (255, 255, 255) BLUE = (0, 0, 255) GREEN = (0, 255, 0) RED = (255, 0, 0) PURPLE = (255, 0, 255) background=pygame.image.load("images/map-bg.png") house1=pygame.image.load("images/house1.png") house1 = pygame.transform.scale(house1, (180, 100)) house2=pygame.image.load("images/h...
import os import logging import tempfile import pytest from traitlets import Float, TraitError, Dict, Int from traitlets.config import Config from pathlib import Path from .. import Tool, Component from ..tool import export_tool_config_to_commented_yaml, run_tool def test_tool_simple(): """test the very basic fu...
# Code for the ex-post analysis (segmentation, market shares, etc.) # General import sys import time import copy import numpy as np # Functions import nested_logit # Data import data_HSR as data_file def printOutputAnalysis(data): # Print prices, subsidies, taxes, market shares for all altern...
import argparse import os import random from util import www2fb, processed_text, clean_uri # output 'cleanedFB.txt', 'names.trimmed.txt', 'transE_*.txt', 'entity2id.txt', 'relation2id.txt' def get_fb_mids_set(cleanfile, fbsubset): print('get all mids in the Freebase subset...') lines_seen = set() # holds lin...
"""Qsignature: detection of sample mixups. https://sourceforge.net/p/adamajava/wiki/qSignature/ """ import os import shutil import subprocess import xml.etree.ElementTree as ET import pysam import toolz as tz from bcbio import bam, utils from bcbio.distributed.transaction import file_transaction from bcbio.log impor...
#!/usr/bin/env python3 # classic ttt: 3x3 board RBH 2016 # - genmove finds value of all moves, using alphabeta search # implemented this alphabeta improvement: # - instead of searching over all children of a node, # - search only over non-isomorphic children # - (any two isomorphic children will have the ...
# -*- coding: utf-8 -*- from app.view.attr import AttrH #=============================================== def _resetupAttr(aspect_h, attr_h): idx1 = aspect_h.find(attr_h.getName().lower()) idx2 = aspect_h.find(attr_h.getName()) if idx1 >= 0: aspect_h.delAttr(aspect_h[idx1]) if idx2 >= 0: ...
"""MobileNetV2 in PyTorch See the paper "MobileNetV2: Inverted Residuals and Linear Bottlenecks" (https://arxiv.org/abs/1801.04381) for more details. """ import math import torch import torch.nn as nn def conv2d(inplanes, out_planes, kernel_size=3, stride=1, padding=0, groups=1, bias=False): """convolution with p...
#!/usr/bin/env python3 """ PURPOSE: create https/wss endpoints for a network on AWS USUAGE: $ python3 main.py <network_name> for example, the following cmd is used to create https/wss endpoints for testnet # build complete pipeline $ python3 main.py -n testnet # update endpoints only - after a network has been ...
from flask import Flask, render_template, request, session, Response import sqlite3 app = Flask(__name__) app.secret_key = "key" conn = sqlite3.connect("inventory.db") c = conn.cursor() create_inventory_table = """CREATE TABLE IF NOT EXISTS inventory ( item_id INTEGER PRIMARY KEY AUTOINCREMENT, item_na...
import cv2 import argparse import os import sys import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torchvision import transforms from PIL import Image from utils.helpers import colorize_mask import matplotlib.pyplot as plt # from models.jitnet import JITNet # from models.jitnetli...
# # (C) Copyright 2013-2016 Enthought, Inc., Austin, TX # All right reserved. # """ Web implementations of the Jigna Server and Bridge. """ # Standard library. import json import mimetypes from os.path import abspath, dirname, join import threading import traceback try: from urllib import unquote except ImportEr...
#!/usr/bin/env python3 from xml.etree.ElementTree import XML import xml.dom.minidom import queue from queue import Full import ipaddress from multiprocessing import Process, Queue, process from Conntrack import ConnectionManager import time cm = ConnectionManager() from config import homenetwork,homenetwork_router ho...
# can we optimize an MD engine using the thermodynamic gradient? import jax from jax.config import config; config.update("jax_enable_x64", True) import jax.numpy as jnp from quadpy import quad from thermo_deriv.lj import lennard_jones from timemachine.integrator import langevin_coefficients import numpy as np import f...
# Source: http://www.codeskulptor.org/#user48_NSMe42Kl30l6x2p_6.py # Implementation of classic arcade game Pong import simplegui import random import math # # # CONSTANTS # # # # generic constants ZERO_VECTOR = (0, 0) BOOLEAN_VECTOR = (0, 1) # indexing constants for readability LEFT, RIGHT = H_DIRECTIONS...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from datetime import datetime, date from dateutil.relativedelta import relativedelta from django.db.models import Q from django.http import ( Http404, HttpResponseRedirect, HttpResponsePermanentRedirect, ) from django.shortcuts import get_ob...
import copy from collections import OrderedDict import astropy.constants as const import astropy.units as u import numpy as np from astropy.table import QTable, hstack from exorad.log import Logger from exorad.models.optics.opticalElement import OpticalElement from exorad.models.signal import Radiance from exorad.uti...
#!/usr/bin/env python # ~ -*- coding:utf-8 -*- import os from lxml import etree from mock import MagicMock from mwlib.pdf import utils from mwlib.pdf.collection import Article from mwlib.pdf.htmlfilters import images from mwlib.pdf.htmlfilters.test.utils import RelaxNGValidator rng = RelaxNGValidator(images) file_di...
import deepchem as dc import json import numpy as np from copy import deepcopy from hyperopt import hp, fmin, tpe from shutil import copyfile from utils import init_trial_path, load_dataset, EarlyStopper def load_model(save_path, args, tasks, hyperparams): if args['dataset'] in ['PDBbind']: mode = 'regression...
""" API wrappers for interacting with census data. Usage: from api_wrapper.api import CensusBoundaries census_bondaries = CensusBoundaries('2018') county_gdf = census_bondaries.get_boundaries_gdf('Ignored', 'county') block_gdf = census_bondaries.get_boundaries_gdf('Colorado', 'block') """ import pan...
# -*- coding: utf-8 -*- ## \package ui.menu # MIT licensing # See: docs/LICENSE.txt import wx from dbr.config import ConfCode from dbr.config import GetDefaultConfigValue from dbr.config import ReadConfig from dbr.language import GT from dbr.log import DebugEnabled from globals.bitmaps import ICON_CLOCK f...
""" This file contains class definition and necessary tools for constructing and evaluating all symmetry groups. """ import numpy as np from itertools import product as itertools_product from enum import Enum from hikari.symmetry import SymmOp from hikari.utility.list_tools import find_best def _unpack_group_dictiona...
''' make_acfg_family.py Performs CFG extraction from binaries in parallel using the multiprocessing module. If successful, each process will: 1) Get the adjacency matrix of the CFG (not per function, not graphlets) 2) For each basic block (node), compute syntactic features 3) Encode into the DGCNN format Before using...
# -------------------------------------------------------- # Pytorch multi-GPU Faster R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by <NAME>, <NAME>, based on code from Ross Girshick # Modified by <NAME> for Stereo RCNN train # -------------------------------------------------------- from...
#!/usr/bin/env python # coding=utf-8 import pprint import csv import click import requests import datetime as datetime from datetime import date from xml.etree import ElementTree as ET import os # from random import sample import random import json import copy # import os # import json # import loggi...
# Copyright 2019 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 or agreed to in writing, ...
#!/usr/bin/env python3 from dactyl.common import * import requests from bs4 import BeautifulSoup from time import time, sleep from dactyl.config import DactylConfig from dactyl.cli import DactylCLIParser TIMEOUT_SECS = 9.1 CHECK_IN_INTERVAL = 30 FINAL_RETRY_DELAY = 4 * CHECK_IN_INTERVAL TYPE_LINK = "link" TYPE_IMAG...
import re import itertools import graphviz as gv class InvalideSyntaxError(Exception): def __str__(self): return 'Invalide node specification' class RedefinedIdentifierError(Exception): def __init__(self, identifier): self._identifier = identifier def __str__(self): return 'Redefined identifier ' + s...
# Leaky LAN # Copyright (c) 2021 <NAME> < <EMAIL> > # 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, modif...
import re from snappi_ixnetwork.vport import Vport from collections import namedtuple class ResourceGroup(object): """""" """""" def __init__(self, ixnetworkapi): self._api = ixnetworkapi self._store_properties = [] self._layer1_conf = None self.layer1_check = [] ...
from migen import * from litex.soc.interconnect import stream from litex.soc.interconnect.csr import AutoCSR, CSRStorage, CSRStatus, CSR from litex.soc.integration.doc import AutoDoc, ModuleDoc from litedram.frontend.dma import LiteDRAMDMAReader, LiteDRAMDMAWriter class PatternMemory(Module): def __init__(self,...
import re import calendar import time import urllib.parse import base64 from dateutil.parser import parse import WebRequest import WebMirror.OutputFilters.FilterBase import WebMirror.OutputFilters.util.MessageConstructors as msgpackers # from WebMirror.Engine import SiteArchiver import common.database as db # i...
import collections from typing import Dict, List, Optional from botocore.utils import CachedProperty from cfmreslib.base import AWS_SESSION, CustomResourceHandler def _select(data, query): for q in query.split("."): data = data[q] return data class BotoMethod(object): def __init__(self, servic...
import struct import traceback from .gameboy import LR35902 from binaryninja import Type from binaryninja.architecture import Architecture from binaryninja.binaryview import BinaryView from binaryninja.enums import SegmentFlag, SectionSemantics, SymbolType from binaryninja.log import log_error, log_info from binaryni...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os, sys, glob import argparse from pprint import pprint from core import execute from core import utils # import modules from modules import subdomain from modules import takeover from modules import screenshot from modules import portscan from modules import git...
from __future__ import division import mock import os import platform import pytest from parameterized import parameterized import random import time import types import unittest2 from uuid import uuid4 try: import gevent except ImportError: gevent = None try: from pykafka.rdkafka import _rd_kafka # noq...
#import sys import json from urllib.request import Request#, urlopen import urllib import imaplib import smtplib import logging #import getpass import email import email.header import time from datetime import datetime from datetime import timedelta from random import randint #from email.message import EmailMessage #fr...
from uin_fc_lib import ts_forecasts, ml_visualizations import pandas as pd import numpy as np import keras as k from keras.wrappers.scikit_learn import KerasRegressor from keras.callbacks import EarlyStopping, ModelCheckpoint, ReduceLROnPlateau, TensorBoard from sklearn.preprocessing import StandardScaler from sklearn....
import numpy as np import cv2 import open3d as o3d def getAffordancePointCloudBasedOnVariance(pcd): """ Computes 9 points for each affordance, based on standard deviation, present in the point cloud Input: pcd - o3d.geometry.PointCloud() Output: pcd_box ...
#!/usr/bin/env python3 import argparse """ Script to train a grammar based on a set of words for R-loops. Copyright 2021 <NAME> """ def split_word(word): temp = word.replace('o', '-') temp = temp.replace('p', '-') temp = temp.replace('q', '-') temp = temp.replace('u', '-') temp = temp.replace...
import pytest from astropy import units as u from astropy.tests.helper import assert_quantity_allclose from poliastro.earth.atmosphere import COESA76 from poliastro.earth.atmosphere.coesa76 import p_coeff, rho_coeff coesa76 = COESA76() def test_outside_altitude_range_coesa76(): with pytest.raises(ValueError) as...
from __future__ import absolute_import, print_function import argparse import re import sys import time import traceback from datetime import datetime import requests from bs4 import BeautifulSoup from sentry_sdk import capture_exception, capture_message from Tutorifull.constants import CURRENT_TERM, POSTGRES_MAX_IN...
# # 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...
from cEnum import eAxes from cConstants import cPlotConstants, cPlot3DConstants import cPlot import wx import numpy as NP from matplotlib.figure import Figure from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas from matplotlib.axes import Axes as mplAxes from mpl_toolkits.mplot3d import Axes...
from typing import List, Dict, Union, Iterable, Any, Optional, Callable from typing import Tuple import srsly from pathlib import Path from .pipe import Pipe from ..errors import Errors from ..training import validate_examples, Example from ..language import Language from ..matcher import Matcher from ..scorer import ...
import argparse import glob import logging import os import time import random import shutil from typing import List, Optional import numpy as np import torch from pytorch_transformers import (BertConfig, BertTokenizer, RobertaConfig, \ RobertaTokenizer) from pytorch_transformers import AdamW, WarmupLinearSc...
# this file is base on sumo/tools/visualization/plot_net_dump.py # https://github.com/DLR-TS/sumo/blob/7de0683501f247665bbea78645c2775249cd7dbd/tools/visualization/plot_net_dump.py from __future__ import absolute_import from __future__ import print_function import os import sys os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2...
import time import sys import torch import transformers import numpy as np import random import json from pathlib import Path from torch.utils.data import DataLoader, RandomSampler, DistributedSampler, SequentialSampler import os import hydra from tqdm import tqdm, trange from omegaconf import DictConfig from transform...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2012 <NAME> (<EMAIL>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at ...
from Bio import SeqIO from Bio import AlignIO import argparse import shutil import os import sys from tempfile import mkstemp stop_codons = ["TAG", "TAA", "TGA"] def collect_input_arguments(): """ Collecting input arguments at the command line for use later. """ parser = argparse.ArgumentParser(p...
import argparse import time from typing import Optional import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.optim import Optimizer from torch.utils.data import DataLoader from architectures import ARCHITECTURES from datasets import DATASETS, get_num_classes from train_util...
#<NAME> # Base size 6.4MB # pip module size : 21MB from distutils.version import LooseVersion from inspect import getmembers, stack from sys import version_info, executable from sys import path as mod_path from os import path as os_path from importlib import import_module from pkg_resources import working_set #import p...
""" Path planning Sample Code with RRT with Reeds-Shepp path author: AtsushiSakai(@Atsushi_twi) """ import copy import math import os import random import sys import time import matplotlib.pyplot as plt from matplotlib.patches import Rectangle, Circle import numpy as np sys.path.append(os.path.dirname(os.path.absp...
from __future__ import absolute_import, unicode_literals from datetime import date,timedelta import numpy as np from django.db import connections PI_LIST = [ 'rrc_connmean', 'prb_dlutilization', 'prb_ulutilization', 'pdcp_upoctdl', 'pdcp_upoctul', 'rrc_effectiveconnmean' ] ATTR_LIST = [ ...