text stringlengths 8.04k 46.5k |
|---|
'''
Tensorflow implementation of Adaptive Information Transfer Multi-task (AITM) framework.
@The author:
<NAME> (<EMAIL>)
'''
import os
import numpy as np
import tensorflow as tf
import time
import argparse
import random
from sklearn.metrics import roc_auc_score
import multiprocessing
import queue
import threading
os... |
"""
Pull my Garmin sleep data via json requests.
This script was adapted from: https://github.com/kristjanr/my-quantified-sleep
The aforementioned code required the user to manually define
headers and cookies. It also stored all of the data within Night objects.
My modifications include using selenium to drive a Chr... |
"""
Support for WUndergroundPWS weather service.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.wundergroundpws/
"""
import asyncio
from datetime import timedelta
import logging
import re
import aiohttp
import async_timeout
import voluptuous as v... |
from read_images import gen_images, center
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import animation
from skimage.transform import swirl, rescale, rotate, downscale_local_mean, PiecewiseAffineTransform, warp
from skimage import color
from skimage import filters
import scipy.ndimage as ndi
impo... |
import re
import json
import abc
from typing import List, Dict
import numpy as np
import itertools
from wikidata import scheme
from questionanswering import base_objects
from questionanswering.construction import graph
from questionanswering.datasets.dataset import Dataset
class DatasetWithoutNegatives(Dataset, m... |
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ /... |
import json
import pprint
import re
import subprocess
import sys
import xml.etree.ElementTree as ET
from copy import deepcopy
from lxml import etree
"""
Script Version, might be useful for debugging.
"""
SCRIPT_VERSION = "1.0"
"""
List of R6 System keyboards
"""
R6_KEYWORDS = ['R6Class', 'if_any', 'map', 'reset', 'new... |
from gym.spaces import Box, Discrete, MultiDiscrete
import logging
import ray
import ray.experimental.tf_utils
from ray.rllib.agents.ddpg.ddpg_tf_policy import ComputeTDErrorMixin, \
TargetNetworkMixin
from ray.rllib.agents.dqn.dqn_tf_policy import postprocess_nstep_and_prio
from ray.rllib.agents.sac.sac_ensemble_... |
"""
A color and gradient management system.
*Do not pick colors yourself*. A lot of research has gone into color
palettes. Specifically, for:
Numeric data
use `ColorBrewer <http://colorbrewer2.org/>`_ themes
Non-numeric data
use `ColorBrewer <http://colorbrewer2.org/>`_
or `Microsoft Office themes`_
Pag... |
"""
LinAlg
~~~~~~
Common linear algebra functions
"""
import bohrium as np
import bohrium.blas as blas
import numpy_force.linalg as la
import numpy_force as numpy
# We import all of NumPy LinAlg and overwrite with the objects we implement ourself
from numpy_force.linalg import *
from . import bhary
from . import uf... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
@author: <NAME>
@email: <EMAIL>
"""
import numpy as np
import matplotlib.path as mpath
import matplotlib.patches as mpatches
import matplotlib.pyplot as plt
from scipy.special import erf as erf
from functools import partial as partial
MIN_DIST = 10**-6 # threshold f... |
import numpy as np
import json
import copy
from metric_base import *
from nltk.translate.bleu_score import corpus_bleu
def metric_output(metric_class, data, dataloader=None):
name = metric_class._name
version = metric_class._version
if isinstance(dataloader, FakeMultiDataloader):
tmp_file... |
#!/usr/bin/env python
# encoding: utf-8
import numpy as np
from ccblade import CCAirfoil, CCBlade
import array
import os
from myutilities import plt
import matplotlib.pyplot as plt
import scipy.io as sio
# read eng file
def get_eng_data(fname, nsamp, nchan):
fid = open(fname, 'rb')
data = np.zeros((nsamp, ... |
#import open3d as o3d
import argparse
import os
import sys
import logging
import numpy
import numpy as np
import torch
import torch.utils.data
import torchvision
from torch.utils.data import DataLoader
from tensorboardX import SummaryWriter
from tqdm import tqdm
from scipy.spatial.transform import Rotation
from sklearn... |
#!/usr/bin/env python
# encoding: utf-8
'''
GBScleaning -- Remove unwanted variants from VCF file
GBScleaning is a description
It defines classes_and_methods
@author: <NAME>
@copyright: 2018 Cornell University. All rights reserved.
@license: MIT
@contact: user_email
@deffield updated: 11/05/2018
'''... |
# -*- encoding:utf-8 -*-
'''
@time: 2020/06/
@author: hanqiyan
@email: <EMAIL>
'''
import numpy as np
import pickle as pk
import transformer_layers as trans
import tensorflow as tf
import sys, os, time, codecs, pdb
import utils.model_funcs as func
from sklearn.model_selection import KFold
from sklearn.model_selection ... |
#!/usr/bin/env python
"""
Interface with the hottop roaster through the serial port.
This module is split into two pieces, a controlling thread for monitoring
data from the serial interface and a user-facing object to adjust settings or
read content back out. It's NOT recommended to conduct roasting with this
interfac... |
# -*- coding: utf-8 -*-
# NEC-2 Card/Code References
# Here are some references I'm consulting while working with PyNEC. I haven't done NEC decks before, only EZNEC, so I'm learning as I go.
# http://www.antentop.org/w4rnl.001/necdeck.html
# https://www.nec2.org/part_3/cards/
# http://tmolteno.github.io/necpp/classne... |
# coding=utf-8
import os
import shlex
import re
import subprocess
import logging
import collections
from os.path import splitext
from pygit2 import (
GIT_OBJ_COMMIT, GIT_OBJ_TREE,
GIT_OBJ_BLOB, GIT_OBJ_TAG,
GIT_SORT_TIME, GIT_DIFF_IGNORE_WHITESPACE
)
from vilya.libs.git2 import Git2
from vilya.libs.genera... |
"""
Next Tile Selector
Based on our google sheet (
these are the expected inputs
skylevel: current sky level [counts s-1 cm-2 arcsec-2] (from ETC, at the end of last exposure)
seeing: current atmospheric seeing PSF FWHM [arcsec] (from ETC, at the end of last exposure)
transparency:... |
#!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible 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 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... |
"""
Copyright (c) 2010-2018 CNRS / Centre de Recherche Astrophysique de Lyon
Copyright (c) 2016-2019 <NAME> <<EMAIL>>
Copyright (c) 2016 <NAME> <<EMAIL>>
Copyright (c) 2016 <NAME> <<EMAIL>>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted pr... |
import os
import sys
import time
import logging
import urllib.request
import json
import pyperclip
from fourcdl.logging_setup import configure_logging
from fourcdl.gen_downloaded_files_info import file_unique_converted, import_files_info_pickle, export_files_info_pickle, generate_downloaded_files_info, convert_4chan_... |
# encoding: utf-8
"""
plot.py
~~~~~~~
Functionality for creating performance summary plots.
"""
__author__ = "<NAME>"
__email__ = "<EMAIL>"
__created__ = "2018-06-08"
__copyright__ = "Copyright 2018 <NAME>"
__license__ = "MIT https://opensource.org/licenses/MIT"
# standard imports
# third party imports
import rando... |
import os
import json
from datetime import datetime
from dal import autocomplete
from django.contrib.auth import get_user_model, get_user
from django.http import HttpResponseRedirect, HttpResponse
from django.shortcuts import get_object_or_404, render
from django.urls import reverse
from django.views import generic
fr... |
from __future__ import division
import numpy as np
import dolfin as df
import itertools
import inspect
import logging
import sys
import matplotlib.pyplot as plt
from scipy.sparse.linalg import LinearOperator
from finmag.field import Field
from finmag.energies import Exchange
from finmag.util.consts import gamma, mu0
fr... |
"""Solid objects are used by the segment module. A solid has a position, and
orientation (defined by a rotation matrix). This module also contains the
class definition for stadium objects, which are used to construct
StadiumSolid solids. The Solid class has two subclasses: the StadiumSolid and
Semiellipsoid classes.
"... |
"""
Copyright (c) 2022 The RDFLib Team
Python adaptation of the Digital Bazaar Javscript implementation
https://github.com/digitalbazaar/rdf-canonize
for RDFLib by <NAME> <<EMAIL>>
"""
import hashlib
import typing
from collections import OrderedDict
from functools import cmp_to_key
from typing import (
IO,
TYPE... |
# -*- coding: utf-8 -*- #
# Copyright 2020 Google LLC. 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 requir... |
"""A simple MNIST classifier which displays summaries in TensorBoard.
This is an unimpressive MNIST model, but it is a good example of using
tf.name_scope to make a graph legible in the TensorBoard graph explorer, and of
naming summary tags so that they are grouped meaningfully in TensorBoard.
It demonstrates the func... |
"""
====> LMS Migrator <====
This tool duplicates an existing course (exported according to IMS Common
Cartridge 1.1 standards) and revises activity due dates according to user
specifications in a properly formatted new_syllabus.xlsx file.
Warning: Use this tool with caution. Not responsible for loss of data!
This s... |
from random import randint
from scipy.ndimage import gaussian_filter as gauss_filt
import matplotlib.pyplot as plt
import numpy as np
from glob import glob
import os
def readFloatRandomPatches(fileName, width=1, num_sample=1, patch_size=1, rows=None, cols=None, height=None):
with open(fileName, "rb") as fin:
... |
#!/usr/bin/env python3.5
########################################################################################
# script name: functions_jgi.py
# path on oxygen: /data/databases/scripts/gathering_data/jgi
# developed by: <NAME>
# framework: PREGO - WP2
################################################################... |
from collections import defaultdict
import csv
import cv2
import datetime
import imageio
import glob
import h5py
import heapq
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator
import mplcyberpunk
import numpy as np
import operator
import os
import pandas a... |
import sys, pygame, random
import time
pygame.init()
pygame.mixer.init()
size = width, height = 706, 540
screen = pygame.display.set_mode(size)
pygame.display.set_caption("Planet Express Delivery")
background_image = pygame.image.load("./background.jpg").convert()
text_font = pygame.font.Font("./Futurama Bold Font.tt... |
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
\file TFRealTimeImpFast.py
\copyright Copyright (c) 2019 Visual Computing group of Ulm University,
Germany. See the LICENSE file at the top-level directory of
this distribution.
\author <NAME> ... |
#!/usr/bin/env python
"""A Discord bot for managing use of a physical book library."""
import os
import random
import sqlite3
import datetime
import asyncio
import csv
import urllib.request
import yaml
import sys
import isbnlib
import discord
from discord.ext import commands
from discord.ext.tasks import loop
__auth... |
# Copyright 2019 Xilinx 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 writing, ... |
# -*- coding: utf-8 -*-
from luigi import LocalTarget, Task, IntParameter
from tasks.meta import current_session, OBSColumn, GEOM_REF, OBSTag
from tasks.util import (TagsTask, DownloadUnzipTask, Shp2TempTableTask, shell,
classpath, CSV2TempTableTask, TempTableTask,
Colu... |
import copy
import itertools
from functools import reduce
from operator import add, itemgetter
from typing import List, Tuple, Union
import numpy as np
from scipy.stats import multinomial
from quara.objects.composite_system import CompositeSystem
from quara.objects.elemental_system import ElementalSystem
from quara.o... |
# A bunch of hacky functions to prepare Delft3D-FLOW output for plotting and
# TODO: READ ABOUT OOP
# merge some functions into a class?
# leave it as is?
# Use unfunctions for vector sums
from JulesD3D.processing_2d import vector_sum
import xarray as xr
import numpy as np
from os import path
from IPython.display impo... |
'''
This module contains functions for performing glide identification on data
collected from Little Leonardo dataloggers, calling functions from the Pyotelem
library for it's main functions.
The code is an adaptation of the script written by <NAME>,
presented at a body density estimation workshop at the University of... |
import datetime as dt
import json
import logging
from pathlib import Path
from typing import List
import numpy as np
import openpyxl
from te_schemas import land_cover
from te_schemas import reporting
from te_schemas import schemas
from te_schemas.aoi import AOI
from . import config
from . import models
from .. import... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Feb 23 21:55:05 2020
@author: <NAME>
"""
import numpy.random as rnd
import numpy as np
import scipy
from scipy import constants
import matplotlib.pyplot as plt
import matplotlib.cm
from matplotlib.patches import Rectangle
from itertools import cycle... |
# coding=utf-8
# run script
import sys, os, argparse
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' # so here won't have poll allocator info
# remove all the annoying warnings from tf v1.10 to v1.13
import logging
logging.getLogger('tensorflow').disabled = True
from tqdm import tqdm
import numpy as np
import tensorflow as... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 23 21:37:18 2019
@author: leshang
"""
#%%
import numpy as np
import logging
from datetime import datetime
from numpy import genfromtxt
import copy
import pickle
from datetime import datetime
from sklearn.linear_model import LogisticRegression, Linea... |
"""
Set of methods responsible for knowledge analysis
"""
import pickle
from multiprocessing import Pool
import traceback
import psutil
import numpy as np
from matplotlib import pyplot as plt
from csv import writer as csv_writer
from collections import defaultdict
from tabulate import tabulate
from typing import Any, ... |
from django.http import JsonResponse
from django.shortcuts import render
import json
import os
import logging
from datetime import datetime, timedelta
import xmlrpc.client
pointer_map = {'Hypernym': '@', 'Hyponym': '~', 'Member_Holonym': '#m', 'Substance_Holonym': '#s', 'Part_Holonym': '#p',
'Member_Mer... |
"""
Cooling towers basic modelling
Key Dependencies:
- DK_thermo humid air state (psychrometry via PsychroLib: https://psychrometrics.github.io/psychrolib/api_docs.html)
liquid water enthalpy calculation
- Pint 0.9 explicit units
Author: <NAME>
Created: Mar 30, 2020
Versi... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 11 15:23:35 2017
@author: mmrosek
"""
from skimage.filters import threshold_otsu, rank, threshold_local
import imageio
import skimage.filters as filters
import skimage.morphology as morphology
import matplotlib.pyplot as plt
import numpy as np
impor... |
# Copyright 2014
# The Cloudscaling Group, 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... |
import os
from flask import Flask, render_template, g, request, redirect, flash, send_from_directory, send_file
from werkzeug.utils import secure_filename
import time
# Support for mongodb+srv:// URIs requires dnspython:
#!pip install dnspython pymongo
import pymongo
from bson.objectid import ObjectId
from bs... |
import math
import torch.nn.functional as F
import torch
from torch import nn as nn
from torch.nn import Parameter
from proj_utils import copy_model_weights, layers_nnz, fill_model_weights
# using hardware parameters from Eyeriss
default_s1 = int(100 * 1024 / 2) # input cache
default_s2 = 1 * int(8 * 1024 / 2) #... |
"""
Generate the index.html/.md for the examples subdirectory,
based on structured docstrings on each Python example
"""
from __future__ import print_function
import ast
import re
import os
import sys
prog_name, _ = os.path.splitext(os.path.basename(sys.argv[0]))
prog_dir = os.path.dirname(sys.argv[0])
from argp... |
import logging
import math
import slidingwindow as sw
import cv2
import numpy as np
import tensorflow as tf
import time
from . import common
from .common import CocoPart
from .tensblur.smoother import Smoother
try:
from .pafprocess import pafprocess
except ModuleNotFoundError as e:
print(e)
print('you n... |
# Copyright 2021 The Cirq Developers
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... |
# Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com)
# This file provides a test runner for running the Python regression test suite
# under JIT backends. Currently, when we run the test suite under the JIT, we
# compile each function as it is created. While this provides a large surface
# area ... |
"""
Training script for semantic image segmentation using WASR model without IMU functionality.
This script train on MaSTr1325 marine dataset which contains 1325 images
This images should be further pre-augmented using: classical augmentation (rotation, scale, mirroring)
... |
#! /usr/bin/env python
import os
import shutil
import shlex
import argparse
import json
import inspect
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from multiprocessing import Pool
from os.path import abspath, join, isfile
from subprocess import Popen, PIPE
from itertools import product
fro... |
# Copyright (c) 2016-2019 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... |
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
from contextlib import contextmanager
import datetime
import faulthandler
import os
import signal
import subprocess
import sys
import sysconfig
from test import support
from test.support import script_helper, is_android
import tempfile
import threading
import unittest
from textwrap import dedent
try:
import _testc... |
from copy import copy
from functools import reduce
import numpy as np
import tensorflow as tf
import tensorflow.contrib as tc
import logger
from common.mpi_adam import MpiAdam
import common.tf_util as U
from common.mpi_running_mean_std import RunningMeanStd
from mpi4py import MPI
def normalize(x, stats):
if stat... |
#! /usr/bin/env python
# encoding: utf-8
# XCode 3/XCode 4/XCode 6/Xcode 7 generator for Waf
# Based on work by <NAME> 2011
# Extended by <NAME> 2015, https://github.com/mimon
# XCode project file format based on http://www.monobjc.net/xcode-project-file-format.html
"""
See playground/xcode6/ for usage examples.
"""
... |
# postgresql/psycopg2.py
# Copyright (C) 2005-2022 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
r"""
.. dialect:: postgresql+psycopg2
:name: psycopg2
:dbapi: psycopg... |
# coding=utf8
import json
from pprint import pprint
from interactions import event
from script import util
def init_script():
code = """# coding=utf8
import os
import sys
import time
import json
import frida
import argparse
import traceback
import uiautomator2 as u2
from script import util
sessions = None
xml ... |
#-------------------------------------------------------------------------
#
# Copyright (c) 2008, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions descri... |
#!/usr/bin/python
#
# The evaluation script for instance-level semantic labeling.
# We use this script to evaluate your approach on the test set.
# You can use the script to evaluate on the validation set.
#
# Please check the description of the "getPrediction" method below
# and set the required environment variables... |
import utils
from utils import rf
from utils import WcbcException
class Path:
"""A Path object models a path in a graph.
"""
def __init__(self, nodes):
"""Initialize Path object.
Args:
nodes (list of str): a list containing the names of the nodes in the path
... |
import logging
import functools
import traceback
import random
from itertools import tee
import pickle
import os
import sys
import numpy as np
import pandas as pd
import yaml
# SMAC3
try:
from smac.tae.execute_func import ExecuteTAFuncDict
from smac.scenario.scenario import Scenario
from smac.stats.stats ... |
""":func:`~pandas.eval` parsers
"""
import ast
import operator
import sys
import inspect
import tokenize
import datetime
import struct
from functools import partial
import pandas as pd
from pandas import compat
from pandas.compat import StringIO, zip, reduce, string_types
from pandas.core.base import StringMixin
fro... |
"""Code generation for native function bodies."""
from typing import Union, Dict
from typing_extensions import Final
from mypyc.common import (
REG_PREFIX, NATIVE_PREFIX, STATIC_PREFIX, TYPE_PREFIX, MODULE_PREFIX,
)
from mypyc.codegen.emit import Emitter
from mypyc.ir.ops import (
OpVisitor, Goto, Branch, Ret... |
#! /usr/bin/env python
"""Generate Rust code from an ASDL description."""
import sys
import json
import textwrap
from argparse import ArgumentParser
from pathlib import Path
import asdl
TABSIZE = 4
AUTOGEN_MESSAGE = "// File automatically generated by {}.\n"
builtin_type_mapping = {
'identifier': 'Ident',
... |
"""
Rösch-MacAdam colour solid - Visible Spectrum Volume Computations
=================================================================
Defines the objects related to *Rösch-MacAdam* colour solid, visible spectrum
volume computations.
References
----------
- :cite:`Lindbloom2015` : <NAME>. (2015). About the Lab G... |
import os
import re
from datetime import datetime, timezone, timedelta
from math import floor, ceil, cos, sin, pi, sqrt, log
import numpy as np
import pandas as pd
from scipy.stats import trim_mean
import astropy.io.fits
from dateutil.parser import parse
from photrix.util import RaDec, ra_as_degrees, dec_as_degrees
... |
from collections import ChainMap
from enum import Enum, unique
from uC_AST import *
from uC_types import (TYPE_INT, TYPE_FLOAT, TYPE_CHAR, TYPE_STRING, TYPE_VOID,
TYPE_BOOL, TYPE_ARRAY, TYPE_FUNC)
###########################################################
## uC Intermediate Representation (IR) ... |
'''
Created on Jul 22, 2011
@author: Rio
'''
from box import BoundingBox
from collections import defaultdict
from entity import Entity, TileEntity, TileTick
import itertools
from logging import getLogger
import materials
from math import floor
from mclevelbase import ChunkMalformed, ChunkNotPresent
import nbt
from nu... |
"""Parsers for the different file formats.
Functions are sorted in alphabetic order.
"""
from manage_crystal import Crys
from manage_crystal.periodic_table import ptab_atnum_inv
from manage_crystal.utils import is_number, parse_coord
import numpy as np
import os
import sys
import re
ANGS2BOHR = 1.88973
def parseflo... |
# -*- coding: utf-8 -*-
"""
"""
from __future__ import unicode_literals, absolute_import
import logging, json, time, copy, datetime
from collections import OrderedDict
import pprint
from django.utils import timezone
from django.db import transaction
from django.db.models import Q
from django.contrib.auth.models impo... |
'''
Created by <NAME>
ISIA Lab, Faculty of Engineering University of Mons, Mons (Belgium)
<EMAIL>
Source: Delvigne, et al."PhyDAA: Physiological Dataset Assessing Attention" IEEE Transaction on Circuits and Systems for Video Technology (TCSVT) (2016).
Copyright (C) 2021 - UMons
This library is free software; you can re... |
# Copyright (c) 2020, 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
#
# Unless required by appli... |
import torch
# import torch should be first. Unclear issue, mentioned here: https://github.com/pytorch/pytorch/issues/2083
import os
import argparse
from pathlib import Path
import csv
import time
import h5py
import datetime
import warnings
import functools
from tqdm import tqdm
from collections import OrderedDict
imp... |
from CC3501Utils import *
from Bombs import *
from Vista import *
from Pared import *
from Player import *
from Explosion import *
from PDes import *
from Enemy import *
from Win import *
from Power import *
import pygame
import math as m
import random as rand
#########################################################... |
import logging
import json
import os
import boto3
import requests
from random import randint
import datetime as dt
from botocore.exceptions import ClientError
from boto3.dynamodb.conditions import Key, Attr
#from ask_sdk_core.skill_builder import SkillBuilder
from ask_sdk_core.skill_builder import CustomSkillBuilder
f... |
import os
import time
import numpy as np
import tensorflow_datasets as tfds
import tensorflow as tf
import tensorflow.contrib.eager as tfe
import matplotlib.pyplot as plt
from glearn.utils.printing import print_update
from glearn.utils.time import human_time_duration
BUFFER_SIZE = 20000
BATCH_SIZE = 64
MAX_LENGTH = 4... |
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
"""
Capstone Project. Code to run on a LAPTOP (NOT the robot).
Displays the Graphical User Interface (GUI) and communicates with the robot.
Authors: Your professors (for the framework)
and <NAME>.
Winter term, 2018-2019.
"""
import mqtt_remote_method_calls as com
import tkinter
from tkinter import ttk
i... |
"""
Create preliminary validation report
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Script:
_create_preliminary_validation_report.py
Purpose:
Create indicators based on linkage with boundary data from specification in datasets section of configuration file
"""
import time
import os
import pandas ... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# graph_tool -- a general graph manipulation python module
#
# Copyright (C) 2006-2018 <NAME> <<EMAIL>>
#
# 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 Fou... |
"""
Brief: Evaluation of 3D car instance mean AP following coco eval criteria
Author: <EMAIL>, (<NAME> and <NAME>)
Date: 2018/6/20
"""
import os
import json
import numpy as np
import datetime
import argparse
import time
import copy
import sys
sys.path.append('..')
import utils.eval_utils as euts
from col... |
from tkinter import *
from tkinter import ttk
from mainwindow.homescreen import Home
import re
import time
def convert(data):
a = '+'
if (data < 0):
data = -data
a = '-'
data = str(data)
data = data.zfill(4)
return a + data[len(data) - 4:]
class ARRgui:
def __init__(self, roo... |
from Age_n_Sex_Imp import *
from UKBB_Func_Final import *
import os
import sys
import matplotlib.pyplot as plt
from addloglevels import sethandlers
import datetime
"""Script used to calculate probabilities either for Returning participants based on Non-Returning participants model
if mode=="ALL" and USE_PROBA==True (... |
# -*- coding: utf-8 -*-
from __future__ import print_function
import csv
import re
import sys
from datetime import date
from datetime import datetime
from datetime import time
from . import config
from . import utils
ND_STRING = config.ND_STRING
ND_FLOAT = config.ND_FLOAT
ND_INT = config.ND_INT
def _filter_comment... |
# -*- coding: utf-8 -*-
# @Author: yancz1989
# @Date: 2017-05-08 11:23:35
# @Last Modified by: yancz1989
# @Last Modified time: 2017-06-07 16:46:32
# pylint: skip-file
import sys
import os
import argparse
import mxnet as mx
import numpy as np
import logging
# import symbol
# import init_fcnxs
from dataset import Fi... |
"""
int_tree.py - An integration tree can be used to represent a variable ordering in tree form. This is referred to as a
pseudo tree in the literature of Variable Elimination and AND/OR graphs.
IntTree - the abstract integration tree
IntTreeVar - a leaf node of the tree, containing a variable.
IntTreeLine... |
# Ref: https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BMP280-DS001.pdf
# Accession: G00028
# Ref: https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme280-ds002.pdf
# Accession: G00050
import logging
import asyncio
from ....support.data_logger import DataLogger
from ...... |
"""
Additional functions and demos for acoustics equations.
"""
from clawpack import pyclaw
from clawpack import riemann
from matplotlib import animation
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import numpy as np
from ipywidgets import widgets, interact
from IPython.display import display... |
"""
mgf - read and write MS/MS data in Mascot Generic Format
========================================================
Summary
-------
`MGF <http://www.matrixscience.com/help/data_file_help.html>`_ is a simple
human-readable format for MS/MS data. It allows storing MS/MS peak lists and
exprimental parameters.
This mo... |
# nlhtree_py/nlhtree/__init__.py
""" NLHNode, NLHTree, NLHLeaf and supporting elements. """
import binascii
import fnmatch
import os
import re
from stat import S_ISDIR
from xlattice import HashTypes, check_hashtype
from xlcrypto import SP # for get_spaces()
# BECOMES SEPARATE PROJECT
from xlu import (file_sha1hex... |
#cnn_mlrad_body
#The main portion of the cnn_mlrad_project
# Author: <NAME> et al.
# Updated: 04 July 2019
import argparse
import os
import time
import sys
import math
import numpy as np
import tensorflow as tf
from sklearn import metrics
from PIL import Image
import time
import re
from matplotlib import pyplot as plt
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.