text stringlengths 8.04k 46.5k |
|---|
"""
Copyright 2021 Inmanta
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 ... |
from __future__ import print_function
from ctypes import *
import ctypes
from ._alp_defns import *
import numpy as np
import time
def _api_call(function):
"""
decorator to implement error handling for ALP API calls.
"""
def api_handler(dmd_instance, *args, **kwargs):
r = function(dmd_instance,... |
from scapy.all import *
from scapy.layers.bluetooth import _bluetooth_error_codes as bluetooth_error_codes
'''
This module contains some scapy definitions for Bluetooth protocol.
Some of them have been recently included in the latest scapy development version, these changes will be taken into account soon.
'''
class ... |
import json
import logging
from copy import deepcopy
from os import path
from random import random
import re
from datetime import datetime
from tqdm import tqdm
import torch
from typing import Optional, Iterable, List, Tuple, Dict
from transformers import PreTrainedTokenizer, RobertaTokenizer
from torch.utils.data imp... |
"""
MIT License
Copyright (c) 2020 Airbyte
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distr... |
#!/usr/bin/env python
# coding: utf-8
# In[3]:
"""
This module contains functions for loading a pdb file and calculating
the atomic density fields for different atom types. The fields can then be
used for plotting, or to send into the convolutional neural network.
"""
import os
import sys
import torch
import numpy ... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Zinc grammar specification.
# (C) 2016 VRT Systems
#
# vim: set ts=4 sts=4 et tw=78 sw=4 si:
import datetime
import logging
import re
import sys
import iso8601
import pyparsing as pp
import six
# Bring in special Project Haystack types and time zones
from .datatypes import ... |
# coding: utf-8
# In[15]:
import scipy.integrate
import math
import sympy as sp
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.dates as dates
# In[29]:
#Modelo SEIR++:
# S -> Susceptibles
# E -> Expuestos
# I -> Infectados
# R -> Recuperados
# B -> Beta, Tasa de transmisi... |
# -*- coding: utf-8 -*-
"""
MDStudio_SMARTCyp utility functions
"""
import os
import sys
import subprocess
import logging
import re
import tempfile
import shutil
import glob
import time
from threading import Event, Thread
# Library and function compatibility
if sys.version_info[0] < 3:
from cStringIO import Str... |
from __future__ import absolute_import, division, print_function
from libtbx.math_utils import ifloor, iceil
from libtbx import adopt_init_args
import os
from six.moves import zip
MAP_TYPE_F_OBS = 1
MAP_TYPE_DIFF = 2
MAP_TYPE_ANOMALOUS = 4
MAP_TYPE_ISO_DIFF = 8
MAP_TYPE_NEUTRON = 16
MAP_TYPE_F_CALC = 32
MAP_TYPE_FILL... |
#!/usr/bin/env python3
# *******************************************************
# Copyright (c) VMware, Inc. 2020-2021. All Rights Reserved.
# SPDX-License-Identifier: MIT
# *******************************************************
# *
# * DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT
# * WARRANTIES OR CO... |
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import types
import selenium.common.exceptions
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support.ui impor... |
from __future__ import annotations
import asyncio
from asyncio.exceptions import CancelledError
import types
import functools
import inspect
from collections import OrderedDict
from typing import Any, Callable, Dict, List, Optional, Union
from typing_extensions import Required
from ..enums import SlashCommandOptionTy... |
# -*- coding: utf-8 -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2018-2021 <NAME>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the ri... |
from collections import OrderedDict
import enum
import random
import math
import numpy as np
import pprint
import traceback
from typing import Dict, Any, Tuple, Optional, Callable, List, Union, Sequence
from packaging import version
from torch._C import set_autocast_enabled
from torch.distributions.utils import lazy_pr... |
import enum
import typing
from typing import Any, Dict, List, Literal, Optional, Set, Union
from pydantic import BaseModel, Extra, Field, StrictBool, StrictFloat, StrictInt
from tarkov.inventory.types import TemplateId
class Base(BaseModel):
class Config:
extra = Extra.forbid
Color = Union[
Litera... |
# Copyright (c) 2018 DDN. All rights reserved.
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
import Queue
import json
import traceback
import datetime
import dateutil
import dateutil.tz
import time
from django.db import transaction
from django.http import HttpR... |
# 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... |
#!/usr/bin/env python3
# The MIT License (MIT)
#
# Copyright (c) 2016 <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
# ... |
# Copyright (c) SenseTime. All Rights Reserved.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import logging
import os
import time
import datetime
import math
import json
import random
import numpy a... |
# (c) 2012 Massachusetts Institute of Technology. All Rights Reserved
# Code written by: <NAME> (<EMAIL>)
"""
This is a basic toolbox to perform high-resolution analysis of a Hi-C data.
By high resolution we meen that there are more than 10000-20000 bins per genome
- otherwise, binnedData is easily capable of the anal... |
import pygame
from pygame.locals import *
import sys
import myplane
import enemy
import bullet
import supply
from consts import GlobalVar
class Game():
def init_game(self):
pygame.init()
pygame.mixer.init()
pygame.display.set_caption(GlobalVar.SYSTEM_GAME_NAME)
self.init_game_reso... |
'''
A GUI Grid using Tkinter
'''
from __future__ import absolute_import, division, print_function
import PyWavGenSaltash
# from Tkinter import *
import Tkinter as tk
import os
import json
from collections import OrderedDict
from distutils.dir_util import mkpath
import hashlib
def md5(filename):
hash_md5 = ... |
import numpy as np
import logging
import itertools
import operator
from gelcoverage.tools.bed_reader import BedReader
from gelcoverage.tools.bigwig_reader import BigWigReader
import gelcoverage.constants as constants
def find_gaps(coverages, start_position, coverage_threshold):
"""
Find continuous genomic pos... |
import ctypes as ct
import os
import re
import cv2
import numpy
from . import DataSet
from .. import utils, parser
from ..log import get_module_logger
# Configure Logging
logger = get_module_logger('mxio')
# Define CBF constants
CBF = 0x0000
CBF_FORMAT = 0x00000001 # 1
CBF_ALLOC = 0x00000002 # 2
CBF_AR... |
'''
Computes the magnetic field components from Langlais' spherical harmonic model at a certain altitude.
References:
<NAME>.; <NAME>., 1981. Spherical harmonic analysis of the geomagnetic field: an example of a
linear inverse problem, Geophysical Journal of the Royal Astronomica... |
"""
This script packs recorded images into a pickle file.
It is prepared to work with ObjectCapture (in-house tool), and combines all the data for
the pose_cnn network.
<NAME>
Iowa State University
<EMAIL>
April 2019
MIT License
"""
import cv2
import numpy as np
import pickle
import csv
import sys
import getopt
im... |
import abc
import os
import tempfile
import warnings
import torch
from mmlib.equal import tensor_equal
from mmlib.persistence import FilePersistenceService, DictPersistenceService
from mmlib.save_info import ModelSaveInfo, ProvModelSaveInfo
from mmlib.schema.dataset import Dataset
from mmlib.schema.file_reference imp... |
import sqlite3, json, os
import os.path as op
from datetime import datetime
from . import utils, init_db
from .utils import DATA_DIR, DB_PATH, DATAFILE_NAME, DATA_CTX_NAME
DATETIME_MIN = '0001-01-01 00:00:00'
END_OF_JSON = '2.1'
def setup_data_access(current_version):
"""
Prepare the sqlite database so that it's ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
isDinamica = False
try:
dinamica.package("os")
isDinamica = True
except:
isDinamica = False
if not isDinamica:
try:
from . import xmltodict
from .UTILS import UTILS
from qgis.PyQt.QtWidgets import QMessageBox
from qgis.core... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import inspect
import math
import numbers
import copy
import tensorflow as tf
import numpy as np
from tensorflow.python.ops import variables as tf_variables
from trident.backend.common import get_session, addind... |
#!/usr/bin/env python
""" EfficientDet Training Script
This script was started from an early version of the PyTorch ImageNet example
(https://github.com/pytorch/examples/tree/master/imagenet)
NVIDIA CUDA specific speedups adopted from NVIDIA Apex examples
(https://github.com/NVIDIA/apex/tree/master/examples/imagenet)... |
"""
Module providing utility functions for managing Pentaho data-integration
Copyright (C) 2016-2018 ERT Inc.
"""
from contextlib import contextmanager
import logging
import tempfile
import os.path
import filelock
import shutil
import zipfile
import platform
import stat
import threading
import subprocess
from pprint i... |
import argparse
import json
import logging
import os
import sys
from typing import Dict, Optional
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from sklearn.model_selection import KFold
from transformers import BertModel, BertTokenizer
from common import ControllerBase, NeuralCoref... |
import os
import re
import pickle
import logging
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data.dataloader import DataLoader
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity... |
#!/usr/bin/env python3
"""Module containing the PmemdMDRun class and the command line interface."""
import argparse
import shutil, re
from pathlib import Path, PurePath
from biobb_common.generic.biobb_object import BiobbObject
from biobb_common.configuration import settings
from biobb_common.tools import file_utils a... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
.. _mc_states_api:
mc_states_api / general API functions
=======================================
'''
import time
import datetime
import copy
import contextlib
import hashlib
import json
import logging
import os
import re
import socket
import traceback
import salt.out... |
import shutil
import time
import typing as T
from collections import defaultdict
from contextlib import contextmanager
from datetime import timedelta
from math import ceil
from pathlib import Path
from queue import Empty
from tempfile import TemporaryDirectory, mkdtemp
import psutil
from snowfakery.api import COUNT_RE... |
# ---
# jupyter:
# jupytext:
# formats: ipynb,py
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.9.1+dev
# kernelspec:
# display_name: Python [conda env:core_acc] *
# language: python
# name: conda-env-core_acc-py... |
# gridDataFormats --- python modules to read and write gridded data
# Copyright (c) 2009-2014 <NAME> <<EMAIL>>
# Released under the GNU Lesser General Public License, version 3 or later.
"""
:mod:`gridData.core` --- Core functionality for storing n-D grids
===============================================================... |
import cv2
import numpy as np
from typing import List
from scipy import ndimage as ndi
from skimage import morphology as morph
from scipy.ndimage.morphology import distance_transform_edt
# From https://github.com/scikit-image/scikit-image/blob/main/skimage/morphology/misc.py
# warning removed
def remove_small_objects... |
#!/usr/bin/python
import os
import sys, getopt
import random
import numpy as np
import ipdb
import pandas as pd
import scipy.io.wavfile as wav
from scipy.stats import rankdata
import pickle
import os
import keras
import tensorflow as tf
from keras import optimizers
from keras import callbacks
import keras.backend as K... |
import os
import wave
from datetime import datetime
import platform
import time
import numpy as np
import pyaudio
import sounddevice as sd
import tensorflow as tf
from datasets import audio
from infolog import log
from librosa import effects
from tacotron.models import create_model
from tacotron.utils import plot
from... |
import random
import feedparser
import time
from DiscordCharacters import WoDCharacter
import os.path
from discord import message
def splitstr(text,length):
return [text[i:i+length] for i in range(0, len(text), length)]
# list of feeds to pull down
rss_feed_list = [ "https://www.reddit.com/r/WhiteWolfRPG/new.rss"... |
# Copyright Materialize, Inc. and contributors. All rights reserved.
#
# Use of this software is governed by the Business Source License
# included in the LICENSE file at the root of this repository.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software... |
"""An workflow pipeline script for Knowledge Graph generation pipeline.
. RegisterModel
. -
. . CreateModel -> BatchTransform -> NeptuneBulkload
Process-> Train -> Eva... |
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import numpy as np
import pandas as pd
from fbprophet import Prophet
import os
import json
# In[2]:
import inspect
def get_default_args(func):
signature = inspect.signature(func)
return{
k: v.default
for k, v in signature.parameters.items()
... |
#!/usr/bin/env python
from __future__ import division, absolute_import, print_function
import numpy as np
from jams.const import eps
def zacharias(h, clay, sand, db, params=None, thetar=False, thetas=False, lnalpha=False, n=False):
"""
Soil water content with the van Genuchten equation and
the pedo... |
import copy
import json
import shutil
import itertools
from pathlib import Path
from datetime import datetime
from functools import wraps
from collections import deque
import idlib
import rdflib
import htmlfn as hfn
import requests
import ontquery as oq
import augpathlib as aug
#from joblib import Memory
from idlib.uti... |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020 <NAME> <<EMAIL>>
# Copyright (c) 2014 <NAME> <<EMAIL>>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without ... |
import glob
import random
import json
import os
from numpy.core.defchararray import title
from scipy.ndimage import interpolation
import six
###
import tensorflow as tf
import matplotlib.pyplot as plt
###
import cv2
import numpy as np
from tqdm import tqdm
from time import time
from .train import find_latest_checkpo... |
''' This is working code which may or may not be added to a class at some point.'''
from __future__ import print_function
from permpy import *
from math import factorial
import itertools
from collections import Counter
from permpy.RestrictedContainer import *
def expected_basis(B):
return PermSet([expected_basis_e... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# __
# \ /\ / _ / / _ _
# \/ \/ (- / /) () /__ (/ /- /- / (- /-
#
# author: <NAME>
# contact: <EMAIL>
import os
import re
import time
import requests
from lxml import etree
from PIL import Image, ImageDraw, ImageFont
# Lay... |
import functools
import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.transforms as transforms
import matplotlib.pyplot as plt
import scipy.interpolate as interp
import scipy.optimize as opt
from .stats import poisson_interval
__all__ = [
"cms_label", "legend_data_mc", "data_mc", "data... |
import math
import os
import sys
import cv2
from PIL import Image
from PyQt5.QtGui import QPixmap, QImage, QPainter, QPen, QColor
from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QLabel, QVBoxLayout, QHBoxLayout, QFileDialog, \
QGridLayout, QLineEdit, QRadioButton, QMessageBox, QInputDialog
... |
#coding:utf-8
'''
一个编码器:将ground truth注释转换成SSD兼容的训练目标
Copyright (C) 2018 <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 app... |
import pandas as pd
import numpy as np
import logging
import os
import geojson
import math
import itertools
import geopandas as gpd
from geopy.geocoders import Nominatim
from shapely.geometry import Point, Polygon, MultiPolygon, shape
import shapely.ops
from pyproj import Proj
from bs4 import BeautifulSoup
import ... |
"""
Code for creating ZIP load models. Note that this module follows Python
conventions: functions which start with an underscore are "private." So,
a user of this module should only use methods which do not start with an
underscore. At the time of writing (2020-06-17), the public methods are:
- cluster_and_fit
... |
# -*- coding: utf-8 -*-
import pytz
import datetime
import json
from pyramid.view import view_config
from stalker import db, Project, Status, Budget, BudgetEntry, Good, Entity, \
Type, Studio, StatusList, Task
from stalker.db.session import DBSession
import transaction
from webob import Response
import stalker_... |
from .repo import get_local_repo, get_remote_repo, ProcessError, DEFAULT_BRANCH
from .utils import AsyncResult, with_lock, get_secure_random_string
from ConfigParser import RawConfigParser
from datetime import datetime
from subprocess import call
from threading import Semaphore
from urllib2 import urlopen
import json
i... |
# -*- coding: utf-8 -*-
import csv
import datetime
from dateutil.relativedelta import relativedelta
from dateutil.parser import parse
import ftplib
import glob
import os
import os.path
import pickle
import pprint
import re
import shutil
import sys
import time
import webbrowser
import dataset
import... |
#!/usr/bin/env python3
# -*- coding: utf8 -*-
#
# This file is part of PywerView.
# PywerView is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... |
import json
import logging.config
import sys
from json import JSONEncoder
from stn.utils.uuid import generate_uuid
import networkx as nx
from networkx.readwrite import json_graph
from stn.node import Node
from uuid import UUID
import copy
import math
from stn.task import Timepoint
MAX_FLOAT = sys.float_info.max
cl... |
# %%
import os
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
from transformers import (
AutoTokenizer,
AutoModelForQuestionAnswering,
)
from captum.attr import visualization as viz
from captum.attr import (
IntegratedGrad... |
#Copyright 2010 <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, software
#d... |
"""Finds the values in the screen of input multimeter photo"""
import argparse
from datetime import datetime
import cv2
import numpy as np
from imutils import contours, is_cv2
from imutils.perspective import four_point_transform
PARSER = argparse.ArgumentParser()
PARSER.add_argument(
"-i", "--image", help="the inp... |
# -*- coding: utf-8 -*-
# @Author: <NAME>
# @Email: <EMAIL>
# @Date: 2019-06-05 14:08:31
# @Last Modified by: <NAME>
# @Last Modified time: 2022-03-08 17:08:50
import inspect
import time
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
from matplotlib import cm
import seabor... |
from functools import reduce
import os
from pathlib import Path
import h5py
from collections import deque
import numpy as np
from numpy.random import default_rng
from numpy.linalg import norm
import pybullet as p
import assistive_gym as ag
from gym import spaces, Env
import cv2
import torch
from gaze_capture.face_pr... |
from player import *
import time
from threading import Thread
broadcast_time = 0
sbox_time = 0
def process_number(process):
if process == 0:
return 16
else:
return 4
def mul_mac(share, constant):
return (constant*share[0], constant * share[1])
def add_mac(s1, s2):
return (s1[0]+s2[... |
# -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2016, 2017 <NAME> <<EMAIL>>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software wi... |
#!/usr/bin/env python3
import os
import sys
import math
import enum
import urllib
import hashlib
import pathlib
import inspect
import logging
import argparse
import datetime
import itertools
import collections
import multiprocessing
# TODO: version dependencies statically
import bottle
import ffmpeg
import PIL
import... |
#coding=utf-8
# Copyright 2020 JiangChenglin. 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 ap... |
import logging
import os
import re
import shutil
from collections import namedtuple
from typing import Dict, List, Optional
from django.conf import settings
from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
from django.db import models, transaction
from... |
import os
import shutil
from attrdict import AttrDict
import numpy as np
import pandas as pd
from scipy.stats import gmean
from deepsense import neptune
from sklearn.metrics import roc_auc_score
from sklearn.model_selection import train_test_split, KFold, StratifiedKFold
from . import pipeline_config as cfg
from .pip... |
# pylint: disable=too-many-instance-attributes,too-many-lines
from __future__ import annotations
from abc import ABC, abstractmethod
import time
from enum import IntEnum
from copy import deepcopy
from collections import deque
from heapq import heappop, heappush
from typing import (
Deque,
Generator,
Iterat... |
#!/usr/bin/python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import sys
import time
import pickle
import edward as ed
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from scip... |
import numpy as np
import math
import torch
import torch.nn.functional as F
import torch.nn as nn
class tagrnn(nn.Module):
def __init__(self, num_tags, RNN_TYPE="LSTM", NUM_DIRS=2, taglm_hidden_size=100,
taglm_num_dir=2, taglm_num_layer=1, taglm_worddp=0, taglm_rnndp=0):
super().__init__(... |
#!/usr/bin/env python3
import glob
import os
import sys
from collections import OrderedDict
#project_root = '../..'
project_root = '.'
includes = set((
'src/',
'projects/redemption_configs/redemption_src/',
'src/capture/ocr/',
'tests/includes/',
))
disable_tests = set((
# 'tests/utils/crypto/tes... |
"""
Capstone Project. Code to run on a LAPTOP (NOT the robot).
Constructs and returns Frame objects for the basics:
-- teleoperation
-- arm movement
-- stopping the robot program
This code is SHARED by all team members. It contains both:
-- High-level, general-purpose methods for a Snatch3r EV3 robot... |
from astropy.wcs import WCS
from .time import tGTI, GTI
from .mask import edges as medges
from ._det_spatial import offset_to_vec, DL
from .orientation import get_elongation_plane_norm, align_with_z_quat, vec_to_pol, minimize_norm_to_survey
import numpy as np
from math import cos, sin, pi, sqrt
from scipy.spatial impor... |
import pytest
import tempfile
import os
from time import sleep
import json
from hypothesis import given, settings
import hypothesis.strategies as hst
import numpy as np
import qcodes as qc
from qcodes.dataset.measurements import Measurement
from qcodes.dataset.experiment_container import new_experiment
from qcodes.te... |
import logging
import os
import sys
import warnings
from collections import OrderedDict
from typing import Optional, Any
import torch
from pytorch_lightning import Trainer
from torch import nn
import torch.nn.functional as F
import pytorch_lightning as pl
from torch.optim import Adam, AdamW
from torch.optim.lr_schedul... |
import collections
import ctypes
import functools
import os.path
import subprocess
from six import iteritems, itervalues, integer_types, PY2
from six.moves import UserDict
from .lexer import AssemblyLexer
from .parser import AssemblyParser
from .ast import FileNode, LabelNode, GlobalDirectiveNode, FileDirectiveNode, ... |
try:
import comet_ml
except ModuleNotFoundError as e:
print("comet_ml not found, ignoring")
import sys
import os
import yaml
import json
from datetime import datetime
import glob
import random
import platform
import numpy as np
from pathlib import Path
import click
from tqdm import tqdm
import shutil
from func... |
import base64
from typing import List, Optional
import grpc
from agoraapi.transaction.v4 import transaction_service_pb2 as tx_pb
from agora import solana
from agora.client.account.resolution import AccountResolution
from agora.client.environment import Environment
from agora.client.internal import InternalClient, Sub... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from super_gradients.training.models import BasicBlock, Bottleneck, SgModule, HpmStruct
"""
paper: Deep Dual-resolution Networks for Real-time and
Accurate Semantic Segmentation of Road Scenes ( https://arxiv.org/pdf/2101.06085.pdf )
code from git rep... |
import collections
from random import SystemRandom
random = SystemRandom()
def egcd(a, b):
s0, s1, t0, t1 = 1, 0, 0, 1
while b > 0:
q, r = divmod(a, b)
a, b = b, r
s0, s1, t0, t1 = s1, s0 - q * s1, t1, t0 - q * t1
pass
return s0, t0, a
class FieldElement:
"""Represents... |
import pandas as pd
import pytest
from config import proteoforms, proteins, genes, sm
from lib.graph_database_access import fix_neo4j_values, get_low_level_pathways, \
get_reactions_by_pathway, get_pathways, get_reactions, get_complexes, get_complex_components_by_complex, \
make_proteoform_string, get_particip... |
import random
import time
from pathlib import Path
from typing import Tuple, Union
import cv2
import matplotlib.pyplot as plt
import numpy as np
import torch
from torch import Tensor # using torch.Tensor is annoying
from torch import nn
from torch.utils.data import DataLoader
from torch.utils.data import Dataset
fro... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: <NAME>
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
from mpl_toolkits.axes_grid1 import make_axes_locatable
from scipy import interpolate
from astropy.table import Table
from astropy import units as apu
import warnin... |
import demistomock as demisto
from CommonServerPython import *
import json
import requests
import socket
from typing import Dict, Any, List
from netaddr import IPNetwork, IPAddress
# Disable insecure warnings
requests.packages.urllib3.disable_warnings()
'''
Templates for change requests
Change these templates if you... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
from datetime import time
import _init_paths
import os
import pprint
import argparse
import numpy as np
import torch
import torch.backends.cudnn as cudnn
from torch.utils.data import DataLoader
impo... |
import pandas as pd
import numpy as np
import sys
import csv
from time import *
from datetime import *
from io import StringIO
import bootstrapping
import BS
import dataSetConstruction
def rmse(a,b):
return np.sqrt(np.nanmean(np.square(a-b)))
def selectIndex(df, indexToKeep):
return df.loc[indexToKeep][ ~df.l... |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
class RedRio:
def __init__(self,codigo = None,**kwargs):
self.info = pd.Series()
self.codigo = codigo
self.info.slug = None
self.fecha = '2006-06-06 06:06'
self.workspace = '/media/'
self.seccion... |
# Copyright 2020 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... |
"""
logix.py
Author: <NAME>
Displays the user interface of logix using tkinter
and deploys modules to create and save logix circuits.
"""
from src.circuit import Circuit
import src.resource as resource
import sys
import json
import tkinter as tk
from tkinter import ttk
from enum import Enum
from ttkthemes import T... |
from __future__ import print_function
from __future__ import unicode_literals
import os.path as osp
import pickle
import torch.nn.functional as F
import numpy as np
import torch
import matplotlib
from torch.autograd import Variable
matplotlib.use("agg")
import matplotlib.pyplot as plt
print(matplotlib.pyplot.get_backen... |
# Copyright © 2017-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, including without limitation the rights
# to use, copy, modify, merge, publish, distribut... |
""" Contains basic Batch classes """
import os
import traceback
import threading
import dill
try:
import blosc
except ImportError:
pass
import numpy as np
try:
import pandas as pd
except ImportError:
pass
try:
import feather
except ImportError:
pass
try:
import dask.dataframe as dd
except ... |
# encoding: utf-8
"""
.. invisible:
_ _ _____ _ _____ _____
| | | | ___| | | ___/ ___|
| | | | |__ | | | |__ \ `--.
| | | | __|| | | __| `--. \
\ \_/ / |___| |___| |___/\__/ /
\___/\____/\_____|____/\____/
Created on Jul 15, 2014
This script make bounding boxes (bboxes) incl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.