text
stringlengths
3.07k
22.1k
from src.acceptance.base import get_relative_distances import src.datasets.msra.dataset as msra_dataset import matplotlib.pyplot as plt from sklearn.metrics import precision_recall_curve from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score import numpy as np import sklearn imp...
import numpy as np import theano.tensor as tt from scipy.special import logsumexp vsearchsorted = np.vectorize(np.searchsorted, otypes=[np.int], signature="(n),()->()") def compute_steady_state(P): """Compute the steady state of a transition probability matrix. Parameters ---------- P: TensorVari...
#!/usr/bin/python3 ''' Everything about analysis 1. collaboration 2. projection 3. club citations 4. journal citaions ''' import rawDataParser as rdp from graphviz import Digraph from igraph import Graph import random class Analysis: def __init__(self, club, db: str): ''' i...
import numpy as np import scipy.io as sio import os from pathlib import Path import tensorflow as tf import tensorflow_addons as tfa from functools import partial from inspect import getfullargspec import math import random def get_angles(tensor): if len(tensor.shape) > 3: angles = tf.random.uniform( ...
import os import pathlib import sys import datetime import re import time import getpass import difflib import readline from .git import Git class Topic(object): _base = '' _subject = None _isNew = False _ext = '' _path = None _conf = None _full_content = '' _file_len = 0 _file_...
from torchtree import Tree import torch from flerken.utils import BaseDict import numpy as np from torchtree import Tree import torch import numpy as np from flerken.utils import BaseDict import sys sys.path.append('/home/jfm/GitHub/OpenposeWrapper/openpose_wrapper') from skeleton import Skeleton def get_disordered_...
# # Copyright 2018-2021 Elyra 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 in writ...
"""Tests darglint's implementation of CYK.""" from collections import ( deque, ) from unittest import ( TestCase, ) import random from darglint.parse.cyk import parse from darglint.parse.grammar import ( BaseGrammar, ) from darglint.parse.grammar import Production as P from darglint.token import ( Tok...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import json from pyquery import PyQuery from StringIO import StringIO from django.urls import reverse as urlreverse import debug # pyflakes:ignore from ietf.community.models import CommunityList from ietf.group...
# -*- coding:utf-8 -*- # @author <NAME> ( <EMAIL> ) # @date 2017-06-07 import os,sys import mmap def _strips(direction, text, remove): if isinstance(remove, iters): for subr in remove: text = _strips(direction, text, subr) return text if direction == 'l': if text.startswith(remove): r...
# # -*- coding: utf-8 -*- # # Copyright (c) 2022 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...
from django.contrib.admin.views.decorators import staff_member_required from django.core.paginator import Paginator from django.shortcuts import render from .common import * from .constants import * from .models import * def advanced_search(request): """ Returns page containing multiple filters to use when search...
# <NAME> # Tue, Apr 11, 2017 # CS2021 - Lab08 # A "simple" adventure game. class Player(object): def __init__(self, name, place): """Create a player object.""" self.name = name self.place = place self.backpack = [] def look(self): self.place.look() def go_to(self, ...
import datetime from xml.etree import ElementTree try: from urllib.parse import urlparse, parse_qs except ImportError: # Python 2 from urlparse import urlparse, parse_qs import html5lib import requests from .models import ( Category, SearchSortKey, SearchOrderKey, SearchResultPage, TorrentPage, To...
# Copyright (C) 2013, Red Hat, Inc. # All rights reserved. # # 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, modif...
from builtins import range from builtins import object import numpy as np import linecache import math import os import gzip import numbers import multiprocessing import json as json import numpy as np from lsst.sims.catalogs.decorators import register_method, compound from lsst.sims.catUtils.mixins import Variability ...
"""Global bot configuration. General ------- CONFIG_FILE: str The name of the configuration file where we will save this config. BOT_COMMAND_PREFIX: str The character string indicating that what follows is a bot command. BOT_VERSION: str The current bot version. DEBUG_LEVEL: config.DebugLevel Determine...
""" Liquid.py - Python+Pygame port V1 <NAME> MIT License ( http://www.opensource.org/licenses/mit-license.php ) /** * self version: * Copyright <NAME> (radarsat1) ( http://www.music.mcgill.ca/~sinclair ) * MIT License ( http://www.opensource.org/licenses/mit-license.php ) * Downloaded from: http://www.music.mcgill...
import argparse import pickle import torch.nn as nn from sklearn.model_selection import train_test_split from tqdm import * import copy import pandas as pd from arff2pandas import a2p import time from Model import RNN, AutoEncoder import EvalModel import torch from torch.utils.data import Dataset, DataLoader import num...
import sys import os import glob import numpy as np import pandas as pd import keras.backend as kb from tqdm import tqdm from imgaug import augmenters as iaa from keras.models import load_model from keras.callbacks import ModelCheckpoint, TensorBoard, ReduceLROnPlateau, EarlyStopping, CSVLogger from keras.callbacks imp...
# coding: utf-8 import sys from python_environment_check import check_packages import torch import torch.nn as nn from torch.utils.data import DataLoader from torchvision.datasets import MNIST from torchvision import transforms from ignite.engine import Events, create_supervised_trainer, create_supervised_evaluat...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri May 24 16:20:44 2019 @author: cassani """ from __future__ import unicode_literals, print_function, division from io import open import unicodedata import string import torch import torch.nn as nn import random import time import numpy as np all_...
import argparse import logging import os import sys from collections import defaultdict from overrides import overrides from subprocess import Popen, PIPE from typing import List, Optional, Tuple from sacrerouge.commands import MetricSetupSubcommand from sacrerouge.common import DATA_ROOT, TemporaryDirectory from sacr...
import pytest from datetime import date, datetime, timedelta from spans import daterange def test_datetime_type_check(): with pytest.raises(TypeError): daterange(datetime(2000, 1, 1)) with pytest.raises(TypeError): daterange(upper=datetime(2000, 1, 1)) def test_offset(): range_low = da...
"""Script for migrating user-specific sqlite databases to a unified postgres database.""" import asyncio import asyncpg import aiofile import aiobotocore import aiosqlite import json import uuid from datetime import date from os import path from typing import Dict, Union WINE_DIR = "wine_images" def get_sqlite_conne...
from functools import reduce from pyspark.ml.feature import OneHotEncoderEstimator, StringIndexer, VectorAssembler from pyspark.sql.functions import col, countDistinct, format_number, lit, mean, stddev_pop, udf from pyspark.sql.types import DoubleType from pyspark.ml import Pipeline import math import numpy as np impo...
import dataclasses from datetime import datetime from logging import getLogger from typing import ( # type: ignore TYPE_CHECKING, Any, Dict, Optional, Set, Type, Union, _GenericAlias, get_type_hints, ) import orjson from .exceptions import DeserializationError from .fields import ...
import os from lxml import etree attribute_type = 0 attribute_value = 1 pc_pcf = '/config/web/pcf/line' apd_class = 'gw.web.rules.APDRulesHelper' pmp_class = 'gw.pmp.apd.web.rules.APDRulesHelper_PMP' file_ends = ['PanelSet.pcf', 'Popup.pcf', 'ListDetail.pcf', 'Screen.pcf'] no_process = ['MenuItemSet', 'WizardStepSet...
import pytest import itertools from qm import Sx, Sy, Sz, I, osum from qm import f_, fd, a_, ad, gl, gr from qm import commutator, anticommutator def delta(ga, ia, gb, ib): if ga == gb and ia == ib: return 1 return 0 def makeMajoranaParams(majorana_params_pre): majorana_params = [] for N, m...
import os import hashlib import logging import traceback from pathlib import Path from typing import List, Iterable, Tuple, Dict, Optional, Union, Type from datetime import datetime from functools import wraps import git import flask import itsdangerous from slack_sdk import WebClient from slack_sdk.errors import Slac...
from manim import * import networkx as nx import json import ast class Geometry: def __init__(self): pass def get_intersection(self, line1, line2): xdiff = np.array([line1[0][0, 0] - line1[1][0, 0], line2[0][0, 0] - line2[1][0, 0]]).reshape((2, 1)) ydiff = np.array([line1[0][1, 0] - l...
#!/usr/bin/python3 from distutils.dir_util import copy_tree import os import shutil import subprocess import sys import time THIS_DIR = os.path.dirname(os.path.realpath(__file__)) DPDK_RTE_SDK = THIS_DIR + '/../baselines/dpdk/dpdk' VIGOR_RTE_SDK = THIS_DIR + '/../baselines/vigor/dpdk' VIGOR_RTE_SDK_VERIFIED = THIS_DI...
#! /usr/bin/env python3.4 import time, random, ctypes, win32gui, win32con, win32api from PIL import Image, ImageGrab x_positions = [186, 237, 289, 341, 392, 444, 496, 547, 599, 651, 703, 754, 806, 858, 909, 962, 1014, 1065, 1117, 1169, 1220, 1272, 1324, 1376, 1427, 1479, 1531, 1582, 1634, 1686] y_positi...
import os import logging import random from quantities import us, ms import numpy as np import matplotlib.pyplot as plt import torch from torch.utils import data as torch_data from tqdm import tqdm import neptune from ebdataset.vision import INIRoshambo from ebdataset.vision.transforms import Compose, MaxTime, Scal...
import sys,time,datetime,threading,collections,warnings,queue,SIM_MOD_STREAMER from timeit import default_timer as timer class SIM922(SIM_MOD_STREAMER.SIM_MOD_STREAMER): MODNUM = 6 streaming_channel = -1 _ismultistreamer = True lastvalues = {} lastdatatimes = {} excq = queue.Queue(1000) ...
#-*- coding:Utf-8 -*- from __future__ import print_function """ .. curentmodule:: pylayers.util.project .. autosummary:: """ import numpy as np import os import sys import shutil import pkgutil import pdb import seaborn as sns import logging class PyLayers(object): """ Generic PyLayers Meta Class """ # ...
# coding: utf-8 def load_pickle(fname): with open(fname, 'rb') as f: return pickle.load(f) ## time def aexp2zred(aexp): return [1.0/a - 1.0 for a in aexp] def zred2aexp(zred): return [1.0/(1.0 + z) for z in zred] def lbt2aexp(lts): import astropy.units as u from astropy.cosmology import W...
import argparse import gc import json import logging import pprint import sys from pathlib import Path import feather import numpy as np import lightgbm as lgb import pandas as pd from scipy import sparse as sp from tqdm import tqdm import config as cfg from predictors import GBMFeatures, GBMPredictor from utils impo...
# coding=utf-8 """ Functions used to parse individual fields in the feed. """ from typing import Union, Tuple import datetime import numpy as np from pyiqfeed.exceptions import UnexpectedField def blob_to_str(val) -> str: """Convert a blob to a string or a blank.""" if val is None: return "" el...
import math import os import zipfile import h5py import numpy as np from torch.utils.data import Dataset class WIW(Dataset): def __init__(self, root, feats=None, partials=None, split="train", download=True): """ :param root: Root directory of dataset :param feats: Which features to use f...
import numpy as np import matplotlib.pyplot as plt from crazyflie_dynamics import CrazyflieDynamics from data_plotter import DataPlotter import crazyflie_param as P # self.state = np.array([ # [P.x0], # 0 # [P.y0], # 1 # [P.z0], # 2 # [P.psi0], # 3 # [P.theta0], # 4 # [P.phi0], ...
from django.shortcuts import render from .form import Schedule_Meeting from .models import Meeting from account.models import Account, CounsellorDetail import datetime from django.contrib import messages from django.contrib.auth.decorators import login_required # for calendar API # from __future__ import print_function...
import os import requests import sys import subprocess import re import face_recognition import json done_checks = [] social_media = [] usernames = [] emails = [] twitter = [] instagram = [] steam = [] urls = [] urls_stalk = [] urls_done = [] name = "" adresse = "" compare = False first_dl = False def stalk(user): ...
""" MIT License Copyright (c) 2019 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distri...
# -*- coding: utf-8 -*- # # Poio Tools for Linguists # # Copyright (C) 2009-2013 Poio Project # Author: <NAME> <<EMAIL>> # URL: <http://media.cidles.eu/poio/> # For license information, see LICENSE.TXT """This module contains the classes to access annotated data in various formats. The parsing is done by Builder class...
import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import tensorflow as tf from tensorflow.contrib import slim import argparse import cv2 import numpy as np from glob import glob import copy num_classes = 10 img_height, img_width = 32, 32 channel = 3 tf.set_random_seed(0) def Res50(x, keep_prob): def ResBlock...
from rest_framework import request, serializers from rest_framework.viewsets import ModelViewSet from .models import * from decimal import Decimal from accounts.models import Instructor from images.models import MyImage from images.serializers import CommentImageSerializer from djoser.serializers import UserSerializer ...
import argparse import os import os.path as osp import json import shutil import sys import random from time import time import numpy as np import matplotlib.pyplot as plt from sklearn.cluster import AgglomerativeClustering, SpectralClustering from sklearn_extra.cluster import KMedoids from utils import time_to_strin...
# pylint: disable=no-member import copy import datetime import re import dateutil.parser import wx from ninjalooter import config from ninjalooter import extra_data from ninjalooter import logging from ninjalooter import models from ninjalooter import utils # This is the app logger, not related to EQ logs LOG = log...
from concurrent.futures import ThreadPoolExecutor from functools import partial from itertools import islice import json import logging import os from sqlalchemy.orm.exc import NoResultFound from unidecode import unidecode from doab import const from doab.client import DOABOAIClient from doab.db import models, sessio...
# this defines all the tricks """ PROCEDURE FOR ADDING A NEW TRICK: Define the class here Add to list of animations Add bad animation to list of animations Add to tricker.trickMap Add to skills dict in tricker.saveDict Initialize with other tricks in tricker.updateAttributes() Add event handler (self.accept) to play.py...
# Duplicate import from bot.py import os import sys import time import shlex import shutil import random import inspect import logging import asyncio import pathlib import traceback import math import re import aiohttp import discord import colorlog from io import BytesIO, StringIO from functools import wraps from te...
""" Graph Terminology ----------------- * DAG: Directed Acyclic Graph * PDAG: Partially Directed Acyclic Graph * Directed edge: x --> y * Undirected edge: x --- y is represented as the pair x --> y and y --> x * Parents(x): nodes y such that there is a directed edge y --> x * Neighbors(x): nodes y such that there...
from torch.utils.data import Dataset, DataLoader from torch import Tensor import torch import numpy as np from pathlib import Path from typing import Literal, Tuple, Union, Optional from tqdm import tqdm import pykitti2 from utils import read_depth # statistics M_VELOD = 14.0833 S_VELOD = 8.7353 M_CAM2D = 17.2444 S_C...
#!/usr/bin/env python3 import cv2 import os import argparse from tqdm import trange, tqdm import numpy as np import pandas as pd import matplotlib.pyplot as plt def constraint_temporal(result_folder, output_folder, stride=1): result_list = os.listdir(result_folder) if len(result_list) == 0: exit(-1) ...
#!/usr/bin/python import csv import json from optparse import OptionParser import os import subprocess import time ''' this script gathers JVM metrics from jolokia and add to daily csv file ''' def getIndexForColName(col_name): col_name = col_name.lower() if "nonheapmemoryusage" in col_name: return 9...
""" Tool for converting simple 'C' struct and #define lists into Python classes. The subset of C that is understand is limited to: #define <group>_<name> <value> struct X { <type> <name>; <type> <name>[dimension]; }; Blank lines and single-line comments are ignored. defines are expe...
from model_postprocessing import check_model_monotonicity, split_nonmonotonic_clusters import joblib import numpy as np import pandas as pd from scipy.stats import linregress from scipy.optimize import curve_fit # import statsmodels.formula.api as smf ################################################################...
import itertools import logging from collections import defaultdict from z3 import z3 from teether.cfg import opcodes from teether.constraints import check_model_and_resolve, model_to_calls from teether.evm.exceptions import IntractablePath from teether.evm.results import CombinedSymbolicResult from teether.util.z3_e...
__all__ = [ 'AccessibleIfUserMatches', 'AccessibleIfGroupUserIsAdminAndUserMatches', 'Group', 'GroupAdmissionRequest', ] import sqlalchemy as sa from sqlalchemy.orm import relationship from baselayer.app.models import ( Base, DBSession, join_model, User, UserAccessControl, Acce...
import re import torch from torch import nn, einsum import torch.nn.functional as F import torch.utils.checkpoint as cp from collections import OrderedDict from torch import Tensor from torch.jit.annotations import List import numpy as np from einops import rearrange, repeat from einops.layers.torch import Rearrange c...
import ast import contextlib import contextvars import functools import pathlib import sys import textwrap import traceback from io import StringIO import discord from discord.ext import commands bot = commands.Bot('py ', description='Created by A\u200bva#4982', help_command=commands.MinimalHelpCommand()) truncate =...
# Copyright (c) 2021, Djaodjin Inc. # All rights reserved. # # 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 t...
# Copyright 2017 The Nuclio 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 in wr...
import ptypes from ptypes import * pbinary.setbyteorder(ptypes.config.byteorder.littleendian) ### C99 types class void(ptype.undefined): pass class char(pint.int8_t): pass class signed_char(pint.sint8_t): pass class unsigned_char(pint.uint8_t): pass class short(pint.int16_t): pass class signed_short(pint.sint16_t): pa...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 1999-2018 Alibaba Group Holding 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-...
#!/usr/bin/env python3 # Convert a BMP source file to Python source. # Copyright <NAME> and <NAME> 2016 # Released under the MIT licence # Files created by any graphic tool exporting bmp files, e.g. gimp # the colour depth may be 1, 4, 8, 16, or 24 pixels, lower sizes preferred # Usage: # ./bmp_to_icon checkbox_on.b...
"""Multivariate Aggregator module.""" __version__ = '2.0.0' from typing import Dict, List from fastapi import FastAPI, HTTPException from pydantic import BaseModel from .core.algorithms import lstm_model from adtk.transformer import PcaReconstructionError from adtk.data import validate_series from sklearn.preproces...
import base64 import json import logging import os import subprocess import tempfile from collections import OrderedDict from typing import Sequence import click import fiona import geopandas as gpd import processing import production # noqa import requests import utils from appdirs import user_cache_dir from shapely...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # 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 Apach...
"""Utils for annotation loading and processing.""" import glob import os import json from typing import List, Sequence, Tuple from pyquaternion import Quaternion import numpy as np import constants def extract_info_from_annotation_filename(filename): """Extract info from annotations filename. Args: ...
import scipy as sp import scipy.misc, scipy.ndimage.interpolation import numpy as np import os import tensorflow as tf from keras.models import Model from keras.layers import Input,merge, concatenate, Conv2D, MaxPooling2D, Activation, UpSampling2D,Dropout,Conv2DTranspose from keras.layers.normalization import BatchNorm...
import tensorflow as tf ################################################################################## # Pooling & Resize ################################################################################## def crop_resize(x, size=[7, 9, 50, 46]): x = tf.image.crop_to_bounding_box(x, size[0], size[1], size[2],...
"""The RoadSection is parent to all other RoadSection classes.""" import functools import itertools import math from dataclasses import dataclass, field from typing import List, Tuple from simulation.utils.geometry import Line, Point, Polygon, Pose, Transform, Vector from simulation.utils.road.config import Config fro...
""" MIT License Copyright (c) 2020 <NAME> - dominik.kopczynski {at} isas.de <NAME> - nils.hoffmann {at} isas.de 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 re...
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # # Copyright 2018, 8minutenergy / Kisensum. # # 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.apa...
"""Tracing function and controls""" import re import linecache import inspect from copy import copy from types import FrameType, FunctionType, ModuleType from typing import Any, List, Tuple, Callable from ..utils import make_secret, pickle_and_hash _COLLECTOR_RET = None TRACING_VARNAME = "__PYBRYT_TRACING__" TRACI...
import copy import configparser import logging import matplotlib.pyplot as plt import pickle import pymc3 as pm from .models.beta_bern_model import add_beta_bern_model from .models.beta_binomial_model import add_beta_binomial_model from .models.count_model import add_count_model from .models.metric_model import add_ex...
import datetime import os import random import re import shlex import shutil import socket import string import subprocess import time from typing import List, Tuple from munch import Munch import kbr.log_utils as logger def check_host_port(host, port, duration=10, delay=2, ip:str=None): """Repeatedly try if a p...
# # Copyright (c) 2019 UCT Prague. # # cli.py is part of Invenio Explicit ACLs # (see https://github.com/oarepo/invenio-explicit-acls). # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software wi...
from app.type import * from app.nodes import * vars = {} funs = {} call_stack = [] block_stack = [] types = { CEO_BROJ: "~ceo_broj", STRUNA: "~struna", JESTE_NIJE: "~jeste_nije" } class Var: def __init__(self, tip, naziv): self.tip = tip self.naziv = naziv self...
import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import torch_utils from repr.network import * from utils import * def kl_divergence(mu, logvar): kld = -0.5 * (1 + logvar - mu ** 2 - logvar.exp()).sum(1).mean() return kld class RepresentationNetwork: def __...
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:<EMAIL> # # This file is part of astroid. # # astroid is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Softw...
#!/usr/bin/env python3 import json from math import atan2, ceil, pi, sin, cos import PIL.Image as Image import PIL.ImageDraw as ImageDraw import random import secrets import sys import time VERBOSE = False DEFAULT_FILE = 'germany-bw.png' NUM_LINES = 20 NUM_GENERATIONS = 80 INITIAL_SIZE_PERCENT = 80 MUTATE_POPULATIO...
''' Tools to compute STRF Copyright (c) <NAME>, <NAME> All rights reserved Implementation using a light implementation of the Matlab NLS toolbox by TODO ''' import numpy as np import math from scipy import signal from ext import utils def spectrum2scaletime(stft, num_channels, num_ch_oct, sr_time, nfft_rate, ...
#Importando paquetes necesarios import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State import plotly.graph_objs as go import pandas as pd import colores import plotly.figure_factory as ff lista =['Antigua y Barbuda','Argentina','B...
""" Copyright (C) 2016 Accessibility Research Group (Tenkanen). Developer: <NAME>, University of Helsinki, Finland. This script parses Helsinki Region Travel CO2 Matrix 2015 and pushes it to PostGIS Table. A specific Java application called RouteCarbonCalculator (programmed by <NAME>, modified by <NAME>),...
# File: tensor.py # Creation: Wednesday August 19th 2020 # Author: <NAME> # Contact: <EMAIL> # <EMAIL> # -------- # Copyright (c) 2020 <NAME> """ Defines tensors for deep learning application. A tensor is a multi-dimensional array, similar to ``numpy`` arrays. """ # Basic imports import numpy as np try: ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Tools for reading and writing images # # <NAME> # <EMAIL> # # License: MIT # def _tif_reader(tif_path, roi=None): from skimage.io import imread if roi is not None: raise NotImplementedError return imread(tif_path) def _tif_writer(tif_path, im...
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # The Universal Permissive License (UPL), Version 1.0 # # Subject to the condition set forth below, permission is hereby granted to any # person obtaining a copy of this software, a...
#!/usr/bin/env python # Copyright 2016 <NAME> # Apache 2.0. from __future__ import print_function from __future__ import division import argparse import sys import warnings # Collect pronounciation stats from a ctm_prons.txt file of the form output # by subtools/kaldi/steps/cleanup/debug_lexicon.sh. This input fil...
"""Support for generation for models based on pyecore.""" import itertools import os import re import multigen.formatter import multigen.jinja from pyecore import ecore from pyecore.resources import Resource from pyecoregen.adapter import pythonic_names, fix_name_clash class EcoreTask(multigen.jinja.JinjaTask): ...
import copy from collections.abc import Callable, Mapping, MutableSequence from fild.process.common import is_callable_with_strict_args def merge_with_updates(initial_dict, updates, extend_only=False, merge_lists=False): """ Creates copy of initial_dict with updates applied **Par...
import sys import time from matplotlib import cm from tqdm import tqdm from skimage.filters import threshold_otsu from keras.models import load_model import numpy as np import pandas as pd import matplotlib.pyplot as plt import os.path as osp import openslide from pathlib import Path from skimage.filters import thres...
#Modified by: <NAME> # # Esta API recibe un GET y devuelve la tabla entera anonimizada import mysql.connector import pandas as pd import matplotlib.pylab as pl import matplotlib.patches as patches from flask import Flask, request from flask_restful import Resource, Api from json import dumps from flask import jsonif...
import imageflow import numpy as np import pandas as pd import random from skimage import exposure, filters from scipy.misc import imresize import matplotlib.pyplot as plt DATA_PATH = '../Data/Clean_images/' DATA_FOLDERS = [ 'dashedlinesmissing', 'fulltrack1', 'fulltrack2', 'leftcurve', 'rightcurv...
#!/usr/bin/env python """Test server for the modbus integration. The test server allows to catch all requests and define responses. The intention of the test server is to allow simulation of device behaivours that often cause unexpected effects in the production code. The server makes it easier to reproduce issues (l...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools import collections import os, sys import time import numpy as np import tensorflow as tf from tfutils import base, data, optimizer import json import copy from tensorflow.python.ops import ...
#!/usr/bin/python3 __author__ = "<NAME>" __copyright__ = "Copyright 2016, Interface Innovations" __credits__ = ["<NAME>"] __license__ = "Apache 2.0" __version__ = "1.0" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __status__ = "Development" import inspect import os import sys try: import simplejson as json exc...
from typing import Dict, Optional, TYPE_CHECKING, cast from constants import INVADER_USERNAME, rmem_key_stored_hostiles, role_defender, role_miner, role_recycling, \ target_rampart_defense from creeps.base import RoleBase from creeps.behaviors.military import MilitaryBase from jstools.screeps import * from utiliti...