text
stringlengths
8.04k
46.5k
# -*- coding: utf-8 -*- from __future__ import print_function import logging logger = logging.getLogger(__name__) import httplib2 import os from apiclient import discovery import oauth2client from oauth2client import client from oauth2client import tools import datetime import dateutil.parser from PyQt4 import QtGui,...
import pygame, random, sys, os, time, math import numpy as np from pygame.locals import * import _thread as thread import argparse import multiprocessing # for processing osc stream from pythonosc import dispatcher as dsp from pythonosc import osc_server from pythonosc import udp_client import urllib.requ...
import dataclasses import math import json import numpy as np import os import matplotlib as mpl import matplotlib.pyplot as plt import warnings import geopandas as gpd import shapely.geometry as shpg from scipy.interpolate import interp1d @dataclasses.dataclass class UncClass: _default_unc = 0.15 # 15% mean:...
from tkinter import * from tkinter.messagebox import * import random import copy import time import math # 全局变量 N = 8 #棋盘、皇后数量 Queen = [0 for i in range(N)] #皇后位置 one_block_size = 21 #棋盘每个格的像素宽度 # 回溯法全局变量 count_sum = 0 #所有情况统计计数 back_blok_size = 10 #棋盘每个格的像素宽度 every_size = back_blok_size * (N + 1)...
# -*- coding: utf-8 -*- """ Created on Tue Jun 16 10:07:16 2020 PSDM Tools ---------- This file contains tools and associated functions geared at aiding in the analysis of GAC adsorption data. Functions Contained: isotherm_fit() predict_full_scale() specific_throughput() @author: <NAME> EPA Disclai...
# --- Do not remove these libs --- from freqtrade.strategy.interface import IStrategy from pandas import DataFrame # -------------------------------- import talib.abstract as ta import logging import pandas_ta as pta from pandas import DataFrame, Series from datetime import datetime, timezone from freqtrade.persistenc...
import re import numpy as np import warnings import copy from .utils import is_pos_int, is_non_neg_int, \ is_proportion, is_positive, is_non_negative, \ inherits class layout: def __init__(self, ncol=None, nrow=None, byrow=None, re...
""" Each source in a data set has file(s) that contain keys and meta info file. To read from a dataset, supply the path to a meta file to DataSet.prepare(). To read multiple data sets, use DataSet.find(). Then get a DataSetIterator using DataSet.iterator(). To output keys, use Writer.import_meta() with the proper Da...
#!/usr/bin/python3 #****************************************************************************** # Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved. # licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. # You may obtain a co...
# This is needed becuase pygame's init() calls for an audio driver, # which seemed to default to ALSA, which was causing an underrun error. import os os.environ['SDL_AUDIODRIVER'] = 'dsp' import yaml import numpy as np import hexy as hx import pygame as pg from tkinter import filedialog, Tk COL_IDX = np.random.randi...
from coopihc.base.StateElement import StateElement from coopihc.base.utils import ( StateNotContainedError, StateNotContainedWarning, ) from coopihc.base.elements import integer_set, box_space import numpy import pytest import json import copy from tabulate import tabulate def test_array_init_integer(): ...
import discord from discord.ext import commands, tasks import asyncio import asyncpg import calendar import datetime import functools import logging import humanize import io import os import time import typing from PIL import Image, ImageDraw, ImageFont, ImageOps from .utils.theme import get_theme from .utils import...
# -*- coding: utf-8 -*- #============================================================================== # # location.py - Locations file, dictionary and global fields # # After copying playlists between locations use: # # cd ~/.config/mserve/L??? # Where ??? is 001, 002, etc. # sed -i...
""" NonParametric statistical tests Created by <NAME> on 27-02-2018. Copyright (c) 2018 DvM. All rights reserved. """ import cv2 import numpy as np from math import sqrt from scipy.stats import ttest_rel, ttest_ind, wilcoxon, ttest_1samp from IPython import embed def permutationTTest(X1, X2, nr_perm): ''' ''' ...
import numpy as np import subprocess import fileinput import argparse import random import shutil import math import cv2 import os import sys global counter def createNumpyMatrix(geometricVertices): """Parse the strings from the obj file and convert them into numpy matrix of floats to perform math efficiently""" ...
import numpy as np import torch from torch.optim import Adam import gym import time import yaml import safe_rl.algos.cppo.core as core from safe_rl.utils.logx import EpochLogger from safe_rl.utils.mpi_pytorch import setup_pytorch_for_mpi, sync_params, mpi_avg_grads from safe_rl.utils.mpi_tools import (mpi_fork, mpi_avg...
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Support module generated by PAGE version 4.20 # in conjunction with Tcl version 8.6 # Feb 18, 2019 11:55:48 AM -03 platform: Windows NT # Feb 19, 2019 09:09:42 AM -03 platform: Windows NT """ Created on Mon Feb 18 10:08:04 2019 @author: <NAME> """ import sys...
#!/usr/bin/env python3 import os import copy # BEGIN THREAD SETTINGS this sets the number of threads used by numpy in the program (should be set to 1 for Parts 1 and 3) implicit_num_threads = 2 os.environ["OMP_NUM_THREADS"] = str(implicit_num_threads) os.environ["MKL_NUM_THREADS"] = str(implicit_num_threads) os.enviro...
# -*- coding: utf-8 -*- # @Author: <NAME>, <NAME> # @Date: 2019-11-20 10:08:49 # @Last Modified by: Daniel # @Last Modified time: 2020-08-12 13:18:57 import numpy as np from scipy.spatial.transform import Rotation from scipy.sparse import csr_matrix from scipy.spatial import HalfspaceIntersection, ConvexHull from s...
#!/usr/bin/env python # coding=utf-8 import logging import os import sys from dataclasses import dataclass, field from typing import Optional import numpy as np from skim import AutoModelForMaskedLM from sklearn.metrics import classification_report import torch from torch import nn from datasets import ClassLabel,...
import scipy.signal import numpy as np from .cltools import HAVE_PYOPENCL, OpenCL_Helper if HAVE_PYOPENCL: import pyopencl mf = pyopencl.mem_flags #~ from pyacq.dsp.overlapfiltfilt import SosFiltfilt_Scipy from .tools import FifoBuffer, median_mad def offline_signal_preprocessor(sigs, sample_rate, common_r...
""" Skinet (Segmentation of the Kidney through a Neural nETwork) Project Dataset tools Copyright (c) 2021 Skinet Team Licensed under the MIT License (see LICENSE for details) Written by <NAME> """ import os import shutil from time import time import cv2 import numpy as np from skimage.io import imread from common_ut...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ------------------------ # Penji OpDev Fall 2019 # GS Run Wrapper # Author: <NAME> # Updated: # ------------------------ # General import os import argparse import pandas as pd # For Google Sheets import pygsheets # Local import core.utils as utils from core import logge...
import os import shutil from typing import Tuple import pandas as pd from EvaluationUtils.descriptive_stats import create_collage from Utils.union_find import UnionFind from Animator.consolidation_api import CharacterDetectionOutput import numpy as np from numpy import linalg as LA from collections import Counter from...
#!/usr/bin/env python # -*- coding: utf-8 -*- import typing from typing import Iterable, List, Optional, Tuple, Union import torch import torch.nn.functional as F from torch import ByteTensor, Tensor from combustion.util import alpha_blend, apply_colormap, check_is_tensor, check_ndim_match from .convert import to_8...
#!/usr/bin/python3 -Es # Copyright (C) 2012 Red Hat # AUTHOR: <NAME> <<EMAIL>> # see file 'COPYING' for use and warranty information # # semanage is a tool for managing SELinux configuration files # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Publ...
''' Structure ========= The NDB objects are dictionary-like structures that represent network objects -- interfaces, routes, addresses etc. In addition to the usual dictionary API they have some NDB-specific methods, see the `RTNL_Object` class description below. The dictionary fields represent RTNL messages fields a...
# -*- coding: utf-8 -*- import numpy as np import random import math from Policy import * from my_moduler import get_module_logger, get_state_logger from mulligan_setting import * from adjustment_action_code import * mylogger = get_module_logger(__name__) # mylogger = get_module_logger('mylogger') import itertools #st...
# This file was created by: <NAME> # Completed on May 20th of 2020 at 10:10pm # Sources Cited: # Mr. Cozort's 4th period code walkthrough(utilized the code demonstrated as a template) # Utilizes Mr. Cozort's 2nd period code walkthrough(Took inspiration and ideas, and simple add-ons for my code)d # K...
import mxnet as mx import logging def get_setting_params(**kwargs): # bn_params bn_mom = kwargs.get('bn_mom', 0.9) bn_eps = kwargs.get('bn_eps', 2e-5) fix_gamma = kwargs.get('fix_gamma', False) use_global_stats = kwargs.get('use_global_stats', False) # net_setting param workspac...
# -*- coding: utf-8 -*- """The source file classes.""" import collections import io import os from yaldevtools import source_code class DefinitionsIncludeHeaderFile(object): """Definitions include header file. Attributes: enum_declarations (list[EnumDeclaration]): enumeration type declarations. """ de...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #""" #Copyright [2020] [Indian Institute of Science, Bangalore & Tata Institute of Fundamental Research, Mumbai] #SPDX-License-Identifier: Apache-2.0 #""" __name__ = "Script for generating city files - instantiation of a synthetic city" import os import sys import math im...
# Copyright (c) 2009, <NAME>'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """macOS platform implementation.""" import collections import contextlib import errno import functools import os from socket import AF_INET from collections import...
""" Cog for the on_raw_bulk_message_delete event. Logs from these event include: Bulk message deletion Part of the Gabby Gums Discord Logger. """ import asyncio import time import logging from io import StringIO from random import randint from datetime import datetime from typing import TYPE_CHECKING, Optional, ...
''' Created on Jul 3, 2014 @author: roj-idl71 ''' # SUBCHANNELS EN VEZ DE CHANNELS # BENCHMARKS -> PROBLEMAS CON ARCHIVOS GRANDES -> INCONSTANTE EN EL TIEMPO # ACTUALIZACION DE VERSION # HEADERS # MODULO DE ESCRITURA # METADATA import os import time import datetime import numpy import timeit from fractions import Fra...
import numpy as np from collections import namedtuple from pomegranate import GeneralMixtureModel,NormalDistribution import pandas as pd def smooth(ser, sc): return np.array(pd.Series(ser).rolling(sc, min_periods=1, center=True).mean()) origin = namedtuple("origin",["pos","firing_time","L_fork_speed","R_fork_spe...
r""" http://github.com/in4lio/yupp/ __ __ _____ _____ /\ \ /\ \ /\ _ \ _ \ \ \ \_\/ \_\/ \_\ \ \_\ \ \ \__ /\____/\ __/\ __/ \/_/\_\/___/\ \_\/\ \_\/ \/_/ \/_/ \/_/ yup.py -- shell of yupp preprocessor """ from __future__ import absolute_import from __future__ import division from __fu...
import adsk import adsk.core import adsk.fusion import traceback from collections import defaultdict, namedtuple from typing import List from .Fusion360Utilities.Fusion360Utilities import get_app_objects from .Fusion360Utilities.Fusion360CommandBase import Fusion360CommandBase from .Fusion360Utilities import Fusion36...
from __future__ import absolute_import, division, unicode_literals import string EOF = None E = { "null-character": "Null character in input stream, replaced with U+FFFD.", "invalid-codepoint": "Invalid codepoint in stream.", "incorrectly-placed-solidus": "Solidus (/) incorrectly ...
""" Utility functions and classes for pydbwfserver. Used by resource.QueryParserResource and other items """ from collections import defaultdict import logging import re from string import Template import sys import time import twisted from twisted.internet import reactor import antelope.datascope as datascope impo...
#!/usr/bin/env python3 import fnmatch import io import json import logging import re import sys import os import glob import struct import zlib from collections import defaultdict from hashlib import sha256 import click import coin_info from coindef import CoinDef try: import termcolor except ImportError: te...
# Copyright 2015-2018 Yelp 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 writin...
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test replace by fee code # from test_framework.test_framework import MincoinTestFramework from test_...
import re import sys import itertools from collections import defaultdict, deque SQ = '(?:\'(?:[^\'\\\\]|\\\\[\'\"\\\\])*\')' DQ = '(?:\"(?:[^\"\\\\]|\\\\[\'\"\\\\])*\")' BW = '(?:(?:(?![0-9])\w)\w*)' STR = re.compile('(?:%s|%s)' % (DQ, SQ)) WHITE = re.compile(r'\s+') KEY = re.compile(r'(?:%s|%s|%s)' % (BW, SQ, DQ),...
# Author: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # # License: Simplified BSD import numpy as np from scipy import linalg from ..source_estimate import (SourceEstimate, VolSourceEstimate, _BaseSourceEstimate) from ..minimum_norm.inverse import (combine_xyz, _prepare_forward, ...
#!/usr/bin/env python3 import sys import os import os.path import subprocess import tempfile import re import itertools import hashlib import shutil import argparse import codecs import json import multiprocessing from functools import partial backend = 'glsl' args = {} def remove_file(path): #print('Removing fi...
# Copyright 2020 The PyMC Developers # # 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...
# Copyright 2015 The TensorFlow 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 applica...
from multiprocessing import Pool, cpu_count import copy import gzip import math import os import sys import orjson as json # import json from pathlib import Path import pyconll import pyconll.util from pycountry import languages try: from utf8.utils import * except: # to solve issue with ipython executing t...
from __future__ import annotations import copy import itertools from typing import ( TYPE_CHECKING, Sequence, cast, ) import numpy as np from pandas._libs import ( NaT, internals as libinternals, ) from pandas._libs.missing import NA from pandas._typing import ( ArrayLike, DtypeObj, M...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import inspect import io import os import os.path import random import re import sys import time import traceback from contextlib import redir...
import copy import logging import random logging.getLogger('transformers').setLevel(level=logging.WARNING) from nltk.tokenize import sent_tokenize import torch import tqdm from transformers import BertForMaskedLM, BertTokenizer, AdamW, get_linear_schedule_with_warmup from utils import ( BertInput, Defaults, ...
# Copyright (c) 2013-2015 Siphon Contributors. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Test the parsing of the NCSS dataset.xml.""" import logging import xml.etree.ElementTree as ET # noqa:N814 from siphon.http_util import session_manager from siphon.ncss...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import re import json import pytz import datetime import subprocess try: import cStringIO as StringIO except: import StringIO from django.shortcuts import render, get_object_or_404, redirect, get_list_or_404 from django.contrib import me...
# 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...
from __future__ import with_statement import random from collections import defaultdict from datetime import datetime import pytest from whoosh import analysis, fields, index, qparser, query from whoosh.compat import b, u, xrange, text_type, PY3, permutations from whoosh.filedb.filestore import RamStorage from whoosh...
import os import threading import uuid import warnings from abc import abstractmethod, ABCMeta from typing import Sequence, Any, Dict, Callable, Mapping, Optional import s3fs import xarray as xr import zarr from xcube.constants import FORMAT_NAME_LEVELS from xcube.constants import FORMAT_NAME_NETCDF4 from xcube.const...
# Copyright 2018 The TensorFlow 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 b...
import copy import logging import os from collections import Counter, defaultdict from timeit import default_timer as timer from typing import Any, Dict, List, Tuple import pandas as pd import pyprind import six import torch import torch.nn as nn from sklearn.decomposition import TruncatedSVD from torchtext import dat...
import json import logging from collections import OrderedDict from typing import List, Any, Union from typing import Tuple, Dict from elasticsearch import Elasticsearch from pyhocon import ConfigTree from search_ui import Query, TopicCentroid, Session, util logger = logging.getLogger('search-ui') class EsQuery(Or...
"""Main flow for jiant. To debug this, run with -m ipdb: ipdb3 jiant/__main__.py --config_file ... """ # pylint: disable=no-member import logging as log from typing import Iterable log.basicConfig( format="%(asctime)s: %(message)s", datefmt="%m/%d %I:%M:%S %p", level=log.INFO ) # noqa import argparse impor...
""" Helper Methods Author: Austin Transportation Department, Data and Technology Services Description: The purpose of this script is to provide any methods that assist any script associated to this application. """ import sys import glob import csv import io import json import re import datetime from dateutil import ...
'''Implements algorithms for clustering scans by spectral similarity. ''' import operator import functools import bisect import json from collections import deque import numpy as np from scipy.special import comb from ms_deisotope.task.log_utils import LogUtilsMixin from ms_deisotope.data_source.dispatch import ( ...
# coding: utf-8 import numpy as np import random import tensorflow as tf import logging import imageio import read_data # from data_generator import DataGenerator from origin_mil_pick import MIL # from evaluation.eval_reach import evaluate_vision_reach # from evaluation.eval_push import evaluate_push from tensorflow.p...
# # 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 # ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Mar 28 13:22:26 2018 @author: <NAME> <<EMAIL>> """ import cartopy.crs as ccrs import matplotlib.pyplot as plt import matplotlib.colors as colors from cartomap import geogmap as gm from glob import glob from dateutil import parser import h5py, os impor...
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
# Copyright (C) 2019 Regents of the University of California # # 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...
"""Split-Mix Federated Learning""" import sys, os, argparse, copy, time import numpy as np import wandb from tqdm import tqdm import torch from torch import nn, optim from torch.nn.modules.batchnorm import _NormBase # federated from federated.learning import train_slimmable, test, fed_test_model, refresh_bn, test_dbn #...
## ripemd.py - pure Python implementation of the RIPEMD-160 algorithm. ## <NAME> <<EMAIL>> 16 december 2007. ## ## Copyrights ## ========== ## ## This code is a derived from an implementation by <NAME> which is ## subject to the following license. This Python implementation is not ## subject to any other licens...
"""Implements functionality unique to the Lake Shore Model 335 cryogenic temperature controller""" from enum import IntEnum from .temperature_controllers import TemperatureController, InstrumentException from .temperature_controllers import RelayControlMode, RelayControlAlarm, InterfaceMode, HeaterError, \ CurveFo...
#!/usr/bin/env python3 """ K9 is a roving robot that can respond to voice commands. Makes heavy use of google aiy voice library Hardware: Raspberry Pi Zero Google AIY Voice Bonnet: https://aiyprojects.withgoogle.com/voice/#makers-guide--gpio-header-pinout Adafruit Motor bonnet Sharp GP2Y0D810Z0F Digita...
""" mlperf inference benchmarking tool """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals import argparse import array import collections import json import logging import os import sys import multiprocessing import threading import time import mlperf_lo...
from ...core.gui.qt.thread import controller from ...core.utils import files as file_utils, general, funcargparse from ...core.fileio import logfile from PyQt5 import QtCore import numpy as np import threading import collections from future.utils import viewitems import os.path class StreamFormerThread(controller....
import collections import os import typing import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.image as img LOCATION_BIAS = 5 HEIGHT_BIAS = 0.5 WITH_NOISE = True DISPLAY_TAIL = 20 USE_MULTICOLOR = True MAX_VELOCITY = 1 MIN_VELOCITY = 0.1 MAX_RADIUS = 200 MAX_HEIGHT = 12 MIN_HE...
"""Common classes and functions.""" from datetime import tzinfo from enum import Enum, IntEnum from typing import ( Any, Callable, Dict, NamedTuple, Optional, Tuple, Type, TypeVar, Union, cast, ) import arrow from arrow import Arrow from dateutil import tz from .const import (...
import pandas as pd import numpy as np import itertools import warnings import scipy.cluster.hierarchy as sch from scipy.spatial import distance from joblib import Parallel, delayed __all__ = ['hcluster_tally', 'neighborhood_tally', 'running_neighborhood_tally', 'any_cluster_tally'] """TO...
#!/usr/bin/env python # Licensed under a 3-clause BSD style license, see LICENSE. """ Tests for the skhep.math.vectors module. """ # ----------------------------------------------------------------------------- # Import statements # ----------------------------------------------------------------------------- import p...
#!/usr/bin/env python ########################################################################## ## ## ## MadWeight ## ## --------- #...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import itertools import json import logging import multiprocessing import os import pprint import re import sys from pelican.generators import ArticlesGenerator from pelican.generators import PagesGenerator from pelican.settings import DE...
""" Webserver module based on aiohttp to handle web/api requests """ # flake8: noqa # pylint: disable=wrong-import-position, wrong-import-order import aiohttp setattr(aiohttp.http, 'SERVER_SOFTWARE', '') import sys import re import argparse import uuid import gc from typing import Callable, Optional, Type, List, Dict,...
# Copyright 1999-2021 Alibaba Group Holding 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 a...
from typing import * from stud.constants import * from stud.torch_utils import gpus, compute_scatter_mask from tqdm.notebook import tqdm from torchtext.vocab import build_vocab_from_iterator, Vocab, vocab from collections import OrderedDict, namedtuple, Counter from torch.nn.utils.rnn import pad_sequence from torch.uti...
# Generates data from adult ICUs including demographics, lab results and vital measurements import argparse import os import random import numpy as np import pandas as pd import psycopg2 def replace(group): """ Replace missing values in measurements using mean imputation takes in a pandas group, and replace...
# Copyright (c) 2013-2015 Siphon Contributors. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Helps support reading and parsing metadata elements from a TDS client catalog.""" import logging logging.basicConfig(level=logging.ERROR) log = logging.getLogger(__name_...
from __future__ import absolute_import, division, print_function from collections import Iterable, defaultdict, deque from functools import reduce import numbers import operator import numpy as np import scipy.sparse try: # Windows compatibility int = long except NameError: pass class COO(object): ""...
import time import curses import sys import os import multiprocessing as mp import pandas as pd import numpy as np import emcee import h5py from radvel import utils import radvel class StateVars(object): def __init__(self): self.oac = 0 self.autosamples = [] self.automean = [] ...
### # Copyright (c) 2002-2005, <NAME> # Copyright (c) 2008-2009,2011, <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 ...
# Copyright 2012 OpenStack Foundation # 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 requ...
# -*- coding: utf-8 -*- import logging import os import socket import sys import time from copy import deepcopy from multiprocessing import Process, Queue import env import pytest import plumbum from plumbum import ( NOHUP, CommandNotFound, ProcessExecutionError, ProcessTimedOut, RemotePath, S...
""" main.py main.py is the main program of SonaScan and contains most of the GUI functions. """ # Global includes import asyncio import shutil import time import urllib import webbrowser from datetime import datetime from os.path import basename from src.forge import process_scan, monitor_scan_dir, get_obj, get_for...
import logging from datetime import datetime, timedelta import re from urllib.parse import urlparse from xml.etree import ElementTree as ET from xml.sax.saxutils import escape as xml_escape from dateutil import parser from django.urls import reverse from django.utils.functional import cached_property import requests fr...
""" HUMAnN: nucleotide_search module Index database, run alignment, find unused reads Copyright (c) 2014 Harvard School of Public Health 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 re...
#!/usr/bin/env python3 import sys import os import json import pickle import traceback import numpy as np import time import datetime as dtime from progressbar import ProgressBar, ETA, Bar, Percentage from sklearn.base import clone from sklearn.preprocessing import MinMaxScaler from sklearn.cross_validation import KF...
####################################################################### # # # MONDRAGO SOLVER: A brute force script to solve the game of Mondrago # # # # Author: <NAME> (https:/...
# -*- coding: utf-8 -*- from sys import argv import os import os.path import sqlite3 import time from datetime import datetime, timedelta from pprint import pprint import math import re import humanize import argparse import importlib.util from collections.abc import MutableMapping import uuid from rich import box fr...
############################################################################### #MIT License # #Copyright (c) 2019 <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, i...
#!/usr/bin/python # -*- coding: utf-8 -*- import math from enum import IntEnum from itertools import permutations, chain from typing import Dict, Tuple, List, Set, Optional, Callable, Generator from pyrsistent import pvector, PVector from data_structure import Graph from semantic_modeling.config import config from se...
""" This Is My Deeeep.io Version Using Pymunk So That The Collision And Stuff Like That Is Not Crappy. """ # Import Librarys And Modules import arcade import random import math import pymunk from typing import Optional from Pymunk_Helping_Code import follow_sprite from arcade.pymunk_physics_engine import PymunkPhys...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This module implements the handler for input functions of Denon AVR receivers. :copyright: (c) 2021 by <NAME>. :license: MIT, see LICENSE for more details. """ import logging import html import time from copy import deepcopy from typing import Dict, Hashable, List, ...