text
stringlengths
3
1.05M
# import Python's JSON library for its loads() method import json #import sys # import time for its sleep method from time import sleep # import the datetime libraries datetime.now() method from datetime import datetime # use the Elasticsearch client's helpers class for _bulk API from elasticsearch import Elasticsea...
# Copyright 2017-2020 Lawrence Livermore National Security, LLC and other # Hatchet Project Developers. See the top-level LICENSE file for details. # # SPDX-License-Identifier: MIT import glob import struct import re import os import traceback import numpy as np import pandas as pd import multiprocessing as mp import...
import mysql from './MysqlWraper.js' import Manager from './Manager.js' import { EWOULDBLOCK } from 'constants' let fs = require('fs') let metaDefinition = require('./meta_definition.js') const DATABLENAME = 'dat_mdt_update' export default class ReportFile { constructor () { this.reportTime = null this.time...
# 4. Представлен список чисел. Определить элементы списка, не имеющие повторений. Сформировать итоговый массив чисел, # соответствующих требованию. Элементы вывести в порядке их следования в исходном списке. Для выполнения задания # обязательно использовать генератор. my_list = [1, 1, 2, 3, 3, 4, 5, 6, 5] new_list = ...
from __future__ import division, print_function, absolute_import import re import glob import os.path as osp from ..dataset import ImageDataset class DukeMTMCreID(ImageDataset): """DukeMTMC-reID. Reference: - Ristani et al. Performance Measures and a Data Set for Multi-Target, Multi-Camera Tracking...
from rtamt.operation.abstract_operation import AbstractOperation class AbsOperation(AbstractOperation): def __init__(self): self.input = [] def update(self, input_list): out = [] for in_sample in input_list: out_time = in_sample[0] out_value = abs(in_sample[1])...
from models.regressors import CelebaRegressor from models.latent_optimizer import VGGFaceProcessing from models.vgg_face2 import resnet50_scratch_dag import torch from utilities.images import load_images from glob import glob import numpy as np import pandas as pd CeleBaAttribute = ['Wearing_Hat'] # Eyeglasses,Smilin...
"""website URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-ba...
/* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; e...
def uniqueNum(keydic, q): # gets a list (keydic) and a key (q) # if key is not in the list, adds it to the list # and assigns key an incremental numeric ID # returns the key ID in the keydic list. if q in keydic: return keydic[q] else: k = len(keydic) + 1 keydic[q] = k...
// CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: http://codemirror.net/LICENSE const multiplexMode = CodeMirror => { CodeMirror.multiplexingMode = function (outer /*, others */) { // Others should be {open, close, mode [, delimStyle] [, innerStyle]} objects con...
import React, { useState } from 'react'; import { Account } from '@solana/web3.js'; import { Token, TOKEN_PROGRAM_ID } from '@solana/spl-token'; import { useConnection } from '../../contexts/connection'; import { useWallet } from '../../contexts/wallet'; import { sleep } from '../../utils/utils'; import styled from 's...
#%% import requests from sqlite_cache.sqlite_cache import SqliteCache cache = SqliteCache('./app/data/gtin_cache') # https://github.com/csotelo/python-sqlite-cache api_base = "https://world.openfoodfacts.org/api/v0/product/" testgtin = "4008452011007" # loop through later api_suffix = ".json" #api_url = api_base+gtin+...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include <string> #include <map> namespace Microsoft { namespace Azure { namespace DeviceManagement { namespace Common { class ReportedError { typedef std::map<std::string, std::string> Param...
from __future__ import unicode_literals import json import os from datetime import datetime from mock import ANY, patch from test.integration.base import DBTIntegrationTest, use_profile, AnyFloat, \ AnyStringWith from dbt.compat import basestring def _read_file(path): with open(path, 'r') as fp: retu...
""" Module with simple hook saving files to the output dir. """ import shutil from typing import Iterable import os from . import AbstractHook class SaveFile(AbstractHook): """ Save files to the output dir before training. .. code-block:: yaml :caption: save files to output dir hooks: ...
// This file is part of BenchExec, a framework for reliable benchmarking: // https://github.com/sosy-lab/benchexec // // SPDX-FileCopyrightText: 2019-2020 Dirk Beyer <https://www.sosy-lab.org> // // SPDX-License-Identifier: Apache-2.0 import React from "react"; import ReactModal from "react-modal"; import { FontAwesom...
import time from Generic.socket import socket_connect, socket_read, socket_write commands = [ 'set titto 456', 'watch titto', 'set titto 123', 'multi', 'get titto', 'set titto 456', 'get titto', 'exec', 'get titto' ] sock = socket_connect('127.0.0.1', 9527) for command in command...
/* eslint indent: warn, no-irregular-whitespace: warn */ const iff = (cond, yes, no) => (cond ? yes : no); module.exports = ({post, site, templateSettings}) => { const date = new Date(); const hasFeatureImageCaption = templateSettings.showFeatureImage && post.feature_image && post.feature_image_caption; ret...
var annotated = [ [ "s_PIN", "structs___p_i_n.html", "structs___p_i_n" ], [ "s_PWM", "structs___p_w_m.html", "structs___p_w_m" ] ];
import { defineMessages } from 'react-intl'; const MESSAGES = defineMessages({ menuItem: { defaultMessage: 'Test App', id: 'iaso.plugin.menuItem', }, title: { defaultMessage: 'Test App', id: 'iaso.plugin.title', }, titleCol: { defaultMessage: 'Title', ...
"""Implementation of :class:`Domain` class. """ from __future__ import print_function, division from typing import Any, Optional, Type from sympy.core import Basic, sympify from sympy.core.compatibility import HAS_GMPY, is_sequence from sympy.core.decorators import deprecated from sympy.polys.domains.domainelement i...
#!/usr/bin/python -o # SAVSNet model import pandas as pd import numpy as np import pymc3 as pm import theano.tensor as tt import theano as t import theano.tensor.slinalg as tla def BinomGP(y, N, X, X_star,mcmc_iter,start={}): """Fits a logistic Gaussian process regression timeseries model. Details =====...
import React, { createContext, useContext } from 'react'; import { useProductReducer } from './reducers'; const StoreContext = createContext(); const { Provider } = StoreContext; const StoreProvider = ({ value = [], ...props }) => { const [state, dispatch] = useProductReducer({ products: [], cart:...
import logging import subprocess import sys from io import StringIO from mangum import Mangum from starlette.applications import Starlette from starlette.middleware import Middleware from starlette.middleware.authentication import AuthenticationMiddleware from starlette.middleware.sessions import SessionMiddleware fro...
import datetime import json import logging import sys from redash.query_runner import * from redash.utils import json_dumps from redash import models import importlib logger = logging.getLogger(__name__) from RestrictedPython import compile_restricted from RestrictedPython.Guards import safe_builtins class Custom...
/* * Bearer Authentication Protocol * * Bearer Authentication is for authorizing API requests. Once * a user is created, a token is also generated for that user * in its passport. This token can be used to authenticate * API requests. * */ module.exports = function(req, token, done) { sails.models.passport....
# # Copyright 2018 Analytics Zoo 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...
import torch.nn import kornia as k import numpy as np from tqdm import tqdm from stage2_cINN.AE.modules.vgg16 import vgg16 def compute_vgg_diversity(videos): """ Computes diversity based on VGG backbone trained on ImageNet Input: PyTorch tensor of shape (BatchSize, NumberSamples, Time, Channel, H, W) ...
// // Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20). // // Copyright (C) 1997-2019 Steve Nygard. // #import <objc/NSObject.h> @class NSData, NSDictionary, NSString, NSTimer, iAP2Session; @interface iAP2AuthenticationController : NSObject { _...
# Contact: sara.ferreira <at> fc [dot] up [dot] pt # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either in source code form or as a compiled # binary, for any purpose, commercial or non-commerci...
#!python3.6 from collections import OrderedDict #変化記号(♭、♯) class Accidental: def __init__(self): self.__NAMES = ('-','+') self.__VALUES = (-1, 1) self.__ACCIDENTALS = OrderedDict(zip(self.__NAMES, self.__VALUES)) @property def Names(self): return self.__NAMES @property def Va...
/** * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "Dictionary.h" #include "LM.h" #include <lm/model.hh> namespace w2l { /** ...
//main.js const greeter = require('./Greeter.js'); document.querySelector("#root").appendChild(greeter());
import os import sys # Hack to find pythoncom.dll - needed for some distribution/setups (includes seemingly unused import win32api) # E.g. if python is started with the full path outside of the python path, then it almost certainly fails cwd = os.getcwd() if not hasattr(sys, 'frozen'): # cx_Freeze etc. will...
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
import math from typing import Optional import numpy as np import pymunk from gym import spaces from pymunk import Vec2d from factored_gym import Observer from k_road.constants import Constants from k_road.entity.entity_type import EntityType from k_road.entity.path import Path from k_road.k_road_view import KRoadVie...
#!/usr/bin/env python #DBISshit! 0.1R - the python app that mimics a database #Copyright (c) 2018 Jan-Daniel Kaplanski ###-------imports------### from sys import argv from io import open from sys import stdin import gzip ###-------imports------### ###----helpful-stuff---### def mprint(arg): print "[MAIN] " + str(a...
# -*- coding: utf-8 -*- import logging from django.db.transaction import commit_on_success from rest_framework import status from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from networkapi.api_rest import exceptions as api_exceptions from networkapi.api_vip_request ...
'''This provides visualization tools for Keras.''' from . import grid2d, DeepPref, video_grid2d from theano import function from keras.callbacks import Callback from bokeh.plotting import (cursession, figure, output_server, push, show) class BokehCallback(Callback): def __init__(self,...
/* crc32.c -- compute the CRC-32 of a data stream * Copyright (C) 1995-2005 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h * * Thanks to Rodney Brown <rbrown64@csc.com.au> for his contribution of faster * CRC methods: exclusive-oring 32 bits of data at a time, and pre-computing...
//===== Copyright (C) 1996-2005, Valve Corporation, All rights reserved. ======// // // Purpose: An application framework // // $Revision: $ // $NoKeywords: $ //===========================================================================// #ifndef APPFRAMEWORK_H #define APPFRAMEWORK_H #ifdef _WIN32 #pragm...
Model: file://amf-client/shared/src/test/resources/validations/examples/pattern-properties/pattern_properties4.raml Profile: RAML 1.0 Conforms? false Number of results: 1 Level: Violation - Source: http://a.ml/vocabularies/amf/parser#pattern-properties-on-closed-node Message: Node without additional properties supp...
import asyncio import pytest from eth.chains.base import MiningChain from eth.tools.builder.chain import ( build, disable_pow_check, genesis, latest_mainnet_at, mine_block, ) from trinity.db.eth1.header import AsyncHeaderDB from trinity.protocol.les.api import LESV1API, LESV2API from trinity.prot...
#!/usr/bin/env python """GUI for Mine Sweeper. Author: Yuhuang Hu Email : duguyue100@gmail.com """ from __future__ import print_function import argparse import sys, time, pygame import game_state, game_draw, game_input, game_board import constants from constants import BOARD_HEIGHT, NUM_MINES, BOARD_WIDTH from minesw...
# Generated by Django 3.1.2 on 2020-10-31 12:04 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import pyuploadcare.dj.models class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AU...
"""Integration for Crownstone.""" from __future__ import annotations from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from .const import DOMAIN from .entry_manager import CrownstoneEntryManager async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> b...
module.exports = function memoize(fn) { let cachedPayload; let cachedResult; let pristine = true; const context = this; return function memoizedFn() { const payload = arguments[0]; if (!pristine && cachedPayload === payload) { return cachedResult; } pristine = false; cachedResult = f...
#pragma once #include <errno.h> #include <pthread.h> #include <pthread.h> #include <time.h> #include <cstdint> #include "MutexLock.h" #include "noncopyable.h" class Condition : noncopyable { public: explicit Condition(MutexLock &_mutex) : mutex(_mutex) { pthread_cond_init(&cond, NULL); } ...
import grace import grace.times import grace.ols import numpy as np import matplotlib.pyplot as plt import sklearn.linear_model as lm initial = (26, 130) # get x values (in days) days = grace.ols.time_vector() all_days = np.linspace(np.min(days), np.max(days), np.max(days) - np.min(days)) # Get OLS stuff for this p...
from django import forms class CreateNewList(forms.Form): name = forms.CharField(label="Name", max_length=100) check = forms.BooleanField(required=False)
import { Sprite } from './sprite'; import { Consts } from './constants'; class Particle { constructor(ctx, x, y, color, intencity) { this.color = (typeof color === 'undefined') ? '255,255,255' : color; this.r = 3; this.x = x; this.y = y; this.vx = (Math.random() * 4 - 2) * ...
# Generated by Django 3.0.1 on 2021-01-31 21:15 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Fan', fields=[ ('id', models.AutoField(auto...
#import <UIKit/UIKit.h> #import <CocoaAsyncSocket/CocoaAsyncSocket.h> #define JAN_1970 ((uint64_t)0x83aa7e80) // UNIX epoch in NTP's epoch: // 1970-1900 (2,208,988,800s) union ntpTime { struct { uint32_t fractSeconds; ui...
from beaker.cache import CacheManager from beaker.util import parse_cache_config_options cache_opts = { 'cache.type': 'file', 'cache.data_dir': '/tmp/cache/data', 'cache.lock_dir': '/tmp/cache/lock' } cache = CacheManager(**parse_cache_config_options(cache_opts)) rate_cache = cache.get_cache('rate.cache'...
dcsApp.service('app', ['$q', '$http', 'messageService', '$rootScope', function($q, $http, msg, $rootScope){ this.user = {'name':'', 'password': '', 'url':''}; this.isAuthenticated = false; var exculdeHeaders = {'ds_name': 'ds_name', 'date':'date'}; this.httpRequest = function(uri, queryParams){ var defe...
"use strict";angular.module("aphrodite",["angular-click-outside","duScroll","ngAnimate","ngDialog","ui.mask"]).config(["momentProvider","ngDialogProvider",function(e,t){e.locale("pt-br"),t.setDefaults({className:"aph modal modal--limit",showClose:!1,plain:!1,trapFocus:!1,closeByDocument:!1,closeByEscape:!0})}]),functio...
/** * Generated header by Geoffrey Testelin for generator-cozen-angular-test project * Created with: generator-cozen-angular * * Created by: Geoffrey Testelin * Date: 31/01/2018 * Time: 17:45 * Version: 0.0.0 */ /* eslint key-spacing:"off" */ module.exports = { app: { src : [ '<%= paths.app %>/confi...
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); exports.__esModule = true; exports.default = writeRedirectsFile; var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); var _constants = require("...
# -*- coding: utf-8 -*- # Generated by Django 1.11.18 on 2019-11-04 21:03 from __future__ import unicode_literals from django.db import migrations def delete_unused_user_roles(apps, schema_editor): unused_roles = ("Senior Judge", "Active Judge") UserRole = apps.get_model('accelerator', 'UserRole') UserRo...
import json import pandas import requests import time import math import numpy as np # Step1: Get V-average def getAveV(): r = requests.get('https://shuttles.rpi.edu/history') while r.status_code != 200: time.sleep(2) r = requests.get('https://shuttles.rpi.edu/history') text = r.json() # g...
from cli import * import sim_commands device_name = get_last_loaded_module() # cross 32-bit reads not supported def read_config(obj, offset, size): reg = offset / 4 off = (offset % 4) * 8 return 0L + (obj.config_registers[reg] >> off) & ((1L << size * 8) - 1) def get_info(obj): return (sim_commands.g...
import time print("Enter your character's full name.") name = input() age = None print("Enter your character's age.") def get_age(): global age age = int(input()) if age < 18: print("Your character can not be under 18. Please enter a valid age.") get_age() get_age() allowed_color...
from datetime import datetime from functools import wraps from signal import signal, SIGINT import click from cli.utils import QuestionaryOption from notifications.notifications import NotificationHandler, TIME_FORMAT from stores.amazon import Amazon from stores.bestbuy import BestBuyHandler from stores.nvidia import...
class Exit(object): def __init__(self, name, target): self.name = name self.target = target def valid(self): return self.target.has_space()
/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ import ReactSharedInternals from 'shared/ReactSharedInternals'; import { IndeterminateComponent, FunctionalComponent, ...
from RatioAlgorithm import RatioAlgorithm def get_line_equation(p1, p2): """ takes 2 points and generating a vector equation of a line. shown as (x, y, z) + t*(x_diff, y_diff, z_diff) :param p1: a tuple of point 1 (x, y, z) :param p2: a tuple of point 2 (x, y, z) :return: a tuple of two tuples...
# -*- coding: utf-8 -*- """ Dummy conftest.py for pykaal. If you don't know what this is for, just leave it empty. Read more about conftest.py under: https://pytest.org/latest/plugins.html """ # import pytest
import React from "react"; import { CDropdown, CDropdownItem, CDropdownMenu, CDropdownToggle, CImg } from "@coreui/react"; import CIcon from "@coreui/icons-react"; const TheHeaderDropdown = () => { const logout = () => { localStorage.clear(); sessionStorage.clear(); window.location.href = "/";...
import { getExploreUrlAndPayload, getAnnotationJsonUrl } from '../explore/exploreUtils'; import { requiresQuery, ANNOTATION_SOURCE_TYPES } from '../modules/AnnotationTypes'; import { Logger, LOG_ACTIONS_LOAD_CHART } from '../logger'; import { COMMON_ERR_MESSAGES } from '../common'; import { t } from '../locales'; cons...
// import { // getToken // } from '@/utils/auth' // get token from cookie // let token = getToken() // console.log('token', token) // axios.defaults.headers.common['token'] = token; // axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'; //配置请求头 // //添加一个请求拦截器 // axios.interceptors.req...
# # MIT License # # (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP # # 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...
import hashlib class GoodHasher: def __init__(self, seed): self.seed = seed def compare_with_hash(self, val, hash_to_compare): return hash_to_compare == self.hash(val) def hash(self, val): val_with_seed = "{}-{}-{}".format(self.seed * 21, val, self.seed * 37).encode() re...
"""Tests for classes from depencency_finder module.""" from bayesian.dependency_finder import DependencyFinder from pathlib import Path def test_scan_and_find_dependencies(): """Test scan_and_find_dependencies function.""" manifests = [{ "filename": "npm-list.json", "filepath": "/bin/local", ...
// license [ // This file is part of the Phantom project. Copyright 2011-2020 Vivien Millet. // Distributed under the MIT license. Text available here at // https://github.com/vlmillet/phantom // ] #pragma once #include <phantom/traits/IsDataPointer.h> /// @cond ADVANCED namespace phantom { template<typename t_Ty> ...
# # Bulter volmer class # import pybamm from .base_kinetics import BaseKinetics class NoReaction(BaseKinetics): """ Base submodel for when no reaction occurs Parameters ---------- param : model parameters domain : str The domain to implement the model, either: 'Negative' or '...
//helpers const esPar = (numero) =>{ return (numero % 2 === 0) } const calcularPromedio = (list) =>{ let sumlist = 0; list.forEach(value =>{ sumlist += value; }) const promedio = sumlist / list.length; return promedio } //calcular media const medianaSalaryGuate = (list) =>{ cons...
var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } r...
# Generated by Django 3.1.3 on 2021-09-07 09:56 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUT...
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_project_file> <FileVersion major="1" minor="6" /> <Project> <Option title="project6chap10" /> <Option pch_mode="2" /> <Option compiler="gcc" /> <Build> <Target title="Debug"> <Option output="bin/Debug/project6chap10" prefix_auto="1" e...
/** * 配置信息 */ import vueCookie from 'vue-cookie' import tld from 'tldjs' const profiles = { // 环境变量 env: () => process.env.NODE_ENV, prodenv: () => process.env.PROD_TOKEN, apiDomain: () => { let domain = ''; if (profiles.prodenv() === 'dev' || profiles.prodenv() === 'development') { ...
import axiosClient from './axios'; const tokenAuth = (token) => { if (token) { axiosClient.defaults.headers.common['x-auth-token'] = token; } else { delete axiosClient.defaults.headers.common['x-auth-token']; } }; export default tokenAuth;
#!e:\coding_practice_try_different_projects\machine learning\healthcare_project\env2\scripts\python.exe # When the django-admin.py deprecation ends, remove this script. import warnings from django.core import management try: from django.utils.deprecation import RemovedInDjango40Warning except ImportError: rai...
from __future__ import absolute_import, division, print_function import os import numpy as np import matplotlib.pyplot as plt import matplotlib import json from PIL import Image from ..datasets import OTB from ..utils.metrics import rect_iou, center_error from ..utils.viz import show_frame class ExperimentOTB(objec...
import datetime import sys import shutil import gc from keras.callbacks import EarlyStopping, CSVLogger, ModelCheckpoint, LearningRateScheduler, TensorBoard import model_structure from load_data import data_generator, test_generator, get_test_true from Param_DMVST_flow import * def mkdir(path): folder = os.path...
# https://atcoder.jp/contests/abc203/tasks/abc203_d N, K = map(int, input().split()) a_map = [list(map(int, input().split())) for _ in range(N)] s_map = [[0 for _ in range(N + 3)] for _ in range(N + 3)] shikii = (K**2 // 2) + 1 def has_lower(x: int) -> bool: for i in range(N): for j in range(N): ...
from main.game.pieces.pawn import Pawn from main.game.pieces.torre import torre from main.game.pieces.queen import queen from main.game.pieces.king import king from main.game.pieces.cavalo import cavalo from main.game.pieces.bispo import bispo from main.game.ConvertStringArray import arrayTostring,stringToArray,arrayTo...
// Due to the order of importing dependencies, // we have to manually keep a list of layouts. export default [ "LayoutCorners", "LayoutJr", "LayoutOdyssey", "LayoutGlass", "LayoutGlassLite", "LayoutLine", "LayoutPhoenix", "LayoutShipStation", "LayoutEpsilon", "LayoutBlack", "LayoutClear", "Layou...
#MenuTitle: Green Blue Manager # -*- coding: utf-8 -*- from __future__ import division, print_function, unicode_literals __doc__=""" Define an angle above which a node will be set to blue, below which it will be set to green. """ import vanilla from math import degrees, atan2 from Foundation import NSPoint, NSMutableA...
# Copyright (c) 2008 Divmod. See LICENSE for details. """ An AMP server which requires authentication of its clients before exposing an addition command. """ from sys import stdout from twisted.python.log import startLogging, msg from twisted.internet import reactor from twisted.cred.checkers import InMemoryUsernam...
import torch import torch.nn as nn from .base import BaseDetector from .test_mixins import RPNTestMixin, BBoxTestMixin, MaskTestMixin from .. import builder from ..registry import DETECTORS from mmdet.core import bbox2roi, bbox2result, build_assigner, build_sampler, tensor2imgs import numpy as np import mmcv import ma...
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
"""Optimizes hyperparameters using Bayesian optimization.""" from argparse import ArgumentParser, Namespace from copy import deepcopy import json from typing import Dict, Union import os from hyperopt import fmin, hp, tpe import numpy as np from chemprop_solvation.models import build_model from chemprop_solvation.nn...
from office365.runtime.client_value import ClientValue class ObjectIdentity(ClientValue): """ Represents an identity used to sign in to a user account. """ def __init__(self, signInType, issuer, issuerAssignedId): """ :param str signInType: Specifies the user sign-in types in your di...
// Copyright 2020 Google 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 in ...
import random from temperature_web_control.model.temperature_monitor import TemperatureMonitor, Option class DummyDevice(TemperatureMonitor): def __init__(self, name, fluctuation, logger): super().__init__(name) self._temperature = 10 self._setpoint = 0 self.dummy_fluctuation = fl...
import os import sys import subprocess as sp from PIL import Image import numpy as np import glob FFMPEG_BIN = "ffmpeg" DATASET_BASE_PATH = os.environ['YCL_DATA_ROOT'] opticalflow_version = True target_rows = 227 target_cols = 227 target_length = 10 # frame strides train_frame_strides = [1] test_frame_stride = 1 #...
# Generated by Django 3.0.3 on 2021-08-20 06:34 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('fyle', '0010_expense_org_id'), ] operations = [ migrations.AddField( model_name='expensegroupsettings', name='import...
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: atari.py # Author: Yuxin Wu <ppwwyyxxc@gmail.com> import numpy as np import time, os import cv2 from collections import deque import threading import six from six.moves import range from tensorpack.utils import (get_rng, logger, get_dataset_path, execute_only_once)...
""" This project lets you try out Tkinter/Ttk and practice it! Authors: David Mutchler, Valerie Galluzzi, Mark Hays, Amanda Stouder, their colleagues and Zheming Zhang. """ # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE. import tkinter from tkinter import ttk def main(): """ Constructs a GUI with stuff on...