text
stringlengths
8.04k
46.5k
# Copyright (c) 2010-2013, Regents of the University of California. # All rights reserved. # # Released under the BSD 3-Clause license as published at the link below. # https://openwsn.atlassian.net/wiki/display/OW/License ''' Contains the moteState container class, as well as contained classes that structure the m...
import json import math import os from glob import glob from os import path from pathlib import Path from shutil import copyfile from typing import Union import cv2 import numpy as np import skimage.measure from tqdm import tqdm from .box_utils import get_region_props def create_folders_if_not_exists(folder_path): ...
""" Neural ODEs on MNIST with no downsampling before ODE, implemented with Haiku. """ import argparse import collections import os import pickle import time import haiku as hk import jax import jax.numpy as jnp import tensorflow_datasets as tfds from jax import lax from jax.config import config from jax.experimental i...
#!/usr/bin/env python # Copyright 2016-2021 Biomedical Imaging Group Rotterdam, Departments of # Medical Informatics and Radiology, Erasmus MC, Rotterdam, The Netherlands # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obt...
import itertools class Signature: def __init__(self, name, args, ret, pr, cpr, upward, downward): self.mName = name self.mArgs = args self.mResult = ret self.mProcess = pr self.mCProcess = cpr self.mUpward = upward self.mDownward = downward def GetSignatu...
import os import time from collections import defaultdict import pickle #import psutils import multiprocessing as mp from .parallel import get_chunks, get_chunks_by_load, get_physical_cores import numpy as np # from scipy.stats import iqr as scipy_iqr # from scipy.stats import mode as scipy_mode # import soundfile a...
#!/usr/bin/env python # encoding: utf-8 """ plate_utils.py Created by <NAME> on 28 Aug 2014. Licensed under a 3-clause BSD license. Revision history: 28 Aug 2014 <NAME> Initial version 3 May 2015 <NAME> Major rewrite """ from __future__ import division, print_function import collections import i...
from . import segmentation from . import textdetect from . import textgroup from . import toponyms from . import triangulate from . import transforms from . import accuracy from . import imwarp import pythongis as pg import PIL, PIL.Image import numpy as np import datetime import time import math import os import...
import os, configparser, argparse import re, threading, json, hashlib import pathlib from datetime import datetime # Global verbosity check # Get's changed by command line flag '-v' verbose = False # Colors RED = '\x1B[31;1m' CYAN = '\x1B[36m' GREEN = '\x1B[32;1m' YELLOW = '\x1B[33;1m' RESET = '\x1B[0m...
"""Business logic.""" import datetime import logging import math from collections import OrderedDict from ortools.sat.python import cp_model from django.contrib.auth import get_user_model from .models import Leave, Role, Shift, ShiftRule, TimeSlot, Day log = logging.getLogger("django") class SolutionNotFeasible(...
"""Top-level routines, including: * extract_features * train_model * find_best_model * predict * analyze * fit_and_predict_one * fit_and_predict_cross_validation """ import boltons.fileutils import datetime import glob import json import logging import numpy as np import os import pandas as pd import shutil import sk...
#!/usr/bin/env python3 import asyncio import concurrent.futures import logging import os import queue import sys import threading import time import traceback import errno from io import StringIO from configparser import RawConfigParser from urllib.parse import urlparse from async_timeout import timeout from tsproxy...
import os, sys, cv2, random import tensorflow as tf import numpy as np from tqdm import tqdm from glob import glob from base import Cell, NetworkItem from info_str import NAS_CONFIG from utils import NAS_LOG DATA_AUG_TIMES = 3 class DataSet: # TODO for dataset changing please rewrite this class's "i...
#!/usr/bin/env python # Author: <NAME> <<EMAIL>> # License: # This is free and unencumbered software released into the public domain. """ Monkeydown (or "Monkey Flavored Markdown") is a markdown extension, designed in a way that monkeys can easily typeset Shakespeare's works. Implemented as a JSON filter for monkey ...
# -*- coding: utf-8 -*- #! python.exe import os import codecs import re import sys import copy import time import logging print("hello python") def mylog(arg1, *arg2): tempstr = arg1 for x in arg2: tempstr += " " + str(x) print(tempstr) logging.info(tempstr) def checkArrIsOk(arr): sum = 0 for x in arr...
import os import glob import json import pandas as pd import numpy as np import csv import torch import time from torch.autograd import Variable from PIL import Image import cv2 from torch.nn import functional as F from opts import parse_opts_online from model import generate_model from mean import get_...
__source__ = 'https://leetcode.com/problems/number-of-distinct-islands-ii/' # Time: O() # Space: O() # # Description: Leetcode # 711. Number of Distinct Islands II # # https://en.wikipedia.org/wiki/Dihedral_group # similar question: Starry Night # http://olympiads.win.tue.nl/ioi/ioi98/contest/day1/starry/starry.html #...
# -*- coding: utf-8 -*- ''' File: zhdate.py File Created: Sunday, 17th February 2019 4:58:02 pm Author: <NAME> (<EMAIL>) ''' from datetime import datetime, timedelta ''' 从1900年到2100年的农历月份数据代码 20位二进制代码表示一个年份的数据, 前四位0:表示闰月为29天,1:表示闰月为30天 中间12位:从左起表示1-12月每月的大小,1为30天,0为29天 最后四位:表示闰月的月份,0表示当年无闰月 前四位和最后四位应该结...
""" This function accepts a Batch object and runs network inference on the biom files in the object. The output of the function is a Network object, which contains inferred networks for each of the keys in the biom dictionary. The settings of the network inference tools are parsed from txt documents, and not input dir...
import warnings import ctypes as _ctypes # Load mkl_spblas through the libmkl_rt common interface # Check each of these library types _MKL_SO_LINUX = "libmkl_rt.so" _MKL_SO_OSX = "libmkl_rt.dylib" _MKL_SO_WINDOWS = "mkl_rt.dll" # There's probably a better way to do this _libmkl, _libmkl_loading_errors = None, [] for ...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from QOpenScienceFramework import dirname from QOpenScienceFramework.util import check_if_opensesame_file from QOpenScienceFramework.compat import ...
# encoding: utf-8 from collections import OrderedDict from mo_dots import Null, is_null from mo_future import text, is_text from mo_imports import export, expect from mo_parsing import whitespaces from mo_parsing.core import ParserElement from mo_parsing.exceptions import ( ParseException, RecursiveGrammarExc...
from typing import List, Optional, Union, Tuple, Dict from datetime import datetime, timedelta import io import csv import json import math import pandas as pd from flask import session, current_app, make_response from bokeh.plotting import Figure from bokeh.embed import components from bokeh.util.string import encode...
""" This module contains abstract base classes for interval types and interval collection types. """ from enum import Enum from abc import ABC, abstractmethod from typing import List, Union, Dict, Hashable, Set, Optional, Any, Iterable, TypeVar from uuid import UUID from methodtools import lru_cache from inscripta.bi...
# globals.py (stewi) # !/usr/bin/env python3 # coding=utf-8 """ Supporting variables and functions used in stewi """ import pandas as pd import json import logging as log import os import numpy as np import yaml import time import subprocess from datetime import datetime from esupy.processed_data_mgmt import Paths, F...
import os import torch import imageio import numpy as np import torch.nn as nn import torch.nn.functional as F device = torch.device("cuda" if torch.cuda.is_available() else "cpu") # Misc utils def img2mse(x, y, M=None): if M == None: return torch.mean((x - y) ** 2) else: return torch.sum((x ...
#! /usr/bin/env python # -*- coding: utf-8 -*- from copy import deepcopy from bg import Multicolor, KBreak, BreakpointGraph, GRIMMReader, NewickReader, BGGenome import itertools import networkx as nx import os __author__ = "<NAME>" __email__ = "aganezov(at)gwu.edu" ###################################################...
"""Implementation of a few integer sequences from the OEIS.""" import argparse import math from itertools import count from functools import lru_cache, reduce from random import random, choice from decimal import Decimal, localcontext from typing import ( Callable, Dict, Iterable, Iterator, List, ...
# -*- coding: utf-8 -*- import six import itertools import os import shutil import requests import hypothesis import hypothesis.strategies as st import pytest from verta.registry.entities import RegisteredModels from verta.tracking.entities._deployable_entity import _CACHE_DIR from . import utils import verta fro...
# -*- coding: utf-8 -*- class visual_(): def __init__(self, file_path): self.dir= file_path def show_error(self, iteration, error, name1, name2, dim): # 画 L_2 relative error vs. iteration 图像的函数 # for drawing L_2 relative error vs. iteration plt.figure(figsize=(8,7))...
import cv2 import numpy as np import tensorflow as tf from tensorpack.utils import viz from tensorpack.utils.palette import PALETTE_RGB from tensorpack.dataflow.imgaug import transform #import pycocotools.mask as cocomask from skimage import measure from skimage.measure import find_contours import matplo...
# pacman.py # --------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley.edu. # # A...
# Copyright 2019 Xanadu Quantum Technologies 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...
# Copyright 2014 The Oppia 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 applicable ...
"""TwinBert Implementation""" # import torch import logging from tensorflow.python.keras import backend as K from transformers.modeling_tf_bert import TFSequenceClassificationLoss, TFBertPreTrainedModel from transformers import BertConfig import tensorflow as tf from tensorflow.python.keras.saving.hdf5_format import l...
#!/usr/bin/env python3 import asyncio import json import logging.config import os import signal import ssl import time import urllib from urllib.parse import urlencode import tornado.concurrent import tornado.escape import tornado.httpserver as httpserver import tornado.ioloop import tornado.web import tornado.websock...
import plistlib import struct from asn1crypto.cms import ContentInfo from collections import OrderedDict from enum import IntEnum from io import BytesIO, SEEK_CUR from pprint import pformat from typing import Any, BinaryIO, Dict, List, Optional, Tuple from .reqs import Requirement, deserialize_requirement from .utils...
# Copyright 2019 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...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
#!/usr/bin/env python """ KneadData KneadData is a tool designed to perform quality control on metagenomic sequencing data, especially data from microbiome experiments. In these experiments, samples are typically taken from a host in hopes of learning something about the microbial community on the host. However, m...
import logging import re from copy import deepcopy from datetime import datetime, timezone from pathlib import Path from typing import Any import pandas as pd import pytest from pandas.util.testing import assert_frame_equal from kedro.extras.datasets.pandas import CSVDataSet, ParquetDataSet from kedro.io import ( ...
import torch import torch.nn as nn import torch.optim as optim import torch.autograd as autograd import torch.nn.functional as F import os from os.path import basename, splitext import numpy as np import time import sentencepiece as spm from statistics import mean import nltk as nltk from jericho import * from jeric...
# flake8: noqa """ Model selection and serving with Ray Tune and Ray Serve ======================================================= This tutorial will show you an end-to-end example how to train a model using Ray Tune on incrementally arriving data and deploy the model using Ray Serve. A machine learning workflow can b...
# Copyright (c) 2009-2014 <NAME> <<EMAIL>> import os import struct import uuid import logging from collections import namedtuple from datetime import timedelta, datetime from mogul.media import localize _ = localize() from mogul.media import MediaHandler from mogul.media.element import Element from mogul.media.id3 i...
""" Density of Sea Water using the Jackett and McDougall 1995 [1]_ function Functions: rho :: computes in-situ density from salinity, potential temperature and pressure rho_s_t :: compute the partial derivatives of in-situ density with respect to salinity and potential temperature rho_p :: compute the parti...
# Copyright 2018 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. """Creates builds.""" import collections import copy import datetime import hashlib import itertools import logging import random from google.appengine.api...
#!/usr/bin/env python # encoding: utf-8 # <NAME>, 2010-2018 (ita) """ Classes and functions enabling the command system """ import os, re, sys from waflib import Utils, Errors, Logs import waflib.Node if sys.hexversion > 0x3040000: import types class imp(object): new_module = lambda x: types.ModuleType(x) else: ...
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ##...
from django.shortcuts import redirect import json from django.shortcuts import render, reverse from django.contrib.auth.backends import ModelBackend from django.contrib.auth import authenticate, login, logout from accounts.models import User, Messages, Matches, Claims from django import forms from django.db import Inte...
if __name__ == '__main__' and __package__ is None: from os import sys sys.path.append('../') import os,math,json,pathlib,torch import numpy as np from utils.plot_confusion_matrix import plot_confusion_matrix def get_metrics(label_id, confusion, VALID_CLASS_IDS:list=None): if VALID_CLASS_IDS is not None: ...
# Copyright 2013 OpenStack Foundation # # 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...
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
"""Functionailty for drawing tensor networks. """ import textwrap import importlib import collections import numpy as np from ..utils import valmap HAS_FA2 = importlib.util.find_spec('fa2') is not None def parse_dict_to_tids_or_inds(spec, tn, default='__NONE__'): """Parse a dictionary possibly containing a mi...
from __future__ import absolute_import, division, print_function import sys import logging from logging import Formatter from functools import wraps import traceback import collections from datetime import datetime import errno import functools from hashlib import md5 import os import socket from time import time from...
# encoding: utf-8 ''' These dictize functions generally take a domain object (such as Package) and convert it to a dictionary, including related objects (e.g. for Package it includes PackageTags, PackageExtras, PackageGroup etc). The basic recipe is to call: dictized = ckan.lib.dictization.table_dictize(domain_o...
#!/usr/bin/env python # coding=utf-8 # Copyright 2022 The HuggingFace Team. 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/LI...
# # 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 us...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'dialog.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! import PyQt5 import matplotlib.pyplot as plt from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import Qt from PyQt5....
#!/usr/bin/env python3 # Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this # file except in compliance with the License. You may obtain a copy of the # License at # # https://opensource.org/licenses/BSD-3-Clause...
#!/usr/bin/env python # coding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import os, sys, unittest, itertools, re from glob import glob from xml.etree import ElementTree as stdlibElementTree from base64 import b64encode, b64decode from lxml import etree import cryptogra...
from abc import ABCMeta, abstractmethod import collections import sys import re try: from collections import Counter except ImportError: from counter import Counter allele_delimiter = re.compile(r'''[|/]''') # to split a genotype into alleles class _Call(object): """ A genotype call, a cell entry in a VC...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ---------------------------------------------------------------------# """ - Module that should take care of collocation of points or swaths - Needs input from modules that retrieve from observational platforms and models """ # --- import libraries --------------------...
# # -*- coding: utf-8 -*- # # Copyright (c) 2018 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from typing import Any, Dict from braces.views import LoginRequiredMixin, StaffuserRequiredMixin, SuperuserRequiredMixin # NOQA from core.models import Semester, Unit, UserProfile from django.contrib import messages from django.contrib.a...
# -*- coding: utf-8 -*- # Copyright 2020 The PsiZ 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 r...
import random import pandas as pd import numpy as np import datetime import json import numpy as np import matplotlib.pyplot as plt import os,random from shutil import copyfile from datetime import datetime from datetime import timedelta def prepare_cases(cases, cutoff=25,step=14): new_cases = cases.diff() smo...
import pandas as pd import scipy.io as sio import scipy.interpolate import numpy as np import scipy.sparse import scipy import gzip import subprocess import collections from collections import defaultdict, Counter import scipy.sparse as sp_sparse import warnings import pickle import os #warnings.filterwarnings('ignore'...
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------ # Name: metadata.py # Purpose: music21 classes for representing score and work meta-data # # Authors: <NAME> # <NAME> # # Copyright: Copyright © 2010, 2012 <NAME> and the music21 # ...
""" Python VXI-11 driver Copyright (c) 2012-2014 <NAME> and <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, modi...
import generation.generator as generator import random as rd import pandas as pd import numpy as np REASON_OF_DEATHS = ["murdered", "died because of old age", "died of creeper attack", "died of skeleton attack", "died of spider attack (he did not became Spider-Man)", "died of zombie attack", "died...
#!/usr/bin/env python3 # The MIT License (MIT) # # Copyright (c) 2016 Codalogic Ltd # # 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...
# -*- coding: utf-8 -*- ''' RENDER_MODEL_VIEWS.py brief: render projections of a 3D model from viewpoints specified by an input parameter file usage: blender blank.blend --background --python render_model_views.py -- <shape_obj_filename> <shape_category_synset> <shape_model_md5> <shape_view_param_file> <s...
#!/usr/bin/env python import re import sys import os import ast import glob import os.path import getopt import shutil import tarfile import xml.dom.minidom import traceback try: import urllib.request as urllib except ImportError: import urllib import uuid from pandawnutil.wnmisc.misc_utils import commands_get...
# Copyright 2013 VMware, 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 of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
import datetime import logging import os import pytest import random import time import traceback from tests.common.fixtures.conn_graph_facts import fanout_graph_facts from tests.common.helpers.assertions import pytest_assert from tests.common.helpers.pfc_storm import PFCStorm from tests.common.plugins.loganalyzer.log...
import pyttsx3 # pip install pyttsx3 import datetime import speech_recognition as sr # pip install SpeechRecognition # import pyaudio # pip install pipwin and then pipwin install pyaudio import wikipedia ...
#! /usr/bin/env python3 # -*- coding: utf-8 -*- from math import * import os from random import shuffle from termcolor import colored import random import itertools import operator import more_itertools as mit #-------------------------------------------------------------- CST #PLAYERS_NB = 2 PLAYERS_NB = 4 ...
import csv from collections import defaultdict from transformers import GPT2Tokenizer, GPT2Model import torch.nn as nn from torch.utils.data import DataLoader, Dataset import torch from torch.optim import AdamW, SGD from tqdm.auto import tqdm import json import random from torch.distributions.normal import Normal from ...
# Licensed under an MIT open source license - see LICENSE from .length import * from .utilities import distance import numpy as np import scipy.ndimage as nd import matplotlib.pyplot as p import copy def isolateregions(binary_array, size_threshold=0, pad_size=0, fill_hole=False, rel_size=0.1, mor...
# -*- coding: utf-8 -*- # MIT license # # Copyright (C) 2018 by XESS Corp. # # 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...
# %% Imports import re import glob import argparse import CppHeaderParser # %% Constants # Association between member property and PlantUML symbol MEMBER_PROP_MAP = { 'private': '-', 'public': '+', 'protected': '#' } # Links LINK_TYPE_MAP = { 'inherit': '<|--', 'aggregation': 'o--', 'compos...
# encoding=utf-8 import numpy as np import math import sys import os import time import torch import torch.nn as nn import torch.backends.cudnn as cudnn import torch.optim as optim from torch.autograd import Variable import torch.nn.functional as F import logging import random import imageio # add for shape-preserving...
""" reports.py A Flask Blueprint module for reports. """ from flask import Blueprint, render_template, abort, g from flask import url_for, current_app, Response, request from flask.ext.babel import format_datetime, gettext from datetime import datetime, date, timedelta from meerkat_frontend import app from meerkat_fro...
# -*- coding: utf-8 -*- ############################################################################### # Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # # All rights reserved. # # This file is part of the AiiDA-FLEUR package. ...
# # This source file is part of the EdgeDB open source project. # # Copyright 2008-present MagicStack Inc. and the EdgeDB authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http...
import os from configparser import ConfigParser, RawConfigParser from background_task import background from datetime import datetime, timedelta from .models import Preset, ServerSetting from django.conf import settings from subprocess import Popen, PIPE from xml.etree.ElementTree import Element, SubElement, tostring, ...
""" Helper functions to deliver entrance/exit/region sets to OWG rules. """ from BaseClasses import Entrance def get_sword_required_superbunny_mirror_regions(): """ Cave regions that superbunny can get through - but only with a sword. """ yield 'Spiral Cave (Top)' def get_boots_required_superbunny_m...
#!/usr/bin/env python3 # ==================================== # Copyright (c) Microsoft Corporation. All rights reserved. # ==================================== """JRDSClient class.""" from datetime import datetime import time import configuration3 as configuration import locallogger from workerexception import * ...
# Copyright (c) 2016-2020 Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import asyncio import json import logging import os import re import ssl import sys import tempfile from functools import partial from subprocess import PIPE, Popen from typing import Any, Dict, List, Optional...
import sys import os sys.path.append(os.path.abspath("../")) sys.path.append(os.path.abspath("utils")) sys.path.append(os.path.abspath("visualizer")) sys.path.append(os.path.abspath("graph")) import cv2 from opt import opt import torch.utils.data as data from gcn_utils.io import IO from gcn_utils.gcn_model import Mod...
# encoding: utf-8 from __future__ import annotations from ckan.types import Context import logging from typing import Any, cast import sqlalchemy import six import ckan.lib.search as search import ckan.lib.navl.dictization_functions import ckan.logic as logic import ckan.plugins as p import ckanext.datastore.logic....
# Copyright 2017 <NAME>. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sub...
#!/usr/bin/env python import logging as log import os.path as osp import sys import time from argparse import ArgumentParser from imutils import face_utils from utils_cursor import * import cv2 import numpy as np import pyautogui as pag import dlib from openvino.inference_engine import IENetwork from i...
#!/usr/bin/env python """Test of various URL, the content is checked in RDF. It could be done in another output format. The goal is to maximize the coverage.""" from __future__ import print_function import os import sys import socket import unittest import rdflib import io import lib_util import lib_properties from ...
""" eee511 final project: """ from __future__ import division from __future__ import absolute_import import os import sys import shutil import time import random import argparse import torch import torch.nn as nn import torch.backends.cudnn as cudnn import torchvision.datasets as dset import torchvision.transforms a...
''' Reference: https://github.com/adsodemelk/PRST ''' # -*- coding: utf-8 -*- from __future__ import print_function, division import copy __all__ = ["rldecode", "rlencode", "units", "mcolon", "recursive_diff", "gridtools"] import plot.velocity_src.gridtools import numpy as np import scipy.sparse from scipy.sparse im...
# encoding: utf-8 """ Test suite for pptx.text.fonts module """ from __future__ import absolute_import, print_function, unicode_literals import io import pytest from struct import calcsize from pptx.compat import BytesIO from pptx.text.fonts import ( _BaseTable, _Font, FontFiles, _HeadTable, _N...
# -*- coding: utf-8 -*- """ Created on Thu Jan 12 15:31:55 2017 @author: <NAME>, <NAME>, <NAME> """ from __future__ import division, print_function, absolute_import import numpy as np import matplotlib.pyplot as plt from scipy.linalg import sqrtm from pyUSID.io.hdf_utils import get_auxiliary_datasets from pyUSID.viz...
from CommonServerPython import * # IMPORTS # import json import requests import urllib3 from typing import Dict, List, Union # Disable insecure warnings urllib3.disable_warnings() # CONSTANTS # MAX_FETCH_SIZE = 50 DATE_FORMAT = "%Y-%m-%dT%H%M" # 2019-09-01T1012 PARAMS_KEYS = { "threat_score": "t_score", "th...
# Copyright 2014 <NAME> <<EMAIL>> # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. import re import shlex from gi.repository import GObject from quodlibet import const from .tcp...