text
stringlengths
8.04k
46.5k
#!/usr/bin/env python # @license # Copyright 2020 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 applicab...
# -------------------------------------------------------- # 3D object detection model for point cloud # Licensed under The MIT License [see LICENSE for details] # Created on 17/12/2017 # Modified by <NAME> # -------------------------------------------------------- """ Descrption: """ import os import sys BASE_DIR = ...
import sys import os import logging import getopt import re import io import subprocess import tempfile import codecs import pickle from zipfile import ZipFile import gzip import time import shutil from egazette.ocr.djvuxml import Djvu from egazette.ocr.abbyxml import Abby from egazette.ocr.htmlmaker import HtmlMaker ...
import datetime from datetime import timedelta from typing import List, Optional, Tuple import saml2 from pydantic import BaseModel, Field from saml2.entity_category.edugain import COC class ExternalLink(BaseModel): label: str url: str class WaldurCore(BaseModel): EXTENSIONS_AUTOREGISTER = Field( ...
# from dsgn.utils.torch_utils import generate_coord from __future__ import print_function import argparse import os import time import numpy as np import torch from torch._C import device import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.optim as optim from torch.serializatio...
import json import logging import subprocess import mdtraj.version import netCDF4 as nc import numpy as np import parmed import simtk.openmm.version import yaml from mdtraj.formats.hdf5 import HDF5TrajectoryFile from mdtraj.utils import ensure_type, in_units_of from parmed.amber.netcdffiles import NetCDFTraj from blu...
import os import numpy as np from PIL import Image import math from scipy import signal import pickle from datetime import datetime class LFWDataloader(): def __init__(self, data_path, batch_size=1): self.data_path = data_path self.data = [] self.labels = [] self.batch_size = batch...
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from person_detector.person_finder.yolo_utils import build_targets, to_cpu class Darknet53(nn.Module): def __init__(self, with_head=False): super(Darknet53, self).__init__() if with_head: print("Warni...
""" @file @brief Functions which converts :epkg:`ONNX` object into readable :epkg:`python` objects. """ import pprint import warnings import numpy from scipy.sparse import coo_matrix from onnx import onnx_pb as onnx_proto, TensorProto from onnx.numpy_helper import to_array, from_array as onnx_from_array from skl2onnx.c...
# $Id: pcap.py 77 2011-01-06 15:59:38Z dugsong $ # -*- coding: utf-8 -*- """Libpcap file format.""" from __future__ import print_function from __future__ import absolute_import import sys import time from decimal import Decimal from . import dpkt from .compat import intround TCPDUMP_MAGIC = 0xa1b2c3d4 TCPDUMP_MAGIC_...
# Copyright 2019-2021 Cambridge Quantum Computing # # 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 a...
# limatix_writespreadsheet.py: # a processtrak script that writes your # experiment log or a tabular portion of your # experiment log to a .ods spreadsheet import collections import zipfile import sys import copy try: # py2.x from urllib import pathname2url from urllib import url2pathname from urllib...
from BaseType.Subject import Subject from Event.Event import Event from Event.EventHandler import (PriceHandler, SignalHandler, FillHandler, ClearHandler, ENDHandler) from Event.EventQueue import EVENT_QUEUE from pandas.tseries.offsets import DateOffset from Logger.Logger import LoggerStringUnit from BaseType.Const imp...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Tensorflow DNNRegressor in Python # CC-BY-2.0 <NAME> # see: http://www.cbcity.de/deep-learning-tensorflow-dnnregressor-einfach-erklaert # # this is next to impossible to set up nicely with argparse, therefore move it at least to the top of the file #list_of_hl=[ # ...
"""File holding topological optimization/simplification code.""" from collections import defaultdict from copy import deepcopy from typing import DefaultDict, Dict, Iterable, List, Optional, Set, Tuple, cast import networkx as nx from loguru import logger from ..compilation.artifacts import CompilationArtifacts from ...
#!/usr/bin/env python import os import time import logging import dask.bag as db from dask.diagnostics import ProgressBar from h5py import __version__ as H5PY_VERSION from blimpy import __version__ as BLIMPY_VERSION from .turbo_seti_version import TURBO_SETI_VERSION from .kernels import Kernels, Scheduler from .data...
# coding: utf-8 import os import webbrowser from typing import List from collections import OrderedDict from datetime import datetime import pandas as pd import traceback from .objects import Mark, Direction, BI, FakeBI, FX, RawBar, NewBar from .utils.echarts_plot import kline_pro from .signals import check_three_fd, c...
import os import sys import json import pickle import hashlib import traceback import cclib import openbabel.pybel as pybel import numpy as np import openbabel as ob import scipy.sparse as sp import sklearn.preprocessing # constants CstBohr2Ang = 0.52917721092 CstHartree2eV = 27.21138505 CstHartree2cm1 = 219474.63137...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # king_phisher/server/server_rpc.py # # 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...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
import matplotlib.pyplot as plt import matplotlib.patches as mpatches from matplotlib.backends.backend_pdf import PdfPages import pandas as pd import numpy as np from yellowbrick.regressor import PredictionError, ResidualsPlot from yellowbrick.regressor.alphas import AlphaSelection import yellowbrick as yb from typing ...
import time import os import glob import re from json.decoder import JSONDecodeError from rotkehlchen.exchange import data_up_todate from rotkehlchen.kraken import kraken_to_world_pair from rotkehlchen.bittrex import trade_from_bittrex from rotkehlchen.bitmex import trade_from_bitmex from rotkehlchen.binance import tr...
# Copyright 2021 Google LLC # Copyright 2021 <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/LICENSE-2.0 # # Unless required by applicable law o...
# -*- coding: utf-8 -*- from __future__ import print_function import logging import os import posixpath import xml.etree.ElementTree as ET import defcon from mutatorMath.objects.error import MutatorError from mutatorMath.objects.location import Location from mutatorMath.objects.mutator import Mutator from mutatorMath...
"""Tags! Tag types: - Image gallery tags - Folder on disk, with images in it. "imgmemes" - Image macro tags - Image base, font, justifcation, border, maxwidth, etc. - Love, hate, etc. - Text tags - "textmemes" - Use creatable. - Custom tags - Python custom image generation (everything else). """ ...
# -*- coding: utf-8 -*- from datetime import datetime import json import os import socket from django import forms from django.conf import settings from django.forms.models import formset_factory, modelformset_factory from django.template.defaultfilters import filesizeformat import commonware import happyforms import...
#!/usr/bin/env python3 """ The mol-mod data importer takes an Excel or Tar file stream, then rearranges and inserts the data into the database. The script is executed inside a running container using the import_excel.py wrapper. """ import hashlib import json import logging import os import re import select import sys...
import numpy as np import scipy.special as special import scipy.spatial.distance as distfuncs def cart2sph(x, y, z): """Conversion from Cartesian to spherical coordinates Parameters ------ x, y, z : Position in Cartesian coordinates Returns ------ phi, theta, r: Azimuth angle, zenith ang...
import sublime import sublime_plugin import datetime import re import regex from pathlib import Path import os import fnmatch import OrgExtended.orgparse.node as node from OrgExtended.orgparse.sublimenode import * import OrgExtended.orgutil.util as util import OrgExtended.orgutil.navigation as nav import OrgExtended...
# 导入所需的库 import pandas as pd import numpy as np import talib as tl import tensorflow as tf from sklearn.preprocessing import MinMaxScaler # 股票策略模版 # 初始化函数,全局只运行一次 def init(context): set_benchmark('000300.SH') log.info('策略开始运行,初始化函数全局只运行一次') set_commission(PerShare(type='stock',cost=0.0002)) set_slippa...
import os from os import path import unittest from datetime import datetime from collections import OrderedDict from semantic_version import Version as SemanticVersion from mytardis_ngs_ingestor.illumina_uploader import \ get_fastqc_summary_for_project import mytardis_ngs_ingestor from mytardis_ngs_ingestor.illumin...
import json import logging import os from datetime import datetime from typing import List import pendulum import requests from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import KubernetesPodOperator from airflow.providers.cncf.kubernetes.utils import pod_launcher from airflow.providers.slack.operators...
# -*- coding: utf-8 -*- import sys from copy import deepcopy sys.path.append('.') import argparse import os import time import math import json import torch from torch.autograd import Variable as V import torch.backends.cudnn as cudnn import torch.nn.functional as F import torchvision.datasets as dset import torchvis...
# -*- coding: utf-8 -*- import grequests import requests from couchdb.http import ResourceConflict from datetime import datetime, timedelta, time from gevent.pool import Pool from iso8601 import parse_date from json import dumps from logging import getLogger from openprocurement.chronograph.utils import context_unpack ...
import numpy as np import numpy.linalg as nla from numpy import cos, sin import scipy.linalg as sla import scipy.interpolate import scipy.optimize from fym.core import BaseEnv, BaseSystem from fym.utils.rot import quat2dcm, quat2angle, angle2quat class Aircraft3Dof(BaseSystem): g = 9.80665 rho = 1.2215 m...
# -*- mode: python; coding: utf-8 -*- # Copyright (c) 2020 Radio Astronomy Software Group # Licensed under the 2-clause BSD License """Tests for Mir class. Performs a series of test for the Mir class, which inherits from UVData. Note that there is a separate test module for the MirParser class (mir_parser.py), which ...
import numpy as np from typing import Any from typing import Dict from typing import List from typing import Type from typing import Tuple from typing import Union from typing import Callable from typing import Optional from cftool.misc import register_core from cftool.misc import shallow_copy_dict from cftool.misc im...
import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import GPy import numpy as np import matplotlib as mpl import time from GPy.core.parameterization.variational import VariationalPosterior try: import visual visual_available = True except ImportError: visual_available = False class d...
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Legacy script to plot distribution of certain classes onto chromosomes. Adapted from the script used in the Tang et al. PNAS 2010 paper, sigma figure. """ import logging import sys from itertools import groupby from math import ceil import numpy as np from jcvi.apps....
# # Core implementation of the job system. Includes the main JobQueue and # JobCron tasks, as well as related tools. # from abc import ABC, abstractmethod from datetime import datetime, MINYEAR, MAXYEAR import asyncio import calendar import collections import copy import functools import logging import ti...
#!/usr/bin/env python # coding=utf-8 # Copyright 2020 The HuggingFace Team 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-...
#!/usr/bin/python # The MIT License # # Copyright (c) 2007 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
# -*- coding: utf-8 -*- """ © Siemens AG, 2020 Author: <NAME> (<EMAIL>) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at <http://www.apache.org/licenses/LICENSE-2.0>. Unless required by applicable ...
from discord.ext import commands, tasks import discord import json from loguru import logger import asyncio from bs4 import BeautifulSoup import aiohttp import sys from utils.utils import * from utils.data import * import math import datetime with open('data/server.json') as d: server = json.load...
# -*- coding: utf-8 -*- """ Functions for working with FreeSurfer data and parcellations """ import os import warnings from nibabel.freesurfer import read_annot, read_geometry import numpy as np import scipy.sparse as ssp from scipy.ndimage.measurements import _stats, labeled_comprehension from scipy.spatial.distance...
# Written in python3. import numpy as np import sys import os import tensordispenser import initialtensors import scipy.sparse.linalg as spsla import operator import itertools import scaldim_plot from tensorstorer import write_tensor_file, read_tensor_file from functools import partial from timer import Timer from TNR...
""" Data pruning unit tests. Copyright (c) 2018-2021 Qualcomm Technologies, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met: - Redistributions ...
import functools import inspect import re import typing # it's weird importing get_args and get_origin directly from contextlib import suppress from collections import deque from types import NoneType, UnionType from typing import Optional, Any, Callable, Sequence, Annotated, Literal, Union, TypeVar import attrs fro...
""" Copyright (c) 2018, 2019 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import print_function, absolute_import, unicode_literals import abc import json import logging import re import os impo...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import os from collections import OrderedDict from sbpy.data import dimensions import pytest from copy import deepcopy import astropy.units as u from astropy.coordinates import Angle from astropy.table import QTable, Column from astropy.time import Time fr...
from flask_wtf import FlaskForm from flask import render_template from wtforms.widgets import TextArea, TextInput, Select from wtforms.fields import HiddenField, FileField, SelectMultipleField from wtforms import fields, widgets, Form from appshell.markup import element, button, link_button, GridColumn from markupsafe ...
from __future__ import division import matplotlib.pyplot as plt from matplotlib import colors as mcolors import functools import random import json import sys from BaseControl.TextItem import TextItem, TextItemDlg from BaseControl.LineItem import LineItem, LineItemDlg from BaseControl.Location import LocationItem, L...
import numpy as np import matplotlib matplotlib.use('Agg') import networkx as nx import csv from numpy import ma import dynesty import corner import copy import matplotlib.pyplot as plt import random as rnd from multiprocessing import Pool, cpu_count import INoDS_convenience_functions as nf import warnings import scipy...
import logging from six.moves.urllib.parse import urlparse from pprint import pformat from bson import ObjectId from bson.dbref import DBRef from elasticsearch.exceptions import ElasticsearchException, NotFoundError from elasticsearch.serializer import JSONSerializer from elasticsearch_dsl import Search, Q, A from el...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Automatically initialize and run idealized experiments in WRF on a single computer or cluster. @author: <NAME> """ import numpy as np import math import os import datetime import argparse import glob import importlib import inspect from copy import deepcopy from path...
from Modules.Rotater import rotater from Modules.Utilities import utilities import requests import json import re import linecache import itertools import threading import time import sys class colors: HEADER = '\033[95m' WHITE = '\033[0m' OKBLUE = '\033[94m' OKCYAN = '\033[96m' OKGREEN = '\033[92m...
import os, argparse, codecs, glob, json, random import torch import numpy as np from tqdm import tqdm from pretrained_model import Pretrained_Model from distiller import Distiller from util import smart_lower, sort_by_idx, compute_accuracy import warnings from scipy.stats import spearmanr, pearsonr from sklearn.metrics...
# -*- coding: utf-8 -*- """ Created on Mon Nov 13 20:45:47 2017 @author: Rachit & Nitesh """ import json class tweetsSenti: def __init__(self, **kwargs): return super().__init__(**kwargs) def searchTweets(self, q, ct): import numpy as np import pandas as pd import re ...
# -*- coding: UTF-8 -*- # # Copyright (c) 2008, <NAME> <<EMAIL>> # # 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...
import networkx as nx import matplotlib.pyplot as plt import pandas as pd import numpy as np import datetime from os.path import join semester_start = '2019-10-01' semester_end = '2020-02-28' study_map = { 'Bachelorstudium' : 'bachelor', 'Masterstudium' ...
# coding: utf-8 # # Mask R-CNN - Inspect Nucleus Trained Model # # Code and visualizations to test, debug, and evaluate the Mask R-CNN model. # In[1]: import os import sys import random import math import re import time import numpy as np import tensorflow as tf import matplotlib import matplotlib.pyplot as plt i...
import asyncio import json import logging import re from abc import ABC, abstractmethod from datetime import datetime from functools import partial from typing import List, Union, Dict, Callable, Any, Coroutine, Optional, Awaitable, Tuple import aiohttp import telepot from telepot.aio.loop import OrderedWeb...
import pandas as pd import torch import torch.nn as nn import torch.optim as optim import itertools from collections import deque from io import StringIO from prepare_data import DataProcessor from subprocess import check_output import time import os from datetime import datetime from sklearn.preprocessing import Stand...
""" DIRECT Nine DoF Manipulation Panel """ __all__ = ['Placer', 'place'] # Import Tkinter, Pmw, and the dial code from this directory tree. from panda3d.core import * from direct.showbase.TkGlobal import * from direct.tkwidgets.AppShell import * from direct.tkwidgets import Dial from direct.tkwidgets import Floater f...
#!/usr/bin/env python ################################################################################ # Author: <NAME> (<EMAIL>) # # PURPOSE: # To provide plotting and analysis routines for tracer particles for nubhlight. # Performs simple binning. Saves plots, etc. ###################################################...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Core Zen Coding library. Contains various text manipulation functions: == Expand abbreviation Expands abbreviation like ul#nav>li*5>a into a XHTML string. === How to use First, you have to extract current string (where cursor is) from your test editor and use <code>fi...
#!/usr/bin/env python3 import random from collections import OrderedDict from gym_minigrid.minigrid import * from gym_minigrid.register import register class BaseCaveGoalEnv(MiniGridGoalEnv): class Actions(IntEnum): # Turn left, turn right, move forward left = 0 right = 1 forwa...
# Version: 0.19 """The Versioneer - like a rocketeer, but for versions. The Versioneer ============== * like a rocketeer, but for versions! * https://github.com/python-versioneer/python-versioneer * <NAME> * License: Public Domain * Compatible with: Python 3.6, 3.7, 3.8, 3.9 and pypy3 * [![Latest Version][pypi-image]...
import bottle import re import os import numbers import json import importlib from zipfile import ZipFile import babel.dates import base import foodsoft class Session(bottle.Bottle): def __init__(self): super().__init__() self.instance = None self.foodsoft_connector = None self.set...
"""Functions in Python for Turtle Art.""" from turtle import Turtle, colormode, done, tracer, update import random from random import randint colormode(255) # get an input from the user def main() -> None: """The entrypoint of the program.""" user_input: str = input("Enter a word for a randomly generated p...
import multiprocessing as mp from copy import copy import numpy as np import tkinter import pickle import os from itertools import accumulate from matplotlib import pyplot as plt, lines from casadi import Callback, nlpsol_out, nlpsol_n_out, Sparsity from ..misc.data import Data from ..misc.enums import PlotType, Cont...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, <NAME> <<EMAIL>> # Sponsored by Four Kitchens http://fourkitchens.com. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DO...
"""Early-pipeline operations that error-check and lower grammars.""" from __future__ import annotations # mypy: disallow-untyped-defs, disallow-incomplete-defs, disallow-untyped-calls import collections import dataclasses from dataclasses import dataclass import typing from .grammar import (CallMethod, Element, End,...
import models.daslip as model import numpy as np import matplotlib.pyplot as plt import scipy.io as spio import pickle from matplotlib import gridspec from enum import Enum # Functions to read in a MAT file and then convert it to an easily accessible # dictionary. These functions come thanks to the post: # https://st...
#!/usr/bin/env python # A Global import to make code python 2 and 3 compatible from __future__ import print_function def make_graphs(graph_dir, mat_dict, centroids, aparc_names, n_rand=1000): #mat_dict comes from make_corr_matrices.py ''' A function that makes all the required graphs from the correlation ...
# 根据op的身体节点坐标,根据决策树,返回命令 from math import atan2, degrees, sqrt, pi, fabs from simple_pid import PID import time def distance(a, b): if a[0] is None or b[0] is None: return None return int(sqrt((b[0]-a[0])**2+(b[1]-a[1])**2)) def angle(A, B, C): if A[0] is None or B[0] is None or C[0] is None: ...
"""This module contains these classes: `Hfss3dLayout` and `SweepString`.""" from __future__ import absolute_import import os from .application.Analysis3DLayout import FieldAnalysis3DLayout from .desktop import exception_to_desktop from .modules.SolveSetup import Setup3DLayout from .generic.general_methods import gene...
# -*- coding: utf-8 -*- # StreamOnDemand Community Edition - Kodi Addon # ------------------------------------------------------------ # streamondemand 5 # Copyright 2015 <EMAIL> # http://www.mimediacenter.info/foro/viewforum.php?f=36 # # Distributed under the terms of GNU General Public License v3 (GPLv3) # http://www...
# Copyright (c) 2021 Mira Geoscience Ltd. # # This file is part of geoapps. # # geoapps is distributed under the terms and conditions of the MIT License # (see LICENSE file at the root of this source code package). import os import sys from multiprocessing.pool import ThreadPool from typing import Union from uuid...
# (C) <NAME> and Carnegie Mellon University, 2017 import logging import time from tensorlog import comline from tensorlog import config from tensorlog import declare from tensorlog import funs from tensorlog import matrixdb from tensorlog import ops from tensorlog import util conf = config.Config() conf.reparameteri...
# -*- coding: utf8 -*- """ ====================================== Project Name: NLP File Name: train_ee Author: czh Create Date: 2021/9/8 -------------------------------------- Change Activity: ====================================== """ import os import glob import json import re import time import...
# Copyright 2017 Google Inc. All Rights Reserved. # 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/LICENSE-2.0 # # Unless require...
import logging import os import random import re import shutil import subprocess import sys import time from collections import Counter from datetime import datetime from math import nan from os import getcwd, rename, walk from pathlib import Path from random import randint, shuffle, uniform from subprocess import PIPE...
import numpy as np import pandas as pd import os import cv2 from copy import deepcopy def load_SDD(path='data/SDD/', mode='train'): ''' Loads data from Stanford Drone Dataset. Makes the following preprocessing: -filter out unnecessary columns (e.g. generated, label, occluded) -filter out non-pedestria...
"""mfdn_v15.py -- driver module for MFDn v15. <NAME> University of Notre Dame - 06/08/17 (pjf): Initial version of MFDn v15 scripting, built from mfdn_v14.py. - 06/22/17 (pjf): Update references to mcscript.exception.ScriptError. - 07/31/17 (pjf): Create work directory if nonexistent when running mfdn. - 08/11/17 (pj...
from PIL import Image from matplotlib.offsetbox import (OffsetImage, AnnotationBbox) import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy import stats from matplotlib.lines import Line2D def cm2inch(*tupl): """ This function convertes cm to inches Obtained from: https://stackover...
#!/usr/bin/env python3 import zipfile import re import json import time import threading import queue import shutil import subprocess import multiprocessing import sys import os import urllib.request deps = [ #('org.codehaus.jackson', 'jackson-core-asl', '1.9.13'), #('org.codehaus.jackson', 'jackson-mapper-asl', ...
# -*- coding: utf-8 -*- from __future__ import print_function as _ from __future__ import division as _ from __future__ import absolute_import as _ import numpy as np from ...commons import builtins from ...commons.basic_graph_ops import disconnect_edge, connect_edge, \ delete_node, replace_node, connect_dests, to...
import discord from discord.ext import commands import asyncio import random import aiohttp import dateutil.parser import dataset import json from urllib.parse import quote_plus botver = "Mewtwo v2.0" #--Bot's version, obviously--# melo =[ #--List of images for meloetta command--# 'https://sks316.s-ul.eu/gKaVnpMW...
import math import re import numpy as np import torch from torch import nn from torch.nn import functional as F from fibber import log from fibber.metrics.bert_lm_utils import get_lm from fibber.paraphrase_strategies.asrs_utils_text_parser import TextParser from fibber.paraphrase_strategies.asrs_utils_wpe import get_...
import csv import io import os import re import sys from contextlib import ExitStack from itertools import chain, repeat, islice from pathlib import Path from string import ascii_letters, digits, punctuation from textwrap import wrap from smart_open import smart_open from tabulate import tabulate from terminaltables ...
import gym from gym import spaces from random import randint import numpy as np import torch from pygame.locals import * import pygame import time device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") torch.autograd.set_detect_anomaly(True) ## Size of game GAME_WIDTH = 20 GAME_HEIGHT = 15 GAME_DEPTH ...
#!/usr/bin/env python from manimlib.imports import * from my_svg_class import MyCreature # To watch one of these scenes, run the following: # python -m manim example_scenes.py SquareToCircle -pl # # Use the flat -l for a faster rendering at a lower # quality. # Use -s to skip to the end and just save the final frame #...
""" (c) 2020 <NAME>, MIT Licence Python Landscape Classification Tool (PyLC) An evaluation of deep learning semantic segmentation for land cover classification of oblique ground-based photography MSc. Thesis 2020. <http://hdl.handle.net/1828/12156> <NAME> <<EMAIL>>, June 2020 University of Victoria Module: Analyzer Ut...
############################################################################# # Import # ############################################################################# import os import random import PIL.Image as Image from tqdm import tqdm import numpy ...
""" views.py defines the application logic and controls what webpage is rendered on each specific url """ import json from django.utils import timezone from django.contrib import messages from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required from django.co...
""" This file contains the code to generate the pulse-ox report. Many of the functionalites used here have been borrowed from Nilearn (https://nilearn.github.io/) """ import matplotlib.pyplot as plt import numpy as np import os import string from html import escape from os.path import join as opj from scipy.signal ...
# -*- coding: UTF-8 -*- """Crop Rows Image Processing .. moduleauthor:: <NAME> <<EMAIL>> """ from __future__ import division from PIL import Image import warnings import random import os import time import numpy as np import cv2 import math from math import sin,cos,radians import imutils_perspective as imutils imp...
"""Tools for RFI flagging This module contains tools for finding and removing Radio Frequency Interference (RFI). Note that this generates masks where the elements containing RFI are marked as :obj:`True`, and the remaining elements are marked :obj:`False`. This is in contrast to the routines in :mod:`ch_pipeline.rfi...
#!/usr/bin/env python import argparse import functools import logging import signal import sys from botocore.exceptions import ClientError import argcomplete from . import CHANGE_SET_FORMAT, __version__ from . import stack_set from . import aws import boto3 from .s3 import temporary_bucket from .helper import collect...