text stringlengths 3.07k 22.1k |
|---|
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import random
df_motor = pd.read_csv('/home/ubuntu/bagfiles/3r/r2_motor.csv', header=0)
df_odom1 = pd.read_csv('/home/ubuntu/bagfiles/net_arch/PPO3_odom.csv', header=0)
df_odom2 = pd.read_csv('/home/ubuntu/bagfiles/net_arch/PP... |
import os
import argparse
import requests
parser = argparse.ArgumentParser(description="Nxs")
parser.add_argument("--model_url", type=str, required=True)
args = parser.parse_args()
def send_get_request(url, payload={}, headers={}, timeout=60000):
return requests.get(
url=url, params=payload, headers=head... |
# Copyright 2021 Fedlearn 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 writi... |
# -*- coding: utf-8 -*-
"""
Spatiotemporal Trajectories in Resting-state FMRI
=================================================
Credit: <NAME>
In this example we illustrate how we can extract meaningful spatiotemporal
information from a Variational Auto-Encoder (VAE) using rfMRI data.
The `test` variable must be se... |
"""
===============================================================================
calibration_tools
- <NAME> 2019/04/29
-------------------------------------------------------------------------------
Module with tools for calibrating a stereo vision system. The core of the
module is kept in the CalibrationSystem cla... |
import numpy as np
import json
from pandas.util.testing import all_timeseries_index_generator
from scipy.signal import savgol_filter
from scipy.optimize import curve_fit
import scipy
import matplotlib.pyplot as plt
from math import fabs, pi, asin, sin, log, degrees, acos
import trendline
from scipy.interpolate import ... |
# Copyright 2020 Makani Technologies LLC
#
# 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... |
# Copyright 2016 Fortinet, Inc.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... |
import torch
from torch import nn
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# device = torch.device('cpu')
class scale_and_shift(nn.Module):
def __init__(self):
super(scale_and_shift, self).__init__()
self.alpha = torch.ones(1).to(device)
self.beta = torch.zeros... |
"""MatminerCompositionFeatures tests.
Scientific Machine Learning Benchmark
A benchmark of regression models in chem- and materials informatics.
2019-2020, Citrine Informatics.
"""
import pytest
import numpy as np
matminer = pytest.importorskip("matminer")
pymatgen = pytest.importorskip("pymatgen")
import smlb
fr... |
import json
import os
import bottle
import parse_board
import board
import tests
from api import ping_response, start_response, move_response, end_response
from pathfinding.core.grid import Grid
from pathfinding.finder.a_star import AStarFinder
@bottle.route('/')
def index():
return '''
Battlesnake documenta... |
#!/usr/bin/python3
import argparse
import random
import sys
#Utility functions##########################
def msg(name=None):
return '''gen_traffic_csv.py [-option1 <value1>] ... [-optionN <valueN>] <output_path>'''
def str2bool(v):
if isinstance(v, bool):
return v
if v.lower() in ('yes', 'true', 't', '... |
import toml
import json
import logging
import os, urllib
import base64
from functools import wraps
from django.conf import settings
from django.http import HttpResponse
from ratelimit.decorators import ratelimit
from django.views.decorators.csrf import csrf_exempt
from biostar.accounts.models import User
from biostar.r... |
#!/usr/bin/env python3
'''
Causeway Server - key/value storage server geared toward small files with ECSDA signature auth
Usage:
python3 server.py
'''
import os, json, random, time, string
from settings import DATABASE, PRICE, DATA_DIR, SERVER_PORT
from flask import Flask
from flask import request
from flask impo... |
from telnet_connection import TelnetConnection
from convert import convert_to_mp4
import os
import netifaces as ni
import subprocess as sp
import argparse
from time import sleep
import json
class Download:
def __init__(self, filename, full_path):
self.filename = filename
self.full_path = full_pat... |
import numpy as np
import cv2
import sys
import crownSegmenterEvaluator as CSE
from osgeo import gdal
from scipy.spatial.distance import directed_hausdorff
from sklearn.neighbors import KDTree
def avMinDistCloserTop(list1):
if len(list1)==0: return -1
newList1=np.asarray([[x,y] for x,y in list1 ])
newLis... |
from django.core.validators import MinValueValidator, MinLengthValidator
from django.db import models
from django.urls import reverse
from django.contrib.auth.models import (
AbstractUser,
AbstractBaseUser,
PermissionsMixin,
BaseUserManager
)
import uuid
from django.core.validators import RegexV... |
"""Read in an Ortec SPE file."""
import datetime
import os
import warnings
import dateutil.parser
import numpy as np
from .spectrum_file import (
SpectrumFile,
SpectrumFileParsingError,
SpectrumFileParsingWarning,
)
warnings.simplefilter("always", DeprecationWarning)
class SpeFileParsingError(SpectrumFi... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Skeleton structure.
**Project Name:** MakeHuman
**Product Home Page:** http://www.makehuman.org/
**Code Home Page:** http://code.google.com/p/makehuman/
**Authors:** <NAME>
**Copyright(c):** MakeHuman Team 2001-2011
**Licensing... |
from __future__ import absolute_import
import logging
import operator
from copy import deepcopy
from datetime import timedelta
from django.conf import settings
from django.db import transaction
from sentry.incidents.logic import create_incident, update_incident_status
from sentry.incidents.endpoints.serializers imp... |
from datetime import date
import mysql.connector as mysql
from time import sleep
db = mysql.connect(host="localhost", user="root", password="", database="escola")
command_handler = db.cursor(buffered=True)
today = date.today().strftime("%d-%m-%Y")
def create_subject(sub):
command_handler.execute("INSERT INTO `s... |
"""Create auto update CloudWatch events."""
import boto3
import cfnresponse
import os
import logging
import json
client = boto3.client('cloudformation')
event = boto3.client('events')
aws_lambda = boto3.client('lambda')
function_name = os.environ['FUNCTION_NAME']
region = os.environ['REGION']
account_id = boto3.clie... |
'''Methods to generate annotated TEI for export.'''
from bs4 import BeautifulSoup
from datetime import datetime
from django.conf import settings
from django.contrib.auth import get_user_model
from django.db.models import Q
from django.utils.text import slugify
from eulxml.xmlmap import load_xmlobject_from_string, teim... |
from datetime import date
from datetime import datetime
from dateutil import tz
import time
def nordic2Arrival(data, arrival_id):
"""
Function for converting a nordic file into a Arrival string
:param NordicData data: NordicData object to be converted
:param int arrival_id: arrival id of the assoc
... |
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
# This file is a part of OpenCV project.
# It is a subject to the license terms in the LICENSE file found in the top-level directory
# of this distribution and at http://opencv.org/license.html.
#
# Copyright (C) 2020, Intel Corporation, all rights reserved.
# Third party copyrights are property of their respectiv... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2002-2010 <NAME> <<EMAIL>>
# All Rights Reserved.
# Simplified BSD License (see LICENSE.txt for full text)
"""\
Manage a set of addressed binary strings (Segments) in a Memory object.
This type of data is used to represent memory contents of the MCU.
"""
... |
import sqlite3, datetime, os, multiprocessing as mp, concurrent.futures
from pathlib import Path
import click
import pandas as pd
import SimpleITK as sitk
import pydicom
from tqdm import tqdm
ifr = sitk.ImageFileReader()
ifr.LoadPrivateTagsOn()
dcm_tags = { # Attributes
"0008|0005": "SpecificCharacterSet",
... |
import copy
import csv
import os
import matplotlib.pyplot as plt
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from PIL import Image
from torchvision.transforms import transforms
def ravel_index(x, y, img_size):
x = x / img_size[1]
y = y % img_size[1]
return x, y
... |
from contextlib import contextmanager
import logging
import multiprocessing.pool
import os
import sys
import subprocess
from urllib.parse import urlparse
from urllib.request import urlretrieve
import pip.utils.logging
from pip.commands import InstallCommand
from pip._vendor.packaging.requirements import Requirement
fr... |
"""
Classes that take local XML (output of PDFToXMLParser) and instantiate Tables.
Also pickles the instantiated Tables for caching.
Typical usage is within TableExtractor that utilizes external PDF parsing tools.
"""
import os
from typing import Tuple, List
from bs4 import Tag, BeautifulSoup
try:
import cPickl... |
from collections import defaultdict
import sqlite3
import subprocess
# VCPKG Repository
class PortsRepo:
def __init__(self, folder ):
self.hashes = {}
self.folder = folder
# git log --first-parent master --format=oneline
def readHashes( self ):
lines = subprocess.check_output(['git', 'log', '--first-parent',... |
# Copyright (c) 2018, EPFL/Human Brain Project PCO
#
# 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 applic... |
# coding: utf-8
"""
brownie.functional
~~~~~~~~~~~~~~~~~~
Implements functions known from functional programming languages and other
things which are useful when dealing with functions.
:copyright: 2010 by <NAME>
:license: BSD, see LICENSE.rst for details
"""
from inspect import getargspec
fro... |
import bsddb3
import sqlite3
import os
import time
import logging
from datetime import datetime
from xclib.utf8 import unutf8
class sq3c_debugger(sqlite3.Connection):
# def execute(self, sql, *args, **kwargs):
# logging.debug('EXECUTE: %s' % sql)
# return super().execute(sql, *args, **kwargs)
def... |
# zettelkasten/setupy.py
"""Module handling the initial use of the zettelkasten after installation."""
import logging
from pathlib import Path
from . import defaults
logger = logging.getLogger(__name__)
def create_config_folder(dummy_location=None):
"""Create the zk's tweaking folder for the configuration and r... |
from moneywagon.services import Service, BitcoinAbe, BitpayInsight
class BlockStrap(Service):
"""
Documentation here: http://docs.blockstrap.com/en/api/
"""
#decomissioned
service_id = 10
domain = 'http://api.blockstrap.com'
supported_cryptos = ['btc', 'ltc', 'drk', 'doge']
api_homepage... |
# -*- coding:utf-8 -*-
import os
import re
from string import punctuation
import math
from gensim.corpora import WikiCorpus
import zhconv
import jieba
from datetime import datetime
import logging
# 标点符号集合
punc = punctuation + r'··.,;\\《》?!“”‘’@#¥%…&×()——+【】{};;●,。&~、|::'
# 标点符号集合包括字母
punc2 = punc + r'\sA-Za-z~()()【】%*... |
""" Sparse AutoEncoder of DIABIMMUNE Project: Learn latent representation of DIABIMMUNE microbial profiles."""
## v1.6
from __future__ import division, print_function, absolute_import
import datetime
import sys
import os
from optparse import OptionParser
import tensorflow as tf
import numpy as np
import pand... |
#!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Nodes for PPAPI IDL AST"""
#
# IDL Node
#
# IDL Node defines the IDLAttribute and IDLNode objects which are constructed
# by th... |
"""Capture L0 visibilities from a SPEAD stream and write to a local chunk store.
This process lives across multiple capture blocks. It writes weights and flags
as well.
The status sensor has the following states (with typical transition events):
- `idle`: ready to start capture
-> ?capture-init ->
- `wait-d... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from layers import *
from data import voc_refinedet, coco_refinedet
import os
from .Snet import snet
from .Res2NetLite72 import Res2NetLite
from .modules import conv_bn,Bottleneck,gropy_conv_bn,InvertedResidual
class RefineDet(nn.Module):
"""Sin... |
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 30 06:08:44 2021
@author: prakh
"""
# Reference : https://stackabuse.com/python-for-nlp-neural-machine-translation-with-seq2seq-in-keras/
# Import relevant libraries
import os, sys
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Input, LSTM... |
#!/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... |
# -*- coding: utf-8 -*-
"""Boltzmann machine training.
Functions for 'exact' maximum likelihood training of Boltzmann machine models
(exact in the sense that the expectations required to compute the
log-likelihood gradient with respect to the weight and bias parameters are
computed exactly i.e. by exhaustively summing... |
#!/usr/bin/env python3
import warnings
from typing import List, Optional, Tuple, Union
import numpy as np
import numpy.testing as nptest
import pandas as pd
import pandas.testing as pdtest
import scipy.sparse
from sklearn.utils.validation import check_array, check_scalar
def series_if_applicable(ds: Union[pd.Series... |
import re
from os import system, path
from threading import Thread
import pandas as pd
import numpy as np
from traceback import format_exc
from datetime import datetime
import pickle
from transformers import BertTokenizer, BertForSequenceClassification
import torch
from torch.utils.data import TensorDataset, DataLoad... |
from Artesian._GMEPublicOffers.QueryParameters.GMEPOfferQueryParameters import GMEPOfferQueryParameters
from Artesian._GMEPublicOffers.Config.ExtractionRangeConfig import ExtractionRangeConfig
from Artesian._Configuration.DefaultPartitionStrategy import DefaultPartitionStrategy
from Artesian._GMEPublicOffers.Config.Gen... |
import inspect
from prompt_toolkit.buffer import Buffer
from prompt_toolkit.document import Document
from prompt_toolkit.completion import Completion
from prompt_toolkit.filters import Condition, is_done
from prompt_toolkit.formatted_text import ANSI, to_formatted_text, fragment_list_to_text
from prompt_toolkit.keys i... |
# Inspired by the TF Tutorial: https://www.tensorflow.org/get_started/mnist/pros
import tensorflow as tf
import numpy as np
# Constants to eventually parameterise
## Base Dir to write logs to
BASE_LOGDIR = './logs/'
## Subdirectory for this experiment
RUN = '4'
## Learning Rate for Adam Optimizer
LEARN_RATE = 1e-4
#... |
import tensorflow as tf
from voxelgan.loss import generator_loss, discriminator_loss
from voxelgan.optimizer import Optimizer
import numpy as np
class Latent(tf.keras.Model):
'''
The latent
'''
def __init__(self, d) -> None:
super(Latent, self).__init__(name='')
self.input_layer = tf.keras.layers.Input(shape=... |
from pickle import FALSE, TRUE
import streamlit as st
import dlib
import numpy as np
import cv2
import tensorflow as tf
import keras
import os
from PIL import Image
from random import randint
#Page Configs
st.set_page_config(page_title='Face Studio', page_icon = './assets/icon.png', layout = 'wide', initial_sidebar_... |
# ======================== Imports ======================== #
import argparse
import os
import warnings
from typing import Any, Callable, Dict, List
import higher
import torch
import torch.nn as nn
from numpy import number
from tqdm import tqdm
import wandb
from dataloader import ECGDataSetWrapper
from engine.helper... |
import configparser
# from datetime import datetime
import os
from settings import (
S3_DESTINATION_REGION,
S3_DESTINATION_AWS_ACCESS_KEY_ID,
S3_DESTINATION_AWS_SECRET_ACCESS_KEY,
SONG_DATA,
LOG_DATA,
LAKE_DIM_SONG,
LAKE_DIM_ARTIST,
LAKE_DIM_USER,
LAKE_DIM_TIME,
LAKE_DIM_SONGPLAY... |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import uuid
from typing import Callable, Union
from unittest.mock import Mock
import aiounittest
from botbuilder.core import (
ConversationState,
MemoryStorage,
InvokeResponse,
TurnContext,
Mes... |
#!/usr/bin/env python3
"""Script to install patttoo."""
from inspect import ismethod
import textwrap
import argparse
import sys
import os
import getpass
import pwd
EXEC_DIR = os.path.dirname(os.path.realpath(sys.argv[0]))
ROOT_DIR = os.path.abspath(os.path.join(EXEC_DIR, os.pardir))
_EXPECTED = '{0}pattoo{0}setup'.fo... |
from shutil import which
import subprocess as subp
import time
import os
import sys
import requests
import subprocess as subp
import json
import importlib
import threading
from color import alert, default, error_
R = '\033[31m' # red
G = '\033[32m' # green
C = '\033[36m' # cyan
W = '\033[0m' # whit... |
# -*- coding: utf-8 -*-
"""
Facilities for interacting with GPG encrypted files.
:author: <NAME> <<EMAIL>>
:copyright: Copyright (c) <NAME> and contributors, 2016-2019.
:license: BSD
"""
import os
import re
import shutil
import subprocess
from safe.util import get_executable, Subprocess, temporary_directory
#: Name... |
from fastai.vision import ImageSegment, Image
from fastai.vision.image import open_image, show_image, pil2tensor
from fastai.vision.data import SegmentationProcessor, ImageList
from fastai.layers import CrossEntropyFlat
from fastai.callbacks import LearnerCallback
import torch
import warnings
import PIL
import numpy as... |
# import pascalvoc
import numpy as np
import glob
import os
import matplotlib.pyplot as plt
from pathlib import Path
import _init_paths
import settings
from BoundingBox import BoundingBox
from BoundingBoxes import BoundingBoxes
from Evaluator import *
from utils import BBFormat
def getBoundingBoxes(di... |
import numpy as np
import pandas as pd
from scipy import signal, ndimage, interpolate, stats, spatial
from scipy.interpolate import CubicSpline
from sklearn.decomposition import PCA
from pathlib import Path
import os,sys, json
import h5py
import pickle as pkl
sys.path.append('../PreProcessing/')
sys.path.... |
import pytest
from datetime import datetime as dt
from sentinel_server import get_last_heart_rate, get_patient_from_database
from sentinel_server import patient_database
from sentinel_server import attending_database
from testfixtures import LogCapture
@pytest.mark.parametrize("input, expected", [
(
({"a"... |
import numpy as np
from prlqr.systems.dynamical_system import DiscreteTimeDynamicalSystem, StateFeedbackLaw, NormalRandomControlLaw
from prlqr.analysis.stability_analysis import check_stability
class LinearSystem(DiscreteTimeDynamicalSystem):
def __init__(self, A, B, controller, settings):
self.A = A
... |
# This file is part of the Etsin service
#
# Copyright 2017-2018 Ministry of Education and Culture, Finland
#
# :author: CSC - IT Center for Science Ltd., Espoo Finland <<EMAIL>>
# :license: MIT
"""Download API endpoints."""
import json
from flask_mail import Message
from dateutil import parser
from flask_restful im... |
"""Data processing module.
This module aims at preparing and shaping the data in order to make it suitable for the subsequent training step.
"""
import sys
import logging
import json
import pickle as pkl
from pathlib import Path
from typing import Union
import numpy as np
from scipy.sparse import csr_matrix
from panda... |
"""Dependency handling for ports."""
from __future__ import absolute_import
import collections
from libpb import env, event, log, pkg, signal, stacks
__all__ = ['Dependent', 'Dependency']
class DependHandler(object):
"""Common declarations to both Dependent and Dependency."""
# The type of dependencies
... |
"""
YAML parser for predict config files
"""
import os
import copy
import csv
import yaml
import joblib
from .utils import check_for_missing_keys, flatten
path = os.path.abspath(__file__)
dir_path = os.path.dirname(path)
with open(os.path.join(dir_path, "validation.yml")) as val_yaml:
validate_dict = yaml.load(... |
import random
'''
Reversi
8*8
Blank = -1
A = 0
B = 1
Always in the order of (y,x)
'''
def is_in_board(y, x):
return (y >= 0 and y <= 7 and x >= 0 and x <= 7)
def count_stones(board, turn):
count = 0
for y in board:
for x in y:
if x == turn:
count... |
import json.decoder
from typing import List, Dict, Union, Optional
import aiohttp
from bs4 import BeautifulSoup
from utils import Semester
class HujiDataCollector:
def __init__(self, method: str, url: str, headers: dict = None, data: dict = None, params: dict = None,
async_session: aiohttp.Clie... |
import shapefile
# import finoa
import shapely
# import matplotlib
import numpy as np
# import matplotlib.pyplot as plt
# import pandas as pd
from pyproj import Proj, transform
# import stateplane
__author__ = '<NAME>'
def distPL(Point, lineseg):
# input:Point(x,y);lineseg[(x,y),(x,y),(x,y)...]
# output:di... |
""" Main program that manages radiometric recording and data management. """
from __future__ import print_function, absolute_import
import os
import time
import math
import datetime
import argparse
import ads1256
import signal
import sys
import multiprocessing
from threading import Event
from CaptureDuration import ... |
import os
import random
import shutil
import queue
import traceback
import dataclasses
from typing import Optional
from pathlib import Path
from kaiko.utils import commands as cmd
from kaiko.utils import datanodes as dn
from kaiko.utils import engines
from kaiko.beats import beatsheets
@dataclasses.dataclass
class Son... |
#
# crc32.py
#
# Copyright © 2020 Foundation Devices, Inc.
# Licensed under the "BSD-2-Clause Plus Patent License"
#
# From: https://bitbucket.org/isode/cbor-lite/raw/6c770624a97e3229e3f200be092c1b9c70a60ef1/include/cbor-lite/codec.h
# This file is part of CBOR-lite which is copyright Isode Limited
# and others and r... |
import os
import openpyxl
import fpdf
import argparse
import delorean
import PyPDF2
from collections import defaultdict
from sale_log import SaleLog
import matplotlib.pyplot as plt
from itertools import islice
A4_INCHES = (11.69, 8.27)
def generate_summary(logs):
'''
Generate a summary, according to the rece... |
#!/usr/bin/env python3
import os.path
import tensorflow as tf
import helper
import warnings
from distutils.version import LooseVersion
import project_tests as tests
from sklearn.utils import shuffle
EPOCHS = 10
KEEP_PROB = 0.5
LEARNING_RATE = 0.001
BATCH_SIZE = 16
# Check TensorFlow Version
assert LooseVersion(tf.__v... |
# Train, evaluate, and save a Graph Neural Network (GNN) model
import os
import sys
import argparse
from shutil import copyfile
import yaml
import random
import numpy as np
import torch
from torch_geometric.data import DataLoader
from sig.utils import io_utils
from sig.nn.models.gat import GAT
from sig.nn... |
"""fips verb to build the oryol samples webpage"""
import os
import yaml
import shutil
import subprocess
import glob
from string import Template
from mod import log, util, project, emscripten, android
GitHubSamplesURL = 'https://github.com/floooh/oryol-samples/tree/master/src/'
BuildEmscripten = True
BuildWasm = T... |
import warnings
import numpy as np
from scipy import spatial
from shapely.geometry import mapping, shape, Point, LineString, Polygon,MultiPoint,MultiLineString
from shapely.ops import cascaded_union,split,nearest_points,linemerge,snap
from tqdm import tqdm
from .df import DF
def resample_LineString(linestring, maxLen... |
# python 3.6
"""Inverts given images to latent codes with In-Domain GAN Inversion.
Basically, for a particular image (real or synthesized), this script first
employs the domain-guided encoder to produce a initial point in the latent
space and then performs domain-regularized optimization to refine the latent
code.
"""... |
"""
MNIST worker
Code based on example 5 of quickstart hpbandster
We'll optimise the following hyperparameters:
+-------------------------+----------------+-----------------+------------------------+
| Parameter Name | Parameter type | Range/Choices | Comment |
+=========================+===... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import csv
import datetime
import os
import signal
import sys
from time import time
import uuid
from warnings import warn
from configobj import ConfigObj, ConfigObjError, flatten_errors
from validate import Validator
from logfile import write_metapop_dat... |
# -*- coding: utf-8 -*-
import sys
import functools
import logging
from datetime import timedelta
from dateutil import parser
from datafeed.bidict import Bidict
from datafeed.exchange import *
from datafeed.quote import *
from datafeed.providers.http_fetcher import *
from datafeed.utils import json_decode
__all__ =... |
#!/usr/bin/env python3
"""
Jira Ticket Number(s): DEV-3318, DEV-3442, DEV-3443, DEV-4109
Expected CLI:
$ python3 usaspending_api/database_scripts/job_archive/recompute_all_awards.py
Purpose:
Re-calculate all award fields to ensure the awards are accurate and up-to-date
Can choose a range of award.id val... |
# badges.py
#
# Application responds to users in the scene and updates the user avatar with name and badge updates.
import argparse
import yaml
from arena import *
from gstable import GoogleSheetTable
DFT_CONFIG_FILENAME = './config.yaml'
ACTUSERS = {} # actual users by camera id
config = {}
data = []
def init_ar... |
from typing import List, Dict, Any, Callable, Union, Optional
from app.boardgame import BoardGame, BOARDGAME_FIELD_CHECK
from app.filters import stringify_filter_results, _filter, validate_filters
from app.utils import Whitespace
# -- how to use field checks --
# if field in FIELD_CHECK and FIELD_CHECK[field](value)... |
from flask import Flask, request ,session , url_for ,escape ,redirect
from flaskext.mysql import MySQL
from flask_cors import CORS
from login.loginManager import loginManager
import os
import json
# import socket
# _socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# _socket.connect(('172.16.17.32', 5000))
#h... |
import random
import time
import math
import copy
from generator import generator
from heuristic import evaluate
from rules import is_attacked, check_order
# The 'node' and 'cut' variables store, respectively,
# the number of nodes visited throughout the program
# and the number of times the tree was subjected to
# al... |
#!/usr/bin/env python3
# Copyright (c) 2021 Seagate Technology LLC and/or its Affiliates
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your ... |
# coding: utf-8
import codecs
import re
import json
import argparse
import os
from budget2013_common import *
from budget2013_0 import Budget2013_0
from budget2013_1 import Budget2013_1, Budget2013_1_TableDataItem
from budget2013_2 import Budget2013_2
from budget2013_3 import Budget2013_3
from budget2013_4 import Budg... |
"""
LST Periodic Analytics Reporter - Zoom Reporter
Intended for finding periodic stats on Zoom service usage.
Note: uses zoom_web_api_client class to make requests
Last modified: July 2017
By: <NAME>
"""
import os
import sys
import logging
import json
import time
import math
import csv
import datetime
... |
import json
import os
import logging.config
import sys
from enum import Enum
import io
from typing import List, Dict, Tuple, Union
import re
from tqdm import tqdm
logconf_file = os.path.join(os.path.dirname(__file__), "log.conf")
logging.config.fileConfig(fname=logconf_file, disable_existing_loggers=False)
logger = lo... |
import os
import sys
import time
import logging
import logging.config
import asyncio
import warnings
from urllib.parse import urlparse
from concurrent.futures import ThreadPoolExecutor
from multiprocessing import cpu_count
from typing import Set, Optional, Tuple, Callable
from email.utils import parsedate, formatdate
f... |
import argparse
import gc
from datetime import datetime
from pathlib import Path
import copy
import faiss
import h5py
import numpy as np
import pandas as pd
import torch
import torch.nn.functional as F
from torch.utils import data
from torchvision import transforms
from tqdm import tqdm
from model import MultiHeadRes... |
# Twisted Imports
from twisted.internet import reactor, defer
from twisted.python import log
# System Imports
import os
import re
import logging
from collections import deque
# Sibling Imports
from ..data import Variable as data_Variable
from ..util import now, Event
from ..events import Event
from ..machine import M... |
# Sway
from __future__ import print_function, division
import sys
sys.dont_write_bytecode = True
from model import *
from space import *
from grid import *
def BASIC_5_2(): return BASIC(5,2)
def BASIC_10_2(): return BASIC(10,2)
def BASIC_20_2(): return BASIC(20,2)
def BASIC_40_2(): return BASIC(40,2)
class BASI... |
# global imports
import numpy as np
import copy
from future.builtins import range
##################################################################
# functions for handling spike train data
##################################################################
# TODO create continous process with given correlation (e.g.... |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# File: utils.py
# Written by <NAME> <<EMAIL>>
# Utility code for Wearkly-Supervised Object Localization (WSOL).
import cv2
import numpy as np
import multiprocessing
import tensorflow as tf
import random
import os
import sys
from abc import abstractmethod
from tensorpa... |
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-LOG 蓝鲸日志平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-LOG 蓝鲸日志平台 is licensed under the MIT License.
License for BK-LOG 蓝鲸日志平台:
------------------------------------------------... |
import os
from get_block_data.block import Block, prefix, prefix_dir, extract_predicate, stacks, objs
import matplotlib.pyplot as plt
import numpy as np
from c_swm.utils import save_list_dict_h5py
NUM_EPISODE = 100
EPISODE_LENGTH = 10
N_TRAIN_DICT = {1:10, 2:80, 3:600, 4:5000}
N_EVAL_DICT = {1:2, 2:16, 3:120, 4:760}
... |
"""
Worker classes for template matching
"""
import os
import dem, scarplet
import numpy as np
import logging
import uuid
from osgeo import gdal, osr
from s3utils import save_file_to_s3, save_tiff
from shutil import move, rmtree
from time import sleep
from timeit import default_timer as timer
from WindowedTempla... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.