text
stringlengths
3.07k
22.1k
from base64 import b64decode import logging from django.core.exceptions import SuspiciousOperation from django.core.files.uploadedfile import SimpleUploadedFile from django.db import transaction from django.db.models import Q from django.utils.crypto import get_random_string from zentral.contrib.inventory.models import...
import time import shutil import dlib import numpy as np import PIL.Image import torch from torchvision.transforms import transforms import dnnlib import legacy from configs import GENERATOR_CONFIGS from dlib_utils.face_alignment import image_align from dlib_utils.landmarks_detector import LandmarksDetector from tor...
# Copyright 2016 Google 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 applicable law or a...
import math from collections import OrderedDict from functools import partial import torch.nn as nn import torch from torch.nn import Module as Module from src.models.tresnet.layers.anti_aliasing import AntiAliasDownsampleLayer from .layers.avg_pool import FastGlobalAvgPool2d from src.models.tresnet.layers....
import requests import bs4 import sqlite3 import pandas as pd hr_db_filename = 'C:/Users/Jeff/Google Drive/research/Hampton Roads Data/Time Series/' \ 'hampt_rd_data.sqlite' def get_id(typ, data): """ gets either the siteid or variableid from the db :param typ: String. Either "Site" or "...
from sys import argv import Base from Base import Net from Base import Node, Board import Base_Test import numpy as np import copy import atexit import matplotlib.pyplot as plt import Base_Test from netlist_parser import parse_file def show_graph(): # b = Board(0, nets, min_cost_placement, 12, 12) ...
"""This module provides a generalized implementation of UNet. See the `UNet` class docstring for more information. """ import attr from typing import List, Optional, Text from sleap.nn.architectures import encoder_decoder from sleap.nn.config import UNetConfig import numpy as np import tensorflow as tf @attr.s(auto...
import sys, struct, random, string, meterpreter_bindings # A stack of this stuff was stolen from the Python Meterpreter. We should look # to find a nice way of sharing this across the two without the duplication. # # START OF COPY PASTE # # Constants # # these values will be patched, DO NOT CHANGE THEM DEBUGGING = F...
import sys sys.path.append('..') import matplotlib.pyplot as plt import numpy as np import pandas as pd import scipy.optimize import projgrad from scipy.stats.mstats import gmean import matplotlib colors = matplotlib.rcParams['axes.prop_cycle'].by_key()['color'] black = matplotlib.rcParams['axes.labelcolor'] tcellcol...
from veroviz._common import * from veroviz._validation import valCreateArcsFromLocSeq from veroviz._validation import valCreateArcsFromNodeSeq from veroviz._createEntitiesFromList import privCreateArcsFromLocSeq def createArcsFromLocSeq(locSeq=None, initArcs=None, startArc=1, objectID=None, leafletColor=config['VRV_D...
import numpy as np import time import cv2 def sample_angle(): d = np.random.binomial(1,0.5) theta = np.random.uniform(np.pi/12, np.pi - np.pi/12) * (-1)**d return theta class Player(): def __init__(self, x, board_size, bat_size, dtheta = np.pi/12, dy = 3): self.x = x self.y = np....
""" Types used to represent a full function/module as an Abstract Syntax Tree. Most types are small, and are merely used as tokens in the AST. A tree diagram has been included below to illustrate the relationships between the AST types. AST Type Tree ------------- *Basic* |--->Assignment | |--...
import sys print(sys.path) import os from pathlib import Path import settings print('os.getenv', os.getenv('LB_WORKING_FOLDER_NAME')) print('change projects in .env') import os from util import Util from app_settings import AppSettings, AppSettingsTest #from app_settings import AppSettings from text_file import Text...
"""Python wrappers around TensorFlow ops. This file is MACHINE GENERATED! Do not edit. """ import collections as _collections from tensorflow.python.eager import execute as _execute from tensorflow.python.eager import context as _context from tensorflow.python.eager import core as _core from tensorflow.python.framew...
from pytororo.pytororo import stone_board, black_stone, white_stone, sticky_rice_cake, sticky_rice_cake_board, print_stone_board, print_cake_board def go(): print('Trace | Start.') board = """\ .x...o......./ ooxxxxoo...../ .oox..x..o.../ o.oox..x...../ oooox....o.../ xxxx..x.o..../ ............./ .......x...
"""Helper functions for finding and plotting a pareto front.""" from os.path import join from typing import Dict, MutableMapping, Optional # import sys # from PyQt5.QtWidgets import QApplication import numpy as np from plotly import offline import plotly.express as px import plotly.graph_objects as go import matplotl...
#!/usr/bin/env python3 from tensorflow.python.saved_model import tag_constants from tensorflow.python.framework.convert_to_constants import convert_variables_to_constants_v2 import rospy import rospkg from visualization_msgs.msg import Marker, MarkerArray from sensor_msgs.msg import Image from statek_ml.msg import Dyna...
import torch.nn as nn import math import torch.utils.model_zoo as model_zoo import torch.nn.init as weight_init import torch __all__ = ['MultipleBasicBlock','MultipleBasicBlock_4'] def conv3x3(in_planes, out_planes, dilation = 1, stride=1): "3x3 convolution with padding" return nn.Conv2d(in_planes, out_planes, ...
# -*- coding: utf-8 -*- """ Created on Thu Nov 15 01:45:23 2018 @author: JAE """ import torch import torch.multiprocessing as mp import random import numpy as np import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from collections import namedtuple, deque import gym import copy import ...
## ## © Copyright 2021- IBM Inc. All rights reserved # SPDX-License-Identifier: MIT ## # example of accessing the module structure API https://jazz.net/wiki/bin/view/Main/DNGModuleAPI # prints the module content with indenting corresponding to headings and calculated section number # NOTE NOTE NOTE the section number ...
# ------------------------------------------------------------------------------ # Experiment class that tracks experiments with different configurations. # The idea is that if multiple experiments are performed, all intermediate # stored files and model states are within a directory for that experiment. In # addition,...
import os import re import csv import codecs import numpy as np import pandas as pd from nltk.corpus import stopwords from nltk.stem import SnowballStemmer from string import punctuation from gensim.models import KeyedVectors from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_...
import functools import ipaddress import json import logging import re import operator import testinfra import time from typing import Optional, Dict import requests from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.retry import Retry import pytest LOGGER = logging.getLogger(__name__) ...
import os import torch from PIL import Image from skimage import io from torch.utils.data import Dataset import h5py from .upna_preprocess import * from .utils import * from bingham_distribution import BinghamDistribution def make_hdf5_file(config, image_transform): dataset_path = config["preprocess_path"] csv...
import operator import re from datetime import date, datetime, timedelta from crispy_forms.bootstrap import FormActions from crispy_forms.helper import FormHelper from crispy_forms.layout import Field, Layout, Submit from django import forms from django.contrib.auth import get_user_model from django.contrib.auth.model...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Script to implement the network in Google Colab for access to hardware accelerator i.e. GPUs. With GPUs, the training is accelerated manifold. @author: rpm1412 """ #%% Cell 1: Import libraries import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axe...
#!/usr/bin/env python # coding: utf-8 """script that generates source data csvs for searchstims training history figures""" from argparse import ArgumentParser from pathlib import Path import pandas as pd import pyprojroot from searchnets.tensorboard import logdir2df def get_net_number_from_dirname(dirname): re...
""" pilots.py Methods to create, use, save and load pilots. Pilots contain the highlevel logic used to determine the angle and throttle of a vehicle. Pilots can include one or more models to help direct the vehicles motion. """ import os import shutil import numpy as np import keras import matplotlib matplotlib.use...
import math import torch import torch.nn as nn from .ocean import Ocean_ from .oceanplus import OceanPlus_ from .oceanTRT import OceanTRT_ from .siamfc import SiamFC_ from .connect import box_tower, AdjustLayer, AlignHead, Corr_Up, MultiDiCorr, OceanCorr from .backbones import ResNet50, ResNet22W from .mask import MMS,...
import os import math import numpy as np #import itertools #import open3d as o3d # import pandas as pd # from tqdm import tqdm # import joblib # import time import rosbag import sensor_msgs.point_cloud2 as pc2 import torch import yaml ''' - name: "x" offset: 0 datatype: 7 count: 1 - name: "y" offset: 4 ...
from __future__ import absolute_import, division, print_function import numpy as np from mock import MagicMock, patch from ...config import settings from .. import DataCollection, Data, SubsetGroup from .. import subset from ..subset import SubsetState from ..subset_group import coerce_subset_groups from .test_state ...
# Released under The MIT License (MIT) # http://opensource.org/licenses/MIT # Copyright (c) 2013-2015 SCoT Development Team import unittest from importlib import import_module import numpy as np from numpy.testing import assert_allclose import scot from scot import varica, datatools from scot.var import VAR class ...
from __future__ import annotations import re from abc import abstractmethod, ABCMeta from collections.abc import Sequence from email.headerregistry import Address, AddressHeader from re import Pattern from pymap.mime import MessageContent from pymap.parsing.message import AppendMessage from sievelib.commands import ...
# -*- coding: utf-8 -*- from ctypes import addressof import cv2 import numpy as np import pickle import requests import json import urllib import hashlib import urllib.parse from hashlib import md5 import sys from xlrd import open_workbook # xlrd用于读取xld import xlwt # 用于写入xls import PIL from PIL import ImageFile Imag...
""" Helper class and functions for loading KITTI objects Author: <NAME> Date: September 2017 """ import os import sys import numpy as np import cv2 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) ROOT_DIR = os.path.dirname(BASE_DIR) sys.path.append(os.path.join(ROOT_DIR, "mayavi")) import kitti_util as utils i...
#!/usr/bin/python3 import os import sys import numpy as np import rospy import ros_numpy import tf2_ros from shapely.geometry import Point from geometry_msgs.msg import PoseWithCovarianceStamped from sensor_msgs.msg import PointCloud2 from nav_msgs.msg import Odometry from darknet_ros_msgs.msg import B...
# Copyright (c) 2013 Tencent Inc. # All rights reserved. # # Author: <NAME> <<EMAIL>> # Created: September 27, 2013 """ This module defines cu_library, cu_binary and cu_test rules for cuda development. """ from __future__ import absolute_import from __future__ import print_function import os from blade import bu...
#!/usr/bin/env python #%% import pandas as pd import regex as re import argparse, os, csv import unicodedata #%% def validate_file(f): if not os.path.exists(f): raise argparse.ArgumentTypeError("{0} does not exist".format(f)) return f #%% tags=list('.?!,;:-—…') parentheses=r'\([^)(]+[^)( ] *\)' parenthe...
import argparse import os import cv2 import csv import sys import operator import numpy as np import config as cf import torch import torch.nn as nn import torch.backends.cudnn as cudnn import torchvision from torchvision import datasets, models, transforms from networks import * from torch.autograd import Variable f...
# Copyright 1996-2019 Cyberbotics Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
import networkx as nx import matplotlib.pyplot as plt ####################################################################### class Node: def __init__(self, value): self.value = value self.next = None class Queue(): def __init__(self): self.front = None self.rear = None ...
#!/usr/bin/env python # mirto_code_main.py import numpy as np from scipy.linalg import lu , solve import cProfile, pstats import mirto_code_configuration import mirto_code_compute_F import sys import ctypes # Empty class to store result class mirto_state: pass class mirto_residuals: pass class mirto_history: d...
import time import numpy as np import matplotlib.pyplot as plt import torch from torch import nn from torch.utils.data import TensorDataset, DataLoader from torchvision.utils import save_image class Generator(nn.Module): def __init__(self, n_noise=62, n_disc=10, n_cont=2): super().__init__() ...
from pyiron_atomistics import Project as PyironProject import numpy as np from collections import defaultdict from spin_space_averaging.sqs import SQSInteractive from pyiron_contrib.atomistics.atomistics.master.qha import QuasiHarmonicApproximation def get_bfgs(s, y, H): dH = np.einsum('...i,...j,...->...ij', *2 ...
import json import logging import time from datetime import timedelta, datetime from aliyunsdkcore.client import AcsClient from aliyunsdkpolardb.request.v20170801.DescribeSlowLogRecordsRequest import DescribeSlowLogRecordsRequest from component import mymysql from config import app_conf from service import serious_sq...
import datetime import urllib.request, urllib.parse, urllib.error from http.cookiejar import CookieJar import os import re from .central import CentralBase from ..utils import utils class CSLWeekly(CentralBase): def __init__(self, name, storage): CentralBase.__init__(self, name, storage) self.base...
import json import os from tqdm import tqdm import datetime from hackathon.utils import to_datetime, read_data_from_file from enum import Enum WORLD_TICK_PER_SECONDS = 20 MISSION_TIME_IN_SECONDS = 600 OBSERVATIONS_FILENAME = "observations.txt" LEVER_FILENAME = "lever_event.txt" TRIAGE_FILENAME = "triage_event.txt" ROO...
from tslearn.utils import to_time_series_dataset from tslearn.clustering import silhouette_score import tslearn.clustering as clust from scipy import signal import itertools import pandas as pd import numpy as np import matplotlib.pyplot as plt from gippy import GeoImage import gippy.algorithms as alg import re from os...
#!/usr/bin/env python3 """ comic_snagger Scrapes https://www.readcomics.io for comic book images """ import os import shutil import textwrap from collections import namedtuple from types import ModuleType from typing import List, NamedTuple, Tuple import requests from bs4 import BeautifulSoup # type: ignore from req...
import argparse import numpy as np import pandas as pd import os import pickle import langdetect as lang import time from datetime import datetime import json directory = 'data/twitter' outfile = 'output.csv' verbose = False def parse_arguments(): parser = argparse.ArgumentParser() parser.add_argument('direct...
# -*- coding: utf-8 -*- import json import datetime import requests from django.conf import settings from django.contrib.gis.geos import Point from django.utils.translation import ugettext as _ from geotrek.common.parsers import (AttachmentParserMixin, Parser, GlobalImportError) f...
import subprocess import pandas as pd import io import random from multiprocessing import Pool, Value, cpu_count import time import os import json import numpy as np PARAM_DIR = "./params" GENERATION_SIZE = 4*12 MUTATION_SCALE = .5 N_ELITE = 2 POTTS_SEED = 1 CHANGE_POTTS_SEED_PER_GEN = True GENERATION_NO = 1 np.random...
from bisect import bisect from biicode.common.utils.bii_logging import logger import difflib from biicode.common.exception import BiiException def _lcs_unique(a, b): # set index[line in a] = position of line in a unless # a is a duplicate, in which case it's set to None index = {} for i in xrange(len(...
""" nftfwls - List data from nftfw blacklist database """ import sys import datetime from signal import signal, SIGPIPE, SIG_DFL from pathlib import Path import argparse import logging from prettytable import PrettyTable from .fwdb import FwDb from .config import Config from .geoipcountry import GeoIPCountry from .sta...
import numpy as np import tensorflow as tf from collections import deque, namedtuple from typing import Tuple import random Transition = namedtuple('Transition', ('actions', 'rewards', 'gradients', 'data', 'targets')) logs_path = '/tmp/tensorflow_logs/example/' class ReplayMemory(object): ...
from flask import Flask, flash, redirect, render_template, request, session, abort, g import os import json import pandas as pd import ngs_player_tracking import math app = Flask(__name__) ##ext_file_path = 'D:/Sports Analytics/sportradar/' data_file_path = '../big_data_bowl_2021/' #'../../NFL/big_data_bowl_2021/' df_...
import logging from datetime import timedelta from typing import Optional, Iterable, List from homeassistant.components.climate import SUPPORT_TARGET_TEMPERATURE, SUPPORT_PRESET_MODE, HVAC_MODE_OFF, \ HVAC_MODE_HEAT from homeassistant.components.climate.const import HVAC_MODE_AUTO, HVAC_MODE_COOL, CURRENT_HVAC_IDL...
from __future__ import annotations import math from typing import List, Tuple import numpy as np class last_touch: def __init__(self): self.location = Vector() self.normal = Vector() self.time = -1 self.car = None def update(self, packet: GameTickPacket): touch =...
import html import os import re from itertools import chain import mistletoe import mistletoe.block_token as block_token import mistletoe.span_token as span_token from mistletoe.html_renderer import HTMLRenderer from ..constants.code_extensions import Extensions from ..parse.parse_markdown.file_imports import process...
# -*- coding: utf-8 -*- """ Created on Thu Mar 10 15:31:17 2016 Last update on Saturday 17 March 2018 @author: michielstock Kruskal's algorithm for finding the maximum spanning tree """ from union_set_forest import USF import heapq import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation blue ...
import ast from functools import partial from syn.base_utils import setitem, pyversion from syn.type.a import List from syn.five import STR, xrange from .base import PythonNode, Attr, AST, ACO, CC, Statement, Expression, \ resolve_progn, GenSym, ProgN, AsValue, ResolveProgN, logging from .literals import Tuple, Lis...
import argparse import contextlib import math import os import random import shutil import uuid from pathlib import Path from typing import Tuple import cv2 import imageio import joblib import numpy as np from matplotlib import pyplot as plt from numba import njit, prange from tqdm import tqdm # Parameters brightness...
#<NAME> #ilk değer x=0 noktası olarak alındı from math import sqrt #verilen sayıları m.dereceden polinoma yaklaştırır def yaklastir(sayi_dizisi,m=2): n = len(sayi_dizisi) x_uzeri_toplamlari=[]# [0]->xtoplam [1]->x**2toplam [2]->x**3toplam... for i in range(2*m):#toplamları ekleneceğinden tüm elema...
# # Copyright 2015 <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, sof...
import bpy from mathutils import Vector, Matrix from math import radians from .properties import * from ..tools.blenderhelper import find_parent def can_draw_gizmos(context): aobj = context.active_object selected_archetype = get_selected_archetype(context) if aobj and selected_archetype: if not se...
# Run this app with `python app.py` and visit http://127.0.0.1:8050/ in your web browser. # This is the main file. It contains the dash setup and callbacks. from os import environ import dash import pandas as pd import plotly.graph_objects as go from dash import dash_table, dcc, html from dash.dependencies import In...
import torch import torch.nn as nn import torch.nn.functional as F def weights_init(m): if isinstance(m, nn.Conv2d) or isinstance(m, nn.Linear): nn.init.xavier_uniform(m.weight.data) nn.init.constant(m.bias, 0.1) class LossFn: def __init__(self, cls_factor=1, box_factor=1, landmark_factor=1...
import argparse import logging import ipdb import os import sys import torch import random import importlib import yaml from box import Box from pathlib import Path import resource rlimit = resource.getrlimit(resource.RLIMIT_NOFILE) resource.setrlimit(resource.RLIMIT_NOFILE, (2048, rlimit[1])) import src def main(ar...
"""Runs' on-db store.""" from collections import defaultdict from dataclasses import dataclass from datetime import datetime from functools import lru_cache from typing import Any, Dict, List, Optional, cast import sqlalchemy from pydantic import parse_obj_as from opentrons.util.helpers import utc_now from opentrons....
# nuScenes dev-kit. # Code written by <NAME>, 2020. import colorsys from typing import Any, Dict, List, Tuple, Callable import cv2 import numpy as np from pyquaternion import Quaternion from nuscenes.prediction import PredictHelper from nuscenes.prediction.helper import quaternion_yaw from nuscenes.prediction.input_r...
import unittest import sys import os import numpy as np import SciFiReaders as sr import sidpy import wget wget.download("https://github.com/pycroscopy/SciFiDatasets/raw/main/data/Bias-Spectroscopy041.dat", out = 'Bias-Spectroscopy.dat') wget.download("https://github.com/pycroscopy/SciFiDatasets/blob/main/data/COOx_...
import pandas as pd import numpy as np import category_encoders as ce import datetime from sklearn.model_selection import train_test_split from sklearn.linear_model import LinearRegression # Make NumPy printouts easier to read. np.set_printoptions(precision=3, suppress=True) def rearrange_date(df): """ Merges ...
import hashlib import shutil import sys import os import tarfile import zipfile from urllib.error import HTTPError, URLError from urllib.request import urlopen from shutil import copyfileobj if sys.version_info >= (3, 6): def _path_to_string(path): if isinstance(path, os.PathLike): return os.f...
"""Calculate morris indices for models with dependent parameters. We convert frequently between iid uniform, iid standard normal and multivariate normal variables. To not get confused, we use the following naming conventions: -u refers to to uniform variables -z refers to standard normal variables -x refers to multiv...
from contextlib import ContextDecorator from collections import defaultdict import copy import threading class OptPipelines: pipelines = defaultdict(None) @classmethod def register_pipeline(cls, name, func): assert name not in cls.pipelines, f"The pipeline {name} had already registered" c...
import sys, getopt, json, os, shutil, re from urllib import parse class JournalDirectory: id = '' name = '' parent = None path = '' class JournalEntry: id = '' name = '' content = '' directory = '' path = '' # Core def run_export(pathToWorldDirectory, shouldBeS...
import unittest import numpy as np from cdbw import CDbw epsilon = 1e-16 # 1 - 3D DATA TEST 1 data_3d_1 = np.load("xyz.npy") labels_3d_1 = np.load("labels.npy") # 2 - 3D DATA TEST 2 data_3d_2 = np.load("xyz1.npy") labels_3d_2 = np.load("labels1.npy") # 3 - 2D BLOBS DATA TEST data_2d_bl = np.load("xyzbl.npy") labels...
# -*- coding: utf-8 -*- from PyQt4 import QtTest from acq4.devices.OptomechDevice import OptomechDevice from .FilterWheelTaskTemplate import Ui_Form from acq4.devices.Microscope import Microscope from acq4.util.SequenceRunner import SequenceRunner from acq4.devices.Device import * from acq4.devices.Device import TaskGu...
from functools import lru_cache import json import logging import math import re from typing import Generator, List, Tuple, Union import boto3 import humanfriendly from .qc_resources import handle_qc_check from .util import CoreStack, Step, Resource, State, make_logical_name, do_param_substitution,\ time_string_t...
class BST_TreeNode: def __init__(self,val): self.data = val self.left = None self.right = None class BinarySearchTree: def __init__(self): self.root = None def isNode(self,val): tempNode = self.root while(tempNode!=None): ...
from django.db import models from django.core.exceptions import ValidationError class TabSettings(models.Model): key = models.CharField(max_length=20) value = models.IntegerField() def __unicode__(self): return "%s => %s" % (self.key,self.value) @classmethod def get(cls, key, default=None)...
import six from libtaxii.constants import ( CT_DATA_FEED, CT_DATA_SET, SS_ACTIVE, SS_PAUSED, SS_UNSUBSCRIBED, RT_FULL, RT_COUNT_ONLY ) from .utils import is_content_supported class Entity(object): '''Abstract TAXII entity class. ''' def __repr__(self): pairs = ["%s=%s" % (k, v) for k...
import os import h5py import pandas as pd import copy from RAMAC import extract_feature import torchvision import torchvision.transforms as transforms import torch.utils.data as data import numpy as np from PIL import Image, ImageChops import torch from diffusion import Diffusion from resnet import resnet101 from cirto...
from __future__ import absolute_import, division, print_function, unicode_literals __metaclass__ = type import random import os import math import h5py import cv2 import numpy as np import sqlite3 from .util import static_vars from .task import DEBUG from .google_storage import downloadIfAvailable POSITIVE_IMAGE_DA...
# Author: <NAME> import h5py import json import librosa import numpy as np import os import scipy import time import sys import re from collections import Counter from pathlib import Path from PIL import Image from torchvision.transforms import transforms from dataloaders.utils import WINDOWS, compute_spectrogram "...
import warnings import numpy as np from scipy.spatial.distance import cosine as cos_distance from .utils import compute_fragments, average_agg_tanimoto, \ compute_scaffolds, fingerprints, \ get_mol, canonic_smiles, mol_passes_filters, \ logP, QED, SA, NP, weight from moses.utils import mapper from multiproc...
#!/usr/bin/python # -*- coding: utf8 -*- ''' Inputs: * pbf file * bbox * output folder Generate * Some gpkg files for basemap: landuse,water,highways, etc... * gpkg with land and oceans polygons (clipped by bbox too) ''' import os import argparse import logging ''' Usage python3 /home/trolleway/tmp/OSMTram/core/pro...
#=============================================================================== # Copyright (c) 2016, <NAME>, <NAME> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of sourc...
# Keep-Sabbath Copyright (c) 2019-2020 <NAME>, Correct Syntax. # 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 condit...
import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm import matplotlib.colors as colors from scipy.stats import binom from scipy import linalg from scipy.sparse.linalg import expm_multiply from scipy.sparse import csc_matrix from scipy.special import comb import math import time def get_2sat_...
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import json import logging import os import sys LEVEL = logging.INFO class Build: BUILD = 'build' DESCRIPTION = 'description' build = [ Build.DESCRIPTION, Build.BUILD ] def write(name, data): """ JSON FORMAT: { "init...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
import pytest from diofant import (I, O, Rational, Symbol, atanh, conjugate, elliptic_e, elliptic_f, elliptic_k, elliptic_pi, gamma, hyper, meijerg, oo, pi, sin, sqrt, tan, zoo) from diofant.abc import m, n, z from diofant.core.function import ArgumentIndexError from diofant.u...
""" Utilities for running tests for db, logging, etc. """ import datetime import json import os from anchore_engine.services.policy_engine.engine.feeds import ( IFeedSource, FeedGroupList, FeedList, GroupData, ) from anchore_engine.db.entities.policy_engine import FeedMetadata from anchore_engine.subs...
''' fuck rna fuck deep learning ''' # -*- coding: utf-8 -*- import numpy as np from keras.models import Model from keras.layers import Input, Dropout, Embedding, LSTM from keras.layers import Activation, dot, TimeDistributed from keras.layers import concatenate, Dense, Bidirectional from keras.models import model_fr...
"""Module with scared experiment for hyperparameter search.""" import os import math from tempfile import NamedTemporaryFile from collections import defaultdict from copy import deepcopy import numpy as np import matplotlib.pyplot as plt import pandas as pd from sacred import Experiment from sacred.observers import ...
# -*- coding: utf-8 -*- """ Author ------ <NAME> Email ----- <EMAIL> Created on ---------- - Tue Mar 8 15:26:00 2016 read_spectrum Modifications ------------- - Fri Jul 15 16:08:00 2016 migrate read_spectrum from lamost.py Aims ---- - read various kinds of spectra """ import os from collections import Ord...
"""Utilities for submitting to Argoverse tracking and forecasting competitions""" import json import math import os import shutil import tempfile import uuid import zipfile from typing import Dict, List, Optional, Tuple, Union import h5py import numpy as np import quaternion from scipy.spatial import ConvexHull from ...
import os import sys from . import arguments, commands from . import git_utils from . import docums_utils from .app_version import version as app_version description = """ dvci is a utility to make it easy to deploy multiple versions of your Docums-powered docs to a Git branch, suitable for deploying to Github via gh...
from abc import ABCMeta import numpy as np import torch import torch.nn as nn from torch.nn.modules.batchnorm import _BatchNorm from mmcv.cnn import normal_init, constant_init from core.gdrn_selfocc_modeling.tools.layers.layer_utils import resize from core.gdrn_selfocc_modeling.tools.layers.conv_module import ConvModu...