text
stringlengths
8.04k
46.5k
# ========== # # Datasets # # ========== # # System Libraries import cv2 import numpy as np import os import random from tqdm import tqdm # Torch Libraries import torch from torch.utils import data import pickle from torchvision import transforms # DataAugmentation Config doFlip = True doRandomCrop = True train_on...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import from celery import shared_task from django.conf import settings from django_statsd.clients import statsd from django.contrib.gis.geos import GEOSGeometry from apps.modeling.geo...
import getpass import logging import os import signal import tarfile import time from datetime import datetime from distutils.dir_util import copy_tree from shutil import copyfile, rmtree from subprocess import DEVNULL, PIPE, STDOUT, CalledProcessError # nosec from typing import Callable, Dict, Iterable, List, Optiona...
from pony.orm import * from pony.orm.dbapiprovider import StrConverter import os.path from enum import Enum import time import datetime import tehbot class EnumConverter(StrConverter): def validate(converter, val, obj=None): if not isinstance(val, Enum): raise ValueError('Must be an Enum. Got ...
import os from functools import partial, wraps import docopt import six from six.moves import urllib import dcoscli from dcos import (cmds, config, emitting, errors, http, mesos, packagemanager, ssh_util, subprocess, util) from dcos.cosmos import get_cosmos_url from dcos.errors import DCOSException,...
import json import urllib from datetime import datetime from django.conf import settings from django.core.cache import cache from django.utils import translation from django.utils.datastructures import SortedDict import commonware.log import waffle from tower import ugettext_lazy as _lazy import amo from access impo...
# -*- coding: utf-8 -*- """ Script para generar documentación del API. """ import os import sys import shutil import textwrap import subprocess from epydoc import cli, log from epydoc.util import plaintext_to_latex from epydoc.docwriter.latex import LatexWriter from epydoc.apidoc import * SRC_DIR = os.path.join(os...
# # (C) 2011-2016 by <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, modify, merge, publish, #...
import os import cv2 import re import argparse import torch import numpy as np from os import path, makedirs import pickle from tqdm import tqdm from glob import glob from natsort import natsorted import yaml import multiprocessing as mp from multiprocessing import Process from functools import partial from dotmap impo...
import json import os import numpy as np from scipy.optimize import linear_sum_assignment import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import axes3d, Axes3D import cv2 import pylab as pl from numpy import linalg as LA import random import math from mpl_toolkits.mplot3d import axes3d, Axes3D from all_datase...
from collections import OrderedDict import empyrical as ep import numpy as np import matplotlib as mlb mlb.use("TkAgg") from pyfolio import timeseries from pyfolio.utils import (APPROX_BDAYS_PER_MONTH) import backtrader as bt import pandas as pd from backtrader.utils.py3 import items, iteritems from openpyxl import lo...
""" TimeSeriesResponse """ from __future__ import annotations import datetime import json import logging import math from dataclasses import dataclass, field from typing import List, Dict, Tuple from sortedcontainers import SortedSet logger = logging.getLogger(__name__) @dataclass class TimeRange: """ Repr...
################################################################################ # # # THIS MODULE IS DEPRECIATED. PLEASE DON'T ADD TO THE SPAGHETTI HERE IF YOU # # CAN AVOID IT. ...
# FIXME ideally we would use the .pbi as much as possible here, but we need to # add numPasses to avoid looping over BAM records. """ Generate a report summarizing Circular Consensus Read (CCS) results. """ from collections import defaultdict, namedtuple import functools import tempfile import zipfile import os impo...
import math import gym from enum import IntEnum import numpy as np from gym import error, spaces, utils from gym.utils import seeding from gym_rooms.rendering import * from gym.envs.registration import register import random import time CELL_PIXELS = 32 # pixel size COLORS = { 'red' : (255, 0, 0), 'green' : (0, 2...
import unittest try: from tests.synthetic_trace_factory import create_random_trace, create_sinsoidal_trace_w_decay, create_triangle_trace except: from synthetic_trace_factory import create_random_trace, create_sinsoidal_trace_w_decay, create_triangle_trace from anxcor.xarray_routines import XArrayXCorrelate, XA...
from __future__ import print_function, division import time import pickle import os import gc import argparse import re import numpy as np import six.moves as sm import skimage.data import imgaug as ia from imgaug import augmenters as iaa def main(): parser = argparse.ArgumentParser() parser.add_argument("...
import time import gc import os import datetime import torch import torch.nn as nn import numpy as np import cv2 from torch.utils.tensorboard import SummaryWriter import torch.nn.functional as F from fire.runnertools import getSchedu, getOptimizer, getLossFunc from fire.runnertools import clipGradient, w...
# -*- coding: utf-8 -*- import time import datetime from itertools import groupby, ifilter from sqlalchemy.schema import Table from sqlalchemy.orm import backref from purchasing.database import db, Model, Column, RefreshSearchViewMixin, ReferenceCol from purchasing.filters import days_from_today from purchasing.da...
#!/usr/bin/python3 ''' Twint.py - Twitter Intelligence (formerly known as Tweep). Written by <NAME> (@now) Special thanks to @hpiedcoq & @pielco11 for contributing several search and storing options. See wiki on Github for in-depth details. https://github.com/haccer/twint/wiki Licensed under MIT License Copyright (c...
import torch import torchnet as tnt import numpy as np from sklearn.metrics import confusion_matrix import os import json import pickle as pkl import argparse import pprint from tqdm import tqdm from models.stclassifier import PseTae, PseLTae, PseGru, PseTempCNN, ClassifierOnly from learning.loader import get_test_loa...
""" This module contains utilities to manipulate the documentation units, usually trees, and update nodes. """ import logging from collections import Counter, defaultdict from functools import lru_cache from typing import Any, Dict, FrozenSet, List, Set, Tuple, Callable from .take2 import ( Admonition, Bloc...
from __future__ import annotations import abc import functools import itertools import json import math from typing import ( Any, Callable, Dict, Generic, Hashable, Iterable, List, Optional, Set, Tuple, TypeVar, cast, ) import fsspec import networkx as nx from networkx....
""" This module defines the `BasePdf` that can be used to inherit from in order to build a custom PDF. The `BasePDF` implements already a lot of ready-to-use functionality like integral, automatic normalization and sampling. Defining your own pdf --------------------- A simple example: >>> class MyGauss(BasePDF): >...
import time import calendar import re import json import textwrap from deprecated import deprecated from typing import Iterable, Optional, Set, Tuple, Union, List from kwhelp.decorator import AcceptedTypes, DecArgEnum, DecFuncEnum, RuleCheckAllKw, TypeCheckKw from kwhelp import rules from bs4.element import Tag from pa...
# coding: utf-8 # Author: <NAME> # Contact: <EMAIL> # This file is part of Wizard # MIT License # Copyright (c) 2021 <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 restric...
from __future__ import absolute_import, division, print_function from easydict import EasyDict as edict import numpy as np import pickle import torch import torch.nn as nn import torch.nn.functional as F from utils import * from data_utils import AmazonDataset class KnowledgeEmbedding(nn.Module): def __init__(s...
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- import atexit import copy import html import json import logging import mimetypes import random import re import string import traceback import urllib.error import urllib.parse import urllib.request from datetime import datetime, timedelta from distutils.util import st...
import cv2 import numpy as np from scipy import stats def cal_undistort(img, objpoints, imgpoints): # Image Calibration gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) ret, mtx, dist, rvecs, tvecs = cv2.calibrateCamera(objpoints, imgpoints, gray.shape[::-1], None, None) dst = cv2.undistort(img, mtx, dist,...
"""A reusable AST for manipulating or executing FPCores in python.""" import typing #from . import fpcommon def sexp_to_string(e): if isinstance(e, list) or isinstance(e, tuple): return '(' + ' '.join((sexp_to_string(x) for x in e)) + ')' else: return str(e) def annotation_to_string(e, props...
"""Input functions.""" import cPickle import functools import json import os import cv2 import numpy as np import tensorflow as tf from object_detection.builders import image_resizer_builder from object_detection.builders import model_builder from object_detection.builders import preprocessor_builder from object_dete...
# -*- coding: utf-8 -*- # # Copyright 2018-2019 - Swiss Data Science Center (SDSC) # A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and # Eidgenössische Technische Hochschule Zürich (ETHZ). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in c...
#!/usr/bin/env python import logging import re import sys from typing import Optional, Union, cast, Literal, TypedDict from lxml.etree import _ElementTree, tounicode from lxml.html import HtmlElement, document_fromstring, fragment_fromstring from .cleaners import clean_attributes, html_cleaner from .debug import de...
import struct import itertools from collections import defaultdict from functools import reduce import basicTypes import algebra from instruction import * buildExpr = algebra.Expression.build def extend(const): if const < 0x8000: return const else: return const-0x10000 def moveReg(reg, isFrom...
# coding: utf-8 # In[1]: import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms import numpy as np import matplotlib.pyplot as plt # Add Bayesian-and-novelty directory to the PYTHONPATH import sys import os sys.path.append(os.pat...
# Copyright (c) 2020 Yubico AB # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditi...
# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fi...
import networkx as nx from bispy.utilities.graph_entities import ( _Vertex, _QBlock as _Block, _Edge, _Count, _XBlock, _SCC, ) from typing import List, Tuple, Set, Dict, Union from .ranked_pta import ranked_split from bispy.paige_tarjan.paige_tarjan import paige_tarjan_qblocks from bispy.dovier_...
""" Functions for converting Google-style and -type input and output to/from Mod9-style and -type. """ import base64 from binascii import Error as BinasciiError from collections import OrderedDict import itertools import json import logging from types import GeneratorType from mod9.reformat import utils from mod9.ref...
# setup.py # created: January 15, 2020 # # Uses the CMake (https://cmake.org) tools to generate the platform-specific rhino3dm projects # See related scripts in this folder for other steps in the process. # # This script is inspired by - but deviates from - the "Scripts To Rule Them All" pattern: # https://githu...
import pytest import numpy as np from scifin.statistics import distributions as dis from scifin.statistics import statistics class TestStandardNormalFunctions: """ Tests the standard normal functions. """ def test_pdf(self): assert dis.standard_normal_pdf(0.) == pytest.approx(0.3989422804014...
# Copyright 2021 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 agreed to in writing, ...
# coding: utf-8 # Copyright (c) <NAME>. # Distributed under the terms of the MIT License. import numpy as np from tqdm.notebook import tqdm from MDAnalysis.analysis.distances import distance_array from scipy.signal import savgol_filter from mdgo.util import atom_vec __author__ = "<NAME>" __version__ = "1.0" __maintai...
#!/usr/bin/env python # coding: utf-8 import wget from unidecode import unidecode from datetime import datetime import json import os import subprocess from copy import deepcopy import cssutils from bs4 import BeautifulSoup from text_util.text_util import segment_by_sentence from text_util.util import replaceSpecialU...
# to extract data form the web # google and its first 5 links import requests import re from lxml import html from urllib import parse as urlparse import re from socket import gethostbyname, gethostbyaddr from lms_quiz import bcolors class google(): def __init__(self, q, limit=1, count=10, mode='legacy...
"""Module containing the shared RNN model.""" import numpy as np import collections import torch from torch import nn import torch.nn.functional as F from torch.autograd import Variable import models.shared_base import utils logger = utils.get_logger() def _gen_mask(shape, drop_prob): """Generate a droppout m...
# Author: <NAME> # Description: This file defines the code necessary to extract relevant information from a single # microcscope image. This generally means supplying contrast values calculated via # the FPContrastCalculator.py code. # (https://github.com/derangedhk417/Monola...
import os from typing import Callable, List, Dict import imageio import numpy as np import tensorflow as tf from tqdm import tqdm import dataflow.nerd as data import nn_utils.math_utils as math_utils import utils.training_setup_utils as train_utils from models.nerd_net import NerdModel from nn_utils.nerf_layers impor...
import numpy as np """ This file defines layer types that are commonly used for recurrent neural networks. """ def affine_forward(x, w, b): """ Computes the forward pass for an affine (fully-connected) layer. The input x has shape (N, d_1, ..., d_k) and contains a minibatch of N examples, where eac...
#!/usr/bin/env python3 # expr_transforms.py --- # # Filename: expr_transforms.py # Author: <NAME> # Created: Wed Sep 2 18:19:39 2015 (-0400) # # # Copyright (c) 2015, <NAME>, University of Pennsylvania # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are per...
# 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 or agreed to in writing, softw...
import os import cv2 import math import time import torch import random import numbers import numpy as np from torch import nn from PIL import Image import scipy.misc as sm from torch.nn import init from torch.optim import Adam from torch.utils import data from torch.backends import cudnn from torchvision import transf...
import numpy as np from copy import deepcopy import torch from torch.backends import cudnn from torch.cuda.amp import GradScaler, autocast from torch.nn import Identity from nnunet.network_architecture.generic_UNet import Upsample from nnunet.network_architecture.generic_modular_UNet import PlainConvUNetDecoder, get_d...
import torch import torch.nn as nn import torch.nn.functional as F from torch.optim import optimizer import torchvision import torchvision.transforms as transforms import torchvision.utils import torch.optim as optim from torch.utils.data import DataLoader from tensorboardX import SummaryWriter # from torchsummary impo...
#!/usr/bin/env python3 #Pipe input from `lightning-cli listchannels` #pip3 install PyMaxflow mpmath import sys, signal, json from functools import reduce import maxflow from mpmath import * from enum import Enum ##################################################### #GLOBAL VARIABLES ##################################...
from __future__ import print_function from __future__ import division import heapq import logging import math import random import sys from constants import * from data import * class Extractor(object): def __init__(self): self.name = "Extractor" def train(self, data): pass def extract(...
# -*- coding: utf-8 -*- """ aideveloper_bin some useful functions that I want to keep separate to make the main script a bit shorter --------- @author: maikherbig """ import os,shutil,json,re,urllib import numpy as np import dclab import h5py import aid_start #import a module that sits in the AIDeveloper ...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. """ Implements core sequence generation logic. """ from __future__ import print_function import sys, os import copy import time import random import inspect import itertools import multiprocessing from multiprocessing.dummy import Pool as ThreadP...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import pdb from nets.network import Network from model.config import cfg _BATCH_NORM_DECAY = 0.997 _BATCH_NORM_EPSILON = 1e-5 DEFAULT_VERSION = 2 DEFAULT_DTYPE = tf....
""" Two Marknov chains, one with bigrams and the other with merge, copy, and clear Build two parallel strings, string and buffer. Copy and clear buffer. <NAME> and <NAME> last edited: Oct 11,2016 """ import numpy as np import random ############ SOME LOG FUNCTIONS ############ log0=float('-inf') def log(f): ...
import networkx as nx import dgl from gensim.models import KeyedVectors import numpy as np import torch from torch.utils.data import Dataset import torch.nn.functional as F import random import pickle import time from tqdm import tqdm import random import copy from itertools import chain import os class Taxon(obje...
""" Handles parsing of the configuration file. """ from typing import Optional, List import logging import tempfile import sys from os import path from os import makedirs import os import glob import csv import re import yaml from uncoverml import transforms _logger = logging.getLogger(__name__) """ The strings ass...
# -*- coding: utf-8; -*- # # (c) 2016 uquake development team # # This file is part of the uquake library # # uquake 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 yo...
import pickle import numpy as np import argparse import networkx as nx #from datetime import datetime ## time def load_graph(filename): 'load the graphical model (DO NOT MODIFY)' return pickle.load(open(filename, 'rb')) def inference_brute_force(G): ''' Perform probabilistic inference on graph G, an...
"""PyTorch models for Deep Audio Viz Module Contents: Base Model for any model compatible with Deep Audio Viz training CNN Classifier model - adaptation of VGG and AlexNet Convolution Autoencoder model - Normal, Shared Weights and Skip Connections Model related utils - Checkpoint, analysis config, etc ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ __author__ = 'Justin' __mtime__ = '2018-12-17' """ import os import numpy as np import torch import torch.nn as nn from torch.nn import functional as F import torchvision.datasets as dsets import torchvision.transforms as transforms import torchvision from torch.autog...
#!/usr/bin/python3 #Napoleon Server #Simple server for CMM2 Napoleon Commander over network (UDP used) or serial port #JirSoft, 2020 VER = 'v0.28' #Here are the defaults used when no argument is given to the program #******************************************************************************************** WIFI = ...
# flake8: noqa import os, sys, time, logging, logging.handlers, re, platform from pathlib import Path from functools import cached_property from enum import Enum from typing import Callable, Dict, List, Any, Optional, Type, TYPE_CHECKING, TypeVar from textwrap import dedent from getpass import getuser from subprocess ...
""" Application Creator: <NAME> Application Function: To encrypt and decrypt non unicode text Making the password: Due to the way encrypion functions work, the password have certain limitations: 1. The digits can be 1-9(not 0-9) 2. The number of digits may not be the nu...
import numpy as np import math import sys """ reference: **Berreman1971**: Berreman, <NAME>. "Optics in stratified and anisotropic media: 4× 4-matrix formulation." Josa 62.4 (1972): 502-510. **Yeh1979**: <NAME>. "Optics of anisotropic layered media: a new 4× 4 matrix algebra." Surface Science 96.1-3 (1980): 41-53. *...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import time import argparse import traceback import xlsxwriter from tqdm import tqdm from openpyxl import load_workbook from crossref.restful import Works def menu(args): parser = argparse.ArgumentParser(description = "This script eliminates the du...
# @Author: <NAME> <xuan> # @Date: 2019-10-27, 4:32:34 # @Last modified by: xuan # @Last modified time: 2019-10-30, 11:07:50 from datetime import datetime import json import glob import os from pathlib import Path from multiprocessing.pool import ThreadPool from typing import Dict, Tuple from math import ceil fr...
""" Equations and constants relating to gases and compressible flow. """ # Last updated: 11 January by <NAME> from __future__ import annotations from pyavia.core.solve import fixed_point, solve_dqnm from pyavia.core.units import Dim, make_total_temp from pyavia.core.util import all_not_none, all_none from abc import A...
""" Main module to handle reaction rules and to apply them on metabolites. """ import concurrent.futures import logging import sqlite3 import itertools import collections import pebble from rdkit import Chem from rdkit.Chem import AllChem from rpreactor.chemical.standardizer import Standardizer from rpreactor.rule.e...
""" Contains classes and functions related to Optimal Control. Module: optimlib """ from .brysonho import * import sympy as sym from beluga.utils import sympify2, keyboard from beluga.problem import SymVar import logging def get_satfn(var, ubound=None, lbound=None, slopeAtZero=1): # var -> varible inside saturat...
import random import descriptions import re import math import mufadb as db import mufa_world as mw import mufa_constants as mc def monster(noderef): all_monsters_list = db.MonsterEntry.objects.no_dereference() selection = random.choice(all_monsters_list) n_char = selection.character_stats n_char.ente...
import threading import logging import base64 import six import io import re import os from config import CPU_CORES from collections import deque from difflib import SequenceMatcher from pdf2image import convert_from_path from time import gmtime, strftime, time from PyPDF2 import PdfFileWriter, PdfFileReader from azu...
import datetime import time from abc import ABC, abstractmethod from collections import Callable from enum import IntEnum from PyQt5.QtCore import QRegExp, Qt from PyQt5.QtGui import QRegExpValidator from PyQt5.QtWidgets import QVBoxLayout, QLineEdit, QHBoxLayout, QLabel, QCheckBox, QPushButton, QMessageBox, \ QGr...
# coding: utf-8 # # Project: X-ray image reader # https://github.com/silx-kit/fabio # # # Copyright (C) European Synchrotron Radiation Facility, Grenoble, France # # Principal author: <NAME> (<EMAIL>) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this s...
import xmltodict import json import math import collections import logging from biothings.utils.dataload import dict_sweep, boolean_convert from biothings.utils.dataload import boolean_convert, to_int from biothings.utils.dataload import float_convert, int_convert from biothings.utils.dataload import unlist_incexcl as...
from collections import Counter import sublime from VintageousPlus import PluginLogger from VintageousPlus import NullPluginLogger from VintageousPlus.vi import cmd_base from VintageousPlus.vi import cmd_defs from VintageousPlus.vi import settings from VintageousPlus.vi import utils from VintageousPlus.vi.contexts im...
import speech_recognition as sr import VoiceCommands import SimilarWords import threading r = sr.Recognizer() mic = sr.Microphone() recognisedText = "" def recognise() : # To Do: ambient noise stuff text = "error" try: with mic as source: r.dynamic_energy_threshold ...
# Copyright 2019 # # 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, software # ...
#!/usr/bin/env python3 # Generated by "pythonizer -aM -v3 -d5 Path.pm" v0.971 run by JO2742 on Thu Apr 14 15:50:18 2022 """Implementation of perl File::Path package""" __author__ = """<NAME>""" __email__ = "<EMAIL>" __version__ = "0.977" import builtins, perllib, os, re _str = lambda s: "" if s is None else st...
import re from collections import Mapping from pulsar.api import HttpException from pulsar.utils.slugify import slugify from pulsar.utils.html import INLINE_TAGS, escape, dump_data_value, child_tag from .html import html_visitor, newline DATARE = re.compile('data[-_]') def attr_iter(attrs): for k in sorted(at...
from PyQt5.QtWidgets import QWidget, QGridLayout, \ QLabel, QVBoxLayout, QSizePolicy, QProgressBar, \ QPushButton, QHBoxLayout, \ QStackedWidget from PyQt5.QtCore import Qt, pyqtSlot from PyQt5.QtGui import QFont, QColor, QPainter from...
#!/usr/bin/env python3 # coding: utf-8 import warnings warnings.filterwarnings("ignore", category=FutureWarning) import argparse import sys # from __future__ import print_function import os from copy import deepcopy import re import csv import time import configparser import h5py import traceback import math import nu...
import random from tkinter import * import time minado = Tk() minado.geometry("249x266+500+200") minado.title("Campo Minado") bombas = [] sort = [] camp_minas = [] savelista = [] x = 1 id_valor = 0 X1 = 80 X2 = 1 jogadas = [] infos = Frame(minado,width = 50,height = 40,bg='grey') infos.pack(side = TOP, fill = X) q...
#!/usr/bin/python3 # Copyright 2018-2019 <NAME> @ alvarob96 in GitHub # See LICENSE for details. from datetime import datetime, date import json from random import randint import pandas as pd import pkg_resources import requests import unidecode from lxml.html import fromstring from investpy.utils.user_agent import...
# # Copyright (c) 2014-2015 The developers of Aqualid project # # 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, mo...
#!/usr/bin/env python3.exe # If the code below looks horrible and unpythonic, do not panic. # # It is. # # This is a manual conversion from the original Perl script to # Python. Improvements are welcome. # from __future__ import print_function, unicode_literals import argparse import os import re import sys import te...
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
#!/usr/bin/env python #-------------------------------- # Name: auto_calibration_func.py # Purpose: METRIC Automated Calibration based on ETRF distribution #-------------------------------- import argparse from datetime import datetime import logging import os import random import re import string import ...
"""Functions to read information from files. Supports UCTE format and PSSE format. For more information on UCTE format, see http://cimug.ucaiug.org/Groups/Model%20Exchange/UCTE-format.pdf For more information on PSSE format, see PSSE documentation """ import math import numpy as np import itertools import logging fro...
# import python packages import time import subprocess # for running an R script import random import math import sys # for getting command line arguments for chromosome # range import os # for changing directory import os.path as path # for opening a path relative to working directory # import classes import SN...
""" Module of constants and rules used in our resource sanity checks. Used in post_run_check.py. """ from __future__ import print_function from datetime import datetime import json import logging import math import os import re from dateutil import parser as date_parser from . import readers from . import util LOGG...
import warnings warnings.filterwarnings('ignore') import tensorflow as tf import numpy as np import pickle import getopt import time import sys import os import nltk sys.path.append(os.path.dirname(os.path.abspath(__file__))+'/../') from dual_dnc import Dual_DNC from cached_dnc.cached_dual_dnc import CachedDual_DNC f...
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
from attendance.models import AttendanceModel, AttendanceData, DatewiseData, HolidayData, UserDayoffData, TimeSheetData from .serializers import AttendanceSerializer, AttendanceDataSerializer from django.views.generic import TemplateView, View, DetailView, ListView from django.views.generic.edit import FormView, Update...
from tkinter import * from tkinter.ttk import * from random import random, shuffle, choice from math import * from time import time, sleep from threading import Thread import time_profile from bisect import insort, bisect_left from SimpleMaths import linear_map from animation import AnimatedValue class EndOfChainErr...