text
stringlengths
6.04k
39.5k
import pandas as pd import numpy as np import statsmodels.formula.api as smf #**************************************************************************************** #********************** DATA PROCESSING BASED ON dofile_fertility *********************** #************************************************************...
#!/usr/bin/env python # # Copyright 2018, CRS4 - Center for Advanced Studies, Research and Development # in Sardinia # # 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.ap...
import gc import json import math import os import random import time from pathlib import Path import numpy as np import pandas as pd import torch import torch.nn as nn import torch.optim as optim from torch.optim import Adam from torch.utils.data import (DataLoader, Dataset, RandomSampler, SequentialSampler) from tra...
"""add_award_procurement Revision ID: 73db7d2cc754 Revises: 31876f<PASSWORD> Create Date: 2016-09-01 15:08:33.267152 """ # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = '31876f<PASSWORD>' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade(...
# coding: utf-8 import os import re import time import click import fmf import requests import tmt from tmt.utils import WORKDIR_ROOT, ProvisionError, retry_session def import_testcloud(): """ Import testcloud module only when needed Until we have a separate package for each plugin. """ global...
import re from functools import partial from itertools import chain from .. import install_name_tool, patchelf from ... import options as opts, safe_str, shell from .flags import optimize_flags from ..common import BuildCommand, library_macro from ...builtins.copy_file import CopyFile from ...file_types import * from ...
""" Click command to do static annotation searching via Stevedore plugins. """ import datetime import errno import os import re from abc import ABCMeta, abstractmethod import yaml from stevedore import named from code_annotations import annotation_errors from code_annotations.exceptions import ConfigurationException ...
import sys from lxml import etree from datetime import datetime # from pprint import pprint import logging import requests from util import reg_person, reg_financial_data from util import reg_representative, reg_organisation from util import reg_action_field from util import reg_interest, reg_country_of_member from u...
import theano import theano.tensor as T from scipy.optimize import minimize from scipy.ndimage.filters import gaussian_filter as gf from numpy import fft import numpy as np def setup_graph(): """Setup the theano graph for all possible operations.""" n_x = T.lscalar('n_x') n_y = T.lscalar('n_y') pos_x...
import tkinter as tk from tkinter import filedialog from tkinter import messagebox import pandas as pd import matplotlib matplotlib.use("TkAgg") from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg from matplotlib.figure import Figure from tkinter import ttk import csv import pandas as pd import r...
import asyncio import copy import os import serial import numpy as np import pandas as pd import bokeh.models from . import comms from . import parsers # Color palette is from colorcet _colors = [ "#1f77b3", "#ff7e0e", "#2ba02b", "#d62628", "#9367bc", "#8c564b", "#e277c1", "#7e7e7e",...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
import re import itertools import collections import attr from csvw.dsv import UnicodeWriter from csvw.dsv import reader as base_reader from clldutils.misc import lazyproperty from clldutils.apilib import API from clldutils.attrlib import valid_range from clldutils import jsonlib from nexus import NexusReader from new...
import unittest import settings from templating import get_template_contexts from .mocks import K8sClientMock from .mocks import ServiceMetadata from .mocks import ServicePort from .mocks import ServiceSpec from .resource import Adapter from .resource import Provisioner from .resource import ProvisioningError class ...
''' This version of the terrain generator library interpreter is set up to produce terrain maps using Perlin noise. Important settings and inits specific to the Perlin generator can be found in the code by searching for cfref:perlin-gen Additional display options may be viewed by swapping WHICH_COLOR_SCHEME constant...
import os from pysia.procparams import ProcParams from pysia.algos import iterative_levenshtein, align_text from robust_ner.embeddings import clear_embeddings def generate_paired_sentences_from_text_files(corpus_name, log, start_from_file="", start_from_line=0, chunk_size=1000, save_img=False): """ Generate...
import pygame import random import numpy as np SCREEN_WIDTH = 800 SCREEN_HEIGHT = 900 GRID_SIZE = 20 # fontcolor, bgcolor white = '#ffffff' BgColor = '#cccccc' colors = { 1: ['#b3adad', '#b3adad'], 2: ['#776e64', '#eee4da'], 4: ['#776e64', '#ede0c8'], 8: ['#f9f6f2', '#f2b179'], 16: ['#f9f6f2', '#f59563'...
# -*- coding: utf-8 -*- """This is a part of neuralflow package/EnergyModel class. This source file contains functions for synthetic data generation.""" import numpy as np import math from tqdm import tqdm from .energy_model_settings import MINIMUM_PEQ def generate_data(self, deltaT=0.00001, time_epoch=[(0, 1)], las...
import os import xml.etree.ElementTree as ET import numpy as np import copy import cv2 from imgaug import augmenters as iaa from boundbox import BoundBox def _interval_overlap(interval_a, interval_b): x1, x2 = interval_a x3, x4 = interval_b if x3 < x1: if x4 < x1: return 0 else: return min(x2,x4) - x1 e...
import yaml import numpy as np from xml.etree.ElementTree import ElementTree, Element, SubElement from .transform import Transform from .utils import lift_material, visual, collision, box_link, joint class LiftDoor: def __init__(self, yaml_node, name, lift_size, gap, plugin=True): self.name = name ...
# Tests for Blt widgets. import os import Tkinter import Test import Pmw Test.initialise() testData = () # Blt vector type def _setVectorItem(index, value): w = Test.currentWidget() w[index] = value def _getVectorItem(index): w = Test.currentWidget() return w[index] def _getVectorSlice(index1, ind...
# Copyright 2015-2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
#! /usr/bin/env python3 # Copyright (c) 2021, NVIDIA CORPORATION. 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 # # ...
"""Add contracts to the documentation.""" import ast import inspect from typing import List, Callable, Any, Optional, Tuple import asttokens import icontract import icontract._checkers import icontract._represent import sphinx_icontract_meta __title__ = sphinx_icontract_meta.__title__ __description__ = sphinx_icontr...
import keras from keras.models import Model from keras.layers import Dense from keras.layers import LSTM from keras.layers import Embedding from keras.layers import Flatten from keras.layers import Dropout from keras.layers import SpatialDropout1D from keras.layers import Input from keras.layers import GlobalMaxPooling...
""" spark-submit task2.py <filter threshold> <support> <input_file_path> <output_file_path> spark-submit task2.py 70 50 "file:///Users/markduan/duan/USC_course/USC_APDS/INF553/homework/hw2/dataset/task2_data.csv" "task2_output.txt" """ import sys import time from pyspark import SparkConf, SparkContext # import os # ...
#!/usr/bin/env python """This routine parses plain-text parameter files that list runtime parameters for use in our codes. The general format of a parameter is: max_step integer 1 small_dt real 1.d-10 xlo_boundary_type c...
"""Experiment running. Can only be imported from the experiment folder. """ from genericpath import exists import os # import run # import nna import torch import torch.nn as nn from torchvision import transforms import numpy as np from pathlib import Path from collections import Counter import wandb from ignite...
import unittest import chainer import chainer.functions as F import chainer.links as L from chainer import testing import numpy as np import pytest from onnx_chainer import export from onnx_chainer.export import RetainInputHook from onnx_chainer.testing import input_generator from onnx_chainer_tests.helper import ONN...
from __future__ import print_function, division import os import sys from os.path import join import numpy as np import periodictable import six from x4i3 import exfor_manager, exfor_entry try: import cPickle as pickle except: import pickle data_dir = os.path.abspath('data') # modified from above elem_names...
# Copyright 2017-2020 TensorHub, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
#imports--------------------------------------------------------------------------------------------------------- from tkinter import * import csv import numpy as np import matplotlib.pyplot as plt #page one-------------------------------------------------------------------------------------------------------- de...
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" ##################################################################### # Set A # ##################################################################### # In this set of experiments we will try...
""" Common utility functions and classes adpated from https://github.com/matterport/Mask_RCNN/blob/master/mrcnn/utils.py Mask R-CNN The MIT License (MIT) Copyright (c) 2017 Matterport, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files...
# ##### 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 distr...
import numpy as np import imghdr from enum import Enum import tensorflow as tf import matplotlib.pyplot as plt import cv2 import csv from .dataset import createDataset from .model_interface import ModelInterface from .query_strategy.prototypical import Prototypical from active_tester.query_strategy.noisy_label_uncerta...
""" Helper functions for calculating 2D and 3D bounding box IoU. Collected by <NAME> Date: September 2017 """ from __future__ import print_function import tensorflow as tf import numpy as np from scipy.spatial import ConvexHull from hf.core import box_8c_encoder from hf.core import oriented_nms def polygon_clip(sub...
from ipaddress import IPV4LENGTH import psycopg2 import unittest import os import sys from datetime import datetime from requests import request sys.path.insert(0, '/app') sys.path.insert(0, '.') sys.path.insert(0, '..') from psycopg2.errors import UndefinedTable, InFailedSqlTransaction from stix2 import IPv4Address...
""" Copyright (C) University of Science and Technology of China. Licensed under the MIT License. """ import torch.utils.data as data from PIL import Image import torchvision.transforms as transforms import numpy as np import random import torch import cv2 import matplotlib.pyplot as plt import torch.nn.functional as F...
from itertools import compress from activatable_model.models import BaseActivatableModel, ActivatableManager, ActivatableQuerySet from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.contrib.postgres.fields import JSONField from django....
import warnings from copy import copy from enum import Enum import os import numpy as np import acconeer.exptool as et from acconeer.exptool.clients.links import LinkError from argparse import ArgumentParser import json json_data = '{"ip_a":"10.54.14.197","running_average_factor":0,"gain":0.2,"profile":"et.configs.E...
# Copyright 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This module handles factory test states (status) and shared persistent data. The `state` provides two different data set using shelve_utils.DictShelf...
import eventlet eventlet.monkey_patch(os=False) import json import os import uuid from threading import Lock import spotipy from flask import Flask, redirect, render_template, request, session from flask_session import Session from flask_socketio import SocketIO from numpy import dot from numpy.linalg import norm fro...
#!/usr/bin/env python """ Exercices on HMM, inference and learning References: [1] http://bozeman.genome.washington.edu/compbio/mbt599_2006/rabiner.pdf [2] http://bozeman.genome.washington.edu/compbio/mbt599_2006/hmm_scaling_revised.pdf [3] http://alumni.media.mit.edu/~rahimi/rabiner/rabiner-errata/ ...
""" Utility classes and methods for working with FVCOM output. The Unstructured Grid Finite Volume Community Ocean Model (FVCOM) is "a prognostic, unstructured-grid, finite-volume, free-surface, 3-D primitive equation coastal ocean circulation model developed by UMASSD-WHOI joint efforts. ...The horizontal grid is com...
import collections import copy from loguru import logger import math import numpy as np import random import tensorflow as tf import time import threading import zipfile import visualization def FIM(activations, activation_grads): """ Calculates the fishers information attribution between the input activatio...
from ReadCameraModel import ReadCameraModel from UndistortImage import UndistortImage import numpy as np import random from numpy.linalg import matrix_rank import math import cv2 import matplotlib.pyplot as plt import os import copy import pandas as pd frames = [] pathimage="/home/arjun/Desktop/VOM/Oxford_dataset/st...
#! /usr/bin/env python3 # Copyright(c) 2019, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of con...
from datetime import date from django.contrib.contenttypes.models import ContentType from django.test import TestCase from django.urls import reverse from rest_framework import status from dcim.models import Site from extras.constants import CF_TYPE_TEXT, CF_TYPE_INTEGER, CF_TYPE_BOOLEAN, CF_TYPE_DATE, CF_TYPE_SELECT...
"""Routing functions to simulate overland flow on GIS rasters defined by DEM raster datasets. Here are some conventions of this model: A single pixel defines its neighbors as follows: 3 2 1 4 p 0 5 6 7 The 'p' refers to 'pixel' since the flow model is pixel centric. One of the o...
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # Copyright (c) 2015, Battelle Memorial Institute # 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. Redistri...
import os import time import struct import math import bpy import bpy_extras.io_utils import mathutils import random import fnmatch import collections from array import * from collections import namedtuple from mathutils import Vector from random import randint #======================================================...
# MIT License # # Copyright (c) 2022 <NAME> [srccircumflex] # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modi...
import math import torch import neural_renderer as nr from .utils import * EPS = 1e-7 def get_rotation_matrix(rxyz): rx, ry, rz = rxyz.unbind(1) m_x, m_y, m_z = torch.zeros(3, len(rxyz), 3, 3).to(rxyz.device).unbind(0) m_x[:, 1, 1], m_x[:, 1, 2] = rx.cos(), -rx.sin() m_x[:, 2, 1], m_x[:, 2, 2] = rx...
import re import bson import mongoengine import pytest import yaml from distpickymodel import errors from distpickymodel import models from unittest.mock import Mock from tests import conftest as cfg_test from tests import utils @pytest.fixture(scope='module', autouse=True) def tear_up_down_db(): try: ut...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Sep 18 21:53:21 2018 @author: jsulloa """ import numpy as np from scipy.stats import randint, uniform import pandas as pd import matplotlib.pyplot as plt from sklearn.tree import DecisionTreeClassifier from sklearn import svm from sklearn.ensemble impo...
""" Character object -- Author : Drlarck Last update : 1/11/20 by DrLarck """ import asyncio # util from utility.graphic.embed import CustomEmbed from utility.graphic.icon import GameIcon from utility.graphic.color import GameColor from utility.entity.ability import Ability class Character: def __init__(sel...
""" models of Generators, Endoders and Discriminators at various image sizes following deep convolutionnal model of DCGAN cf https://pytorch.org/tutorials/beginner/dcgan_faces_tutorial.html and https://github.com/pytorch/examples/tree/master/dcgan the final non linearity of the generator should be tanh ( positive and ...
import multiprocessing as mp import os import signal import time import _pybgpstream import pytricia import redis import requests import ujson as json from artemis_utils import get_ip_version from artemis_utils import get_logger from artemis_utils.constants import CONFIGURATION_HOST from artemis_utils.constants import...
""" Define substitute_finder models """ import json import logging import os import requests from django.conf import settings from django.contrib.auth.models import AbstractUser from django.db import models from django.db.models import CASCADE from django.db.utils import IntegrityError __author__ = '<NAME>' LOGGER ...
# Copyright (c) 2020. Author: <NAME>, <EMAIL> import os, sys, pdb, time, argparse, datetime, importlib, numpy as np, tensorflow as tf from tqdm import tqdm from termcolor import colored from utils.Dataset_Assign import Dataset_Assign from utils.io_util import shuffle_data, loadh5DataFile from utils.EarlyStoppingCrite...
#!/usr/bin/env python # coding: utf-8 # In[1]: import numpy as np import pickle import glob from sklearn.metrics import f1_score import torch as t import tensorflow as tf import re import torch import numpy as np from matplotlib import pyplot as plt import time import argparse from tqdm import tqdm import torch.nn ...
import random import logging import discord from discord.ext import commands from sqlalchemy import orm from kaztron import KazCog from kaztron.config import SectionView from kaztron.driver.pagination import Pagination from kaztron.theme import solarized from kaztron.utils.checks import mod_only from kaztron.utils.di...
from wand.image import Image as WandImage from wand.color import Color as WandColor import io from webclient.models import User, Labeler, Image, ImageLabel, CategoryLabel from django.conf import settings import re import wand.exceptions import os from PIL import Image as PILImage import numpy import SVGRegex from webcl...
from tempfile import NamedTemporaryFile import pandas as pd import numpy as np from tensorflow.keras import backend as K from tensorflow.keras.layers import Input, Flatten, Dense, Dropout, Lambda, concatenate,Add, Multiply, RepeatVector, Reshape from tensorflow.keras.models import Model from tensorflow.keras.models im...
import os from unittest.mock import create_autospec, patch, Mock import SpackCIBridge class AttrDict(dict): def __init__(self, iterable, **kwargs): super(AttrDict, self).__init__(iterable, **kwargs) for key, value in iterable.items(): if isinstance(value, dict): self._...
r""" Sage functions to compute minimal models of rational functions under the conjugation action of `PGL_2(QQ)`. AUTHORS: - <NAME> (May 22, 2012) - <NAME>, <NAME> (Nov 2013): Modified code to use projective morphism functionality so that it can be included in Sage. REFERENCES: .. [Bruin-Molnar] \N. Bruin and <NA...
# -*- coding: utf-8 -*- # # django-codenerix # # Codenerix GNU # # Project URL : http://www.codenerix.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
from keras.layers import Input, Dense, concatenate from keras.layers.recurrent import GRU from keras.utils import plot_model from keras.models import Model, load_model from keras.callbacks import ModelCheckpoint import keras import pandas as pd import numpy as np import keras.backend as K from keras.utils import to_cat...
'''Access World Bank API data ''' import wbgapi as w try: import numpy as np import pandas as pd except ImportError: np = None pd = None def fetch(series, economy='all', time='all', mrv=None, mrnev=None, skipBlanks=False, labels=False, skipAggs=False, numericTimeKeys=False, params={}, db=None, **dime...
""" Functions for algebraic fitting """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six import numpy as np MODE_DICT_ELLIPSE = {'circle': 'xy', 'ellipse_aligned': '0', 'ellipse': ''} MODE_DICT_ELLIPSOID = {'sphere': 'xyz', 'prolate': 'xy', 'oblate...
""" Python Lexical Analyser Regular Expressions """ import array import string import types from sys import maxsize from plex import errors # # Constants # BOL = 'bol' EOL = 'eol' EOF = 'eof' nl_code = ord('\n') # # Helper functions # def chars_to_ranges(s): """ Return a...
from parcels import (FieldSet, ScipyParticle, JITParticle, Variable, ErrorCode) from parcels.particlefile import _set_calendar from parcels.tools.converters import _get_cftime_calendars, _get_cftime_datetimes from parcels import ParticleSetSOA, ParticleFileSOA, KernelSOA # noqa from parcels import ParticleSetAOS, Part...
from __future__ import print_function, division import blosc import torch from torch.utils.data import Dataset from data_pre.seg_data_utils import * from data_pre.transform import Transform import SimpleITK as sitk from multiprocessing import * blosc.set_nthreads(1) import progressbar as pb from copy import deepcopy im...
"""The *ComponentCore* class provides the means to add some basic features for construction of service modules. """ import argparse import logging import os import shlex import sys from logging.handlers import WatchedFileHandler class ComponentCore(object): """The *ComponentCore* class provides configuration serv...
import torch import torch.nn.functional as F from torch import nn import pickle from tqdm import tqdm import logging import math import os import re from collections import defaultdict import numpy as np from examples.utils.mention_db import MentionDB from examples.utils.mention_db import BertLowercaseNormalizer from...
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
# coding=utf-8 # Copyright 2018 The DisentanglementLib 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 # # Un...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import os import shutil import datetime import pstats import collections import socket import json import six...
#!/usr/bin/python # -*- coding: utf-8 -*- # # ISCAM Analysis, provide functions to analyse and plot iSCAM data # Copyright 2019,2020 <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 # #...
import argparse import sys import logging import os import glob import random import tensorflow as tf import numpy as np from dataset import Dataset #import model import model3 as model def exp_learning_rate(learning_rate, global_step, step, decay, staircase=False): learning_rate = tf.train.exponential_decay( ...
import json import websocket import re import requests import colorama from colorama import Fore import threading import time import asyncio import inspect import os import datetime class Client: def __init__(self, username, password, source=None): """ Creates a Scratch Client so you can start con...
############################################################################# # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # 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 th...
"""Test helpers.""" import os import sys from pathlib import Path from pprint import pprint from textwrap import dedent from typing import Dict, Iterable, List, Optional, Set, Union import pytest from click.testing import CliRunner from more_itertools.more import always_iterable, windowed from responses import Request...
import os import time from collections import defaultdict, deque import numpy as np import pandas as pd import itertools import CONSTANT from util import Config, Timer, log, timeit from sklearn.decomposition import PCA from sklearn.feature_extraction.text import TfidfVectorizer from preprocess import clean_df NUM_O...
""" Module storing write_snapshot_mocks_to_disk, the end-to-end function that generatee the full collection of AlphaQ halos that have been populated with model galaxies with the following properties: {M*, SFR, Mr, g-r, r-i}, where colors are restframe extincted SDSS colors k-corrected to z=0.1. This is the module used...
import json import os import gym import numpy as np import pandas as pd import tensorflow as tf from abc import ABC from pathlib import Path from collections import deque from datetime import timedelta, datetime from time import perf_counter, sleep from termcolor import colored class BaseAgent(ABC): """ ...
from PyQt5.QtWidgets import QGraphicsView, QApplication, QGraphicsProxyWidget from PyQt5.QtCore import * from PyQt5.QtGui import * import enum from .node_scene import Scene from .node_edge_dragging import EdgeDragging from .node_graphics_socket import GraphicsSocket from .node_graphics_edge import GraphicsEdge from .no...
#!/usr/bin/env python # coding: utf-8 # In[10]: import numpy as np import pandas as pd import geopandas as gpd from shapely.geometry import Polygon import os import time import datetime as dt MAY_CAN_PATH = '/data2/jiang/Toyota/CAN_day_data_1122ver/' OCT_CAN_PATH = '/data2/jiang/Toyota/CAN_day_data_202110/' NOV_CAN_...
""" ResNet Inference Example ======================== **Author**: `<NAME> <https://homes.cs.washington.edu/~moreau/>`_ This tutorial provides an end-to-end demo, on how to run ResNet-18 inference onto the VTA accelerator design to perform ImageNet classification tasks. """ ##########################################...
# This code is copied from the hf/notebooks repo and tailored to our needs. import nbformat import os import re import shutil import textwrap import urllib.parse from pathlib import Path from functools import partial PATH_TO_DOCS = '..' PATH_TO_DEST = '../notebooks' DOC_BASE_URL = "http://takelab.fer.hr/podium/" # T...
import logging import os import sys from copy import deepcopy from subprocess import run, DEVNULL from sys import argv, stdout from pycman.config import PacmanConfig from aurman.bash_completion import possible_completions from aurman.classes import System, Package, PossibleTypes from aurman.coloring import aurman_err...
#!/usr/bin/python3 """ PyConTextPipeline v1.2.1 <EMAIL>/<EMAIL> Apache 2.0 """ import argparse, re, pipeUtils, pyodbc, sys from os import path, makedirs, getpid from shutil import copyfile import eHOSTTools as eht from multiprocessing_on_dill import Pool, cpu_count from timeit import default_timer from yaml import saf...
from copy import deepcopy import glob import os import time from draw import draw from collections import deque from gv import * gv_init() import numpy as np from datetime import datetime time_str = str(datetime.now()).replace(':','-').replace(' ','--') time_str = time_str[0:time_str.find(".")] set_v('time_str', time_...
import argparse import json import os import random import re import secrets # New in Python 3.6 import shutil import string import subprocess import sys from io import open import jinja2 import jsonobject import yaml from commcare_cloud.environment.main import get_environment TEMPLATE_DIR = os.path.join(os.path.di...
#!/usr/bin/env python # Copyright (c) 2007-2008 ActiveState Software Inc. # License: MIT (http://www.opensource.org/licenses/mit-license.php) """Test the Python markdown2.py.""" import os import sys from os.path import join, dirname, abspath, exists, splitext, basename import re from glob import glob from pprint impo...
########################### # Crop Classification under Varying Cloud Coverwith Neural Ordinary Differential Equations # Author: <NAME> # Code adapted from <NAME>, Latent ordinary differential equations for irregularly-sampled time series ########################### import numpy as np import torch import torch.nn as n...
from pebble import ProcessPool, ProcessExpired import os from argparse import ArgumentParser from multiprocessing import cpu_count import time import gzip import json import requests import sys import pickle as pkl from warcio.archiveiterator import ArchiveIterator import re import spacy esnlp = spacy.load('es') MAX_...
# -*- coding: utf-8 -*- # workflow adapted from # https://cmusphinx.github.io/wiki/tutorialadapt import glob import logging import os import pandas as pd import re import shutil import sqlite3 from datetime import datetime from naomi import paths from naomi import plugin from naomi import pluginstore from naomi import ...
import pygame import math import os import pickle import logging import sys #-- Engine imports-- import SETTINGS import PLAYER import TEXTURES import MAP import RAYCAST import SPRITES import NPC import LEVELS import GUNS import PATHFINDING import TEXT #-- Game imports -- import EFFECTS import HUD import ITEMS import IN...