text
stringlengths
6.04k
39.5k
import ctypes import json import os import random import socket import textwrap import threading import uuid from threading import Thread from typing import List import spotipy from spotipy.oauth2 import SpotifyOAuth, logger, SpotifyOauthError from db import get_spotify_token_info, add_or_update_spotify_token_info, g...
#! /usr/bin/env python # Copyright (c) 2018 - 2019 <NAME> <<EMAIL>> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
""" A specification drawer is for visualizing combinatorial specification object """ import json import os import tempfile import threading import time import uuid import webbrowser from copy import copy from typing import TYPE_CHECKING, ClassVar, Dict, Iterable, List, Tuple, cast import requests from logzero import l...
from itertools import cycle import random from datetime import datetime import traceback from discord import Embed, Message, Member, DMChannel from discord.ext import menus class Connect4(menus.Menu): def __init__(self, *players, **kwargs) -> None: super().__init__(**kwargs) self.winner = None ...
# # Copyright (c) 2019 ISP RAS (http://www.ispras.ru) # Ivannikov Institute for System Programming of the Russian Academy of Sciences # # 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 # # h...
import gzip import h5py import math import numpy as np import os import time from .utils import get_chrom_sizes, rle_encode, vrange def tsv_to_h5( tsv_filepath: str, chrom_sizes_filepath: str, chrom: str, bin_size: int, cluster_size: int = 3, header: bool = False, timeit: bool = False, ...
# Copyright 2020 University of Illinois Board of Trustees. All Rights Reserved. # Author: <NAME>, DPRG (https://dprg.cs.uiuc.edu) # This file is part of Baechi, which is released under specific terms. See file License.txt file for full license details. # =================================================================...
# TODO: PC->MaG, please check if something missing and delete import json import logging import os import time from pathlib import Path import docker import pika from celery import Celery from celery.states import SUCCESS as CSUCCESS from celery.utils.log import get_task_logger from sqlalchemy import and_, exc from s...
# Copyright 2015 Ufora 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 i...
""" dbs.py: Database utility functions for banzai This is built around the SQLAlchemy ORM Author <NAME> (<EMAIL>) October 2015 """ from __future__ import absolute_import, division, print_function, unicode_literals import os.path from sqlalchemy import create_engine, pool, desc from sqlalchemy.orm import se...
import time import numpy as np import tensorflow as tf from stable_baselines import logger from stable_baselines.common import (ActorCriticRLModel, SetVerbosity, TensorboardWriter, explained_variance, tf_util) from stable_baselines.common.math_u...
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2021 <NAME> (The Compiler) <<EMAIL>> # # This file is part of qutebrowser. # # qutebrowser 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, e...
# -*- coding: utf-8 -*- import json import sys from sqlalchemy.sql import text from sqlalchemy.sql import func from flask import Blueprint from flask import request from flask import jsonify from src.util.logger import get_logger from src.util.mysqlConnector import get_session from src.util.stringUtility import str_t...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ *********** consensus_by_alignment_lobSTR.2.3.py Version 0.4.0 By <NAME> (1) (1) Department of Pathology, University of Washington School of Medicine, Seattle, WA 98195 July 2017 Modified November 2018 by <NAME> (1) Creating single stranded and double stranded co...
''' TODO: Usage instructions TODO: Setup instructions, including required table names, such as top_url etc ''' # new idea for threshold, perhaps give bonus related to score? # Work out how to drop without hacking # Need to do proper analysis of course pages vs non course pages to optimise scorer # Add extra universiti...
# <NAME> 2021 for ECE457A A#2 import collections import math import numpy as np from queue import Queue from queue import LifoQueue import heapq from termcolor import colored mazeList = ([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
#/usr/bin/python3 """ Copyright 2019 <NAME> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing,...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' gnpy.core.elements ================== This module contains standard network elements. A network element is a Python callable. It takes a .info.SpectralInformation object and returns a copy with appropriate fields affected. This structure represents spectral informat...
""" Contains the path technology behind opt_einsum in addition to several path helpers """ from __future__ import absolute_import, division, print_function import heapq import itertools from collections import defaultdict import numpy as np from . import helpers __all__ = ["optimal", "greedy", "eager"] def optima...
from src.model_blocks import * import torch.nn as nn import timm from src.activations import Swish_Module from src.config import YAMLConfig import typing import gc from src.utils import * """ Test two pytorch models are the same """ """ This is a testing for RANZCR. Note that the model weights will never match unles...
# 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...
""" This is a python prototype for a SRS based math v0.1a: first run for with mult tables and first compute of due time v0.1b: added \a in the msg_try_again to add a system beep when failing v0.1c: adding argparse v0.2: moving to MVC NEXT: create client class to prepare for web server / client architecture """ from ...
"""Read flight updates from kafka and store them into the database""" from collections import defaultdict from datetime import datetime, timezone, timedelta from itertools import zip_longest, takewhile, chain import json import os import threading import time import traceback import warnings from typing import Optiona...
from datetime import datetime from flask import ( Blueprint, current_app, jsonify, request ) import os.path import re import time from flask_jwt_extended import jwt_required from sqlalchemy.orm.exc import NoResultFound from app.comms.email import send_email from app.dao.events_dao import ( dao_cre...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import matplotlib as mpl # mpl.use('Agg') import matplotlib.pyplot as plt from matplotlib.transforms import Bbox import nauka import numpy as np import torch from torch import nn from torch.nn import functional as F import ganground as gg from gangro...
import pygame, math import constants #This file handles generation of all the sizes of the elements #The values have been optimised for 1280*720 window area MARGIN = 2 board_width = 620 board_box_width = 42 piece_box_width = (constants.WINDOW_WIDTH - board_width) / 2 #330 one_piece_box_width = piece_box_width / 2 #16...
#!/usr/bin/env python # encoding:utf-8 """ Author : <NAME> Date : 2021/4/11 Time: 9:25 File: sensitiveAnalysis.py HomePage : http://github.com/yuanqingmei Email : <EMAIL> Sensitive analysis by trim and fill method. Reference: [1] M.Borenstein, <NAME>, <NAME>, <NAME>. Introduction to meta-analysis, John Wiley & Sons, ...
# Copyright 2022 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...
# -*- coding: utf-8 -*- """ Created on Tue Mar 7 10:48:35 2017 Full CI calculation for H2 Main structure: 1. functions dealing with all integrals 2. functions transform MO integrals to AO, and then AO to (Gaussian type orbitals) GTOs 3. Constuct configurations and Hamiltonian matrix @author: bingg """ ...
from mowl.model import Model from mowl.graph.util import gen_factory import pandas as pd import click as ck import os import pickle as pkl import dgl from dgl import nn as dglnn import torch as th import numpy as np from math import floor from torch import nn from torch.nn import functional as F from torch import optim...
"""Module that defines the TreeModel. Based on: PySide examples/itemviews/simpletreemodel See: https://github.com/PySide/Examples/blob/master/examples/itemviews/simpletreemodel /simpletreemodel.py """ from __future__ import annotations from collections import OrderedDict from difflib import SequenceMatcher impo...
#FORCESNLPsolver_chance_5_20_50 : A fast customized optimization solver. # #Copyright (C) 2013-2020 EMBOTECH AG [<EMAIL>]. All rights reserved. # # #This software is intended for simulation and testing purposes only. #Use of this software for any commercial purpose is prohibited. # #This program is distributed in the ...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # import uuid from copy import deepcopy from typing import Any, Dict, List, Optional from uuid import uuid4 import cyclecloud # noqa from cyclecloud.model.ClusterNodearrayStatusModule import ClusterNodearrayStatus from cycl...
""" anviz_sync.anviz ~~~~~~~~~~~~~~~~ Anviz device abstraction, communication protocol and commands. crc table & algorithm based on: https://github.com/benperiton/anviz-protocol :copyright: (c) 2014 by <NAME> :license: BSD, see LICENSE for more details. """ import socket import struct im...
#!/usr/bin/python3 # -*- coding: utf-8 -*- # File: ./hooks/post_gen_project.py # Author: <NAME> <<EMAIL>> # Date: 2021-01-30 15:08:47 +0100 # Project: pyproject-template: A cookiecutter template for Python projects # # SPDX-License-Identifier: MIT # """Hook...
import pathlib import methods import torch from torch import utils import dataset import logging import json import time import integrators import numpy as np from collections import namedtuple import copy import functools TRAIN_DTYPES = { "float": (torch.float, np.float32), "double": (torch.double, np.float6...
""" Overall approaches for Tamarisk experiments: The 2.7 python codes are used with RL glue to generate samples. Codes residing at: /home/reazul/Summer-2017/ML+Summer/Summer-2017/TamariskInvasiveSpecies/invasive_species/src are used with the virtual env at: /home/reazul/Summer-2017/ML+Summer/Summer-2017/RL_Glue/python2...
import copy import csv import gzip import logging import os import re import subprocess import tempfile from collections import defaultdict from multiprocessing import Pool from pathlib import Path import numpy as np import pandas as pd import tqdm from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqRecord impor...
import os from datetime import datetime, timedelta, timezone from time import time import json import numpy as np from logger_util import logger from config import BaseConfig from google.cloud import storage from download_batch_files import download_batch_into_memory import requests import io import psycopg2 import psy...
""" An Implementation of Euler Integration for reaction path following. References: [1] <NAME> and <NAME>, J. Chem. Phys. 90(4):2154 (An Improved Algorithm for Reaction-Path Following) """ __authors__ = "<NAME>" __credits__ = ["<NAME>"] __copyright__ = "(c) 2018-2019, Derricotte Research Group" __license__ = "...
"""This module implements a low-level and stateless API for all commands of the STOMP protocol version supported by stompest. All STOMP command frames are represented as :class:`~.frame.StompFrame` objects. It forms the basis for :class:`~.session.StompSession` which represents the full state of an abstract STOMP proto...
import numpy as np from gym.spaces import Dict, Discrete import random from rlkit.data_management.replay_buffer import ReplayBuffer import pandas as pd class ObsDictRelabelingBuffer(ReplayBuffer): """ Replay buffer for environments whose observations are dictionaries, such as - OpenAI Gym GoalEnv env...
# vim: set et ai ts=4 sts=4 sw=4: from __future__ import print_function import os import textwrap import base64 import struct import ctypes import javaobj import tempfile from pyasn1.codec.ber import decoder from pyasn1.error import PyAsn1Error b8 = struct.Struct('>Q') b4 = struct.Struct('>L') # unsigned b2 = struct....
#!/usr/bin/env python from random import randrange, uniform import re, sys, os, time, yaml, copy, glob import numpy as np from argparse import ArgumentParser import shutil, subprocess import matplotlib.pyplot as plt from constants import * from regexes import * from utils import * from create_run_directory import crea...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function """ pgs.app =============== A bottle webapp for serving static files from a git branch, or from the local filesystem. Objectives: * [x] Learn Bottle * [x] Serve Static Files (such as ``index.html``) * [x] Append .html (``file_path = ...
import keras from keras.models import Model from keras.layers import Input, Dropout, Activation, SpatialDropout2D, Lambda from keras.layers.convolutional import Conv2D, Cropping2D, UpSampling2D, Deconv2D from keras.layers.pooling import MaxPooling2D, GlobalAveragePooling2D from keras.layers import concatenate, add, mul...
# Copyright 2021 AlQuraishi Laboratory # Copyright 2021 DeepMind Technologies Limited # # 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 # # U...
# apf.py # # <NAME> 2017 # # # Extends class definitions in spectra.py for the High Resolution Echelle # spectrometer at the WM Keck observatory. __author__ = 'nate' import matplotlib.pyplot as plt import numpy as np from astropy.io import fits from pathos.multiprocessing import ProcessingPool as Pool from tqdm imp...
from __future__ import absolute_import, division, print_function from keras.layers import Lambda, Input, Dense, Conv2D, MaxPooling2D, UpSampling2D, Reshape from keras.models import Model from keras.datasets import mnist from keras.losses import mse, binary_crossentropy from keras.utils import plot_model from keras imp...
import pdb import numpy as np import torch from torch import nn import torch.nn.functional as F from maskrcnn_benchmark.utils.logged_module import LoggedModule def wrap_nd_batch(fn, tensor): s = list(tensor.shape) tensor = tensor.reshape([-1, s[-1]]) result = fn(tensor) s2 = list(result.shape) asse...
# Modfied code from scVI to SISUA for loading 10xGenomics datasets # # MIT License # Copyright (c) 2018, <NAME> # ... # # Full license: https://github.com/YosefLab/scVI/blob/master/LICENSE # Original code: https://github.com/YosefLab/scVI/blob/master/scvi/dataset/dataset10X.py # # For more information about how to read...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import collections import csv import functools import warnings import io import json import boto3 import csv import codecs from pathlib import Path from datetime import datetime from dataclasses import dataclass, field import typing as t from bot...
import os import time import shapely from shapely.geometry import Polygon import pickle5 as pickle from mrcnn.model import MaskRCNN import mrcnn.utils import mrcnn.config import cv2 import numpy as np from flask import Flask, Response from time import ctime print(cv2.__version__) print(cv2.getBuildInformation()) # И...
""" Utitilies -- how to intuitively distinguish it from analysisTools.py? """ from openmm.app import * import openmm.unit as unit import argparse import os import csv import numpy as np import time import Bio.PDB # biopython # import mdtraj as md # mdtraj calls "simtk.openmm", hence "Warning: importing 'simtk.openm...
#sbatch -a 0-3 multiple_complete_retrieval.slurm #sbatch -a 0-5 multiple_complete_retrieval.slurm 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 * import time import os import numpy as np # from ...
import copy import getopt import os import json import socket import sys import time from Options import StochasticOptions from Database.Table import create_datebase, create_table, clean_table, dump_table_names from Kubernetes import ( create_pods, # test_ls, get_pods, delete_pods, kube_target_serv...
import datetime import csv import hashlib import json import numpy import os import pandas import pickle import re import shutil import uuid from expfactory.battery import get_load_static, get_experiment_run from expfactory.survey import generate_survey from expfactory.experiment import load_experiment from expfactory...
from tkinter import * import tkinter.font as tk_font import math def check_decimal(number): number = str(number) if len(number.split('.')) == 1: return int(number) else: # also check if input is for ex. <.1> instead of <0.1> if number.split('.')[0] == "": number = f"0{n...
""" Library Simulation model Copyright (c) 2020 <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, p...
# PyVision License # # Copyright (c) 2006-2008 <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: # # 1. Redistributions of source code must retain the above copyright # notice, this list o...
#!/usr/bin/env python3 import itertools import os import sys from dataclasses import dataclass, field from pathlib import Path from typing import Dict, Iterator, List, Optional import dacite import ida_bytes import yaml import idaapi import idautils import ida_funcs import ida_lines import ida_search import ida_segm...
from tkinter import * import ID_extract import file_rename_1 import read_Size import os import re from itertools import groupby LOG_LINE_NUM = 0 class MY_GUI(): def __init__(self,init_window_name): self.init_window_name = init_window_name #设置窗口 def set_init_window(self): self.init_window...
import pandas as pd from scipy.stats import ttest_ind, mannwhitneyu from copy import deepcopy from sklearn.metrics import pairwise_distances, roc_curve, auc from scipy.spatial.distance import pdist from copy import deepcopy from sklearn.metrics import confusion_matrix from copy import deepcopy import numpy as np import...
import numpy as np import math import json import imageio import xml.etree.ElementTree as ET from scipy.spatial.transform import Rotation from svg.path import parse_path, Line, CubicBezier BPM = 108 TIME_TO_BEATS = BPM / 60 FILES = ["EasyStandard.dat", "ExpertStandard.dat"] BASE_HJ = 2 RESOLUTION = 0.02 # In normal...
""" C64lib module holds all information needed to provide abstraction to low level graphic related operation and conbertion in Python. """ import os from collections import Counter import logging from PIL import Image from PIL.ImageDraw import Draw from c64img.path import get_modified_fname from c64img.logger import ...
''' Created on Aug 23, 2017 @author: zli ''' import cv2 import sys, os, json, argparse from glob import glob import numpy as np from PIL import Image from faster_rcnn import network from faster_rcnn.faster_rcnn import FasterRCNN from faster_rcnn.utils.timer import Timer from panicle_data_integration import full_day_o...
########################################################################### # Created by: <NAME> # Email: <EMAIL> # Copyright (c) 2018 ########################################################################### import math import torch from torch.nn import Module, Conv2d, Parameter, Softmax, Conv1d import torch.nn as ...
""" """ #FIXME: Ensure that all attributes of a georef are treated everywhere #and unit test from builtins import str from builtins import object import sys import copy from anuga.utilities.numerical_tools import ensure_numeric from anuga.anuga_exceptions import ANUGAError, TitleError, \ ...
import os import math as math import numpy as np from tkinter import Tk from tkinter.filedialog import askopenfilename import ntpath from numba import njit from scipy import interpolate np.seterr('raise') @njit def is_complex(x): """ Check if a value is complex Parameters ---------- x : float ...
""" Biharmonic splines in 2D. """ import itertools from warnings import warn import numpy as np from sklearn.utils.validation import check_is_fitted from .base import n_1d_arrays, BaseGridder, check_fit_input, least_squares from .coordinates import get_region from .utils import parse_engine from .model_selection impo...
#!/usr/bin/python # -*- coding: UTF-8 -*- import timeit import numpy as np import math import random as rand class calculate_polynomial: """ by XRH date: 2020-08-19 计算多项式的 方法集合 """ def cal_poly_naive(self,a_list,x_list): """ 求解多项式的值 (朴素方法) 对于 x_list 的...
import csv import PySimpleGUI as sg import pandas as pd import sys import numpy as np pizzaList = [] price = 0 shipping = False pizzaChoices = 0 confirm = "" receipt = [] test1 = False test2 = False test3 = False # rounds number to 4.sf def roundup(x): return float(np.format_float_positional(x, precision=4, uni...
""" This code is modified from the implementation of "stable_baseline" (https://github.com/hill-a/stable-baselines) to match the interface for goal proposing environment """ import tensorflow as tf import numpy as np import warnings import logging from stable_baselines.common.policies import ActorCriticPolicy, Recu...
import asyncio import collections.abc import dataclasses import json import re from typing import List, Optional, Tuple import aiohttp import httpstan.models import httpstan.schemas import httpstan.services.arguments as arguments import httpstan.utils import numpy as np import simdjson from clikit.io import ConsoleIO ...
import sys, os, time, itertools, re, warnings import numpy as np import matplotlib.pyplot as plt import dill as pickle from obspy.signal.detrend import polynomial import bead_util as bu import peakdetect as pdet import scipy.optimize as opti import scipy.signal as signal from tqdm import tqdm from joblib import Par...
import json, os, sys, argparse, csv, urllib.parse from uuid import uuid4 from pprint import pprint from rdflib import Graph, plugin from rdflib.serializer import Serializer from lxml import etree as ET from statistics import mean from datetime import datetime formatPlaceholder = "____MAPS-FORMAT" def maps_result_to_g...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # written in Python3 # MIT License # # Copyright (c) 2018 <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, inclu...
#!/usr/bin/env python import logging.handlers import subprocess import glob import os import sys import shutil import mimetypes from collections import defaultdict, OrderedDict from tornado.ioloop import IOLoop from tornado.template import Loader from tornado.process import Subprocess from tornado.escape import xhtml_...
from __future__ import annotations import sys from collections import defaultdict from pathlib import Path from typing import ( TYPE_CHECKING, Any, Callable, Collection, Dict, Iterable, Iterator, List, NamedTuple, Optional, Sequence, Set, Tuple, Type, TypeVar...
import unittest import numpy as np import numpy.testing as npt from squidward import gpc, utils from squidward.kernels import distance, kernel_base # useful for debugging np.set_printoptions(suppress=True) np.random.seed(0) class ClassificationTestCase(unittest.TestCase): """Class for guassian process classific...
import tkinter as tk from tkinter import ttk from tkinter import filedialog from codeeditor import CodeeditorFrame from dialog import OpenFileDialog, SettingsDialog, MessageDialog, SaveFileDialog from configuration import Configuration import keyword import os import gc import webbrowser import subprocess class Notebo...
# -*- coding: utf-8 -*- """ test_api ~~~~~~~~ Test the core API functionality. """ from __future__ import print_function from __future__ import unicode_literals from __future__ import division import logging import os import re import time import pytest import six from chemspipy import ChemSpider, errors logging...
""" Use DDPG to train a stock trader based on a window of history price """ from __future__ import print_function, division from model.ddpg.actor import ActorNetwork from model.ddpg.critic import CriticNetwork from model.ddpg.ddpg import DDPG from model.ddpg.ornstein_uhlenbeck import OrnsteinUhlenbeckActionNoise fro...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © Her Majesty the Queen in Right of Canada, as represented # by the Minister of Statistics Canada, 2019. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # ...
import numpy as np from .. import constants as c from .scatmodel import ScatModel __all__ = ['Mie'] MAX_RAM = 8.0 # Major update: March 27, 2016 # This code is slow, so to avoid running getQs over and over again, create # "calculate" function that runs getQs and stores it, then returns the appropriate values later??...
import pickle import random import matplotlib.pyplot as plt from sklearn.utils import shuffle from tensorflow.contrib.layers import flatten import tensorflow as tf import numpy as np import cv2 import os import glob import matplotlib.image as mpimg # 忽略读取mnist数据时的warning old_v = tf.logging.get_verbosity() tf.logging.s...
#!/usr/bin/env python from __future__ import print_function import os import sys import codecs import json import fnmatch import shlex import collections import cmd ANSI_BLUE = '\033[94m' ANSI_GREEN = '\033[92m' ANSI_YELLOW = '\033[93m' ANSI_RED = '\033[91m' ANSI_PROMPT = '\033[95m' ANSI_ENDC = '\033[0m' class Delega...
import sys import numpy as np import pandas as pd from sklearn import metrics from sklearn.cluster import AffinityPropagation from sklearn.cluster import AgglomerativeClustering from sklearn.cluster import Birch from sklearn.cluster import DBSCAN from sklearn.decomposition import PCA from sklearn.neighbors import knei...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on 2017-10-06 at 13:29 @author: cook Version 0.0.0 """ import numpy as np import matplotlib.pyplot as plt from astropy.io import fits from astropy.table import Table from astropy import units as u from tqdm import tqdm import warnings import os import time...
from __future__ import division import sys import pytest from gmpy_cffi import mpz, MAX_UI PY3 = sys.version.startswith('3') if PY3: long = int invalids = [(), [], set(), dict(), lambda x: x**2] class TestInit(object): small_ints = [-1, 0, 1, 123, -9876, sys.maxsize, -sys.maxsize - 1] big_ints = [s...
# Copyright (c) 2006-2012 Regents of the University of Minnesota. # For licensing terms, see the file LICENSE. from decimal import Decimal import os import sys import conf import g from item import geofeature from item import item_base from item import item_helper from item.util.item_type import Item_Type from util_...
""" ############################################################################### # Copyright 2019, by the California Institute of Technology. ALL RIGHTS RESERVED. # United States Government Sponsorship acknowledged. Any commercial use must be # negotiated with the Office of Technology Transfer at the # Califo...
from brewutils import Archive, SchemaRef, compare_version, compute_digest, cwd, download_file, schemas, tempdir from glob import glob from jsonschema import ValidationError from koji import ClientSession, PathInfo from logging import getLogger from os import getenv, listdir, mkdir, devnull from os.path import basename,...
import cmd import os import sys from string import digits from traceback import print_exc from serial import Serial from serial.serialutil import SerialException from typing import Any import time from funibot_api.funiconfig import FuniArgs, FuniConfig from funibot_api.funilib import Direction, Vecteur from funibot_ap...
# file findingaids/content/tests.py # # Copyright 2012 Emory University Library # # 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 # ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # A tf.keras implementation of MobileViT, # ported from https://keras.io/examples/vision/mobilevit/ # # Reference: # [MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer](https://arxiv.org/abs/2110.02178) # https://github.com/apple/ml-cvn...
import pickle import numpy as np import matplotlib.pyplot as plt import tensorflow as tf from skimage import color from sklearn.utils import shuffle from sklearn.model_selection import train_test_split from numpy.linalg import norm from scipy.signal.signaltools import convolve2d import os import time training_file =...
import pandas as pd import numpy as np import matplotlib.pyplot as plt import plotly.graph_objects as go import json import datetime from dateutil.relativedelta import relativedelta import os from urllib.request import urlopen from pandas.api.types import is_numeric_dtype # https://github.com/ebmdatalab/datalab-pandas...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 CEA # <NAME> # Licensed under the terms of the CECILL License # (see guiqwt/__init__.py for details) # pylint: disable=C0103 """ guiqwt.label ------------ The `labels` module provides plot items related to labels and legends: * :py:class:`guiqwt.shapes.LabelItem`...
from social_django.views import _do_login from social_core.actions import do_auth, do_complete, do_disconnect from django.core.exceptions import ObjectDoesNotExist from django.contrib.auth.decorators import login_required from .models import ProfileForm, Profile, Workout, WorkoutForm, FSWorkoutForm from badgify.models ...