text
stringlengths
3
1.05M
from typing import List from blspy import AugSchemeMPL, G1Element, G2Element from staicoin.consensus.coinbase import create_puzzlehash_for_pk from staicoin.util.bech32m import encode_puzzle_hash from staicoin.util.config import load_config from staicoin.util.default_root import DEFAULT_ROOT_PATH from staicoin.util.in...
from tqdm.notebook import trange #logarithmic values: exp_powers = list(range(-6,1)) exp_vals = list(np.exp(exp_powers)) #Find Optimal Learning Rate for Ada-Boosting staged_train_scores, staged_test_scores = {}, {} score_train, score_test = {}, {} for i in trange(len(exp_vals)): model = AdaBoostClassifier( ...
# encoding: utf-8 import codecs import sys import unittest from conda.core.subdir_data import cache_fn_url from conda.misc import url_pat, walk_prefix from conda.utils import Utf8NamedTemporaryFile class TestMisc(unittest.TestCase): def test_Utf8NamedTemporaryFile(self): test_string = 'ōγђ家固한áêñßôç' ...
# Copyright 2021 QuantumBlack Visual Analytics Limited # # 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 # # THE SOFTWARE IS PROVIDED "AS IS",...
# coding: utf-8 """ Paragon Insights APIs API interface for PI application # noqa: E501 OpenAPI spec version: 4.0.0 Contact: healthbot-feedback@juniper.net Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class TopicSchema...
const { componentIndex, component } = require('../templates'); const { createDirectory, createFile } = require('../utils'); const createWebComponent = (name, { base, web }) => { createDirectory([web]); createFile(`${web}/index.js`, componentIndex(name)); createFile(`${web}/${name}.jsx`, component(name)); cre...
from rest_framework import serializers, pagination from .models import Post, Category class PostSerializer(serializers.HyperlinkedModelSerializer): category = serializers.SlugRelatedField( read_only=True, slug_field='name' ) tag = serializers.SlugRelatedField( many=True, r...
import React from 'react'; import { connect } from 'react-redux'; import { push } from 'react-router-redux'; import classNames from 'classnames'; import PropTypes from 'prop-types'; import { CSSTransitionGroup } from 'react-transition-group'; import { authLogoutAndRedirect } from '../../../actions/auth'; import '../.....
from LedModule import led pulseInTime = 75 pulseOutTime = 1000 def pulse(device, r, g, b, ww, cw, pulseInTime=75, pulseOutTime=1000): """ Fade in for a given time and fade out for another given time. If you give pulseInTime << pulseOutTime, you can accomplish a "pulse" effect. """ led.setColor( ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # king_phisher/server/rest_api.py # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, ...
from .core.cproto import CProto # noqa
/* P_spec.h */ /* =============================================================================== P_SPEC =============================================================================== */ /* */ /* Animating textures and planes */ /* */ typedef struct { char istexture; VINT picnum; VINT basepic; VINT nump...
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow */ 'use strict'; const React = require('react'); const { PermissionsAndroid, Picker, StyleSheet, Tex...
/******/ (function(modules) { // webpackBootstrap /******/ // install a JSONP callback for chunk loading /******/ var parentJsonpFunction = window["webpackJsonp"]; /******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) { /******/ // add "moreModules" to the modules o...
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Obje...
# -*- coding: utf-8 -*- import random from queue import PriorityQueue import numpy as np import scipy.misc from .astar import astar from .gridworld import generate_grid, MOUVEMENT from gym_pathfinding.games.gridworld import generate_grid, is_legal, MOUVEMENT import operator ACTION = {mouvement: action for action, mou...
import React, { useState, useEffect, useRef } from 'react'; import Checkbox from '../../atoms/Checkbox/Checkbox'; import Badge from '../../molecules/Badge/Badge'; import { connect } from 'react-redux'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faCaretDown, faCaretUp } from '@fortawesome...
""" This class implements a token bucket, allowing for requests to be made without being ratelimited. """ import time class RateBucket: def __init__(self, requests_per_15_minutes, requests_per_second): self.requests_per_15_minutes = requests_per_15_minutes self.requests_per_second = requests_per_...
# Copyright 2003 by Bartek Wilczynski. All rights reserved. # # This file is part of the Biopython distribution and governed by your # choice of the "Biopython License Agreement" or the "BSD 3-Clause License". # Please see the LICENSE file that should have been included as part of this # package. """Parsing AlignACE ...
import path from 'path' import fs from 'fs' import { createFilter } from 'rollup-pluginutils' import Concat from 'concat-with-sourcemaps' import Loaders from './loaders' import normalizePath from './utils/normalize-path' /** * The options that could be `boolean` or `object` * We convert it to an object when it's tru...
""" Primitive sentence splitting using Sampo Pyysalo's GeniaSS sentence split refiner. Also a primitive Japanese sentence splitter without refinement. Author: Pontus Stenetorp <pontus stenetorp se> Version: 2011-05-09 """ from loguru import logger import re from re import compile as re_compile from re import DOT...
/* This file was generated by upbc (the upb compiler) from the input * file: * * envoy/service/status/v3/csds.proto * * Do not edit -- your changes will be discarded when the file is * regenerated. */ #if COCOAPODS==1 #include "third_party/upb/upb/def.h" #else #include "upb/def.h" #endif #if COCOAPODS=...
/* DOCUMENT INFORMATION > XXXXXXXXXXXXXXXXXXXX > XXXXXXXXXXXXXXXXXXXX > XXXXXXXXXXXXXXXXXXXX *////////////////////////////////////////////////// import hh from 'hyperscript-helpers'; import { h } from 'virtual-dom'; const { span, div, p } = hh(h); // PUBLIC function copyright(dispatch, className, notice) { ...
#!/usr/bin/env python3 # Copyright (c) 2014 ARM Limited # All rights reserved # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementatio...
"""The tests for Climate device actions.""" import pytest import voluptuous_serialize import openpeerpower.components.automation as automation from openpeerpower.components.climate import DOMAIN, const, device_action from openpeerpower.helpers import config_validation as cv, device_registry from openpeerpower.setup im...
# coding: utf-8 """ OpsGenie REST API OpsGenie OpenAPI Specification # noqa: E501 OpenAPI spec version: 2.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import opsgenie_swagger from opsgenie_swagger.models.aler...
/* * KBase "Functional Website" * * Login, Workspace/Narrative Browser, Upload, Apps * * Uses Angular.js * * -- Some of the critical files -- * App: js/app.js * Controllers: js/controllers.js * Directives: js/directives/landingpages.js * js/directives/*...
from __future__ import unicode_literals import re from ..en import Provider as AddressProvider class Provider(AddressProvider): postal_code_letters = ( 'A', 'B', 'C', 'E', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'R', 'S', 'T', 'V', 'X', 'Y', ) city_prefixes = ('North', 'East', 'West', 'S...
(function($) { var settings = { // Parallax background effect? parallax: true, // Parallax factor (lower = more intense, higher = less intense). parallaxFactor: 20 }; skel.breakpoints({ xlarge: '(max-width: 1800px)', large: '(max-width: 1280px)', medium: '(max-width: 980px)', s...
export default { BORDER_RADIUS_SMALL: 5, BORDER_RADIUS_MEDIUM: 15, BORDER_RADIUS_LARGE: 25, BORDER_RADIUS_ROUND: 1000, BORDER_WIDTH_SMALL: 0.5, BORDER_WIDTH_MEDIUM: 1, BORDER_WIDTH_LARGE: 2, BORDER_MARGIN_VERTICAL: 15, BORDER_MARGIN_HORIZONTAL: 15, BORDER_PADDING_VERTICAL: 10, BORDER_PADDING_HORIZ...
from flask import Flask from orchestration.api.services import service class App: app = Flask(__name__) def __init__(self): self._init_logging() self._init_server() def _init_logging(self): pass def _init_server(self): self.app.url_map.strict_slashes = False ...
// // ZJDate.h // ZJKit // // Created by 张炯 on 2018/7/16. // #import <Foundation/Foundation.h> @interface ZJDate : NSObject /** 判断开始时间、结束时间是否合法 @param startDate 开始时间 @param endDate 结束时间 @return 是否合法 */ + (BOOL)zj_legalityForStartDate:(NSDate *)startDate endDate:(NSDate *)endDate; @end
import React from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import { Subheading, styles } from '@storybook/design-system'; const { color, typography, pageMargins, breakpoint } = styles; export const Heading = styled(Subheading)` display: block; margin-bottom: 1rem; co...
module.exports=':rat: :mouse2: :ox: :water_buffalo: :cow2: :tiger2: :leopard: :rabbit2: :cat2: :dragon: :crocodile: :whale2: :snail: :snake: :racehorse: :ram: :goat: :sheep: :monkey: :rooster: :chicken: :dog2: :pig2: :boar: :elephant: :octopus: :shell: :bug: :ant: :bee: :beetle: :fish: :tropical_fish: :blowfish: :turtl...
import React, {Fragment} from 'react' import PageTitle from '../../../../Layout/AppMain/PageTitle'; // Examples import FormToggleSwitchExample from './Examples/Basic/'; class FormToggleSwitch extends React.Component { render() { return ( <Fragment> <PageTitle ...
import os import time import argparse import numpy #import pdb import cv2 import pycuda.autoinit # This is needed for initializing CUDA driver from utils.yolo_with_plugins import TrtYOLO from utils.camera import add_camera_args, Camera from utils.display import show_fps from utils.distancing import show_distancing f...
from trytond.pool import Pool from .disc import * def register(): Pool.register( Asociacion, Campo, Zona, Distrito, Iglesia, Gp, Party, Reporte, ReporteBautizo, module='discipulado', type_='model')
# -*- coding: utf-8 -*- """ Copyright (C) 2017 Sebastian Golasch (plugin.video.netflix) Copyright (C) 2019 Smeulf (original implementation module) Functions for Kodi library NFO creation SPDX-License-Identifier: MIT See LICENSES/MIT.md for more information. """ import xml.etree.ElementTree as ET fr...
/*! * WULF v1.2.39 (http://wulf-demo.dynamic.nsn-net.net/) * Copyright © 2016-2017 Nokia. All rights Reserved. */ !function(a){"function"==typeof define&&define.amd?define(["jquery","fuelux/repeater"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){function b(b,c,d,e,f){var g=e...
export default "M3 18.34C3 18.34 4 7.09 7 3L12 4L11 7.09H9V14.25H10C12 11.18 16.14 10.06 18.64 11.18C21.94 12.71 21.64 17.32 18.64 19.36C16.24 21 9 22.43 3 18.34Z"
var searchData= [ ['deprecated_20list',['Deprecated List',['../a00481.html',1,'']]] ];
import _defineProperty from "@babel/runtime/helpers/defineProperty"; import _extends from "@babel/runtime/helpers/extends"; import * as React from 'react'; import Animate from 'rc-animate'; import classNames from 'classnames'; import LoadingOutlined from '@ant-design/icons/LoadingOutlined'; import PaperClipOutlined fro...
import { createDrumGenerator } from "../utils"; import { randLt, randFloat } from "../../../utils"; import { NOTE_LENGTH } from "../../constants"; const { quarter, sixteenth, eighth } = NOTE_LENGTH; export default opts => createDrumGenerator(opts, ({ currentNote, spec, common }) => { if (currentNote % q...
/* * This header is generated by classdump-dyld 1.5 * on Tuesday, November 10, 2020 at 10:10:48 PM Mountain Standard Time * Operating System: Version 14.2 (Build 18K57) * Image Source: /usr/lib/libAWDSupportFramework.dylib ...
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (o...
import os import streamlit as st import config def main(): island_url = st.text_input("小岛链接") if "/g/" in island_url: st.success("小岛链接已保存") config.ISLAND_URL = island_url elif island_url == "": pass else: st.error("小岛链接无效") config.DEBUG_MODE = st.checkbo...
from tensorboardX import SummaryWriter import os import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import numpy as np import matplotlib.pyplot as plt from torch.utils.data import Dataset, DataLoader from skimage.transform import resize import torch.optim as optim fro...
"""Application settings.""" import os from sqrl.data.sources import utsg as utsg_source SECRET_KEY = os.getenv('SECRET_KEY', None) SERVER_NAME = os.getenv( 'SERVER_NAME', 'localhost:{0}'.format(os.getenv('PORT', '8000'))) ENV = os.getenv('FLASK_ENV', 'production') # MongoDB configuration MONGODB_SETTINGS = { ...
jQuery(function(a){function t(){a(".wc-setup-content").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}function i(){a("form.activate-jetpack").submit()}function s(){wp.ajax.post("setup_wizard_check_jetpack").then(function(e){if(!e||!e.is_active||"yes"===e.is_active)return i();setTimeout(s,3e3)}).fail(fu...
/** * @license * Copyright (C) 2020 The Android Open Source Project * * 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 require...
import unittest class MyException(Exception): pass class MyException2(Exception): pass class MyException3(Exception): pass class Foo: def test(self): raise MyException class Bar: def test(self, a, b, c=1, d=2): if a != 'a': raise MyException if c == 1: ...
# Copyright 2020 The HuggingFace Team. 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 applicabl...
/* Copyright 2018 Canaan 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 ...
import React, {Component} from 'react'; import './registration-page.css'; import {compose} from "../../utils"; import {connect} from "react-redux"; import {Link} from 'react-router-dom'; import withLibraryService from "../../hoc"; import { withRouter } from "react-router"; import { registrationsClearFields, re...
from pprint import pformat from biothings.tests.web import BiothingsDataTest class TestMyvariant(BiothingsDataTest): prefix = 'v1' host = 'myvariant.info' def check_index_count(self, assembly): # when run individually # it's possible there's not enough time to populate the metadata ...
#ifndef STARTITEM_H #define STARTITEM_H #include <QGraphicsItem> #include <QPainter> class StartItem : public QGraphicsItem { public: StartItem(); virtual QRectF boundingRect() const override; virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override; private...
/****************************************************************************** * * @brief providing APIs for configuring I2C module (I2C). * ******************************************************************************* * * provide APIs for configuring I2C module (I2C). **********************************************...
import React from 'react' import Layout from './src/components/layout' export const wrapPageElement = ({ element, props }) => ( <Layout {...props}>{element}</Layout> )
import unit from machine import PWM class Servo: portMethod = unit.PORT0 """ A simple class for controlling hobby servos. Args: pin (machine.Pin): The pin where servo is connected. Must support PWM. freq (int): The frequency of the signal, in hertz. min_us (int): The minimum si...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the PyMVPA package for the # copyright and license terms. # ### ### ### ### ###...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
""" Copyright 2020 The OneFlow 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 applicable law or agr...
""" Module: 'uselect' on esp32_LoBo MCU: (sysname='esp32_LoBo', nodename='esp32_LoBo', release='3.2.24', version='ESP32_LoBo_v3.2.24 on 2018-09-06', machine='ESP32 board with ESP32') Stubber: 1.0.0 - updated """ from typing import Any POLLERR = 8 POLLHUP = 16 POLLIN = 1 POLLOUT = 4 def poll(*args) -> Any: pass ...
module.exports = { tailwind: { plugins: ['macros'], config: './tailwind.config.js', format: 'auto', }, }
/* Copyright (c) 2002-2010 Rally Software Development Corp. All rights reserved. SourceCodeCheckIn.js */ function SourceCodeCheckIn() { var containerDiv, results; var rallyDataSource = new rally.sdk.data.RallyDataSource('__WORKSPACE_OID__', '__PROJECT_OID__', '__PROJECT_SCOPING_UP__', '__PROJEC...
#! /bin/env python '''Setup file for libs.robot See: https://packaging.python.org/en/latest/distributing.html ''' import os import re import sys from setuptools import setup, find_packages _INTERNAL_SUPPORT = 'asg-genie-support@cisco.com' _EXTERNAL_SUPPORT = 'pyats-support-ext@cisco.com' _INTERNAL_LICENSE = '...
# Released under the MIT License. See LICENSE for details. # """Network related data and functionality.""" from __future__ import annotations from typing import TYPE_CHECKING, Optional, Any, Annotated from dataclasses import dataclass, field from efro.dataclassio import ioprepped, IOAttrs if TYPE_CHECKING: pass...
# test_scc.py from intersim.graph import InteractionGraph def main(): neighbor_dict1 = {0:[], 1:[2], 2:[]} graph1 = InteractionGraph(neighbor_dict1) print(graph1.strongly_connected_components) neighbor_dict2 = {0:[1], 1:[2], 2:[0]} graph2 = InteractionGraph(neighbor_dict2) print(graph2.str...
from decimal import Decimal from typing import Any, List from datetime import datetime, timedelta import pytest from prisma import Prisma, Json, Base64 from prisma.enums import Role from prisma.models import Lists def _utcnow() -> datetime: # workaround for https://github.com/RobertCraigie/prisma-client-py/issue...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ...
/** * header.js * Handles saving and loading variables from the users computer (cookie access). */ // Config var BAD_USERNAME = [" ", "<", ">", "&", "\\"]; var BAD_MESSAGE = ["<", ">"]; const TEAMSOLVE_INDEX = "../index.php"; function random(_) { return Math.floor(Math.random() * _); } function cl...
""" Created on Feb 25, 2018 @author: Siyuan Qi Description of the file. """ import os import shutil import argparse import time import numpy as np import torch.utils.data import torch.autograd import torch import torchvision import metadata import hico_config import roi_feature_model def main(args): best_pr...
(function(e, a) { for(var i in a) e[i] = a[i]; }(this, /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /**...
import datetime from copy import deepcopy import iso8601 from flask import g, current_app from flask_restful import marshal, abort, reqparse, Resource, inputs from app import db from app.constants import API_ENVELOPE, MAX_TIMECLOCK_HOURS, SECONDS_PER_HOUR from app.models import Timeclock, User from app.apiv2.decorato...
!function(t,e){"function"==typeof define&&define.amd?define(function(){return e(t)}):e(t)}(this,function(t){var e=function(){function e(t){return null==t?t+"":W[Y.call(t)]||"object"}function n(t){return"function"==e(t)}function r(t){return null!=t&&t==t.window}function i(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}f...
/* +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2015 The PHP Group | +---------...
from PyProjects.pyprojects import PyProjects if __name__ == '__main__': proj = PyProjects() proj.make_project(os.getcwd()+'/Tests/','test_proj','test','test@test.com','test')
// JavaScript correctness tests import '@endo/init'; // @ts-check // eslint-disable-next-line import/no-extraneous-dependencies import test from 'ava'; import * as proc from 'child_process'; import * as os from 'os'; import { xsnap } from '../src/xsnap.js'; import { options } from './message-tools.js'; const io = { ...
import axios from 'axios' import { MessageBox, Message } from 'element-ui' import store from '@/store' import { USER_ID, USER_NAME, USER_ROLE, USER_ROLE_TYPE, USER_MANAGER_ID, USER_LOGIN_TIME } from '@/utils/user'; import qs from 'qs'; // create an axios instance const service = axios.create({ // ba...
import json if __name__ == '__main__': score_dict = dict() valid_num = 0 with open('raw/scores-10-10.txt') as ifs: lines = ifs.readlines() for rank, submit_id, id, time in [line.split()[0:4] for line in lines]: if id not in score_dict: score_dict[id] = [] ...
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * * (C) 2003 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #include "mpi.h" #include <stdio.h> #include <string.h> #include "mpitest.h" /* calling lookup_name 15 times in a loop when the name has not been been...
""" Get song info. """ import xml import shutil from base64 import decodebytes from pkg_resources import iter_entry_points import mpd import untangle from .fifo import FIFO from . import brainz from . import util def get_client_types(): """Enumerate the pidi.plugin.client entry point and return installed client...
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5347a4d9"],{"22ae":function(e,t,a){},ca1c:function(e,t,a){"use strict";var n=a("22ae"),o=a.n(n);o.a},f093:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{className:"animated"}},[a(...
from dateutil.relativedelta import relativedelta from allauth.account.forms import SignupForm from allauth.account.models import EmailAddress from crispy_forms.bootstrap import ( InlineField, FormActions, Accordion, AccordionGroup, FieldWithButtons, StrictButton, ) from crispy_forms.helper impo...
# Copyright 2019-2022 Axis Communications AB and others. # # For a full list of individual contributors, please see the commit history. # # 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 # # ...
const THREE = require('three'); const { MathEx } = require('@ykob/js-util'); export default class FlameCore { constructor() { this.uniforms = { time: { type: 'f', value: 0 }, }; this.obj; } createObj() { // Define Geometry const geometry = new THREE.OctahedronGeome...
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import logging import time from pants.engine.internals.scheduler import Scheduler from pants.pantsd.service.pants_service import PantsService class StoreGCService(PantsService): """...
import Widget from './Widget' import TechnicalIndicatorView from '../view/TechnicalIndicatorView' import TechnicalIndicatorFloatLayerView from '../view/TechnicalIndicatorFloatLayerView' export default class TechnicalIndicatorWidget extends Widget { _createMainView (container, props) { return new TechnicalIndicat...
import React from 'react'; const LocationInput = props => { return ( <div className={'location-container'}> <div className={'location-input'}> <form className={'location-input-form'} onSubmit={(event) => props.buttonCallback(event)}> <input className={'locati...
/** * 用于文档的生成 */ var Mustache = require( './mustache' ); var fs = require( 'fs' ); var ps = require( 'path' ); // 需要便利的目录 var targetDirs = [ '../lib/commands/', '../lib/protocol/', '../lib/jasTest/' ]; var targetDirsDesc = [ '普通操作命令(由底层协议派生)', '底层协议命令描述:\n' + '如果您使用protocol级别的方法,所有的回到返回值都遵循...
import React from "react"; import Toaster from "components/Toaster"; import { createStructuredSelector } from "reselect"; import { connect } from "react-redux"; import debounce from "lodash/debounce"; import NavLink from "react-router-dom/NavLink"; import { showDialog } from "containers/App/actions"; import { makeSele...
import uuid from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.test import TestCase from dcim.models import DeviceRole, DeviceType, Manufacturer, Platform, Rack, Region, Site, SiteGroup from extras.choices import JournalEntryKindChoices, ObjectChangeActi...
#!/usr/bin/env python DOCUMENTATION = ''' --- module: hashivault_approle_role_list version_added: "3.8.0" short_description: Hashicorp Vault approle list roles module description: - Module to list approle roles from Hashicorp Vault. options: url: description: - url for vault default:...
#!/usr/bin/env python import os import sys import dotenv if __name__ == "__main__": dotenv.read_dotenv() os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gallery.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may f...
# coding: utf-8 """ UltraCart Rest API V2 UltraCart REST API Version 2 # noqa: E501 OpenAPI spec version: 2.0.0 Contact: support@ultracart.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import copy import logging import multipro...
# Copyright (c) 2011, Silas Sewell # All rights reserved. # # This file is subject to the MIT License (see the LICENSE file). import fnmatch import glob import json import logging as log import ops import os import rpm log.basicConfig(level=log.INFO) class Break(Exception): pass class Build(object): def __init...
import unittest import numpy as np from pyml.metrics.classification import precision_score class test_classification(unittest.TestCase): def test_precision_score(self): y_pred = np.array([1,2,3,4,5,6,3,1]) y_true = np.array([1,2,3,4,5,6,4,1]) # 默认,要7位有效数字都要相同 self.assertAlmostEqua...
import random from typing import Union import tkinter class Card: def __init__(self, label: str, suit: str, visible: bool = True): self.label = label self.suit = suit self.value = self._get_value() self.visible = visible # Only visible cards can be used for counting def _get_...
////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////// ////// ////// 测试代码 ////// var time = new Date...
# # Copyright (c) 2016-2021 Deephaven Data Labs and Patent Pending # import time import contextlib import unittest import jpy from deephaven import DHError from deephaven._ugp import ugp_exclusive_lock from deephaven.table import Table _JTableTools = jpy.get_type("io.deephaven.engine.util.TableTools") def table_e...