text stringlengths 6.04k 39.5k |
|---|
import os.path
import subprocess
import tempfile
from secrets import token_urlsafe
try:
from yaml import CDumper as Dumper
from yaml import CLoader as Loader
except ImportError:
from yaml import Loader, Dumper
import reversion
import yaml
from django.contrib.auth import get_user_model
from django.db impor... |
from tkinter import ttk
from bs4 import BeautifulSoup
from threading import Thread
from urllib.parse import urljoin
from urllib.parse import unquote
from datetime import datetime
# import concurrent.futures
import tkinter as tk
import os
import re
import requests
import mimetypes
# from requests.auth import HTTPBasicA... |
"""
@name: Modules/House/Entertainment/_test/test_onkyo.py
@author: <NAME>
@contact: <EMAIL>
@copyright: (c) 2014-2020 by <NAME>
@license: MIT License
@note: Created on Mar 22, 2014
@summary: Test
Passed all 29 tests - DBK - 2020-01-28
"""
__updated__ = '2020-01-30'
# Import system type stuff
fro... |
from __future__ import print_function
from __future__ import division
import torch
import torch.nn as nn
from torch.optim import *
import torch.nn.functional as F
from torch.nn.utils import clip_grad_norm_
import torch.utils.model_zoo as model_zoo
from dataset import get_dataloaders
import os
import numpy as np
impor... |
from collections import namedtuple
from itertools import groupby
from .instance_lru import lru_cache
CODE2CIGAR = "MIDNSHP=XB"
CIGAR2CODE = dict([y, x] for x, y in enumerate(CODE2CIGAR))
CIGAR = namedtuple('CIGAR', 'operation length')
MATCH = 0
INSERTION = 1
DELETION = 2
SOFT_CLIP = 4
HARD_CLIP = 5
# Op BAM Descrip... |
#------------------------------Part1--------------------------------
# In this part we import necessary graph files and initialize our graph
from src.Graph import Graph,initialize_map, get_image_mapping
from googletrans import Translator
import requests
translator = Translator()
nodes,map_node = initialize_map('src/n... |
import argparse
import pickle
import os
import math
import io as sysio
from pathlib import Path
import numpy as np
import torch
import cv2
from tqdm import tqdm
from pcdet.models import load_data_to_gpu
from pcdet.config import cfg, cfg_from_yaml_file
from pcdet.datasets import build_dataloader
from pcdet.models impo... |
import os, json
import numpy as np
from matplotlib import colors, cm
from matplotlib.patches import Rectangle
import matplotlib.pyplot as plt
from monty.json import MontyDecoder
from ipywidgets import interact, interactive, interactive_output, fixed, FloatSlider, Tab, \
Select, SelectMultiple, HBox, VBox, Output, ... |
# -*- coding: utf-8 -*-
import os
import sublime
import sublime_plugin
import sys
import logging
log = logging.getLogger(__name__)
PACKAGE_SETTINGS = "GDL.sublime-settings"
DEFAULT_AC_PATH = "C:/Program Files/GRAPHISOFT/ARCHICAD 23"
DEFAULT_AC_PATH_MAC = "/Applications/GRAPHISOFT/AC23/ARCHICAD 23.app"
def save_all_... |
# -*- encoding: utf-8 -*-
#
# Copyright © 2014-2015 eNovance
#
# Authors: <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
... |
import sys
import threading
import queue
import numpy as np
import scipy as sp
import scipy.signal
import matplotlib.pyplot as plt
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
import pyaudio
import tkinter
import serial
import serial.tools.list_ports
f_sampling = 44100
duration = 10.... |
# -*- coding:utf-8 -*-
# @author xupingmao
# @since 2016
# @modified 2022/04/12 20:54:34
"""Parse minipy code, grammar see minipy.grammar"""
from mp_tokenize import *
if "tm" not in globals():
from boot import *
_smp_end_list = ['nl', 'dedent']
_skip_op = ['nl', ';']
class AstNode:
def __init__(self, type... |
from datetime import timedelta
import functools
import numpy.ma as ma
import numpy as np
import matplotlib.pyplot as plt
import os
import pandas as pd
import pathlib
LOG_EPS = -1e150
report_begin_str = (
"\\documentclass[a4paper]{article} \n \\usepackage[english]{babel} \n \\usepackage[utf8x]"
"{inputenc} \n... |
import torch
import copy
import numpy as np
from PIL import Image
import random
from torch.utils.data import Dataset
from torchvision.datasets import CIFAR100
import torchvision.transforms as T
from datasets.CTAugment import apply
from datasets.ImageNet import ImageNet, ImageNet32
from datasets.Places365 import Places... |
import os
import logging
import numpy as np
import pandas as pd
from pathlib import Path
from typing import Union, Optional, Tuple, Sequence, Callable
from math import floor
from abc import ABC
from enum import Enum
from bnnbench.utils import AttrDict
from bnnbench.utils.universal_utils import standard_pathcheck
from ... |
# -*- encoding: utf-8 -*-
from collections import namedtuple
from pathlib import Path
from typing import Union, List, Set
from astropy.time import Time
import csv
import h5py
import numpy as np
from datetime import datetime
from scipy.interpolate import interp1d
from .biases import BiasConfiguration
__all__ = [
... |
import os
import copy
import pickle
from threading import main_thread
import numpy as np
from torch.optim import lr_scheduler
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torchvision
import torchvision.transforms as transforms
import torch_xla
import torch_xla.de... |
import boto3
import botocore
# import jsonschema
import json
import traceback
from extutil import remove_none_attributes, account_context, ExtensionHandler, \
ext, component_safe_name
from util import get_default_cors_configuration, generate_openapi_definition
eh = ExtensionHandler()
# def validate_state(state):
... |
import torch
from torch_geometric.data import Data
import math
from numpy.linalg import inv
from scipy.spatial.transform import Rotation as R
import h5py
from body_movement_vis import pyKinect
import numpy as np
import body_movement_vis.visualize_sign as visualize_sign
import threading
# from h5_control_single import k... |
import itertools
import os.path
import time
from .core import *
from . import geometry
from . import file_io
from . import version
from . import stringconv
#
# Functions
#
def evaluated_profile_li(profileli):
""" Return a list of synapses which were parsed and evaluated
w/o errors so far
"""
r... |
# -*- coding: utf-8 -*-
# Copyright (c) 2016-2022 by University of Kassel and Fraunhofer Institute for Energy Economics
# and Energy System Technology (IEE), Kassel. All rights reserved.
try:
import pandaplan.core.pplog as logging
except ImportError:
import logging
logger = logging.getLogger(__name__)
from ... |
#Implementing random forests with feature engineering
# importing numpy, pandas, and matplotlib
import numpy as np
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
from skbio.stats.composition import clr
import sys
# importing sklearn
from sklearn.model_selection import train_test_split
from skle... |
import os.path
import argparse
import configparser
import pickle
import sys
import os
import datetime
import json
import csv
import time
from src.handle_args import handle_arg
from src.handle_args import arg_exists
from src.handle_args import config_validation
from src.preprocess_fastqs import reheader_fastqs
from src.... |
import numpy as np
import cv2
import skimage
import math
from skimage import io
import matplotlib.pyplot as plt
from scipy.ndimage import gaussian_filter
from skimage.morphology import reconstruction
from scipy import stats
from statistics import mean
from collections import OrderedDict
import plotly.graph_objects as ... |
# Query BUSCO for a given species or functional group.
# A script that takes a given functional group as input, along with the taxonomic level of that group
# (e.g. Phaeocystis antarctica, species), and then checks for BUSCO completeness among the contigs
# identified as that taxonomic level or lower, also evaluating ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import h5py
import numpy as np
import dolfin as df
import matplotlib.pyplot as plt
import xml.etree.ElementTree as ET
import lxml.etree as etree
plt.rcParams["figure.figsize"] = [16, 10]
# plots a 2d mesh
def plot_mesh2d(mesh):
x, y = mesh.coordinates()[:, 0], mesh... |
import torch
import torch.nn as nn
from torch.nn import init
import torch.nn.functional as F
import math
import numpy as np
torch.set_printoptions(precision=2,threshold=float('inf'))
class AGCNBlock(nn.Module):
def __init__(self,input_dim,hidden_dim,gcn_layer=2,dropout=0.0,relu=0):
super(AGCNBlock,self).... |
"""
# =============================================================================
#
# By CoilingDragon
#
# =============================================================================
"""
def sort_Price_datatable(store_upc,Row,ASIN,SKU,UPC,Store,SaleChan,Status,old_price,file_folder):
#'Row',... |
#!/usr/bin/env python
#
# Copyright 2017 Nomos
#
# 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 agre... |
# -*- coding: utf-8 -*-
from __future__ import print_function, division, unicode_literals, absolute_import
from ....utils import NUMPY_MMAP
from ....pipeline import engine as pe
from ....interfaces.utility import Function, IdentityInterface
from ....interfaces.freesurfer import *
from .utils import copy_file
def chec... |
"""
This script extracts stack traces from txt files made available by Campbell 2016.
"""
import argparse
import codecs
import gzip
import logging
import math
import os
import re
import traceback
from datetime import datetime
from itertools import count
import sys
import json
import pymongo
import unicodedata
def ... |
# coding=utf-8
# Copyright (c) 2019 NVIDIA CORPORATION. All rights reserved.
# Copyright 2018 The Google AI Language Team Authors and The HugginFace Inc. team.
# 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... |
# coding: utf-8
# # Developing an AI application
#
# Going forward, AI algorithms will be incorporated into more and more everyday applications. For example, you might want to include an image classifier in a smart phone app. To do this, you'd use a deep learning model trained on hundreds of thousands of images as p... |
#!/usr/bin/env python3
import datetime
import inspect
import json
import os
import random
import string
import sys
from enum import Enum
from sys import argv
# Make all random more random.
import requests
random = random.SystemRandom()
""" <config> """
# SERVICE INFO
PORT = 8080
EXPLOIT_NAME = argv[0]
# DEBUG -- l... |
"""
telemetrystation-15min.py
This Python program queries the HydroBase web services for
real-time (15 minute) station telemetry data.
The web service results are output to stdout or a file.
Run with -h to display the usage.
See the main program at the end of this file.
"""
import argparse
import dateutil.parser as... |
import logging
import math
import os
import os.path
import os.path as osp
import pdb
import pickle
import time
import numpy as np
import torch
import torch.utils.data as data
from numpy.random import randint
from tqdm import tqdm
from ops.io import load_proposal_file
from ops.utils import temporal_iou
class ActionI... |
# Standard library
import pathlib
# Third-party
import astropy.coordinates as coord
import astropy.table as at
from astropy.time import Time
import astropy.units as u
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import thejoker as tj
from schwimmbad.utils import batch_tasks
from hq.conf... |
import math
from math import cos, degrees, pi, radians, sin
from pathlib import Path
import matplotlib.lines as lines
import matplotlib.patches as mpatches
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
from matplotlib.patches import Ellipse
from numpy import arctan2
from numpy import lina... |
from flask import Flask, Markup
from flask import (
url_for,
request, redirect,
render_template,
send_from_directory,
)
# Flask extensions
from flask_api import FlaskAPI
from flask_flatpages import FlatPages
from flask_migrate import Migrate
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy impor... |
"""
Celery base task aimed at longish-running jobs that return a result.
``JobtasticTask`` adds thundering herd avoidance, result caching, progress
reporting, error fallback and JSON encoding of results.
"""
from __future__ import division
import logging
import time
import os
import sys
import warnings
from contextli... |
# -*- coding: utf-8 -*-
# Copyright (c) 2019 - 2021 Geode-solutions
#
# 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, co... |
import os
from datetime import datetime
from django.contrib import admin, messages
# Register your models here.
from django.forms import BaseInlineFormSet
from django.http import HttpResponseRedirect
from django.urls import path, reverse
from django.utils.safestring import mark_safe
from login.models import RegisterF... |
import jabz
import math
import decimal
import typing
from decimal import Decimal
from dataclasses import dataclass
decimal.getcontext().prec = 100
@dataclass(frozen=True)
class Expr:
precedence = None
def bracketCode(self, e:'Expr'):
c = e.code()
if e.precedence > self.precedence:
... |
from tqdm import tqdm
import argparse
import numpy as np
import torch
import torchvision
import torchvision.models as models
from torch.utils.data import Dataset, DataLoader, random_split, TensorDataset, Subset
from networks import MultiLayerPerceptron, SvhnModel, ConvNet, VGG16, get_nn_params, flatten_params, recon_pa... |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import atexit
import logging
from common import Highlight
# The engine component does the following:
#
# 1. Accepts ... |
# -*- coding: utf-8 -*-
from lxml import etree
import os
from lxml.builder import ElementMaker
import uuid
import random
import datetime
from decimal import Decimal
basedir = os.path.abspath(os.path.dirname(__file__))
# Шаблоны генерации xml документов
def number(num=None):
if num:
with open(os.path.join... |
import functools
import itertools
import joblib
import numba
import numpy as np
def calculate_cic(
y00, y01, y10, y11, quantiles=np.linspace(.1, .9, 9), moments=None,
n_bootstraps=99, n_draws=1000, n_jobs=None, use_corrections=False
):
r"""
Estimates a model using the Changes-In-Changes estimator.
... |
import re
import json
from spytest import st, tgapi
import apis.qos.qos as qosapi
import apis.system.port as port
from apis.system import basic
import apis.common.asic as asicapi
import apis.system.interface as intf
from utilities.common import filter_and_select
obj_name = "AZURE"
port_qos_map = "PORT_QOS_MAP"
tc_q... |
#!/bin/env python3
import sys
import os
import os.path
import glob
import copy
import traceback
import re
import csv
import tempfile
import urllib.request, urllib.parse, urllib.error
import shutil
import atexit
import subprocess
import time
import math
from collections import defaultdict, Counter
from os.path import jo... |
# MEDICAL RECORDS ANALYSIS WITH WATSON ASSISTANT - DASHBOARD
# SEPTEMBER 2021
# Import data
import streamlit as st
import pandas as pd
import geopandas as gpd
import csv
from collections import Counter
import plotly.express as px
from debater_python_api.api.debater_api import DebaterApi
from austin_utils import init_l... |
# ~/dev/py/fieldz/msgImpl.py
# import sys # for debugging
from wireops.enum import FieldTypes, PrimTypes
from wireops.raw import(length_as_varint, field_hdr_len, read_field_hdr,
write_raw_varint, read_raw_varint,
write_field_hdr)
from wireops.typed import T_GET_... |
# encoding: utf-8
import numpy as np
import os
import torch
from PIL import Image
import matplotlib.pyplot as plt
from collections import defaultdict
import gc
from utils.AlignedTripletLoss import low_memory_local_dist
from trainers.re_ranking import re_ranking as re_ranking_func
class ResNetEvaluator:
... |
from ctypes import create_unicode_buffer
from struct import pack
from typing import final
import i2cdriver
from pprint import pprint
import time
UBX_HEADER_1 = 0xB5
UBX_HEADER_2 = 0x62
UBX_CFG_PRT_CLASS = 0x06
UBX_CFG_PRT_ID = 0x00
UBX_CFG_MSG = 0x01
UBX_CFG_NAV5 = 0x24
UBX_CFG_NAVX5 = 0x23
UBX_CFG_RATE = 0x08
UBX_... |
import _init_paths
import argparse
import json
import os
import pickle
import time
from joblib import Parallel, delayed
from tqdm import tqdm
import utils.tracking_utils as tu
from modle.tracker_2d import Tracker2D
from modle.tracker_3d import Tracker3D
from tools.eval_mot_bdd import TrackEvaluation
import ss_gen_p... |
"""
Utilities for emulating GATK's BQSR tool.
BQSR model construction hard clips soft clips and
trims adaptors. ApplyBQSR does not. So we need
different functions for each.
"""
import pysam
import numpy as np
import pandas as pd
import scipy.stats
from .. import compare_reads as utils
from .. import recaltable
#####... |
import json
import logging
import re
import uuid
from string import Template
from urllib.parse import parse_qs, quote, urlencode, urlparse
from sequoia import env, error, http, registry
from sequoia.auth import AuthFactory, AuthType
from sequoia.http import HttpResponse
DIRECT_MODEL = 'direct'
class Client(object):... |
import numpy as np
import scipy.stats as ss
import time
import multiprocessing as mp
from lib.sysdef import System
from lib.excelIO import select_file, read_source, write_output
class Simulation():
"""
Class used to instantiate a simulation run.
Key Attributes:
DURATION Duration of the simula... |
# This file contains methods to deal with criu images.
#
# According to http://criu.org/Images, criu images can be described
# with such IOW:
#
# IMAGE_FILE ::= MAGIC { ENTRY }
# ENTRY ::= SIZE PAYLOAD [ EXTRA ]
# PAYLOAD ::= "message encoded in ProtocolBuffer format"
# EXTRA ::= "arbitrary blob, depends o... |
# ----------------------------------------------------------------------------
# Copyright (C) 2017 Verizon. 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
#
# ... |
import os
import torch
import numpy as np
from glob import glob
import data_util
import util
import torchvision
import pickle
import random
import json
from PIL import Image
from os.path import isfile, join
from os import listdir
from torch.utils.data import DataLoader
def pick(list, item_idcs):
if not list:
... |
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
from PIL import Image, ImageColor
import numpy as np
import matplotlib.pyplot as plt
from opensimplex import OpenSimplex
import skimage.transform as tf
class ImageMap:
def __init__(self, in_map, mapping=None):
if not isinstance(in_map, np.ndarray):
in_map = plt.imread(in_map)[:, :, :3] # RGBA... |
import base64
import json
import os
import threading
import zipfile
from collections import Counter
from datetime import datetime, timedelta
from io import BytesIO
from pathlib import Path
from typing import List, Dict, Any, Tuple, Optional, Union
from PIL import Image
from remi import gui
import config.styles as css... |
import numpy as np
import utils
import units
import config
# In python HIPPO, we represent all atoms and parameters as classes.
class Atom:
'''After parameters are read from .key and .prm files, an Atom class object is created to store the parameter values.'''
def __init__(self):
self.atomtype = N... |
# Copyright 2013-2017 The Salish Sea MEOPAR Contributors
# and The University of British Columbia
# 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... |
import os
import numpy as np
try:
import pymake
except:
msg = "Error. Pymake package is not available.\n"
msg += "Try installing using the following command:\n"
msg += " pip install https://github.com/modflowpy/pymake/zipball/master"
raise Exception(msg)
try:
import flopy
except:
msg = "Er... |
"""
CEASIOMpy: Conceptual Aircraft Design Software
Developed for CFS ENGINEERING, 1015 Lausanne, Switzerland
The script contains the user inputs required for the weight analysis.
| Works with Python 3.6
| Author : <NAME>
| Date of creation: 2018-09-27
| Last modifiction: 2019-10-30 (AJ)
TODO:
* Maybe gather al... |
import re
import json
import spacy
import msgpack
import unicodedata
import numpy as np
import pandas as pd
import argparse
import collections
import multiprocessing
import logging
import random
import torch
from pytorch_pretrained_bert import BertTokenizer
from allennlp.modules.elmo import batch_to_ids
from general_ut... |
import io
import re
import numpy
import pandas
import struct
import zipfile
import warnings
import xml.etree.ElementTree as ET
from .utils import ismember, RGBint2RGB
SUPPORTED_MASTODON_VERSIONS = ["0.3"]
class JavaRawReader:
MAGIC = -21267
VERSION = 5
def __init__(self, raw_file):
if isinstanc... |
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.model_zoo as model_zoo
import pretrainedmodels
import timm
from torchvision import models
class Conv1x1(nn.Module):
def __init__(self, num_in, num_out):
super().__init__()
self.block = nn.Conv2d(num_in, num_out, k... |
#!/usr/bin/env python3
# vim: sta:et:sw=4:ts=4:sts=4
"""
NAME
fermi_helper.py - Build and run Fermi HEP workflow using Docker/Singularity
SYNOPSIS
python3 fermi_helper.py build-docker-image [--tag TAG]
[--only-dependencies] [--pull-dependencies TAG] [--decaf-root ROOT]
[--decaf-repo REPO] [--de... |
# -*- coding: utf-8 -*-
"""
Created on Sat Mar 20 10:51:35 2019
@author: levy.he
"""
import ctypes
from . import vxlapy
from . import vxlbase
import time
import threading
from ...fr import FrFrame
class VectorError(IOError):
def __init__(self, error_code, error_string, function):
self.error_code = error... |
import enum
from typing import Any, Optional, Sequence, Union
import torch
import gym.spaces
import numpy as np
from allenact.base_abstractions.sensor import Sensor
from allenact.base_abstractions.task import Task
from scene_graph.layers.output_utils import postprocess
from scene_graph.utils.augmentations import FastB... |
# -*- coding: UTF-8 -*-
################################################################################
#
# Copyright (c) 2020 Baidu, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"
# you may not use this file except in compliance with the License.
# You may obtain a copy... |
# -*- coding: utf-8 -*-
# Copyright (c) 2022, KarjaKAK
# All rights reserved.
from tkinter import Tk, ttk, simpledialog, messagebox
from Clien.clien import cmsk
from contextlib import redirect_stdout
from DecAn.decan import deconstruct, construct
from datetime import datetime
from .dbase import Ziper
from ast import l... |
# Unless explicitly stated otherwise all files in this repository are licensed under the the Apache License Version 2.0.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2021 Datadog, Inc.
# Automatic generatiom from:
# python utils/scripts/extract_appsec_waf_rules.py ... |
"""Various metrics."""
import torch
from functools import partial
import warnings
warnings.filterwarnings(
"ignore", message=".*torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument.*",
) # this is kornia's problem
def cw_ssim(img_batch, ref_batch, scales=5, skip_scales=None,... |
"""
对ats数据进行处理
"""
import json
import datetime
from collections import Counter, defaultdict
from pyspark import SparkContext, SparkFiles
import uuid
import re
import time
import traceback
def get_function_dict():
function_id2name_dict = {}
function_lvl4_to_lvl3 = {}
function_lvl3_to_lvl2 = {}
function... |
import argparse
import collections
import logging
import multiprocessing
import math
import random
import traceback
#import matplotlib.pyplot as plt
from tqdm import tqdm
from joblib import Parallel, delayed
import numpy as np
import scipy
from sklearn.model_selection import train_test_split, ParameterGrid
import tenso... |
"""
Sqlite3 database. Since the sqlite3 interface is packaged with base Python,
a natural starting point.
This database has a special feature: it is designed to add extra databases solely
by modifying the config fig.
In the config_default, we see:
[D_SQLITE_EXTRA]
TMP={DATA}\platform_tmp.db
This means that there is... |
# -*- coding: utf-8 -*-
## \package input.filelist
# MIT licensing
# See: docs/LICENSE.txt
import os, wx
from wx.lib.mixins.listctrl import TextEditMixin
from dbr.colors import COLOR_executable
from dbr.colors import COLOR_link
from dbr.colors import COLOR_warn
from dbr.language import GT
from dbr.log imp... |
import logging
import munkres
import matplotlib
import matplotlib.pyplot as plt
import pandas as pd
from plotnine import *
import numpy as np
from biclust_comp import logging_utils, utils
from biclust_comp.analysis import accuracy as acc
from biclust_comp.analysis import accuracy_utils as acc_utils
MARKERS = ['s', ... |
#coding=utf-8
'''
Created on 2016年2月23日
@author: 10256603
'''
from tkinter import *
from tkinter import ttk
#import threading
#from threading import Thread as thread
from tkinter import messagebox
from tkinter import scrolledtext
from pg_dataset import *
#from peewee import *
import time
import logging ... |
import os
import warnings
import numpy as np
import pandas as pd
from margrie_libs.margrie_libs.stats.stats import paired_t_test, wilcoxon
from scipy import signal
from rotation_analysis.analysis.block_plotter import BlockPlotter
from rotation_analysis.analysis.event_detection.detection_params import Detec... |
# coding=utf-8
# 使用fast_align 计算前向和后向概率
import torch
import torch.nn.functional as F
# from scripts.process_data import reverse_text
from scripts.process.merge import merge
from src.data.data_iterator import DataIterator
from src.data.dataset import TextLineDataset, ZipDataset
from src.data.vocabulary import Vocabul... |
import logging
from common_utils_py.agreements.service_agreement import ServiceAgreement
from common_utils_py.metadata.metadata import Metadata
from nevermined_gateway.compute_validations import is_allowed_read_compute
import time
from authlib.common.encoding import to_bytes
from authlib.jose import jwt
from authlib... |
from enum import Enum
import click
import requests
from bs4 import BeautifulSoup
import agent
from constants import ANIME_STATUS_MAP, ANIME_TYPE_MAP, MANGA_STATUS_MAP, MANGA_TYPE_MAP
import network
import ui
class ListSearchStatusCode(Enum):
""""An Enum represented the type of result of list searches"""
NO_... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
''' This module contains a class for controlling list of StreamerHead objects.
Its purpose is to create heads, find heads to add or remove, find scale.
'''
# General imports
import numpy as np
import logging
import scipy.special # bessel function
# Import from proj... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# pylint: disable=no-member
# pylint: disable=not-an-iterable
""" Functions
__author__: <NAME>, <NAME>, <NAME>
"""
import numpy as np
from scipy import special
from pymdp.core import utils
from itertools import chain
EPS_VAL = 1e-16 # global constant for use in spm_log(... |
"""Used to query SteamAPI to get dota match information to bootstrap bots"""
from collections import defaultdict
from dataclasses import dataclass
import json
import time
from typing import List
import zipfile
import os
import gzip
import datetime
import requests
from luafun.utils.options import option
from luafun.gam... |
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
import numpy as np
import cv2
import glob
import time
from sklearn.svm import LinearSVC
from sklearn.preprocessing import StandardScaler
from skimage.feature import hog
from sklearn.model_selection import train_test_split
from skimage.feature import hog
i... |
import types
import os.path as osp
from pandas.core import frame
import numpy as np
import sklearn
from sklearn import cluster
from scipy.optimize import linear_sum_assignment
from scipy.spatial.transform import Rotation as R
from utils import kitti_util
from pre_compute_pp_score import get_relative_pose
from utils.... |
# This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... |
#!REPLACELBPBINDIR/venv/bin/python3
# -*- coding: utf-8 -*-
import logging
import sys
Midea2Lox_Version = '3.1.4'
#set path
cfg_path = 'REPLACELBPCONFIGDIR' #### REPLACE LBPCONFIGDIR ####
log_path = 'REPLACELBPLOGDIR' #### REPLACE LBPLOGDIR ####
home_path = 'REPLACELBHOMEDIR' #### REPLACE LBHOMEDIR ####
# TCP Socket... |
'''Populate the graph database'''
import pandas as pd
import numpy as np
from tqdm.auto import tqdm
from pathlib import Path
import datetime as dt
from typing import List, Optional
from newspaper import Article, ArticleException
from tqdm.auto import tqdm
import json
import re
from neo4j.exceptions import DatabaseErro... |
"""
Copyright (c) 2018-present HitchedSyringe
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
"""
import base64
import binascii
import json
import re
import unicodedata
fr... |
'''
Parser class to process HGVS Information with diverse content.
'''
import re
import logging
from typing import Union
import hgvs
import hgvs.parser
import hgvs.validator
import hgvs.exceptions
import hgvs.assemblymapper
import hgvs.config
from lib.global_singletons import ERRORFIXER_INST, MUTALYZER_INST
from lib... |
import torch
from torch.nn import functional as F
from torch import nn
from dsgn.utils.torch_utils import *
from functools import partial
from dsgn.layers.sigmoid_focal_loss import SigmoidFocalLoss
from dsgn.layers.iou_loss import IOULoss
INF = 100000000
def sigmoid_focal_loss_multi_target(logits, targets, weights... |
"""
Copyright (c) Microsoft Corporation.
Licensed under the MIT license.
run evaluation of VR or infenrece for submission
1. VATEX_EN_R
2. YC2R
copied/modified from HERO
(https://github.com/linjieli222/HERO
"""
import argparse
import os
from os.path import exists
from time import time
import torch
from torch.utils.d... |
# -------------------------------------------------------------------
# Box model of nutrient cycling the Lower St Lawrence Estuary (LSLE)
#
# Designed at McGill University, copyright 2020
# <NAME>
#
# The LSLE is a three-layer stratified system.
# This GUI program finds the concentration of nutrients in each layer
# u... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.