text
stringlengths
3
1.05M
const presets = [ [ "@babel/env", ] ] const plugins = [ [ "@babel/plugin-transform-runtime", { corejs: 3, } ] ] const ignore = [ /^.+\.test\.js$/, /^.+\.spec\.js$/, 'node_modules/**' ] module.exports = { presets, plugins, ignore, ...
import React from 'react'; import { useNavigate } from "react-router-dom"; import { Presentation } from "./Presentation"; export function SlidePreview({json}) { let presentation = Presentation(json.content); const navigate = useNavigate(); const directDetail = () => { navigate(`detail/${json._id}`...
"use strict"; /** * Holds all logic used render and output the final documentation. * * The [[Renderer]] class is the central controller within this namespace. When invoked it creates * an instance of [[BaseTheme]] which defines the layout of the documentation and fires a * series of [[RendererEvent]] events. Inst...
const upperTextElement = document.getElementById('upperText'); const lowerTextElement = document.getElementById('lowerText'); const numButtons = document.querySelectorAll('.numButton'); const operatorButtons = document.querySelectorAll('.operatorButton'); const miscButtons = document.querySelectorAll('.miscButton'); va...
"""Utilities for generating OpenAPI Specification (fka Swagger) entities from :class:`Fields <marshmallow.fields.Field>`. .. warning:: This module is treated as private API. Users should not need to use this module directly. """ import re import functools import operator import warnings import marshmallow fr...
/******************************************************************************** ** Form generated from reading UI file 'basicwindow.ui' ** ** Created by: Qt User Interface Compiler version 5.10.1 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! **************************************...
import DropdownChoose from './DropdownChoose'; $(document).ready(() => { // дропдауны гостей const guestsList = document.querySelectorAll('.js-dropdown-guests'); if (guestsList) { guestsList.forEach((item) => { new DropdownChoose({ element: item, title: 'Гости', placeholder: 'С...
// Is there a better solution for all character removal ? const wordValidator = (str = '') => { return str === '' || str === '~' || str === '!' || str === '@' || str === '#' || str === '$' || str === '%' || str === '^' || ...
const router = require('express').Router(); const { Category, Product } = require('../../models'); // The `/api/categories` endpoint router.get('/', (req, res) => { // find all categories // be sure to include its associated Products Category.findAll({ include: [ { model: Product, attr...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _react = _interopRequireDefault(require("react")); var _propTypes = _interopRequireDefault(require("prop-types")); var _gatsbyLink = _interopRequireDefault(require("gatsby-link")); var _helpers = require...
import ACTION_TYPES from './BreadcrumbsActionTypes'; /** * Set selected changeset item * * @param {array} List of breadcrumbs to add, each of which is an object * with a 'text' and optional 'href' property. * @return {object} */ export function setBreadcrumbs(breadcrumbs) { return { type: ACTION_TYPES.SET_...
/* -*- C++ -*- * File: libraw_types.h * Copyright 2008-2019 LibRaw LLC (info@libraw.org) * Created: Sat Mar 8 , 2008 * * LibRaw C data structures * LibRaw is free software; you can redistribute it and/or modify it under the terms of the one of two licenses as you choose: 1. GNU LESSER GENERAL PUBLIC LICENSE ve...
import numpy as np def score(input): var0 = (0) - (0.07692307692307693) return ((((((((((((((((((((((((((((((((((((((((((((((((((((27.02162490523095) + ((np.exp((var0) * (((((((((((((np.power((25.9406) - (input[0]), 2)) + (np.power((0.0) - (input[1]), 2))) + (np.power((18.1) - (input[2]), 2))) + (np.power((0.0)...
#!/usr/bin/env python import subprocess import os import threading application_bundle_root = 'd:/stream/bundle' application_root_url = "http://localhost" application_port = "3000" # ------------------------------------------------------------------- server = None # -----------------------------------...
import os import subprocess import pathlib CURRENT_DIR = pathlib.Path(".").resolve() MESSAGE_COLOR = "\x1b[34m" RESET_ALL = "\x1b[0m" GENERATE_VIRTUAL_ENVIROMENT = "{{ cookiecutter.generate_virtual_enviroment }}" print(f"Downloading tex template...{RESET_ALL}") import requests url = 'https://raw.githubusercontent.c...
/* * * Copyright 2015, Google Inc. * All rights reserved. * * 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, this list of condi...
/* * Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved. * * 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 ...
import numpy as np import evo_gym from evo_gym import spaces class RescaleAction(evo_gym.ActionWrapper): r"""Rescales the continuous action space of the environment to a range [a,b]. Example:: >>> RescaleAction(env, a, b).action_space == Box(a,b) True """ def __init__(self, env, a,...
// // Copyright (C) 2004-2011 by Autodesk, Inc. // // This library is free software; you can redistribute it and/or // modify it under the terms of version 2.1 of the GNU Lesser // General Public License as published by the Free Software Foundation. // // This library is distributed in the hope that it will be use...
# -*- coding:utf-8 -*- """ """ from socket import * from play import Loop loop = Loop() async def echo_server(address): sock = socket(AF_INET, SOCK_STREAM) sock.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) sock.bind(address) sock.listen(5) sock.setblocking(False) # 设置sock为非阻塞的 while True: ...
/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof wind...
import sumolib from app import Config from app.routing.RoutingEdge import RoutingEdge import os, sys # import of SUMO_HOME if 'SUMO_HOME' in os.environ: tools = os.path.join(os.environ['SUMO_HOME'], 'tools') sys.path.append(tools) else: sys.exit("please declare environment variable 'SUMO_HOME'") class ...
var crypto = require('crypto'); var nanoId=require("nano-id"); var utils={}; utils.guid=function(num) { return nanoId(num||16); }; utils.random=function(max){ return Math.floor(Math.random()*max); }; utils.each=function(array,action){ if(!action) return; for(var i=0;i<array.l...
const path = require("path") // module.exports.onCreateNode = ({ node, actions }) => { // const { createNodeField } = actions // if (node.internal.type === "MarkdownRemark") { // const slug = path.basename(node.fileAbsolutePath, ".md") // createNodeField({ // node, // name: "slug", // v...
from django.db import models from ordered_model.models import OrderedModel from ordered_model.admin import OrderedModelAdmin from image_cropping import ImageCroppingMixin from image_cropping import ImageCropField from image_cropping import ImageRatioField class PeopleManager(models.Manager): def get_ordered_peopl...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ core ~~~~~ Implements core main :author: Feei <feei@feei.cn> :homepage: https://github.com/wufeifei/cobra :license: MIT, see LICENSE for more details. :copyright: Copyright (c) 2017 Feei. All rights reserved """ import sys import tim...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2014, Trond Hindenes <trond@hindenes.com>, and others # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # this is a windows documentation stub. actual code lives in the .ps1 # file of the same name ANSIBLE_METADATA...
# # This source file is part of the EdgeDB open source project. # # Copyright 2019-present MagicStack Inc. and the EdgeDB 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...
from fastapi import Response from .. import domain class NoOpTransport(domain.ITransport[None, None]): async def get_login_response(self, token: str, response: Response) -> None: return None async def get_logout_response(self, token: str, response: Response) -> None: return None
import { Subscriptions, Users } from '../../../../../models/server'; module.exports = (room) => { let hasFederatedUser = false; let users = null; let subscriptions = null; if (room.t === 'd') { // Check if there is a federated user on this room hasFederatedUser = room.usernames.find((u) => u.indexOf('@') !==...
import os test_data_dir = os.path.join(os.path.dirname(__file__), 'data') test_config_dir = os.path.join(test_data_dir, 'config-test') graph_data_dir = os.path.join(test_data_dir, 'graph_data') default_worker = {"platform": 'linux', 'arch': '64', 'label': 'linux'} def make_recipe...
class StepBuilder { constructor(points) { this.points = points.slice(); this.edges = []; } addEdge(start, end, width = 2, color = 'blue') { this.edges.push({ start, end, width, color, }); return this; } recolorLastEdge(color = 'blue') { this.edges.push({ ...this.edg...
# Copyright 2015 - Mirantis, Inc. # Copyright 2015 - StackStorm, Inc. # Copyright 2016 - Brocade Communications Systems, 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 # # ...
# # @file TestRateRule.py # @brief RateRule unit tests # # @author Akiya Jouraku (Python conversion) # @author Ben Bornstein # # $Id: TestRateRule.py 10124 2009-08-28 12:04:51Z sarahkeating $ # $HeadURL: https://sbml.svn.sourceforge.net/svnroot/sbml/trunk/libsbml/src/bindings/python/test/sbml/TestRateRule.py $ ...
import os import pytest import multiprocessing import pandas as pd import numpy as np from microsim.column_names import ColumnNames from microsim.population_initialisation import PopulationInitialisation from quant_api import QuantRampAPI # ******************************************************** # These tests run thr...
/// <reference path="typings/angular/angular.d.ts"/> 'use strict'; /** * 定义首页控制器 */ define(function(require, exports, module) { module.exports = function(app) { require('common/service/networkSvc'); require('common/service/authenticationSvc'); // auth为路由改变时的登陆标记 app.regis...
import chdb import config import handlers import flask import flask_sslify from flask.ext.compress import Compress from flask.ext.mobility import Mobility import os import urllib import urlparse # Cache duration for snippets. # Since each page contains a link to the next one, even when no category is # selected, we ...
/** * \file * * \brief SAM USB HPL * * Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries. * * \asf_license_start * * \page License * * Subject to your compliance with these terms, you may use Microchip * software and any derivatives exclusively with Microchip products. * It is your res...
import ext.state as state from core import Core, version_info from psycopg2 import connect VERSION = version_info( name="cweb", major=1, minor=0, patch=0, release="stable" ) app = state.app = Core() try: db = app.db = connect(app.settings.get("postgres")) db.set_session(autocommit=True) with db.cursor() a...
/* * Copyright (c) 2011, Bjoern Knafla * http://www.bjoernknafla.com/ * All rights reserved. * * 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 copyr...
# Copyright (c) 2009-2022 The Regents of the University of Michigan. # Part of HOOMD-blue, released under the BSD 3-Clause License. """Implement many body potentials.""" import hoomd from hoomd.data.parameterdicts import TypeParameterDict from hoomd.data.typeconverter import OnlyTypes, positive_real from hoomd.data.t...
mocha.setup({globals: ['hasCert']}); // Make life easier. window.assert = require('assert'); window.component = require('../lib/component'); window.vdom = require('virtualize'); window.dom = vdom.node; window.Tree = vdom.tree; // Create a container. window.el = document.createElement('div'); document.body.appendChi...
""" Скрипт запуска последовательности обработки данных на разных наборах параметров Основная цель - визуальная оценка качества обработки при различных наборах значений параметров компенсация набега -> формирование и сохранение карт качества -> развертка и сохранения результата Пример использования: ...
"""Added UserAccessToken model Revision ID: a5e8f6d68ca7 Revises: 1bc681714e49 Create Date: 2017-10-12 06:49:23.631008 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'a5e8f6d68ca7' down_revision = '1bc681714e49' branch_labels = None depends_on =...
MSG.catLine = "LINE";
/**! * node-hbase-client - test/scan.test.js * * Copyright(c) 2013 - 2014 Alibaba Group Holding Limited. * * Authors: * 苏千 <suqian.yf@taobao.com> (http://fengmk2.github.com) */ "use strict"; /** * Module dependencies. */ var fs = require('fs'); var path = require('path'); var pedding = require('pedding');...
import numpy as np import scipy from numba import jit, int64, boolean import utils import sklearn.metrics as sm from functools import partial from collections import OrderedDict class ComputeMetrics: metric_types = ["accuracy", "edit_score", "overlap_f1"] # metric_types = ["macro_accuracy", "acc_per_class"]...
from copy import copy from statistics import mean from django.contrib import messages from django.contrib.auth.decorators import login_required, permission_required from django.contrib.auth.mixins import UserPassesTestMixin from django.contrib.humanize.templatetags.humanize import intcomma from django.core.exceptions ...
import React from 'react'; import { Provider } from 'react-redux'; import createStore from './src/state/createStore'; export default ({ element }) => { const store = createStore(); return <Provider store={store}>{element}</Provider>; };
/* Close standard input, rewinding seekable stdin if necessary. Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either versio...
#!/usr/bin/env python3.7 from daemon import GitUpDaemon import os # The repository information is stored in this file. def start_daemon(): repofile = "/tmp/gitup/repositories.csv" logs_dir = '/tmp/gitup/' out = '/tmp/gitup/daemon.out' err = '/tmp/gitup/daemon.err' # make sure the directory to write...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); /** * Repository is supposed to work with your entity objects. Find entities, insert, update, delete, etc. */ var Repository = /** @class */ (function () { function Repository() { } // ------------...
import paramiko import sys from django_rok.re_forward_port import reverse_forward_tunnel from django_rok.util import bcolors ssh_port = 22 localhost = '127.0.0.1' def create_ssh_tunnel(localport, remote_host, remote_port, username, password=None, pkey=None): transport = paramiko.Transport((remote_host, ssh_port))...
//===-- MipsISelLowering.h - Mips DAG Lowering Interface --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
import urllib from chats.saving import track_chat # client_id_source = 'C:/Users/azizove/Desktop/twitch_client_id.txt' client_id_source = 'C:/Users/MainUser/Desktop/twitch_client_id.txt' crs = open(client_id_source, "r") for columns in (raw.strip().split() for raw in crs): client_id = columns[0] # client_secre...
from memory import Memory from instructions import InstructionParser class Computer: def __init__(self): self.memory = Memory() def load_program(self, filename: str): with open(filename) as f: self.memory.load([int(opcode) for opcode in f.readline().s...
import { selected, update } from '@/use/tracks' import { playable } from '@/bach/validate' import { warn } from '@/use/warn' import { ok, fail } from '@/use/notify' import { compose } from 'bach-js' import { composer } from '@/bach/compose' import template from '@/bach/template.bach' import { ref, computed } from '@vu...
'use strict'; // Initialize constants const assert = require('chai').assert; // Initialize dependencies const verifyB2CSiteProperties = require('../../../../lib/cli-api/validators/_verifyB2CSiteProperties'); describe('Verification of the B2C Site Properties', function () { it('successfully recognizes partial va...
import sys # Remove current dir from sys.path, otherwise setuptools will peek up our # module instead of system's. sys.path.pop(0) from setuptools import setup sys.path.append("..") import sdist_upip setup(name='micropython-collections', version='0.1.3', description='collections module for MicroPython', ...
#!/usr/bin/python3 -B # Copyright 2020 Josh Pieper, jjp@pobox.com. # # 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 a...
import multiprocessing import warnings import six import chainer from chainer import cuda from chainer.dataset import convert from chainer.training.updater import StandardUpdater from chainer import variable try: from cupy.cuda import nccl _available = True except ImportError: _available = False import ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os from typing import List # //////////////////////////////////////////////////////////////////// # # The Android Debug Bridge Wrapper Project by Python # # @Author Mr.Shouheng # # @References: # - https://developer.android.com/studio/command-line/adb?hl=zh-cn#...
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
import tensorflow as tf import tensorflow.contrib.layers as layers def _mlp(hiddens, inpt, num_actions, scope, reuse=False, layer_norm=False): with tf.variable_scope(scope, reuse=reuse): out = inpt for hidden in hiddens: out = layers.fully_connected(out, num_outputs=hidden, activation_...
(function (root, factory) { // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, // Rhino, and plain browser loading. if (typeof define === 'function' && define.amd) { define(['exports'], factory); } else if (typeof exports !== 'undefined') { factory(exports); } els...
#!/usr/bin/env python3 import csv import datetime import decimal import itertools import math import os import sys import subprocess import tempfile import jinja2 from decimal import Decimal from enum import Enum from typing import List, Dict, Tuple # First year of tax year tax_year = 2019 # Allowance is £12000 for ...
// @flow import axios from 'axios'; import MockAdapter from 'axios-mock-adapter'; import * as sdk from '../../../src'; jest.setTimeout(10000); let instance = {}; const mock = new MockAdapter(axios); describe('Patients', () => { beforeAll((done) => { sdk.configure({ credentials: { clientAccessKeyId...
# -*- coding: utf-8 -*- """Defines fixtures available to all tests.""" import pytest from webtest import TestApp from vicSafe.app import create_app from vicSafe.database import db as _db from .factories import UserFactory @pytest.fixture def app(): """An application for the tests.""" _app = create_app('tes...
#=========================================================================== # # Copyright (c) 2014, California Institute of Technology. # U.S. Government Sponsorship under NASA Contract NAS7-03001 is # acknowledged. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modific...
import pandas as pd import os from bottle import post, template, request # Set the downloads path downloads_path = os.path.join(os.path.dirname(__file__), '..','downloads') @post('/services/union') def union(): # Get file names file1_name = request.forms.get("file1").strip() file2_name = reques...
import os import time import sys from glob import glob import numpy as np from tqdm import tqdm import pdb import matplotlib #matplotlib.use('Agg') import matplotlib.pyplot as plt import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import DataLoader import argparse im...
for(;;){with(a){continue}}
/* +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2017 The PHP Group | +--------------...
import axios from "axios"; import React, { useState, useEffect } from "react"; const App = () => { const [countries, setCountries] = useState([]) const [search, setSearch] = useState("") const handleSearch = (e) => { //console.log(e.target.value) setSearch(e.target.value) } const filterCountries =...
from .base import Base from sqlalchemy import Table, Column, Integer from sqlalchemy.orm import relationship class Server(Base): __tablename__ = 'server' id = Column(Integer, primary_key=True) discord_server_id = Column(Integer, unique=True, nullable=False) strikes = relationship('Strike')
import path from 'path'; /** * A custom rollup-plugin-postcss loader that resolves node_modules imports in Less files * and replaces them with relative path imports. */ export default { name: 'resolveNodeImportsInLess', test: /\.less$/, async process({code}) { const lessFilePath = this.id; const from ...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import mxnet as mx import numpy as np from config import config from block import conv_block, ConvFactory from heatmap import l2_loss, ce_loss, SymCoherent def Conv(**kwargs): body = mx.sym.Convolution(**...
function checkCookie(){var e=navigator.cookieEnabled;return e||(document.cookie="testcookie",e=-1!=document.cookie.indexOf("testcookie")),e||showCookieFail()}function showCookieFail(){pNotifySimpleInfo("Les cookies sont désactivés. <br><br> L'utilisation de nos services ne sera pas efficient sans les Cookies, donc merc...
#ifndef _APP_H_ #define _APP_H_ #include <Application.h> #include <SettingsWindow.h> #ifdef __HAIKU__ #include <DateTimeFormat.h> #include <NumberFormat.h> #endif // string constants #include "phrase.h" // Localization placeholder, gettext-style // for now this just identifies strings that should be translated somet...
/* * This header is generated by classdump-dyld 1.0 * on Tuesday, November 5, 2019 at 2:39:23 AM Mountain Standard Time * Operating System: Version 13.0 (Build 17J586) * Image Source: /System/Library/PrivateFrameworks/CalendarDatabase.framework/CalendarDatabase * classdump-dyld is licensed under GPLv3, Copyright © 2013...
# Copyright 2017 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
goog.forwardDeclare("c.DagNodeCalculate"); goog.forwardDeclare("c.DagNodeValue"); /** * @private * @final * @constructor * @param {!string} in_name * @param {!string} in_localeName * @param {!string} in_type * @param {!c.Document} in_document * @param {!Array<{op:number,value,node:(!c.DagNodeCalculate|c.DagNod...
import Ember from 'ember'; import DS from 'ember-data'; import { Projection } from 'ember-flexberry-data'; export let Model = Ember.Mixin.create({ compressTo: DS.attr('new-platform-flexberry-service-bus-statistics-interval'), statisticsAgeCount: DS.attr('number'), statisticsAgeUnits: DS.attr('new-platform-flexbe...
# Core modules - Developers only import py_cui import sys sys.path.insert(1, '..') import i18n i18n.load_path.append('./locales/') i18n.set('filename_format', '{namespace}.{format}') # Local modules - Developers only import cui.screen_manager import tasks.logr as LOG import tasks.dev as DEV import tasks.config as ...
describe("hyphenaxe,", function() { var axe = require('../../lib/hyphenaxe.js'); var isAnArrayOfStrings = function ( maybeArr ) { // Return true if an array contains only strings, otherwise false if( Object.prototype.toString.call( maybeArr ) !== '[object Array]' ) { return false; } var al...
# This file is subject to the terms and conditions defined in # file 'LICENSE', which is part of this source code package. import numpy as np from src.rrt.rrt_connect import RRTConnect from src.search_space.search_space import SearchSpace from src.utilities.obstacle_generation import generate_random_obstacles from src...
""" File used to test the scraping ability of the regular expressions. """ # Setting up our fake functions and objects. _ = lambda x: x f = lambda x: x class C(object): pass obj = C() obj.blah = lambda x: x # A single letter function that we don't want f("_key") # Simple function call. _("_key") # The chained ...
import React from 'react' import Link from 'gatsby-link' class TOC extends React.Component { constructor(props) { super(props); this.state = { }; } componentDidMount (){ } render() { return ( <div> <h2>Recent Entries</h2> <ul> <li><Li...
// 去掉中英文空格加制表符换行符 function trim (str) { return str.replace(/[\s\n\t]+$/g, "").replace(/[ ]/g, "") } /** * 小数加、减、乘、除 保留精度计算 * @param {Number} value * @param {Number} decimals * for example * precisionRound(0.1 + 0.2, 2) 返回结果0.3 */ function precisionRound(value, decimals) { return Num...
/* * @Author: your name * @Date: 2020-11-18 00:54:54 * @LastEditTime: 2020-12-23 03:02:32 * @LastEditors: Please set LastEditors * @Description: In User Settings Edit * @FilePath: /scfgui-client/qcloud/apigateway.js */ const tencentcloud = require("tencentcloud-sdk-nodejs"); var config = require("../config"); co...
import React from 'react'; import { G, Text, Rect } from 'react-native-svg'; import PropTypes from 'prop-types'; const BarColumn = ({ values, index, maxValue, barsNumber }) => { // Y Iterator startig from Bottom let barElementY = 100; // Width of one Bar const barWidth = 20; // Padding between the Bars, max...
#!/usr/bin/env python from __future__ import print_function import tree_collection mat = open('/Users/kgori/git_repos/gitolite/treesoflife/data/DistVar.txt').read() map_ = open('/Users/kgori/git_repos/gitolite/treesoflife/data/GenomeMap.txt').read() lab = open('/Users/kgori/git_repos/gitolite/treesoflife/data/Labels.t...
import logging import os from abc import ABC from typing import Optional, List, Union # JSON Key Constants from .fig_svc import FigService FIG_MISSING = "FIG NOT SET" log = logging.getLogger(__name__) class ConfigurationMissingException(Exception): def __init__(self, fig_name): super().__init__(f"The co...
import _ from 'lodash'; import React from 'react'; import { Sparklines, SparklinesLine, SparklinesReferenceLine } from 'react-sparklines'; function average( data ) { return _.round(_.sum(data)/data.length); } const Chart = ( props ) => { return ( <div> <Sparklines height={120} width={180} ...
// // BKXEnlargePictureView.h // Pods-TiKuBaseModulesRepo_Example // // Created by Zhang Xin Xin on 2019/10/8. // #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface BKXEnlargePictureView : UIView -(instancetype)initWithImageView:(UIImage*)image; @end NS_ASSUME_NONNULL_END
(function(global) { 'use strict'; var fabric = global.fabric || (global.fabric = { }), extend = fabric.util.object.extend, clone = fabric.util.object.clone, toFixed = fabric.util.toFixed, NUM_FRACTION_DIGITS = fabric.Object.NUM_FRACTION_DIGITS, MIN_TEXT_WIDTH = 2; if (fabric.Text)...
export const countSum = array => array.reduce((a, b) => a + b, 0); export const countAverage = array => array.reduce((a, b) => a + b, 0) / array.length; export const countMedianDeviation = (array, average) => { let sum = 0; for (let i = 0; i < array.length; i += 1) { sum += Math.abs(array[i] - average); } ...
import tensorflow as tf import numpy as np from .utils import linear_weights from .utils import activation_summaries from .utils import variable_summaries class FullyConnected(object): def __init__(self, shape, stddev=0.02, bias_start=0.0, activation_fn=None, scope=''): self.w = {} self.scope = ...
""" ASGI config for docketdash project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SE...
# -*- coding: utf-8 -*- '''DNS - host name to IP address resolver.''' import collections import enum import random import udp from common import * import logging servers = [] class Qr(enum.IntEnum): Q = 0 R = 1 class Opc(enum.IntEnum): QUERY = 0 IQUERY = 1 STATUS = 2 NOTIFY = 4 UPDATE ...