text
stringlengths
6.04k
39.5k
# This file is part of sequencing. # # Copyright (c) 2021, The Sequencing Authors. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import re import json from collections import defaultdict from contex...
#coding: UTF-8 #開始運行前,請先全選doc,按ctrl + shift + f9移除所有超鏈接並保存 #如果有超鏈接,轉換會出錯 #执行宏操作把doc中的编号转成固定文本 #編譯辭書格式: #第一章 XXX #第二章 XXX #第三章 XX鎮、鄉、區 # 第一節 鎮名緣起 # 第二節 自然環境 # 第三節 區域特色 # 第四節 各里地名釋義 # 第一項 XX里(村) <-------------------------------抓取起始位置 # 里(村)名由來 # 里(村)的description,若干行 # ...
from typing import Callable, Optional from enum import Enum from kogito.core.head import KnowledgeHeadType from kogito.core.utils import vp_present_participle, article, posessive class KnowledgeRelationType(Enum): """ Represents a Knowledge relation type. """ TRANSOMCS = "transomcs" ATOMIC = "ato...
#!/usr/bin/env python # coding: utf-8 # In[190]: import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split ,cross_val_score , KFold from sklearn.preprocessing import MinMaxScaler , Normalizer,StandardScaler,RobustScaler from sklearn.model_selection i...
#%% import os os.chdir('E:\ML Project\Project1') # In[446]: import pandas as pd import numpy as np import warnings import collections import seaborn as sns from datetime import datetime from matplotlib import pyplot as plt from sklearn.model_selection import train_test_split from sklearn.linear_model import Linear...
#!/usr/bin/env python3 import json import operator import pickle import random from argparse import ArgumentParser from functools import partial, reduce from itertools import product, starmap, zip_longest from multiprocessing import Pool from pathlib import Path import numpy as np import pandas as pd import sklearn.t...
# GDB plugin for etnaviv driver debugging. # This needs gdb 7.5+ to work. # # usage (from gdb): # source /path/to/etnaviv_gdb.py # # Commands: # gpu-state (prefix|uniforms) # Show full GPU state (default) or only registers with a certain prefix. # The special prefix 'uniforms' shows only the shader ...
from __future__ import absolute_import, unicode_literals import re from .html import _BaseHTMLProcessor from .sgml import _SGML_AVAILABLE from .urls import _makeSafeAbsoluteURI class _HTMLSanitizer(_BaseHTMLProcessor): acceptable_elements = set(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'asid...
import os import sys import time import pprint import signal import random import inspect import pkgutil import traceback import importlib.util import threading as mt from .ids import generate_id from .threads import get_thread_name # ---------------------------------------------------------------------------...
# -*- coding: utf-8 -*- r""" Intersection graphs The methods defined here appear in :mod:`sage.graphs.graph_generators`. """ #***************************************************************************** # Copyright (C) 2006 <NAME> <<EMAIL>> # Copyright (C) 2006 <NAME> # Copyright (C) 2009 <NAME> <<...
import inspect import sys from pycsp3.dashboard import options from pycsp3.tools.utilities import flatten, is_windows if not is_windows(): import readline fileToTrace = [arg for arg in sys.argv if arg.endswith(".py") and "compiler.py" not in arg] + ["<stdin>"] def _global_value_of(variable): stack = list(r...
# -*- coding: utf-8 -*- # SPDX-License-Identifier: BSD-3-Clause # SPDX-FileCopyrightText: © 2010 by California Institute of Technology. # # statefbk.py - tools for state feedback control # # Author: <NAME>, <NAME> # Date: 31 May 2010 # # This file contains routines for designing state space controllers # # Copyright (c...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.db import models from django.db.models import Sum, Max from django.conf import settings from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext as _ from filer.fields.image ...
import time import numpy as np from sklearn.utils.testing import ignore_warnings from sklearn.exceptions import ConvergenceWarning from ConfigSpace import ConfigurationSpace from ConfigSpace.hyperparameters import CategoricalHyperparameter from solnml.components.fe_optimizers import Optimizer from solnml.components.fe...
#!/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...
import json import logging import tkinter as tk from copy import deepcopy from tkinter import BooleanVar, messagebox, ttk from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple, ValuesView from core.api.grpc.wrappers import Link, LinkType, Node, Session, ThroughputsEvent from core.gui import nodeutils as nutils ...
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """An interactive console for looking analyzing .size files.""" import argparse import atexit import code import contextlib import itertools import logging ...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012-2013, <NAME> <<EMAIL>> # Copyright: (c) 2017, Ansible Project # 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 ANSIBLE_METAD...
import os import shutil import re import time from datetime import datetime as dt from datetime import timedelta from pathlib import Path from zipfile import ZipFile import numpy as np import pyproj import geopandas as gpd import fiona from osgeo import gdal import rasterio as rio from rasterio.merge import merge fro...
# coding=utf-8 from __future__ import absolute_import import fnmatch import glob import hashlib import json import logging import os import os.path import re import tempfile import requests from talos.common import cache from talos.core import config, utils from talos.core.i18n import _ from talos.db import crud imp...
#!/usr/bin/python3 """ This is an AutoMod bot which scans r/unixporn for new posts while making sure that the rules are being followed. It's a modification & merge of several bots written by u/GoldenSights for various subs. MIT Licensed, without any warranty """ # Required modules from sys import stdout from time imp...
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean CLI v1.0. Copyright 2021 QuantConnect Corporation. # # 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...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from network.StarGAN_network import StarGAN_model from util import utility import paddle.fluid as fluid import sys import time import copy import numpy as np import pickle as pkl class GTrainer(): def __in...
# needed for python > 3.8 import os, sys from sys import platform if platform.startswith('Windows') and sys.version_info >= (3,8): os.add_dll_directory(os.getcwd()) import hidapi from .enums import (LedOptions, PlayerID, PulseOptions, TriggerModes, Brightness, ConnectionType) # type: ignore import threading clas...
import uuid import json import random import time from locust import HttpUser, task, between from common import get_ip_map, UserBase, get_random_time class NormalUser(HttpUser): host = "https://pratikfegade.github.io" weight = 100 wait_time = between(1, 2.5) ip_map, port_map = get_ip_map('3a4205d9a390...
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """This module takes a Bean Machine Graph builder and makes a best effort attempt to transform the accumulated graph to meet the requirement...
# 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...
import tensorflow as tf import numpy as np import h5py from sklearn.metrics import pairwise_distances import os from PIL import Image def set_up_environment(mem_frac=None, visible_devices=None, min_log_level='3'): """ A helper function to set up a tensorflow environment. Args: mem_frac: Fraction o...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Diagnostic script to reproduce Cox et al. (2018). Description ----------- Plot effective climate sensitivity ECS vs. temperature variability metric psi to establish an emergent relationship for ECS. Author ------ <NAME> (DLR, Germany) Project ------- CRESCENDO Config...
#!/usr/bin/env python # coding: utf-8 # In[1]: import numpy as np import random from math import * import time import copy import torch from torch.autograd import Variable import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.optim.lr_scheduler import StepLR, MultiStepLR # ...
#!/usr/bin/env python # # Copyright 2012 the V8 project authors. 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 # noti...
from __future__ import unicode_literals import requests import time from bs4 import BeautifulSoup from datetime import datetime, timedelta from decimal import Decimal from .exceptions import ( PageError, DisambiguationError, RedirectError, HTTPTimeoutError, WikipediaException, ODD_ERROR_MESSAGE) from .util im...
# # The Python Imaging Library. # $Id$ # # standard filters # # History: # 1995-11-27 fl Created # 2002-06-08 fl Added rank and mode filters # 2003-09-15 fl Fixed rank calculation in rank filter; added expand call # # Copyright (c) 1997-2003 by Secret Labs AB. # Copyright (c) 1995-2002 by <NAME>. # # See the READ...
import logging import os import pickle from typing import List, Optional import numpy as np import torch from anndata import AnnData, read from scvi import _CONSTANTS from scvi.data import transfer_anndata_setup from scvi.core.models import BaseModelClass, VAEMixin from scvi.core.modules import JVAE, Classifier from ...
#!/usr/bin/env python # Copyright 2016 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
""" The client's core Flexx engine, implemented in PScript. """ from pscript import this_is_js, RawJS from pscript.stubs import window, undefined, time, console, JSON # This module gets transpiled to JavaScript as a whole __pscript__ = True class Flexx: """ JavaScript Flexx module. This provides the connection ...
#!/usr/bin/python # -*- coding: utf-8 -*- # 训练Net2Net模型对MNIST数据集分类 """ This is an implementation of Net2Net experiment with MNIST in 'Net2Net: Accelerating Learning via Knowledge Transfer' by <NAME>, <NAME>, and <NAME> arXiv:1511.05641v4 [cs.LG] 23 Apr 2016 http://arxiv.org/abs/1511.05641 # Notes - What: + Net2Net i...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
import numpy as np import tensorflow as tf import tensorflow.contrib.slim as slim import gym import logz import scipy.signal def normc_initializer(std=1.0): """ Initialize array with normalized columns """ def _initializer(shape, dtype=None, partition_info=None): #pylint: disable=W0613 out = np...
#!/usr/bin/env python # Copyright 2022 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...
""" test_util_i18n ~~~~~~~~~~~~~~ Test i18n util. :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import datetime import os import pytest from babel.messages.mofile import read_mo from sphinx.errors import SphinxError from sphinx.util...
import sys import os import json import uuid import traceback import datetime, time from threading import Lock from types import MethodType import mimetypes import jam import base64 sys.path.insert(1, os.path.join(os.path.dirname(jam.__file__), 'third_party')) from werkzeug.wrappers import Request, Response from werk...
#!/usr/bin/env python3 import re import sys import pprint import getopt pp = pprint.PrettyPrinter(indent=4) prefix = None pmgfiles = list() outfile = None debug = False genhdr = False opts, args = getopt.getopt(sys.argv[1:], "p:o:dg") for o, a in opts: if o == "-p": prefix = a elif o == "-o": ...
''' ------------------------------------------------------------------------ Functions for created the matrix of ability levels, e. This can only be used for looking at the 25, 50, 70, 80, 90, 99, and 100th percentiles, as it uses fitted polynomials to those percentiles. For a more generic version, see income_nopoly.p...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
# AVL Mode Package # Released under MIT License # Copyright (c) 2020 TytusDb Team # Developers: SG#16 from tkinter import Label, Frame, Button, Tk, TOP, BOTTOM, RIGHT, LEFT, END, BOTH, CENTER, X, Y, W, SW, ALL, \ Scrollbar, Listbox, Grid, Entry, filedialog, messagebox, Toplevel, Canvas from tkinter.ttk im...
# encoding: utf-8 __license__ = """ Copyright (c) 2012-2014, <NAME>, all rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of...
# Copyright (c) 2010-2017 <NAME> # Copyright (c) 2010-2017 <NAME> # Copyright (c) 2010-2017 Stony Brook University # Copyright (c) 2010-2017 The Research Foundation of SUNY # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Soft...
import numpy as np from fastai.basic_train import Recorder from fastai.core import ifnone, defaults, Any from fastai.torch_core import to_np from fastai.vision import * import matplotlib.pyplot as plt from typing import Optional import scipy import itertools def model_cutter(model, select=[]): cut = select[0] ...
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# *- coding: future_fstrings -*- import subprocess import sys import logging import requests import shutil import os import re from pathlib import Path import packaging.version import pypipegraph as ppg # some packages are *duplicated* in the package index. # the default is, if the version is identical, to take the on...
""" Functions for explaining text classifiers. """ from functools import partial import itertools import json import re import numpy as np import scipy as sp import sklearn from sklearn.utils import check_random_state from . import explanation from . import lime_base class TextDomainMapper(explanat...
#!/usr/bin/env python # # # Routine for Masking Data with Polygons ## # # By: <NAME> # 2014-03-02 v1.0 # 2016-11-04 v2.0 # import sys import numpy as np import os from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt import argparse def polygons(area="", poly_print=False): """ ...
import torch import torch.nn as nn import numpy as np # let us run this cell only if CUDA is available # We will use ``torch.device`` objects to move tensors in and out of GPU if torch.cuda.is_available(): x = torch.randn(1) device = torch.device("cuda") # a CUDA device object y = torch.ones_like(...
# Copyright 2018-2021 Streamlit 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 wr...
from __future__ import absolute_import, division, print_function import atexit import os import logging import socket import select import signal import platform import requests import socket from subprocess import Popen, PIPE, call import struct import time import weakref from .conf import get_config, DEFAULT_KNIT_H...
import warnings import matplotlib.pyplot as plt import numpy as np # 시그마 메소드. def sigma(i, k, h): result = 0 for j in range(i, k + 1): result += h * j return result # 지정된 변수의 계수를 반환하는 메소드. def extract_coefficient(s, variable): result = "" index = s.index(variable) ...
""" gtp_connection.py Module for playing games of Go using GoTextProtocol Parts of this code were originally based on the gtp module in the Deep-Go project by <NAME> and <NAME> at the University of Edinburgh. """ import traceback from sys import stdin, stdout, stderr from board_util import GoBoardUtil, BLACK, WHITE,...
# Copyright 2016-2018, Rigetti Computing # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. """ Unit tests for quantumflow.channels """ # Kudos: Tests adapted from density branch of reference-qvm by <NAME> from functools i...
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # import torch import os import numpy as np from pytorch_transformers.modeling_bert import ( BertPreTrainedModel, B...
# 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! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
# -*- coding: utf-8 -*- """ This module intends to provide an interface between the underlying command-line interface (cli) based tools, at the same time also provide helpers and classes that also support and provide its own cli for calmjs framework. """ from __future__ import absolute_import from __future__ import un...
"""Custom Folder Dataset. This script creates a custom dataset from a folder. """ # Copyright (C) 2020 Intel Corporation # # 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.apach...
from django.db import models from django.contrib.contenttypes.models import ContentType from django.db import connection from django.apps import apps from .ontologies import * from django.db.models import Manager # Wagtail Imports from wagtail.core import blocks from wagtail.core.models import Page, Orderable from wag...
""" Copyright 2018 - <NAME> TODO: Make sure competition is valid """ import os import uuid import codecs import datetime import dill import gzip import re import warnings import shutil import pandas as pd import numpy as np from sklearn import metrics from .helpers import ( parse_date, sorted_lists_equal, allowed...
#!/usr/bin/env python3 from itertools import product from copy import deepcopy import json import os import time from torch import nn from torch import optim from torch.utils.data import DataLoader import click import numpy as np import torch from models import MyLoss from models.SPOS_NAS import SPOS from utils impo...
import numpy as np import pandas as pd from more_itertools import is_sorted # Test data download requirements: import requests import os import hashlib import bioframe URL_DATA = "https://raw.githubusercontent.com/open2c/cooltools/master/datasets/external_test_files.tsv" def assign_regions(features, supports): "...
#!/usr/bin/env python3 """ FOP Filter Orderer and Preener Copyright (C) 2011 Michael This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or ...
import os import time import math import contextlib import hashlib from IPython.display import display, HTML import radiopadre from radiopadre import settings from radiopadre.render import RenderableElement, render_refresh_button, rich_string, render_url, TransientMessage from collections import OrderedDict from radi...
import Model import Utils from GetResults import GetResults, UnstartedRaceWrapper import copy import xlsxwriter import operator countryReference = '''Code French Country Name English Country Name AFG AFGHANISTAN AFGHANISTAN AHO ANTILLES NEERLANDAISES NETHERLANDS ANTILLES ALB ALBANIE ALBANIA ALG ALGERIE ALGERIA AND AN...
# Copyright 2020 The TensorFlow Hub 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 app...
import torch import math import torch.nn as nn import numpy as np from .config import regnet_cfg def init_weights(m): """Performs ResNet-style weight initialization.""" if isinstance(m, nn.Conv2d): # Note that there is no bias due to BN fan_out = m.kernel_size[0] * m.kernel_size[1] * m.out_chan...
#!/usr/bin/env python2 """The game of tetris""" from header import * os_supports_music=False class Cell(object): """The representation of the smallest part of the tetris, can even be called a box or a brick""" def __init__(self, pos=(0,0), color=0): self.__pos=pos if color==0: ...
import difflib import logging from typing import List, Optional, Set from irrd.conf import get_setting from irrd.rpki.status import RPKIStatus from irrd.rpki.validators import SingleRouteROAValidator from irrd.rpsl.parser import UnknownRPSLObjectClassException, RPSLObject from irrd.rpsl.rpsl_objects import rpsl_object...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # */AIPND/intropylab-classifying-images/check_images_solution.py # # PROGRAMMER: <NAME>. # DATE CREATED: 01/30/2018 # REVISED DATE: 02/27/2018 - reduce scope of program # PURPOSE: Check images & report results: read them in, predict their # content (classifier), ...
# MIT License # # Copyright (c) 2017 <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, copy, modify, merge, publi...
import torch import torch.nn as nn import torch.nn.functional as F from ops.spectral_norm import spectral_norm as SpectralNorm # Defines the GAN loss which uses either LSGAN or the regular GAN. # When LSGAN is used, it is basically same as MSELoss, # but it abstracts away the need to create the target label tensor # ...
# Copyright 2019 Google LLC. 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Notes: InlineKeyboardButton: callback_data: has a common format of ".method_name param1 param2 ...". currently used methods are: - .vote <poll_id> <answer_id> vote for an answer <answer_id> in poll <poll_i...
################################################################################# # Copyright 2019-2020 Advanced Micro Devices, Inc. All rights reserved. # # 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 ...
""" Module containing raster blocks that aggregate rasters. """ from math import ceil, floor, log, sqrt from collections import defaultdict from functools import partial import warnings from scipy import ndimage import numpy as np import geopandas as gpd from dask import config from dask_geomodeling import measuremen...
import logging import random import string from time import sleep from unittest import mock import pytest from piqe_ocp_lib import __loggername__ from piqe_ocp_lib.api.resources import OcpProjects from piqe_ocp_lib.api.resources.ocp_operators import ( ClusterServiceVersion, OperatorGroup, OperatorhubPacka...
"""Functionalities for network creation, clustering and plotting.""" # ------------------------------------ # Name : network.py # Author : E.Taskesen # Contact : <EMAIL> # Licence : See licences # ------------------------------------ # %% Libraries import matplotlib.pyplot as plt import pandas as ...
# -*- coding: utf-8 -*- import copy from math import erfc from typing import Tuple, Set, Union import numpy as np import scipy.constants as const from .beam_pattern import BeamTransitionModel from .beam_shape import BeamShape from ...base import Property from ...functions import cart2sphere, rotx, roty, rotz, mod_bea...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """An iterative multi-scale source detection method. This is a prototype implementation of the following algorithm: 1. Input is: count, background and exposure map and list of scales 2. Compute significance maps on multiple scales (disk-correlate) 3. Larg...
"""model.py. Last update: 2021-02-19. """ # Python imports import gzip import numpy as np import os import pandas as pd import re import shutil import tempfile import sklearn.preprocessing import matplotlib.pyplot as plt from bs4 import BeautifulSoup as bs from IPython.display import display, HTML from pathlib import...
# -*- coding: utf-8 -*- """Provides base model classes.""" import os import json import uuid import statistics from ..exceptions import NotFittedError from ..utilities import check_timeseries, check_resolution, check_data_keys, item_is_in_range from ..time import now_s, dt_from_s from ..units import TimeUnit from pand...
# encoding: utf-8 import pytest from ...model import get_one_or_create from ...model.coverage import WorkCoverageRecord from ...model.customlist import ( CustomList, CustomListEntry, ) from ...model.datasource import DataSource from ...util.datetime_helpers import utc_now class TestCustomList: def test_...
#!/usr/bin/env python3 __doc__ = """ Test scripts for rotation kernels in Elastica Numba implementation""" # System imports import numpy as np import pytest from numpy.testing import assert_allclose import sys from elastica._rotations import ( _get_rotation_matrix, _rotate, _inv_rotate, ) from elastica.ut...
'''The access module provides functionality to compute access opportunities, geometry, and boundaries under different constraints. ''' import logging import typing import copy import datetime import math import numpy as np from brahe.constants import RAD2DEG from brahe.epoch import Epoch from brahe.tle import TLE fro...
""" Multiple Plugin Agent for the New Relic Platform """ import helper import importlib import json import logging import os import requests import socket import sys import threading import time import gzip try: from StringIO import StringIO except ImportError: from io import StringIO from newrelic_python_ag...
"""xmltramp: Make XML documents easily accessible.""" import re from beatbox_six import python_2_unicode_compatible, StringIO, text_type, xrange from xml.sax.handler import EntityResolver, DTDHandler, ContentHandler, ErrorHandler from xml.sax import make_parser from xml.sax.handler import feature_namespaces __version...
from datetime import datetime import sys import re import json import pdfplumber from tabulate import tabulate from parse_email_date import convert_date #usage in python3 environment # (Should be run from within pdf_processing/) # python pdf2json.py ../data/src/mailList.json ../data/src/allMails.json >mailDbg.txt #s...
#!/usr/bin/env pypy # -*- coding: utf-8 -*- from __future__ import print_function import os import re import sys import time import subprocess import signal import argparse import importlib import itertools import multiprocessing import random import unittest import warnings import sunfish import tools #############...
# Copyright 2011-2013 <NAME> # Copyright 2011-2013 <NAME> # Copyright 2012-2013 <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 # # ...
import os import struct from hashlib import md5 from io import BytesIO from typing import Tuple, List, Union from pdf_utils import generic from pdf_utils.generic import pdf_name, pdf_string from pdf_utils.misc import peek, PdfReadError from pdf_utils.rw_common import PdfHandler """ Utility classes for writing PDF fil...
#!/usr/bin/env python3 # PYTHON_ARGCOMPLETE_OK import argcomplete import argparse import math import multiprocessing import tarfile import time from pathlib import Path import artistools as at import numpy as np import pandas as pd from functools import lru_cache, partial traj_root = at.config['gsimerger_trajroot'] ...
# This is a 3D landmark generator to build 3D features and # basically they are lines. Basic shapes should be thoughtfully # input and it will generate 3D landmarks accordingly using # arbitrarily set transform matrix to reshape the objects and # move they to the wanted location. # INFO: Before running the .py file, p...
from __future__ import print_function import collections import sys import numpy as np import time from ray.tune.result import (EPISODE_REWARD_MEAN, MEAN_ACCURACY, MEAN_LOSS, TRAINING_ITERATION, TIME_TOTAL_S, TIMESTEPS_TOTAL, AUTO_RESULT_KEYS) from ray.tune.t...
#!/usr/bin/python # -*- coding: utf-8 -*- import json import csv import re import os import mwparserfromhell as wparser import string import pywikibot import datetime import requests import pymysql import random from urllib.parse import quote from wikidataStuff.WikidataStuff import WikidataStuff as wds site_cache = {...