text
stringlengths
3.07k
22.1k
from numbers import Real from typing import Union, Tuple, Iterable, NamedTuple, List, cast, overload from .math import sqrt, cos, sin from .vec2d import Vec2d from ..typing import VecLike, MatLike, Num class Mat22(NamedTuple): """ A 2x2 matrix. Support basic algebraic operations and exposes matrix prope...
import json import os import pandas as pds import re import requests import sqlite3 import sys from bs4 import BeautifulSoup from getLatLng import getAddress # Función para guardar la información en un archivo JSON def printToJson (cardList): f = open ("cardList.json", "w") try: jsonFile = json.dumps (...
import pandas as pd import numpy as np import os import csv import glob from openpyxl import load_workbook import warnings # Function to input week number, and identify input PDL location and output file path def week_number(): weekNum = input("Enter Week #: ") inputPDL_path = "./Input_PDL/2019-W" + weekNum ...
# vim: fileencoding=utf-8 # Human friendly input/output in Python. # # Author: <NAME> <<EMAIL>> # Last Change: February 9, 2020 # URL: https://humanfriendly.readthedocs.io """ Interactive terminal prompts. The :mod:`~humanfriendly.prompts` module enables interaction with the user (operator) by asking for confirmatio...
# -*- coding: UTF-8 -*- """ A libaray of object for managing I/O Copyright 2014 <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....
import csv import json import math import statistics import sys from scipy import stats import numpy as np import random sys.path.append('lib') import Gender Gender = Gender.Gender import Job Job = Job.Job import Race Race = Race.Race import DataSections DataSections = DataSections.DataSections def parse(file_name): ...
# encoding: utf-8 """ Module for reading/writing data from/to legacy PyNN formats. PyNN is available at http://neuralensemble.org/PyNN Classes: PyNNNumpyIO PyNNTextIO Supported: Read/Write Authors: <NAME>, <NAME> """ from __future__ import with_statement from .baseio import BaseIO from ..core import Segmen...
#!/usr/bin/env python import sys, re, optparse try: from common_methods import * except ImportError: sys.exit("Could not find common_methods.py... download the full toolkit from https://github.com/MonroCoury/Forensic_Tools") def read_moz_cookies(cookies_db): '''Read mozilla firefox cookies. Takes one argu...
from typing import List import torch import torch.nn as nn import torch.nn.functional as F from functools import partial import math from itertools import repeat from torch._six import container_abcs import warnings from ..backbones.vit import VisionTransformer from mmcv.cnn import build_norm_layer from ..builder impo...
#!/usr/bin/env python3 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # @title: Attacking AlexNet (a convolutional neural network for object identification) # @author: <NAME> # @date: June 2018 # @notes: ...
# # Copyright 2018 Analytics Zoo 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 applicable law or agreed to...
from __future__ import division from operator import getitem from typing import Optional, Union import dask.array as da import dask.dataframe as dd import numpy as np import pandas as pd import scipy.sparse import sklearn.preprocessing from .._compat import check_is_fitted from .._typing import ArrayLike, SeriesType...
from django.db.models import Q from django.shortcuts import get_object_or_404 from rest_framework import status, permissions, generics, mixins from rest_framework.response import Response from rest_framework.views import APIView from contents.models import Contents, Category from contents.serializers import ContentsDe...
from collections import OrderedDict from typing import Optional, Sequence, List, Dict, Any from django.conf import settings from django.contrib import admin from django.contrib.auth.models import User from django.http import HttpRequest from django.urls import reverse, resolve from django.utils.html import format_html ...
import torch import torch.nn.functional import typing as _typing from torch_geometric.nn.conv import GCNConv import autogl.data from . import register_model from .base import BaseAutoModel, activate_func, ClassificationSupportedSequentialModel from ....utils import get_logger LOGGER = get_logger("GCNModel") class G...
import pytest import numpy as np from numpy.testing import assert_array_almost_equal from scipy.signal import filtfilt from pylops.utils import dottest from pylops.utils.wavelets import ricker from pylops.avo.poststack import PoststackLinearModelling, PoststackInversion np.random.seed(10) # params dt0 = 0.004 ntwav...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, print_function, unicode_literals, absolute_import """ This module defines utility classes and functions. """ import six from io import open import os import tempfile from subp...
import copy import torch import torchvision import numpy as np from PIL import Image, ImageDraw, ImageFont import matplotlib.colors as clr CMAP_NDVI = clr.LinearSegmentedColormap.from_list('ndvi', ["#cbbe9a","#fffde4","#bccea5","#66985b","#2e6a32","#123f1e","#0e371a","#01140f","#000d0a"], N=256) CMAP_NDVI.set_bad(c...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from collections import defaultdict import sys import re import xml.etree.ElementTree as ET import xml.dom.minidom from six import u, iteritems, PY2 try: # Python 2 unichr except NameError: # pragma: nocover # Python 3 unichr = chr """ Based on the under...
# -*- coding: utf-8 -*- from enum import Enum, auto, unique import random from PIL import Image, ImageDraw, ImageColor from overrides import EnforceOverrides, overrides @unique class Direction(Enum): NORTH = auto() SOUTH = auto() EAST = auto() WEST = auto() class Distances: def __init__(self, roo...
# Copyright (c) OpenMMLab. All rights reserved. from math import sqrt import torch import torch.nn.functional as F def gaussian2D(radius, sigma=1, dtype=torch.float32, device='cpu'): """Generate 2D gaussian kernel. Args: radius (int): Radius of gaussian kernel. sigma (int): Sigma...
""" Copyright (C) 2018-2020 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 applicable law or agreed to i...
#!/usr/bin/env python # coding: utf-8 # # ECG Ensemble 1D-CNN Client Side with Raspberry pie # This code is the server part of ECG ensemble 1D-CNN model for **multi** client and a server. # In[1]: users = 3 # number of clients # ## Import required packages # In[2]: import os import struct import socket import ...
import numpy as np import os import pickle import torch import json import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import pandas as pd import math import utils from data.data_utils import * from data.dataloader_ssl import load_dataset_ssl from constants import * from args import get_a...
import copy import json import logging from datetime import datetime, timedelta import requests import towerlib from django.contrib.auth.models import User from django.db import models from django.db.models.signals import post_save from django.utils import timezone from django.utils.translation import gettext_lazy as ...
#!/usr/bin/env python # # wsman.py: a python version of WaterSlide's wsman # # wsman.py is a prototype and is missing features such as searching and alias # lookup that are found in the original wsman. These functionalities would be # trivial to implement if they're desired. # In a perfect world, We would be able t...
import attr import logging import traceback from enum import Enum from collections import namedtuple from .. import repositories, entities, services logger = logging.getLogger(name=__name__) class ExecutionStatus(str, Enum): SUCCESS = "success" FAILED = "failed" IN_PROGRESS = "inProgress" CREATED = ...
from pytest import raises from imageio.testing import run_tests_if_main, get_test_dir import os import gc import shutil import numpy as np import imageio from imageio.core import Format, FormatManager, Request from imageio.core import get_remote_file test_dir = get_test_dir() def setup_module(): imageio.form...
#!/usr/bin/python import os import math import re import struct import numpy as np import matplotlib.pyplot as plt def readstamp(f): pgmoffset=17 bs=f.read(pgmoffset+4) x=struct.unpack("<I", bs[pgmoffset:pgmoffset+4])[0] # reverse byte reading order t = (x>>0) & 0xffffffff t = ((t >> 16) & 0xffff) |...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from typing import Iterable, Type, MutableMapping, Mapping, Any, Optional, Tuple, List, Sequence import numpy as np import math import torch from torch import Tensor, nn from torch.optim import lr_scheduler, SGD, Adam from torch.opti...
from django.db import models from durationfield.db.models.fields.duration import DurationField import datetime class Country(models.Model): id=models.AutoField(primary_key=True) iso_code2 = models.CharField(max_length=2, blank=True, default="", verbose_name="ISO 2") iso_code3 = models.CharField...
import os import sys import cv2 import numpy as np import pandas as pd from math import sqrt, pow from imgaug import augmenters as iaa #====== MAPPING VALUE FUNCTION =====## def translate(value, leftMin, leftMax, rightMin, rightMax): # Figure out how 'wide' each range is leftSpan = leftMax - leftMin right...
import torch import torch.nn as nn import torch.optim as optim from torch.autograd import Variable from torch.utils.data import DataLoader from tqdm import tqdm import numpy as np import pickle import os from dataloader import DataReader, DatasetLoader from walkers import MetaPathWalker, DeepWalker from model import Sk...
from django import VERSION from django.contrib.admin import ModelAdmin, helpers from django.contrib.admin.util import unquote from django.conf.urls import patterns, url from django.utils.encoding import force_unicode from django.utils.translation import ugettext as _ from django.utils.translation import ugettext_lazy a...
from django.contrib.auth.base_user import AbstractBaseUser from django.db import models class User(AbstractBaseUser): """用户表""" nickname = models.CharField(verbose_name='昵称', max_length=40, null=True, blank=True) gitee_name = models.CharField(verbose_name='gitee名称', max_length=40, null=True, blank=True) ...
#!usr/bin/env python # -*- coding: utf-8 -*- from checkStatusCode import checkStatusCode import createDeviceTypes import getDeviceHeader import getDeviceIDList import globalConfig import json import requests import time import random from pprint import pprint import os import errno # If the device header has not alr...
""" The base Command class. All commands in Evennia inherit from the 'Command' class in this module. """ import re from src.locks.lockhandler import LockHandler from src.utils.utils import is_iter, fill, lazy_property def _init_command(mcs, **kwargs): """ Helper command. Makes sure all data are stored ...
from ctapipe.image.hillas import hillas_parameters from ctapipe.image.hillas import HillasParameterizationError from ctapipe.image import leakage from ctapipe.image.cleaning import tailcuts_clean from ctapipe.image.cleaning import fact_image_cleaning from ctapipe.image.cleaning import number_of_islands from ctapipe.ima...
import pandas as pd import numpy as np import random from bs4 import BeautifulSoup, Comment import requests # Depending on the team, home court advantage is anywhere from 2 to 4 points. HOME_COURT_ADVANTAGE = 3 # The weight of player performance compared to team performance. PLAYER_SCORE_WEIGHT = 0.6 # The weight of t...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, <NAME> <<EMAIL>> # 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', ...
# -*- coding: utf-8 -*- # from io import BytesIO import rdflib import requests from flask import render_template, url_for from rdflib import URIRef, Literal, BNode from requests import Session from lxml import etree from geofabric import _config as config from geofabric.helpers import gml_extract_geom_to_geojson, \ ...
#!/usr/bin/python3 # coding: utf-8 """Simple analyzer and aggregator for a simple time log Reads a text file containing one iso-8601 timestamp per line and normalizes them to quarter-hours. These quarter-hours are treated as "time spent", which gets aggregated into stats by day, week, month and weekday, and printed. "...
#!/usr/bin/env python from __future__ import print_function import argparse import dace import math import numpy as np W = dace.symbol("W") H = dace.symbol("H") num_bins = dace.symbol("num_bins") num_bins.set(256) dtype = dace.float32 def make_copy_to_fpga_state(sdfg): state = sdfg.add_state("copy_to_fpga") ...
import json from django.conf import settings from dateutil.parser import parse as parse_date from django.shortcuts import render, redirect from django.http import HttpResponse from django.views.decorators.http import require_POST from django.views.decorators.csrf import csrf_exempt from .view_helper import * from .mode...
from mxnet import nd from mxnet.gluon import nn from mxnet.contrib.ndarray import MultiBoxPrior class stemblock(nn.HybridBlock): def __init__(self, filters): super(stemblock, self).__init__() self.filters = filters self.conv1 = nn.Conv2D(self.filters, kernel_size=3, padding=1, strid...
""" Masks areas to be carved out based on contour """ import itertools import numpy, scipy.interpolate, numpy.random import vec narrowing_factor = 1.5 # Used when river occupies both sides of a chunk corner_radius_offset = 0.9 river_deviation_centre = (-2, 2) river_deviation_width = (-1, 1) river_frequen...
# Copyright (c) 2021 PaddlePaddle 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 appli...
from py2p import mesh from py2p import flags from typing import cast from Crypto.PublicKey import RSA from Crypto.Hash import SHA256 from Crypto.Signature import pkcs1_15 import qsort import numpy as np import rehash import time, argparse, asyncio, sys, json, random, os, pickle, base64 # script argument parsing parser...
""" Script to read empirical txt files and save them into a parametric db Assumes Ds / fault & zhao (subduction) / bradley (shallow crustal) """ import argparse import glob import os import numpy as np import pandas as pd from qcore import formats from gmhazard_calc.constants import SourceType import gmhazard_calc.u...
import os import pickle import time from os.path import join, dirname import cv2 import lmdb import numpy as np import torch import torch.nn as nn from data.utils import normalize, normalize_reverse from model import Model from .metrics import psnr_calculate, ssim_calculate from .utils import AverageMeter, img2video ...
#!/usr/bin/env python3 # # The menu, intro animation, new-game cutscene, and end-game cutscene # are all stored in an RLE-delta compressed format which this script can # manipulate. # # 9B: End of frame # 1B: 8-bit count, 8-bit value to repeat # E4: 16-bit LE count, 8-bit value to repeat # E6: 16-bit dest address # Oth...
# Copyright (c) 2014 Evalf # # 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, s...
import numpy as np from pyquaternion import Quaternion from iou.compute import compute_iou, compute_giou from iou.increase_confidence import percent_increase, percent_decrease from iou.move_object import move_object from imu.displacement import compute_displacement_pr, compute_displacement_quaternion from imu.image_inf...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # 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...
## seq2seq 做数学题 import torch from tqdm import tqdm import json import time from torch.utils.data import Dataset, DataLoader from bert_seq2seq import Tokenizer, load_chinese_base_vocab from bert_seq2seq import load_bert import re vocab_path = "./state_dict/roberta_wwm_vocab.txt" # roberta模型字典的位置 word2idx = load_chin...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ :Purpose: Perform automated testing on pdvalidate. :Platform: Linux/Windows | Python 3.5 :Developer: <NAME> :Email: <EMAIL> """ # pylint: disable=protected-access # pylint: disable=wrong-import-position import os import sys sys.path.insert(0, os.path.dirname(o...
import math import aiocache from twitchio.ext import commands from alttprbot.database import gtbk from alttprbot.util import speedgaming async def whitelisted(ctx): if ctx.author.name == 'the_synack': return True if ctx.author.name == ctx.channel.name: return True if ctx.author.is_mod: ...
"""Kythe graph structure.""" import base64 import collections import dataclasses from pytype.tools.xref import utils as xref_utils from pytype.tools.xref import indexer FILE_ANCHOR_SIGNATURE = ":module:" @dataclasses.dataclass(frozen=True) class Args: root: str corpus: str path: str # Kythe nodes @datac...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from datetime import datetime import discord from discord.ext import commands import os import random from typing import Dict, List, Tuple import pss_core as core import server_settings import utility as util # ---------- Constants ---------- DAILY_INFO_FIELDS ...
import errno from os.path import join, expanduser from paramiko.config import SSHConfig from invoke import Local from invoke.vendor.lexicon import Lexicon from fabric import Config, Remote, RemoteShell from fabric.util import get_local_user from mock import patch, call from _util import support, faux_v1...
from __future__ import absolute_import, division, print_function, unicode_literals from builtins import range import os import shutil import argparse import numpy as np import pyemma.msm as msm import pyemma.coordinates as coor import matplotlib.pyplot as plt from AdaptivePELE.freeEnergies import cluster, computeDeltaG...
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve. # #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...
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program 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 2 # of the License, or (at your option) any later version. # # This program is distrib...
import numpy as np import scipy.sparse as sps from matplotlib import pyplot as plt def laplacian1D_S(N): Lmat = sps.eye(N)*(-2) if N > 1: b = np.ones(N-1) Lmat += sps.diags(b, offsets=1) + sps.diags(b, offsets=-1) return Lmat def laplacian_square_S(N, drop_bound): L = laplacian1D_S(N) ...
# Copyright (c) 2018-2021 <NAME> # SPDX-License-Identifier: MIT # # Copyright (C) 2020-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 # """ Model store which provides pretrained models. The code imported from: https://github.com/osmr/imgclsmob """ __all__ = ['get_model_file', 'download_model', 'calc...
import numpy as np from qtpy import QtGui, QtCore, QtWidgets import sharppy.sharptab as tab from sharppy.sharptab.constants import * ## Written by <NAME> - OU School of Meteorology ## and <NAME> - CIMMS __all__ = ['backgroundWatch', 'plotWatch'] class backgroundWatch(QtWidgets.QFrame): ''' Draw the backgrou...
# BSD-3-Clause License # # Copyright 2017 Orange # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the followi...
# Copyright (C) 2020 GreenWaves Technologies, SAS # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # This progr...
import argparse import torch import torch.nn as nn from torch.nn import functional as F from typing import Tuple from types import SimpleNamespace import bittensor from . import router class PKMKeys(nn.Module): def __init__(self, key_dim): super().__init__() self._key_dim = key_dim self....
from botocore.exceptions import ClientError from pygments import highlight, lexers, formatters from utils import * from sys import argv import argparse import json import os import boto3 import urllib.request import urllib.parse def listHostsZones(): ''' Fetches all the hostedzones and returns a JSON ob...
import itertools import re from loguru import logger def convert_unit_primap_to_primap2(unit: str, entity: str) -> str: """ This function converts the emissions module style units which usually neither carry information about the substance nor about the time to primap2 units. The function also handle...
# Authors: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # # License: BSD-3 from collections import OrderedDict import numpy as np import pytest from braindecode.datasets import MOABBDataset from braindecode.datautil.preprocess import preprocess, zscore, scale, \ MNEPreproc, NumpyPreproc, filterbank, exponential_...
from multiprocessing import cpu_count import numpy as np import tensorflow as tf @tf.function def augment(x): """ augments a data point x by flipping and cropping images """ # random left right flipping x = tf.image.random_flip_left_right(x) # random pad and crop x = tf.pad(x, paddings=[(...
""" Graph for reasons of pgraph solution """ __author__ = "<NAME>" __date__ = "2013-06-28" from _compat import * import heapq from collections import deque from mybuild.pgraph import Reason import util, logging logger = util.get_extended_logger(__name__) class Rnode(object): def __init__(self, literal, rgr...
#!/usr/bin/env python3 import copy import os from enum import Enum from typing import Any, Callable, Dict, Optional, Tuple, Type, cast import torch import torch.distributed as dist from torch import Tensor from torch.nn import Module from captum.attr._core.guided_grad_cam import GuidedGradCam from captum.attr._core.l...
""" Created on 28. aug. 2015 @author: pab """ from __future__ import division, print_function import numpy as np from scipy import linalg from scipy.ndimage.filters import convolve1d import warnings EPS = np.finfo(float).eps _EPS = EPS _TINY = np.finfo(float).tiny def convolve(sequence, rule, **kwds): """Wrapper...
# # Hex-Rays Decompiler project # Copyright (c) 2007-2020 by Hex-Rays, <EMAIL> # ALL RIGHTS RESERVED. # # Sample plugin for Hex-Rays Decompiler. # It shows how to use "Select offsets" widget (select_udt_by_offset() call). # This plugin repeats the Alt-Y functionality. # Usage: place c...
"""Train a transformer tagging model, using Huggingface's Transformers.""" # pip install thinc ml_datasets typer tqdm transformers torch from dataclasses import dataclass from typing import List, Optional, Tuple, Callable import torch from pathlib import Path from transformers import AutoTokenizer, AutoModel import thi...
from clr import AddReference AddReference("System") AddReference("QuantConnect.Algorithm") AddReference("QuantConnect.Indicators") AddReference("QuantConnect.Common") from System import * from QuantConnect import * from QuantConnect.Algorithm import * from QuantConnect.Indicators import * from datetime import datet...
# Copyright 2019 <NAME> and <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 wri...
import logging import collections import re import time import functools logger = logging.getLogger(__name__) class LimitedDict(collections.OrderedDict): """ A dictionary that enforces a size limit and will remove the oldest item in the dictionary (FIFO) while the limit is exceeded. """ def __in...
# -*- coding: utf-8 -*- """Module containing the class implementing hashing functions & prf """ # import basic stuff import abc import math import struct import logging from typing import Optional # import own stuff import tlsmate.pdu as pdu # import other stuff from cryptography.hazmat.primitives import hashes, hmac...
from tkinter import * from tkinter.filedialog import askdirectory, askopenfilename import cv2 import Main_demo from PIL import ImageTk,Image import os import urllib window = Tk() window.title('Sign Language Helper') window.geometry('1224x800') window.configure(background='whitesmoke') firstTime = True modelPath = Strin...
from .datastruct import StableDict from ..constants import * # NOQA # wrapping msgpack --------------------------------------------------------------------------------------------------- # # due to the planned breaking api changes in upstream msgpack, we wrap it the way we need it - # to avoid having lots of clutter ...
import json from functools import wraps from urllib.parse import urlencode from django import forms from django.contrib import admin, messages as django_messages from django.contrib.admin.templatetags.admin_urls import admin_urlname from django.contrib.admin.views.main import TO_FIELD_VAR from django.core.exceptions i...
# Copyright (c) 2021 elParaguayo # # 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, distrib...
# -*- coding: utf-8 -*- #--------------------------------------------------------------------------- # Copyright 2020 VMware, Inc. All rights reserved. # AUTO GENERATED FILE -- DO NOT MODIFY! # # vAPI stub file for package com.vmware.esx.settings.depot_content.add_ons. #-----------------------------------------------...
from __future__ import absolute_import, division, print_function, unicode_literals import balanced import mock from gratipay import billing from gratipay.testing import Harness from gratipay.testing.balanced import BalancedHarness from gratipay.models.participant import Participant class TestBalancedCard(BalancedHa...
# -*- coding: utf8 -*- """Create a tmux workspace from a configuration :py:obj:`dict`. tmuxp.workspacebuilder ~~~~~~~~~~~~~~~~~~~~~~ """ from __future__ import absolute_import, division, print_function, \ with_statement, unicode_literals import logging from . import exc, Window, Pane, Session, Server from .uti...
import argparse import os import os.path as osp import sys sys.path.append(".") import numpy as np import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import DataLoader from torch.autograd import Variable import random import pdb import math from distutils.version import LooseVersion ...
""" A special directive for including a cq object. """ import traceback from pathlib import Path from uuid import uuid1 as uuid from textwrap import indent from ncadquery import exporters, Assembly, Compound, Color, Sketch from ncadquery import cqgi from ncadquery.occ_impl.jupyter_tools import ( toJSON, dum...
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
# SecretPlots # Copyright (c) 2019. SecretBiology # # Author: <NAME> # Organisation: SecretBiology # Website: https://github.com/secretBiology/SecretPlots # Licence: MIT License # Creation: 11/15/19, 11:09 AM # # # Path finder functions related to the our network from typing import List, Dict, Union import nu...
from pathlib import Path from unittest import TestCase import json from pytezos import Key, pytezos from pytezos.rpc.errors import MichelsonRuntimeError from tezos_mac_tests.ligo import ( LigoEnv, LigoContract, PtzUtils, flextesa_sandbox, token_metadata_object, ) root_dir = Path(__file__).parent...
import errno import os import os.path import platform import shutil import subprocess import tarfile from distutils import log from distutils.command.build_clib import build_clib as _build_clib from distutils.command.build_ext import build_ext as _build_ext from distutils.errors import DistutilsError from io import Byt...
#!/usr/bin/python #coding=utf-8 from __future__ import unicode_literals, division import codecs import json import os import re import sys from io import open # open -> str for both python 2.x and 3.x from copy import copy try: from urllib2 import HTTPError from urllib2 import urlopen except ImportError: ...
# -*- coding: utf-8 -*- """Module completion auxiliary functions""" #------------------------------------------------------------------------------ # # Most functions on this file were taken from the file core/completerlib, # which belongs to the IPython project (v0.13). They were added here because # a) IPy...
import os import random from decimal import Decimal from django.conf import settings from django.core.files.storage import FileSystemStorage from django.db import models from django.db.models import Q from django.utils.translation import ugettext_lazy as _ from taggit.managers import TaggableManager from baby_backend...
from hetnetana import hgnc, mi from .multihetnet import MultiHetNet DOWN, UP, UNREGULATED = 'DOWN', 'UP', 'UNREGULATED' def quick_adders(n): def g(i, **kwargs): n.add_node(hgnc(i), dict(color=hgnc.color, annotations=kwargs)) def m(i, **kwargs): n.add_node(mi(i), dict(color=mi.color, annotati...
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import, unicode_literals __all__ = ["make_ladder", "Sampler"] import attr import itertools import numpy as np from numpy.random.mtrand import RandomState from . import util, chain, ensemble def make_ladder(ndim, ntemps=None, Tmax=N...