text stringlengths 2 999k |
|---|
# Version 51702
upgrades = {'Protoss': {'ObserverGraviticBooster': {'mineral_cost': 100, 'gas_cost': 100}, 'GraviticDrive': {'mineral_cost': 100, 'gas_cost': 100}, 'ExtendedThermalLance': {'mineral_cost': 150, 'gas_cost': 150}, 'PsiStormTech': {'mineral_cost': 200, 'gas_cost': 200}, 'WarpGateResearch': {'mineral_cost':... |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.14.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... |
'''
Copyright (c) 2021, Pycom Limited.
This software is licensed under the GNU GPL version 3 or any
later version, with permitted additional terms. For more information
see the Pycom Licence v1.0 document supplied with this file, or
available at https://www.pycom.io/opensource/licensing
'''
import os
try:
from pyb... |
from UdonPie import UnityEngine
from UdonPie.Undefined import *
class Mode:
def __new__(cls, arg1=None):
'''
:returns: Mode
:rtype: UnityEngine.Mode
'''
pass
|
import logging
from .Container import Container
class HttpProxyContainer(Container):
def __init__(self, name, vols, network, image_store, command=None):
super().__init__(name, 'http-proxy', vols, network, image_store, command)
def get_startup_finished_log_entry(self):
return "Accepting HTTP S... |
import os.path as osp
import warnings
from collections import OrderedDict
import mmcv
import numpy as np
from mmcv.utils import print_log
from torch.utils.data import Dataset
from mmdet.core import eval_map, eval_recalls
from .builder import DATASETS
from .pipelines import Compose
from .coco import CocoDataset
from p... |
# Manul - AFL helper
# -------------------------------------
# Maksim Shudrak <mshudrak@salesforce.com> <mxmssh@gmail.com>
#
# Copyright 2019 Salesforce.com, inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with th... |
import random
from typing import Optional, List, Union
import numpy as np
from common.segment_tree import SumSegmentTree, MinSegmentTree
from common.vec_env import VecNormalize
class ReplayBuffer(object):
def __init__(self, size: int):
"""
Implements a ring buffer (FIFO).
:param size: (... |
# -*- coding: utf-8 -*-
"""A searcher to find keys and values within a Windows Registry."""
from __future__ import unicode_literals
import re
import sre_constants
from dfwinreg import glob2regex
from dfwinreg import key_paths
from dfwinreg import py2to3
class FindSpec(object):
"""Find specification."""
def __... |
# Generated by Django 2.2.4 on 2019-08-14 16:06
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [("iaso", "0018_instance_json")]
operations = [
migrations.AddField(
model_name="instancefile",
nam... |
# BSD Licence
# Copyright (c) 2010, Science & Technology Facilities Council (STFC)
# All rights reserved.
#
# See the LICENSE file in the source distribution of this software for
# the full license text.
"""
A translator specific to CMIP3
The CMIP3 translation code is less complete than CMIP5. It focuses
on translat... |
# vim:fileencoding=utf-8
from django.template.engine import Engine
def template_loader(loader_name):
return Engine.get_default().find_template_loader(loader_name)
def template_from_string(template_code):
return Engine().from_string(template_code)
def get_engine():
return Engine.get_default()
|
from __future__ import print_function
import os
import torch
import torch.optim as optim
import torch.backends.cudnn as cudnn
import argparse
import torch.utils.data as data
from data import WiderFaceDetection, detection_collate, preproc, cfg_mnet, cfg_re50
from layers.modules import MultiBoxLoss
from layers.functions.... |
import ssl
import time
from pathlib import Path
from typing import Union
import pytest
from OpenSSL import SSL
from mitmproxy import certs, connection
from mitmproxy.addons import tlsconfig
from mitmproxy.proxy import context
from mitmproxy.proxy.layers import modes, tls
from mitmproxy.test import taddons
from test.m... |
"""data_fields in LogEntry model
Revision ID: dca2e3e8a5e8
Revises: 1753904231ff
Create Date: 2020-11-07 22:55:40.965889
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'dca2e3e8a5e8'
down_revision = '1753904231ff'
branch_labels = None
depends_on = None
def u... |
import ClientAPI
import MarsCommand
NamedColors = {}
NamedColorsOrig = {
'AliceBlue': ClientAPI.ColorEx.AliceBlue,
'AntiqueWhite': ClientAPI.ColorEx.AntiqueWhite,
'Aqua': ClientAPI.ColorEx.Aqua,
'Aquamarine': ClientAPI.ColorEx.Aquamarine,
'Azure': ClientAPI.ColorEx.Azure,
'Beige': ClientAPI.Co... |
import unittest
from os import getenv
from lemon_markets.account import Account
client_id = getenv('CLIENT_ID')
client_token = getenv('CLIENT_TOKEN')
class _TestAccount(unittest.TestCase):
def test_token_type(self):
self.assertEqual(
Account(client_id, client_token).access_token_type, 'bear... |
'''
@Author: Tao Hang
@Date: 2019-10-17 14:43:52
@LastEditors : Tao Hang
@LastEditTime : 2019-12-19 02:16:10
@Description:
'''
import torch.nn as nn
import torch
from torch.autograd import Variable
def weights_init(model):
for m in model.modules():
if isinstance(m, nn.Conv2d):
nn.init.kaimin... |
import sys
import pytest
import unittest
sys.path.append('tests/python/')
import test_linear # noqa: E402
import testing as tm # noqa: E402
class TestGPULinear(unittest.TestCase):
datasets = ["Boston", "Digits", "Cancer", "Sparse regression"]
common_param = {
'booster': ['gbl... |
""" Cisco_IOS_XR_nto_misc_shprocmem_oper
This module contains a collection of YANG definitions
for Cisco IOS\-XR nto\-misc\-shprocmem package operational data.
This module contains definitions
for the following management objects\:
processes\-memory\: Process statistics
Copyright (c) 2013\-2016 by Cisco Systems, ... |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "googleSheet.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. ... |
import warnings
from abc import ABCMeta
from copy import deepcopy
from pathlib import Path
from types import FunctionType
from typing import Any, Dict, Set, Type, Union
from .exceptions import ConfigError, Error, Extra, Missing, ValidationError
from .fields import Field, Validator
from .parse import Protocol, load_fil... |
"""
Disjoint union of enumerated sets
AUTHORS:
- Florent Hivert (2009-07/09): initial implementation.
- Florent Hivert (2010-03): classcall related stuff.
- Florent Hivert (2010-12): fixed facade element construction.
"""
#****************************************************************************
# Copyright (C) 2... |
import queue
def createMaze3():
maze = []
maze.append(["#","#", "#", "#", "#", "O","#"])
maze.append(["#"," ", " ", " ", "#", " ","#"])
maze.append(["#"," ", "#", " ", "#", " ","#"])
maze.append(["#"," ", "#", " ", " ", " ","#"])
maze.append(["#"," ", "#", "#", "#", " ","#"])
maze.append([... |
# Generated by Django 3.1.5 on 2021-02-03 14:58
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='GroupMember',
fields=[
('id', models.AutoFi... |
# -*- coding: utf-8 -*-
from .context import pn532
import unittest
class TestConstructFrame(unittest.TestCase):
def test_sam_config(self):
expected = [0x00, 0x00, 0xff, 0x05, 0xfb, 0xd4, 0x14, 0x01, 0x01, 0x00, 0x16, 0x00]
self.assertEqual(pn532.construct_frame([pn532.PN532_COMMAND_SAMCONFIGURAT... |
{%for model in models-%}
{%-if model.api-%}
#---- list_{{model.name.lower()}}
{%endif%}
{%endfor%}
|
import numpy as np
sketch_x_train = np.load('/home/adarsh/project/disentanglement/saved_features/da_sketchy_feature_train.npy',allow_pickle=True)
sketch_y_train = np.load('/home/adarsh/project/disentanglement/saved_features/da_sketchy_label_train.npy',allow_pickle=True)
print('1')
sketch_x_val = np.load('/home/adarsh... |
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import nu... |
from functools import partial
import gym
from gym.spaces import Box, Dict, Discrete, MultiDiscrete, Tuple
import logging
import numpy as np
import tree # pip install dm_tree
from typing import List, Optional, Type, Union
from ray.tune.registry import RLLIB_MODEL, RLLIB_PREPROCESSOR, \
RLLIB_ACTION_DIST, _global_r... |
"""Thread-safe in-memory cache backend."""
import pickle
import time
from contextlib import contextmanager
from anthill.framework.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache
from anthill.framework.utils.synch import RWLock
# Global in-memory store of cache data. Keyed by name, to provide
# multiple na... |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import hashlib
try:
from bs4 import SoupStrainer, BeautifulSoup
except ImportError:
print "You need to install beautiful soup"
class BaseParser(object):
"""Base Parser"""
def parse(self):
"""parse"""
raise NotImplementedError('Don\'t invoke... |
import random
from timedWord import TimedWord
def sampleGenerationMain(teacher, upperGuard, length):
if random.randint(0, 1) == 0:
return sampleGeneration_invalid(teacher, upperGuard, length)
else:
sample = None
while sample is None:
sample = sampleGeneration_valid(teacher,... |
# Copyright Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompan... |
# ---------------------------------------------------------------------
# Eltex.MES24xx.get_version
# ---------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
# Pytho... |
# -*- coding: utf-8 -*-
import numpy
from sklearn.datasets.samples_generator import make_blobs
from sklearn.cluster import DBSCAN
from sklearn.preprocessing import StandardScaler
#for making density data
centers = [[1, 1], [-1, -1], [1, -1]]
X, labels_true = make_blobs(n_samples=750, centers=centers, cluster_std=0.... |
# Copyright 2015 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.
"""Provides fakes for several of Telemetry's internal objects.
These allow code like story_runner and Benchmark to be run and tested
without compiling or st... |
# coding: utf-8
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
import re # noqa: F401
import sys # noqa: F401
import nulltype # ... |
# Copy of stdlib's site.py. See explanation in extensions.py.
"""Append module search paths for third-party packages to sys.path.
****************************************************************
* This module is automatically imported during initialization. *
**********************************************************... |
# URI Online Judge
N = int(input())
for i in range(1,N+1):
if N%i == 0:
print(i) |
import numpy as np
import yaml, os, time, pickle, librosa, re, argparse
from concurrent.futures import ThreadPoolExecutor as PE
from collections import deque
from threading import Thread
from random import shuffle
from tqdm import tqdm
from Audio import Audio_Prep, Mel_Generate
from yin import pitch_calc
with open('.... |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/appengine_v1alpha/proto/domain.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf... |
# Zipfile Module
# Open and List
# Metadata in the zip folder
# Access to files in zip folder
# Extracting files
# Closing the zip
|
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'troc.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportErr... |
import numpy as np
import cv2 as cv
import json
from pycocotools import mask as cocomask
import logging
def sa_vector_to_coco_object_detection(
make_annotation, image_commons, id_generator
):
print("converting to coco, vector object detection")
annotations_per_image = []
image_info = image_commons.ima... |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-07-11 01:21
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Food',
... |
import contextlib
import logging
import os
from typing import TYPE_CHECKING, Any, Callable, Tuple, TypeVar, Union
from dvc.exceptions import DvcException
from dvc.parsing.versions import LOCKFILE_VERSION, SCHEMA_KWD
from dvc.stage import serialize
from dvc.stage.exceptions import (
StageFileBadNameError,
Stage... |
#!/usr/bin/python
import subprocess
import json
#Setting this to true will alert you when there is a communication problem while posting plugin data to server
HEARTBEAT = "true"
#if any impacting changes to this plugin kindly increment the plugin version here.
PLUGIN_VERSION = "1"
def get_data():
data = {}
data["... |
# this is a modified version of cli-file-stop-wait.py that is broken into functions.
# send specific files over lora
# Currently working on parsing
# Import Python System Libraries
import time
# Import Blinka Libraries
import busio
from digitalio import DigitalInOut, Direction, Pull
import board
import math
# Import R... |
# -*- coding: utf-8 -*-
import os
import sys
import logging
from boto3.session import Session
from botocore.exceptions import ClientError
from argparse import ArgumentParser
TEMPLATE = "test-ec2"
logger = logging.getLogger()
formatter = '%(levelname)s : %(asctime)s : %(message)s'
logging.basicConfig(level=logging.IN... |
from datetime import datetime
import json
import os
import random
import shutil
import string
import subprocess
import sys
import traceback
import logging
import pytz
from django.db import (models,
transaction)
from django.conf import settings
from django.http import Http404
from agda.models i... |
from collections import namedtuple
from Vintageous.vi.utils import modes
from Vintageous.tests import set_text
from Vintageous.tests import add_sel
from Vintageous.tests import get_sel
from Vintageous.tests import first_sel
from Vintageous.tests import second_sel
from Vintageous.tests import ViewTest
test_data = na... |
from Crypto.Cipher import AES
import base64
class AESCipher(object):
'''
AES Cipher Class for Python
'''
def __str__(self):
return str(self.__class__) + '\n'+ '\n'.join(('{} = {}, {}'.format(item, self.__dict__[item], type(self.__dict__[item])) for item in self.__dict__))
def _pad(self... |
import os
import pyverdict,json
verdictdbConfig = json.load(open(os.path.join(os.path.dirname(__file__),'..','..','verdictdb.config.json')))
port=verdictdbConfig['port']
password=verdictdbConfig['password']
conn=pyverdict.postgres(host='localhost',user='crossfilter',password=password,port=port,dbname='crossfilter-eval... |
#!/usr/bin/env python3
version = '1.0.0'
R = '\033[31m' # red
G = '\033[32m' # green
C = '\033[36m' # cyan
W = '\033[0m' # white
Y = '\033[33m' # yellow
import argparse
parser = argparse.ArgumentParser(description=f'nexfil - Find social media profiles on the web | v{version}')
parser.add_argument('-u', help='S... |
from profiles_api.views import HelloAPIView
from django.urls import path
urlpatterns = [
path('hello-view/', HelloAPIView.as_view())
] |
import argparse
import copy
import decimal
import errno
import subprocess
import time
import glob
import shutil
import os
import platform
from collections import namedtuple
import re
import string
import signal
import socket
import datetime
import inspect
import sys
import random
import json
import shlex
from sys impor... |
# Generated by Django 3.2.4 on 2021-06-24 07:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('data', '0008_binarywalked'),
]
operations = [
migrations.CreateModel(
name='AverageWalked',
fields=[
... |
from .base import *
import sys
import logging.config
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
TEMPLATES[0]['OPTIONS'].update({'debug': True})
# Turn off debug while imported by Celery with a workaround
# See http://stackoverflow.com/a/4806384
if "celery" in sys.argv[0]:
DEBUG... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" Bessy Signal module
@author: Olivier CHURLAUD <olivier.churlaud@helmholtz-berlin.de>
"""
from __future__ import division, print_function
import math
import matplotlib.pyplot as plt
import numpy as np
import scipy.linalg
import scipy.signal as signal
import mysigna... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2011 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... |
import os
import torch
from typing import Any, Dict
from theseus.base.metrics.metric_template import Metric
import cv2
import numpy as np
import hashlib
from theseus.utilities.visualization.visualizer import Visualizer
from theseus.utilities.loggers import LoggerObserver
# To fix tensorflow bug on Google Colab
import ... |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: lock_zone.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _ref... |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: Trd_ModifyOrder.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection a... |
from .base import Resource
class Team(Resource):
def users(self):
return self._get('/team/users')
def timers(self):
return self._get('/team/timers')
|
import asyncio
import json
import logging
import socket
import time
import traceback
from pathlib import Path
from typing import Callable, Dict, List, Optional, Set, Tuple, Union
from blspy import PrivateKey
from ethgreen.consensus.block_record import BlockRecord
from ethgreen.consensus.blockchain_interface import Blo... |
import threading
import unittest
import mock
import cupy
from cupy import testing
from cupy_tests.core_tests.fusion_tests import fusion_utils
class FusionTestBase(unittest.TestCase):
def generate_inputs(self, xp, nargs, dtype):
inputs = [
testing.shaped_random((3, 4), xp, dtype, scale=10, se... |
# Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# These rules are similar to the rules in bazel_common.
# However, our requirements are different in a few ways so we have our own version for now:
# 1. We only include immediate depe... |
# NOTE:
# you only need to run this cell if you have not yet downloaded the data
# otherwise you may skip this cell or comment it out
!wget https://s3.amazonaws.com/video.udacity-data.com/topher/2019/January/5c4147f9_data/data.zip
!unzip data
# thanks God
|
"""
fritzstatus.py
Module to inspect the FritzBox API for available services and actions.
CLI interface.
This module is part of the FritzConnection package.
https://github.com/kbr/fritzconnection
License: MIT (https://opensource.org/licenses/MIT)
Author: Klaus Bremer
"""
from ..core.exceptions import FritzServiceErr... |
# Generated by Django 3.1.2 on 2020-10-25 09:43
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('hello_world', '0007_auto_20201023_2129'),
]
operations = [
migrations.AlterField(
model_name='g... |
import nems.recording as recording
import nems_lbhb.baphy as nb
from src.data import epochs as cpe, cache as cch
# import cpp_dispersion as cdisp
from src.metrics import trp_dispersion as cdisp
from src.visualization.fancy_plots import plot_dist_with_CI
# harcoded selected cells as taken from 190529_select_single_ce... |
def read(log_file):
for line in open(log_file, "r"):
line = line.strip()
if not line:
continue
time, value = map(float, line.split())
data_dict = {"time": time, "value": value}
yield data_dict
|
from .mainSim import printStartupMsg
from .compareSim import MainSim
printStartupMsg()
sim = MainSim()
sim.runsim(100)
print('Exiting mainSim.py')
|
log_level = 'INFO'
load_from = None
resume_from = None
dist_params = dict(backend='nccl')
workflow = [('train', 1)]
checkpoint_config = dict(interval=10)
evaluation = dict(interval=10, metric='mAP')
optimizer = dict(
type='Adam',
lr=5e-4,
)
optimizer_config = dict(grad_clip=None)
# learning policy
lr_config = ... |
# -*- coding: utf8 -*-
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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... |
import numpy as np
from dask import array as da
from typing import Tuple, List, Iterable
import pyqtgraph as pg
import skbeam.core.correlation as corr
from xicam.SAXS.patches.pyFAI import AzimuthalIntegrator
from xicam.core.intents import PlotIntent
from xicam.core import msg
from xicam.plugins.operationplugin import... |
from selenium import webdriver
from fixture.session import SessionHelper
from fixture.contact import ContactHelper
class Application:
def __init__(self, browser, base_url):
if browser == "firefox":
self.wd = webdriver.Firefox()
elif browser == "chrome":
self.wd = webdriver.... |
#!/usr/bin/python3
from brownie import LeXpunK, MerkleDistributor, accounts
def main():
deployer = accounts.load('deployer')
admin = "0x8a7dbC2824AcaC4d272289a33b255C3F1f3cdf32"
mint_address = deployer.get_deployment_address(deployer.nonce + 1)
token = LeXpunK.deploy(admin, mint_address, {'from': dep... |
#!/usr/bin/python -tt
# Copyright 2010 Google Inc.
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
# Google's Python Class
# http://code.google.com/edu/languages/google-python-class/
"""Wordcount exercise
Google's Python class
The main() below is already defined and comp... |
import logging
from django.db import connection, IntegrityError, transaction
from prometheus_client import CollectorRegistry, Gauge
from .models import (Incident, MachineIncident,
OPEN_STATUSES, SEVERITY_CHOICES_DICT,
STATUS_CLOSED, STATUS_CHOICES_DICT, STATUS_OPEN)
logger = ... |
# -*- coding: utf-8 -*-
import boto
def create_temp_s3_link(filename, seconds_available, bucket_name):
connection = boto.connect_s3()
bucket = connection.get_bucket(bucket_name)
key = bucket.new_key(filename)
key.set_contents_from_filename(filename)
temp_url = key.generate_url(expires_in=seconds_available, query_... |
class Solution(object):
def findTheDifference(self, s, t):
"""
:type s: str
:type t: str
:rtype: str
"""
char_num = {}
for c in s:
char_num[c] = char_num.get(c, 0) + 1
for c in t:
if c not in char_num:
return c
... |
# Copyright (c) 2021 PaddlePaddle 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 app... |
# coding: utf-8
"""
Healthbot APIs
API interface for Healthbot application # noqa: E501
OpenAPI spec version: 1.0.0
Contact: healthbot-hackers@juniper.net
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
# pyt... |
# model settings
temperature = 0.01
with_norm = True
model = dict(
type='UVCTrackerV2',
backbone=dict(
type='ResNet',
pretrained=None,
depth=18,
out_indices=(1, 2, 3),
# strides=(1, 2, 1, 1),
norm_cfg=dict(type='SyncBN', requires_grad=True),
norm_eval=Fals... |
# -*- coding: utf-8 -*-
# This file is part of the OpenSYMORO project. Please see
# https://github.com/symoro/symoro/blob/master/LICENCE for the licence.
"""
This module of SYMORO package provides description
of the robot parametrizaion container and symbol replacer class.
"""
import re
import os
import copy
from... |
# Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... |
from django import forms
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
from .models import CustomUser
class CustomUserCreationForm(forms.ModelForm):
class Meta(UserCreationForm.Meta):
model = CustomUser
fields = ('username', 'email')
class CustomUserChangeForm(forms.Mod... |
from darknet import Darknet
import dataset
import torch
from torch.autograd import Variable
from torchvision import datasets, transforms
from utils import *
import os
def valid(datacfg, cfgfile, weightfile, outfile):
options = read_data_cfg(datacfg)
valid_images = options['valid']
name_list = options['name... |
#!/usr/bin/env python
# Copyright 2014 - 2017, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0
"""
<Program>
test_download.py
<Author>
Konstantin Andrianov.
<Started>
March 26, 2012.
<Copyright>
See LICENSE-MIT OR LICENSE for licensing information.
<Purpose>
Uni... |
#! /usr/bin/env python
# coding=utf-8
# Copyright (c) 2019 Uber Technologies, 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
... |
# -*- coding: utf-8 -*-
import os
import tensorflow as tf
import shutil
from deeplabv3plus import model
from dataset import Dataset
from config import cfg
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
log = cfg.TRAIN.LOGDIR
EPOCHS = cfg.TRAIN.EPOCHS
save_every_n_epoch = cfg.TRAIN.SAVE_EPOCH
if os.path.exists(log): shuti... |
from functools import partial
from unittest.mock import patch
from pytest import raises
from pychroot import __title__ as project
from pychroot.scripts import run
def test_script_run(capfd):
"""Test regular code path for running scripts."""
script = partial(run, project)
with patch(f'{project}.scripts.... |
# Copyright (c) 2021 PaddlePaddle 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 appli... |
from .f1 import f1
from .precision import precision
from .recall import recall
from .show_matrix import show_matrix
from .roc import roc
from .segmentation_metrics import *
from .lovasz import * |
import datetime
import threading
from django.utils.html import escape as html_escape
from mongoengine import EmbeddedDocument
try:
from mongoengine.base import ValidationError
except ImportError:
from mongoengine.errors import ValidationError
from mongoengine.base.datastructures import BaseList
from mongoengi... |
# Copyright 2019 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 output.models.sun_data.combined.pkg_003.test_xsd.test import (
B,
De,
Dee,
Der,
Dr,
Dre,
Drr,
Empty,
Root,
)
__all__ = [
"B",
"De",
"Dee",
"Der",
"Dr",
"Dre",
"Drr",
"Empty",
"Root",
]
|
# Note will only work on foxy, will need to be slightly rewritten to launch using eloquent
# See: https://index.ros.org/doc/ros2/Tutorials/Launch-Files/Creating-Launch-Files/
# Will make stdout unaccesible, if required add namespace via ros-args (see readme)
from launch import LaunchDescription
from launch_ros.action... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.