text
stringlengths
8.04k
46.5k
import unittest import tempfile import os import numpy import caffe import h5py class Message_In(caffe.Layer): """A layer that take Messages in and output Q (Q=5) type of messages for prediction""" def setup(self, bottom, top): # self.SceneM = [] # N*(P+1)*5 # self.Action...
import cv2 as cv from IPython.display import clear_output import matplotlib.pyplot as plt import pandas as pd from PIL import Image, ImageOps, ImageChops, ImageDraw import numpy as np import SimpleITK as sitk from skimage.color import rgb2hed from skimage.exposure import histogram from skimage.filters import threshold_...
#!/usr/bin/env python # This program calculates equipartition and other parameters for # radio sources. from datetime import datetime, timedelta from astropy import wcs from astropy.wcs import WCS from astropy.time import Time from coords import * import astropy.visualization as vis from astropy.io import fits from...
# curio/kernel.py # # Main execution kernel. import socket import heapq import time import os import sys import logging import signal from selectors import DefaultSelector from collections import deque, defaultdict # Logger where uncaught exceptions from crashed tasks are logged log = logging.getLogger(__name__) fro...
#! /usr/bin/env python3 # Script to clean out a file system such as scratch based on certain criteria # (e.g. not accessed or modified in x days) # # archiving option # /scratch/delete30/lastname_f/projectx/.archive-me is archived to # /economy/lastname_f/archive/delete30/projectx-2014-08-21/ # # fs-cleaner dirkpeters...
from collections import OrderedDict from spacy.matcher import Matcher from spacy.tokens import Token import question_generation.sentence_simplifier as simplifier from keyword_extraction.keywords_filtered import get_keywords_with_scores from question_generation import * from summarization.sentence_provider import Sent...
################################################################################ # LexaLink Copyright information - do not remove this copyright notice # Copyright (C) 2012 # # Lexalink - a free social network and dating website platform for the Google App Engine. # # Original author: <NAME> # Documentation and addi...
"""Copyright 2014 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in ...
import os import numpy as np import cv2 import pickle import glob import matplotlib.image as mpimg import matplotlib.pyplot as plt from moviepy.editor import VideoFileClip # Declare a line class to help with the transition from one frame to another class Line(): def __init__(self): # line found in the last...
from bokeh.plotting import figure from bokeh.layouts import column, row, Spacer from bokeh.io import curdoc from bokeh.models import ColumnDataSource, Slider, Button, RadioButtonGroup, Arrow, OpenHead#, Div from bokeh.events import Pan from math import sin, cos, pi, atan2, sqrt, acos from mpmath import csc from os.path...
import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import FormatStrFormatter as FSF from matplotlib.ticker import MultipleLocator from astropy.io import ascii from scipy.optimize import fmin from StellarSpectra.spectrum import DataSpectrum c_ang = 2.99792458e18 #A s^-1 #k.xaxis.set_major_format...
import click import pandas as pd import igraph as ig import numpy as np from copy import deepcopy from scipy import optimize from scipy.sparse.csgraph import dijkstra, minimum_spanning_tree, floyd_warshall, bellman_ford, johnson, shortest_path from math import exp from numpy import log # VISUALISATION FUNCTIONS impo...
# Copyright 2019 AUI, Inc. Washington DC, USA # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
from qfengine.data.price.price_source import MySQLPriceDataSource as SQLTable from qfengine.asset import assetClasses import pandas as pd from typing import Union, List, Dict import os import numpy as np import logging import functools from qfengine import settings import concurrent.futures logger = logging.getLogge...
import os from _warnings import warn import numpy as np import matplotlib.pyplot as plt import torch import torchvision import tqdm from matplotlib import pyplot as plt from matplotlib.widgets import Slider from torch import nn import wget from warnings import warn import constants as const import skimage import time ...
# SPDX-Package: FAVD # SPDX-PackageHomePage: https://github.com/secureIT-project/FAVD # SPDX-License-Identifier: MIT # SPDX-FileCopyrightText: 2021-2022 <NAME>, <NAME>, <NAME> # common support from the dangerous words study ## this function leaves a marker for removal of 'set()' in order to experiment ## with using t...
import networkx as nx from networkx.classes.graph import Graph from networkx.classes.digraph import DiGraph from networkx.classes.multigraph import MultiGraph from networkx.classes.multidigraph import MultiDiGraph from networkx.classes.coreviews import MultiAdjacencyView from networkx.classes.reportviews import OutMult...
import numpy as np from sfepy.base.conf import ProblemConf from sfepy.discrete.problem import Problem from sfepy.mesh.mesh_generators import gen_block_mesh from sfepy.postprocess.viewer import Viewer from scipy.interpolate import interpn import matplotlib.pyplot as plt from matplotlib import ticker ...
from scipy.signal import butter, freqz, filtfilt import matplotlib.pyplot as plt import numpy as np def normalize(y, ymax=None, ymin=None, center=None, yerr=None, symgamma=None): ''' :param y: :param ymax: :param ymin: :param center: option ---- None, zero, 0, mean :param symgamma: :return...
from __future__ import print_function import sys, random from operator import attrgetter from collections import OrderedDict from copy import deepcopy from sklearn.preprocessing import normalize from sklearn.cluster import KMeans from sklearn.metrics import silhouette_score from scipy.stats import rankdata import numpy...
import abc import anndata import numpy as np import os import pandas as pd import pytest from typing import Union from sfaira.consts import AdataIdsSfaira, CACHE_DIR from sfaira.data import DistributedStoreSingleFeatureSpace, DistributedStoreMultipleFeatureSpaceBase, load_store from sfaira.estimators import EstimatorK...
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import # goal: support python 2.7 -> python 3.5+ import future from future.utils import iteritems from builtins import range import h5py import numpy as np """ ------ EEGHDF ------ EEGHDF is a format for hdf5 files to encapsulate EEG f...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: # # Copyright 2021 The NiPreps Developers <<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 ...
"""Runge-Kutta ODE timestepper.""" __copyright__ = """ Copyright (C) 2007-2013 <NAME> Copyright (C) 2014, 2015 <NAME> """ __license__ = """ 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 withou...
#!/usr/bin/python # Copyright: (c) 2020, DellEMC """ Ansible module for managing Snapshots on Unity""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': '...
#------------------------------------------------------------------------------ #----TORONTONENSIS #----<NAME>, <NAME>, <NAME>, <NAME> # #----Github: https://github.com/A-Malone/DMC-2015 #------------------------------------------------------------------------------ #---------------------------------------------------...
import trimesh import numpy as np import sys from matplotlib.cm import get_cmap as colormap import os from glob import glob import cv2 import shutil import json import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt sys.path.append(os.path.abspath(__file__)) import pyrender from util import get_...
import socket, os, time, random, sys from progress.bar import IncrementalBar from termcolor import colored from colorama import init from alive_progress import alive_bar def banner(): print ("\033[33m Firebox Ddos V2") items = range(10000000) with alive_bar(len(items)) as bar: for item in items: ...
# -*- coding: utf-8 -*- """The JSONManipulator's core module with all the classes and functions.""" import sys import json import copy from typing import List, Dict from difflib import SequenceMatcher import JSONManipulator.exceptions as exceptions def set_up(full_path) -> None: """Configure the initial JSON f...
from __future__ import division import logging import csv from builtins import str as text from itertools import tee, islice, zip_longest from typing import Optional from sciencebeam_utils.utils.compat import ( python_2_unicode_compatible ) from sciencebeam_utils.utils.csv import ( csv_delimiter_by_filename,...
import os import pandas as pd import numpy as np from tqdm import tqdm from ras_method import ras_method import subprocess data_path = os.path.join('C:\\','Projects','MRIA_Argentina','data') import warnings warnings.filterwarnings('ignore') def dollar_pesos(): """ Dictionary of dollar to pesos conversion values...
from line2.models.command import HybridCommand, Parameter, ParameterType, CommandResultType, CommandResult from random import randint from line2.utils import IsEmpty, Lock from requests import Session as RequestsSession, get as RequestsGet, post as RequestsPost from json import loads from line2.models.types import Ch...
import pandas from django.db import models from django.db.models import Value from django.db.models.functions import Concat from django.utils import timezone from datetime import datetime, date from collections import defaultdict from utils.functional import BaseMapper, cached_classproperty, clean_empty, chunks from c...
""" :Authors: - <NAME> """ import random import os import itertools import numpy as np import sys from collections import defaultdict import grasp.ptypes as ptypes import grasp.semiring as semiring from types import SimpleNamespace from grasp.mt.segment import SegmentMetaData import grasp.mt.cdec_format as cdeclib ...
from common import * from math import floor, ceil from objects import * from doodads import * from paths import * class KPMapScene(QtGui.QGraphicsScene): def __init__(self): QtGui.QGraphicsScene.__init__(self, 0, 0, 512*24, 512*24) # todo: handle selectionChanged # todo: look up why I used setItemIndexMetho...
#!/usr/bin/env python # coding: utf-8 # [10] import numpy as np;import matplotlib.pyplot as plt get_ipython().run_line_magic('pylab', 'inline') from scipy import stats from IPython.html.widgets import interact # ## Regression # Regression np.means fitting data to a line or a polynomial. The simpliest case is a l...
from mittab.apps.tab.models import * from django.db.models import * import random from mittab.libs import errors, mwmatching from mittab.libs.tab_logic.stats import * from mittab.libs.tab_logic.rankings import * from decimal import * from datetime import datetime import itertools def pair_round(): """ Pair th...
import numpy as np from dataclasses import dataclass,field import mapVBVD as pkg from mapVBVD.read_twix_hdr import read_twix_hdr from mapVBVD.twix_map_obj import twix_map_obj from attrdict import AttrDict,AttrMap,AttrDefault\ def bitget(number, pos): return (number >> pos) & 1 def set_bit(v, index, x): #Set the...
from functools import partial from warnings import warn import numpy as np from menpo.transform import Translation from .base import Image, _convert_patches_list_to_single_array from .patches import set_patches def pwa_point_in_pointcloud(pcloud, indices, batch_size=None): """ Make sure that the decision of ...
# encoding: utf-8 """ community.py Created by <NAME> on 2009-11-05. Copyright (c) 2009-2012 Exa Networks. All rights reserved. Modified by Orange - 2014 """ from struct import pack,unpack import socket from bagpipe.exabgp.message.update.attribute import AttributeID,Flag,Attribute from bagpipe.exabgp.structure.asn ...
#!/usr/bin/env python ############################################################################# ## # This file is part of Taurus ## # http://taurus-scada.org ## # Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## # Taurus is free software: you can redistribute it and/or modify # it under the terms of t...
# -*- coding: utf-8 -*- ''' Installation of Python Packages Using pip ========================================= These states manage system installed python packages. Note that pip must be installed for these states to be available, so pip states should include a requisite to a pkg.installed state for the package which...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
#!/usr/bin/env python2 # Copyright 2016 <NAME>. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 """ completion_test.py: Tes...
#!/usr/bin/env python from __future__ import print_function ''' Generates AST terms and serialization code for the Java driver ''' import re import os import os.path import json import codecs import argparse import copy import itertools import string import logging from collections import OrderedDict, namedtuple from...
""" PyTorch EfficientDet model Based on official Tensorflow version at: https://github.com/google/automl/tree/master/efficientdet Paper: https://arxiv.org/abs/1911.09070 Hacked together by <NAME> """ import torch import torch.nn as nn import logging import math from collections import OrderedDict from typing import L...
import numpy as np #from scipy.fftpack import fft,ifft from numpy.fft import fft,ifft import matplotlib.pyplot as plt import pywt import scipy import scipy.signal from scipy import signal from Audio_proc_lib.audio_proc_functions import * from nsgt import NSGT, LogScale, LinScale, MelScale, OctScale #from constant_q_FB ...
''' The Attack class. ''' import datetime import itertools import json import os import time import numpy as np import matplotlib import matplotlib.gridspec as gridspec import matplotlib.pyplot as plt import tensorflow as tf from matplotlib.backends.backend_pdf import PdfPages from ml_privacy_meter.utils.attack_utils...
import gc import os import cv2 import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm import nvgpu import torch from torchvision import transforms from torch.optim import Adam from PIL import Image from skimage.metrics import peak_signal_noise_ratio from skimage.metrics import structural_similarity...
# Copyright 2015 MongoDB, 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, so...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import os import argparse import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.optim.lr_scheduler import CosineAnnealingLR, StepLR from data import S3DIS from model import DGCNN_sems...
# # Copyright (C) Foundry 2020 # import os import re import sys from collections import OrderedDict from typing import Callable, Dict, List, Tuple from PySide2.QtCore import QSize, Qt, Signal from PySide2.QtGui import QPixmap, QTextCursor from PySide2.QtWidgets import (QApplication, QComboBox, QDialog, QErrorMessage,...
import numpy as np from skimage._shared.testing import assert_array_equal from skimage._shared.testing import assert_almost_equal, assert_warns from skimage import data from skimage import img_as_float from skimage import draw from skimage.color import rgb2gray from skimage.morphology import octagon from skimage._share...
"`Image` provides support to convert, transform and show images" from ..torch_core import * from ..data import * from io import BytesIO import PIL __all__ = ['Image', 'ImageBBox', 'ImageSegment', 'ImagePoints', 'FlowField', 'RandTransform', 'TfmAffine', 'TfmCoord', 'TfmCrop', 'TfmLighting', 'TfmPixel', 'Tf...
# coding: utf-8 # # Neural Combinatorial Optimization # In[1]: #-*- coding: utf-8 -*- import tensorflow as tf distr = tf.contrib.distributions import numpy as np from tqdm import tqdm import os import matplotlib.pyplot as plt from utils import embed_seq, encode_seq, full_glimpse, pointer from data_generator impo...
import os import re import textwrap from collections import OrderedDict from jinja2 import Template from conan.tools._compilers import architecture_flag from conan.tools.apple.apple import is_apple_os from conan.tools.build import build_jobs from conan.tools.cmake.toolchain import CONAN_TOOLCHAIN_FILENAME from conan....
# coding=utf-8 # Copyright (c) DIRECT Contributors import logging import pathlib import sys from collections import namedtuple import torch import signal import direct import numpy as np import warnings import functools import gc from typing import Optional, Dict, List, Union, Callable, TypedDict from abc import abst...
# Copyright (c) 2019 Horizon Robotics. 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 applicab...
# Pipeline timings, using Dask # # This takes command line arguments and runs simulation and data reduction, outputing a CSV file of various # timings. # import logging import pprint import socket import time import os import numpy from astropy import units as u from astropy.coordinates import SkyCoord from rascil.dat...
import entity, allocate import numpy as nump import datetime from copy import deepcopy ndsa = 58 #######################################################################Event Processes#################################################################################### def Arrival(arrivalinfo, Sim, Stat, OPTN): """ ...
from sklearn.kernel_approximation import (RBFSampler,Nystroem) from sklearn.ensemble import RandomForestClassifier import pandas import numpy as np import random from sklearn.svm import SVC from sklearn.metrics.pairwise import rbf_kernel,laplacian_kernel,chi2_kernel,linear_kernel,polynomial_kernel,cosine_similari...
# -*- mode: python; coding: utf-8 -*- # Copyright (c) 2018 Radio Astronomy Software Group # Licensed under the 2-clause BSD License """Class for reading FHD save files.""" import numpy as np import warnings from scipy.io.idl import readsav from astropy import constants as const from .uvdata import UVData from .. impo...
#!/usr/bin/env python3 """ Copyright 2010 <NAME> <<EMAIL>> This file is part of PyCAM. PyCAM 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 later version...
# -*- coding: utf-8 -*- # @note: # this file will represent an interface between the ui and the actual commands # this is where all the selection gets logged and the right arguments get piped through from maya import cmds, OpenMaya as OldOpenMaya, OpenMayaUI as OldOpenMayaUI from SkinningTools.Maya.mayaWidget ...
from collections import namedtuple from distutils.version import LooseVersion import logging from logging.handlers import SysLogHandler, TimedRotatingFileHandler import os from pathlib import Path import sys import warnings import appdirs from IPython import get_ipython from ._version import get_versions __version_...
# Copyright (c) 2021 PaddlePaddle 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 ap...
"""This module contains the layout and callbacks for a label's history page.""" import ast import base64 import csv import logging import math import time from datetime import date, datetime, timedelta from io import BytesIO import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import...
#!/usr/bin/env python3 # # tcl_env.py # TCL environment for RL algorithms # # Author: <NAME> import random import numpy as np import pandas as pd from matplotlib import pyplot as plt import gym # Trying out if this works for others. from gym import spaces had some issues import gym.spaces as spaces imp...
import torch import os import glob from torch.utils.data import Dataset import numpy as np import scipy.stats as scipy_stats import numpy.matlib from PIL import Image from torchvision import transforms from xmuda.data.utils.preprocess import create_img_grid, create_voxel_grid, select_points_in_frustum, vox2pix, compute...
#!/usr/bin/env python2 # coding: utf-8 import httplib import logging import socket import time import urllib import urlparse from pykit import http from pykit import utfjson logger = logging.getLogger(__name__) class EtcdException(Exception): pass class EtcdInternalError(EtcdException): pass class NoMo...
# coding:utf-8 import os import shutil import cv2 import math import numpy as np from tqdm import tqdm def FindFileWithSuffix(root, suffix, f_list): """ 递归的方式查找特定后缀文件 """ for f in os.listdir(root): f_path = os.path.join(root, f) if os.path.isfile(f_path) and f.endswi...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Aug 9 17:02:59 2018 @author: bruce """ # last version = plot_corr_mx_concate_time_linux_v1.6.0.py import pandas as pd import numpy as np from scipy import fftpack from scipy import signal import matplotlib.pyplot as plt from matplotlib.colors import ...
#!/usr/bin/env python3 import argparse import datetime import concurrent import concurrent.futures import itertools import logging import os import warnings import rows.forecast.visit import rows.forecast.cluster import rows.forecast.forecast import numpy import pandas import fbprophet import fbprophet.plot import...
import multiprocessing import os import random import shutil import threading import time import traceback import json import re import tempfile from subprocess import run, PIPE from urllib.parse import urlparse from botocore.exceptions import ClientError import boto3 import requests from idseq_dag.engine.pipeline_st...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # "Carving Unit Tests" - a chapter of "The Fuzzing Book" # Web site: https://www.fuzzingbook.org/html/Carver.html # Last change: 2022-01-12 14:55:10+01:00 # # Copyright (c) 2021 CISPA Helmholtz Center for Information Security # Copyright (c) 2018-2020 Saarland University,...
# Copyright 2022 The Kubric 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
import os import json import time import pickle import argparse import dateutil.parser from random import shuffle, randrange, uniform import numpy as np from sqlite3 import dbapi2 as sqlite3 from hashlib import md5 from flask import Flask, request, session, url_for, redirect, \ render_template, abort, g, flash, _...
import enoki as ek import pytest import gc def get_class(name): """Resolve a package+class name into the corresponding type""" if 'cuda' in name: if not ek.has_cuda(): pytest.skip('CUDA mode is unsupported') elif 'llvm' in name: if not ek.has_llvm(): pytest.skip('LL...
import argparse, sys, os import numpy as np from math import radians from plyfile import PlyData, PlyElement from PIL import Image cat_name2id = { 'plane': '02691156', 'car': '02958343', 'chair': '03001627', 'table': '04379243', 'lamp': ...
import os import numpy as np import pandas as pd import matplotlib.pyplot as plt # import seaborn as sns from aif360.datasets import AdultDataset from aif360.datasets import GermanDataset from aif360.datasets import MEPSDataset19 from torch.utils.data import Dataset from sklearn.model_selection import train_...
import os import numpy as np import pandas as pd import torch from skimage import io, img_as_uint from skimage.morphology import skeletonize_3d from numbers import Number from itertools import product from torch.autograd import Variable from torch.utils.data import DataLoader, Dataset from torch.nn.functional import...
from pathlib import Path import pathlib import pickle import time from collections import defaultdict from numpy import meshgrid as n_mesh from second.core.box_np_ops import camera_to_lidar from second.core import box_np_ops import cv2 import numpy as np from skimage import io as imgio from PIL import Image import...
# coding: utf-8 from unittest import TestCase, main from string import ascii_letters from random import choice from future.utils import viewitems from wtforms.form import BaseForm from amgut.connections import ag_data from amgut.lib.data_access.survey import ( QuestionSingle, QuestionMultiple, QuestionText, Questio...
#!/usr/bin/python # # Copyright 2018 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
import logging from lxml import etree import core.nodes.base import core.nodes.physical from core.emulator.emudata import InterfaceData, LinkOptions, NodeOptions from core.emulator.enumerations import NodeTypes from core.nodes import nodeutils from core.nodes.base import CoreNetworkBase from core.nodes.ipaddress impo...
#Protein/polmyer analysis functions import MDAnalysis as mda import MDAnalysis.analysis.distances as maa_dist import statsmodels as stats import math import numpy as np import pandas as pd import sklearn def get_protresd_list(prot_atoms, g2_atoms, dmax, universe): """Find all protein residues for which atoms tha...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** from enum import Enum __all__ = [ 'AacAudioProfile', 'AccountEncryptionKeyType', 'AnalysisResolution', 'AssetContainerPermission', ...
# SPDX-FileCopyrightText: : 2017-2020 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT # coding: utf-8 """ Adds electrical generators and existing hydro storage units to a base network. Relevant Settings ----------------- .. code:: yaml costs: year: USD2013_to_EUR2013: dicountrate:...
"""Module that provides molecular visualization tools.""" import warnings import numpy as np import vtkmodules.vtkCommonCore as ccvtk import vtkmodules.vtkCommonDataModel as cdmvtk import vtkmodules.vtkRenderingCore as rcvtk import vtkmodules.vtkDomainsChemistry as dcvtk import vtkmodules.vtkDomainsChemistryOpenGL2 as...
import pytz import parsedatetime from flask.ext.babel import gettext, ngettext from delorean import Delorean, DeloreanInvalidTimezone, parse as dparse from datetime import timedelta, datetime, date from babel.dates import format_datetime from babel.core import default_locale LC_TIME = default_locale('LC_TIME') def ...
import math import pygame import os import random import helpers import graphics class CircleBounce: def __init__(self,manager): self.manager = manager self.minBouncerSpeed = 4 + 1.5*self.manager.difficulty self.bouncerRad = 16 numBouncers = 1#(self.manager.difficulty + 1)/2 #Integer div...
from __future__ import ( unicode_literals, absolute_import, print_function, division, ) import sys from uuid import UUID from io import BytesIO from . import core from . import properties from .mobid import MobID from .rational import AAFRational from .exceptions import AAFPropertyError import dat...
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------- # Name: search/base.py # Purpose: music21 classes for searching within files # # Authors: <NAME> # # Copyright: Copyright © 2011-2013 <NAME> and the music21 Project # License: LGPL or BSD, ...
#------------------------------------------------------------------------------- # Name: klc # Purpose: functions for grabbig data from '.klc' file # # Author: marks # # Created: 08/12/2012 # Copyright: (c) marks 2012 # Licence: <your licence> #----------------------------------------------------...
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """ Text snippets configuration widgets. """ # Standard library imports import bisect import json # Third party imports from jsonschema.exceptions import Validation...
from abc import ABCMeta, abstractmethod, abstractproperty from collections import deque from typing import Any, Dict, List import torch from ppq.core import (COMPUTING_OP, LINEAR_ACTIVATIONS, SOI_OP, NetworkFramework, OperationMeta, Serializable, SingletonMeta, TargetPlatfor...
import mysql.connector from mysql.connector import Error import connect_to_db import query import form2query import dataDict from flask import Flask, render_template, request app = Flask(__name__) @app.route("/") def home(): return render_template("homepage.html") @app.route("/views", methods = ['GET', 'POST'])...
import datetime as dt from collections import namedtuple from xml.etree.ElementTree import Element, SubElement, tostring, XML from xml.dom import minidom import xml.etree.ElementTree as ET from erica.erica_legacy.config import get_settings from erica.erica_legacy.elster_xml.elster_xml_tree import TOP_ELEMENT_ESTA1A, ...
# -*- coding: utf-8 -*- """ Profiling hooks Site: https://mg.pov.lt/profilehooks/ https://github.com/mgedmin/profilehooks This module contains a couple of decorators (`profile` and `coverage`) that can be used to wrap functions and/or methods to produce profiles and line coverage reports. There's a third conv...
""" This file stores generally important functionality for the Cassiopeia-Preprocess pipeline. """ import functools import itertools import os import time from typing import Callable, Dict, List, Optional, Tuple import warnings from collections import defaultdict, OrderedDict import matplotlib import matplotlib.pyplot...