text
stringlengths
3
1.05M
// 数组遍历 function printNumbers(n) { let limit = 1; for (let i = 0; i < n; i++) { limit *= 10; } let res = []; for (let i = 0; i < limit - 1; i++) { res[i] = i + 1; } return res; }
#!/usr/bin/env python3 # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # 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 with...
/** * @fileoverview test domUtils * @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com> */ import $ from 'jquery'; import domUtils from '../../src/js/domUtils.js'; function createElement(tag, textContent) { const element = document.createElement(tag); if (textContent) { element.textContent = tex...
import React from 'react' import {connect} from "react-redux"; const About = () => ( <div> <h1>About Us</h1> <p>Hello Medium!</p> </div> ) export default connect(null)(About)
var assert = require('assert') , ref = require('ref-napi') , ArrayType = require('ref-array-napi') , Struct = require('../') , bindings = require('bindings')({ module_root: __dirname, bindings: 'struct_tests' }) describe('Struct', function () { afterEach(gc) it('should be a function', function () { ...
/** * HYPERLOOP GENERATED - DO NOT MODIFY * * This source code is Copyright (c) 2018 by Appcelerator, Inc. * All Rights Reserved. This code contains patents and/or patents pending. */ var $dispatch = Hyperloop.dispatch, $init, $imports, $class; var NSObject = require('/hyperloop/foundation/nsobject'); /** ...
class ExpectedPaymentRequest: def __init__(self, amount_upper_bound: int, amount_lower_bound: int, internal_account_id: str, direction: str, type: str= None, currency: str = None, date_upper_bound: str = None, date_lower_bound: str = None, description: str = None, ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.makeMessagesRecvSocket = void 0; const Types_1 = require("../Types"); const Utils_1 = require("../Utils"); const WABinary_1 = require("../WABinary"); const WAProto_1 = require("../../WAProto"); const Defaults_1 = require("../Defaults")...
/* global HELPCONFIG */ import angular from 'angular'; import _ from 'lodash'; class UserProjectsController { constructor( $scope, $state, $log, $window, modalService, authService, projectService, paginationService, organizations, team...
import * as React from 'react'; import PropTypes from 'prop-types'; import { View, Text, StyleSheet } from 'react-native'; import { withTheme } from '../../Library/themeContext'; class ListSection extends React.Component { static propTypes = { children: PropTypes.node.isRequired, title...
import re from thefeck.utils import get_all_matched_commands, replace_command from thefeck.specific.git import git_support @git_support def match(command): return (" is not a git command. See 'git --help'." in command.output and ('The most similar command' in command.output or 'Did yo...
self.__precacheManifest = (self.__precacheManifest || []).concat([ { "revision": "7aad04f6d3750003183c46026a4b5fd5", "url": "/index.html" }, { "revision": "37782bfaf222e74dde54", "url": "/static/css/main.35c0d0d4.chunk.css" }, { "revision": "af0ed8fb45f89fda4e29", "url": "/static/js/2....
# µPing (MicroPing) for MicroPython # copyright (c) 2018 Shawwwn <shawwwn1@gmail.com> # License: MIT # Internet Checksum Algorithm # Author: Olav Morken # https://github.com/olavmrk/python-ping/blob/master/ping.py # @data: bytes def checksum(data): if len(data) & 0x1: # Odd number of bytes data += b'\0' ...
import modules.BaseModule class Echo(modules.BaseModule.BaseModule): def __init__(self): super().__init__() def command(self, user_command): if user_command: self.write('ECHO: ' + user_command + "\n")
var Stat = require('fs').Stats module.exports = cloneStats function cloneStats(stats) { var replacement = new Stat Object.keys(stats).forEach(function(key) { replacement[key] = stats[key] }) return replacement }
# Copyright 2021 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...
// ******************************************************* // Action Constant Generators // ------------------------------------------------------- // ******************************************* // Utility Imports // ------------------------------------------- import * as TYPES_ from './_types'; import * as UTILS_ fro...
from __future__ import print_function from __future__ import absolute_import from __future__ import division import warnings from keras.models import Model from keras.layers import Dense from keras.layers import Dropout from keras.layers import Activation from keras.layers import Reshape from keras.layers import Conv...
import babel from 'rollup-plugin-babel'; import resolve from 'rollup-plugin-node-resolve'; export default { entry: 'src/index.js', plugins: [ resolve(), babel({ exclude: 'node_modules/**' }) ], targets: [ { dest: 'dist/index.js', format: 'cjs' }, { dest: 'dist/in...
var path = require("path"); var fs = require("fs"); var _0777 = parseInt("0777", 8); module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; function mkdirP(p, opts, f, made) { if (typeof opts === "function") { f = opts; opts = {}; } else if (!opts || typeof opts !== "object") { opts = { mode: opts }...
import pprint ''' Date: 2020-08-29 11:07:54 LastEditors: Jecosine LastEditTime: 2020-08-29 11:23:21 ''' class Solution: """ @param s: a string. @return: return the values of all the intervals. """ def calc(self, a, s, i, j): if i == j: a[i][j] = 1 return 1 del...
const inquirer = require("inquirer"); const fs = require("fs"); // array of questions for user const prompt = require("inquirer") const generateMarkdown = require("./utils/generateMarkdown"); const questions = [ { message: "What is the name of the project title?", name: "title" }, { ...
/** * * WebGL With Three.js - Lesson 5 - cubic skybox and reflection * http://www.script-tutorials.com/webgl-with-three-js-lesson-5/ * * Licensed under the MIT license. * http://www.opensource.org/licenses/mit-license.php * * Copyright 2014, Script Tutorials * http://www.script-tutorials.com...
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import torch import t...
import sys import os import inspect import importlib def get_current_path(): current_file = os.path.abspath(inspect.getsourcefile(get_current_path)) path, _ = os.path.split(current_file) return path def get_venv_site_packages(): return os.path.join(get_current_path(), 'env', 'Lib', 'site-packages') ...
// @flow import * as React from 'react'; import SemiControlledTextField from '../../UI/SemiControlledTextField'; import { type ParameterFieldProps } from './ParameterFieldCommons'; export default class DefaultField extends React.Component< ParameterFieldProps, void > { _field: ?any = null; focus() { if (t...
from manim_imports_ext import * import math class StreamIntro(Scene): def construct(self): # Add logo logo = Logo() spikes = VGroup(*[ spike for layer in logo.spike_layers for spike in layer ]) self.add(*logo.family_members_with_points())...
'use strict'; const { ipcRenderer } = require('electron'); const url = require('url'); const MacNotifier = require('node-mac-notifier'); const ConfigUtil = require('../utils/config-util'); const { appId, customReply, focusCurrentServer, parseReply, setupReply } = require('./helpers'); let replyHandler; let clickHand...
/** * @description Logout SVG Icon. * @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon. * @property {string} colorIndex - The color identifier to use for the stroke color. * If not specified, this component will default to muiTheme.palette.textColor. * @pro...
// @flow import test from 'ava'; import createSqlTag from '../../../../src/factories/createSqlTag'; import { SqlToken, } from '../../../../src/tokens'; const sql = createSqlTag(); test('creates a list of tuples', (t) => { const query = sql`INSERT INTO (foo, bar, baz) VALUES ${sql.tupleList([[1, 2, 3], [4, 5, 6]]...
// 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. // // RUN: %hermes -O %s | %FileCheck --match-full-lines %s // RUN: %hermes -O -emit-binary -out %t.hbc %s && %hermes %t.hbc | %FileCheck -...
/* Modernizr 2.5.3 (Custom Build) | MIT & BSD * Build: http://www.modernizr.com/download/#-touch-shiv-cssclasses-teststyles-prefixes-load */ ;window.Modernizr=function(a,b,c){function w(a){j.cssText=a}function x(a,b){return w(m.join(a+";")+(b||""))}function y(a,b){return typeof a===b}function z(a,b){return!!~(""+a).i...
module.exports = { displayName: 'shared-ui-atoms', preset: '../../../../jest.preset.js', transform: { '^.+\\.[tj]sx?$': 'babel-jest', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], coverageDirectory: '../../../../coverage/libs/shared/ui/atoms', };
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var React = _interopRequireWildcard(r...
'use strict' const _isEmpty = require('lodash/isEmpty') const _isFinite = require('lodash/isFinite') const hasTradeTarget = require('../util/has_trade_target') const hasOBTarget = require('../util/has_ob_target') const generateOrder = require('../util/generate_order') const getOBPrice = require('../util/get_ob_price')...
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See http://js.arcgis.com/3.15/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details. //>>built define({"widgets/Draw/setting/nls/strings":{addDistance:"Lis\u00e4\u00e4 pituusyksikk\u00f6",addArea:"Lis...
import chatService from 'src/server/services/chatService' import {stubServiceAPIs} from './util' const stubbedAPIs = stubServiceAPIs(chatService, { createChannel: () => Promise.resolve({}), createChannelMessage: () => Promise.resolve({}), createDirectMessage: () => Promise.resolve({}), createResponseMessage: (...
import React, { Fragment, Component } from "react"; import * as MacrosPrint from "../../macrosPrint"; import * as Macros from "../../macros"; import { Button, Input, Label } from "reactstrap"; import FontAwesome from "react-fontawesome"; import allowedMacros from "./allowedMacros"; import EventName from "../../../conta...
import { assert } from 'chai'; import configureMockStore from 'redux-mock-store'; import thunk from 'redux-thunk'; import { modelReducer, formReducer, actions, actionTypes } from '../src'; describe('batched actions', () => { it('should batch actions', (done) => { const mockStore = configureMockStore([thunk]); ...
import React, { Component } from 'react'; import api from '../functions/api'; import {formatEvent, parseEvents, isAdmin} from '../functions/utils' import MentorHomeEvents from '../components/MentorHomeEvents' import history from '../components/history'; import { Button } from 'react-bootstrap'; const {getEvents} = api ...
module.exports = function loadpics(imgSrcs, then) { // then(err, imgElements) // Calls then after all the images were loaded. var i, imgs, numberOfImages, onload, onloadsCalled, thereWasError, thereWasSuccess; numberOfImages = imgSrcs.length; thereWasSuccess = false; thereWasError = false; imgs = [];...
/** * * 6. Valid Sudoku Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: Each row must contain the digits 1-9 without repetition. Each column must contain the digits 1-9 without repetition. Each of the nine 3 x 3 sub-boxes of the grid must cont...
'use strict'; /************************************************************************************************** * * * Plese read the following tutorial before implementing tasks: * * ht...
function debounce(fn, delay = 500, Switch = true) { let timer = null return function (params) { if (timer) clearTimeout(timer) if (!Switch) { return fn(params) } timer = setTimeout(() => { // el-button获取到的是数组,input获取到的是function if (!Array.isArray(fn)) { fn = [fn] } ...
let data = { "body": "<path d=\"M6.5 6.08c-.78.04-1.5.54-1.78 1.32L3 12.13V22h4v-9.16l1.42-3.9L10.7 10H14V8h-2.85L7.29 6.2a2.17 2.17 0 0 0-.79-.12M9 17h12v2H9m1-15.5a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2a2 2 0 0 1 2 2m11 11a1.5 1.5 0 0 1-1.5 1.5a1.5 1.5 0 0 1-1.5-1.5a1.5 1.5 0 0 1 1.5-1.5a1.5 1.5 0 0 1 1.5 1.5M9 1...
/*! * SAP UI development toolkit for HTML5 (SAPUI5/OpenUI5) * (c) Copyright 2009-2014 SAP AG or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides default renderer for control sap.ui.commons.CheckBox jQuery.sap.declare("sap.ui.commons.CheckBoxRenderer"); j...
/* * testdatefmtrange_it_IT.js - test the date range formatter object in Italian/Italy * * Copyright © 2012-2017, JEDLSoft * * 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 * * ht...
I = -1 a, b, c = 7, 6, 5 for i in range(1, 6): i = I + 2 print('I=%d J=%d' % (i, a)) a = a + 2 print('I=%d J=%d' % (i, b)) b = b + 2 print('I=%d J=%d' % (i, c)) c = c + 2 I = i
#!/usr/bin/env python # -*- coding:utf-8 -*- # Author: Markus Döring # Excercises # ========== # # Try to fill in your own code at the [CODE] markers. ############################################################################### # a) A function and its usage def power(x, n): ''' This is a documentation s...
function day() { var DD = parseFloat(document.getElementById("day").value); var MM = parseFloat(document.getElementById("month").value); var YY = parseFloat(document.getElementById("year").value); var vv = DD == 0; var CC = (YY - 1) / 100 + 1; var weekDay = (((CC / 4) - 2 * CC - 1) + ((5 * YY ...
/* eslint-disable no-undef */ const tf = require('@tensorflow/tfjs'); describe("Generic (NDFrame)", function () { describe("NDframe Created from Array", function () { it("prints the shape of a 1D array", function () { let data = [ 1, 2, 3, "Boy", "Girl" ]; let ndframe = new dfd.NDframe({ data, isSer...
(function () { 'use strict'; angular .module(HygieiaConfig.module) .controller('CodeAnalysisViewController', CodeAnalysisViewController); CodeAnalysisViewController.$inject = ['$scope', 'codeAnalysisData', 'testSuiteData', 'libraryPolicyData', '$q', '$filter', '$uibModal']; function Co...
import React, { forwardRef } from 'react' import classNames from 'classnames' import propTypes from 'prop-types' import { Button } from '../Button' import styles from './IconButton.module.scss' const IconButton = forwardRef( ({ size, variant, className, children, ...buttonProps }, ref) => { const classes = class...
/* Bikes Map Widget for ACP Lobby Screen */ // Draws location of shared bikes in a map. // used in smartpanels with: // new Bikes(<layout config object>, <widget params object>) // // params are // map.lat: 52.215, // map.lng: 0.09, // map.zoo...
import $ from 'jquery'; import AuthenticatedRoute from 'ghost-admin/routes/authenticated'; import ShortcutsRoute from 'ghost-admin/mixins/shortcuts-route'; import PaginationMixin from 'ghost-admin/mixins/pagination'; export default AuthenticatedRoute.extend(ShortcutsRoute, PaginationMixin, { titleToken: 'Content',...
# qubit number=4 # total number=10 import pyquil from pyquil.api import local_forest_runtime, QVMConnection from pyquil import Program, get_qc from pyquil.gates import * import numpy as np conn = QVMConnection() def make_circuit()-> Program: prog = Program() # circuit begin prog += H(0) # number=1 pr...
# This Python 3 environment comes with many helpful analytics libraries installed # It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python # For example, here's several helpful packages to load in import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O...
try: from functools import cached_property except ImportError: # For py<3.8 # https://docs.python.org/3.8/library/functools.html # https://github.com/pydanny/cached-property/blob/409f24286e16ea3086af463edea6b80cdd62deed/cached_property.py#L18-L47 class cached_property(object): """ A...
import * as WasmHandler from './wasmHandler'; (async function () { let canvas, ctx; const timeSinceStart = performance.now(); const version = 'v4.0.0'; let scaleFactor = 2; let width = 0; let height = 0; let frame = 0; let fpsArr = new Array(10); let xCam = 0; let yCam = 0; let scale = 1.2; let keys = []; let ...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
module.exports = function getZerosCount(number, base) { // your implementation let primeNumber = []; let allPrimeNumber = []; while(true){ let firstPrimeNumber = 2; let baseMultiplicity = base; while(baseMultiplicity != 1){ if(baseMultiplicity%firstPrimeNumber == 0){ allPrimeNumber.p...
import Head from 'next/head' import styles from '../../styles/Home.module.css' import Sidebar from './sidebar' export default function Home({ children }) { return ( <div> <Head> <title>Scadies Admin</title> <meta name="description" content="Generated by create ne...
""" QAPI command marshaller generator Copyright IBM, Corp. 2011 Copyright (C) 2014-2018 Red Hat, Inc. Copyright (c) 2019 osy Authors: Anthony Liguori <aliguori@us.ibm.com> Michael Roth <mdroth@linux.vnet.ibm.com> Markus Armbruster <armbru@redhat.com> osy <dev@getutm.app> This work is licensed under the terms of ...
/// Copyright (c) 2012 Ecma International. All rights reserved. /// Ecma International makes this code available under the terms and conditions set /// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the /// "Use Terms"). Any redistribution of this code must retain the above /// copyright an...
// boilerplate includes var config = require("../config/config"), elasticsearch = require("elasticsearch"), es = new elasticsearch.Client({ host: config.elasticsearch, log: 'debug' }); module.exports = { // The homepage. A temporary search page. index: function(req, res) { res.render(...
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||...
const { mkdirSync } = require('fs') try { mkdirSync('structure') } catch ({ message }) { console.error(message) }
# Copyright 2021 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. from blinkpy.common.host_mock import MockHost from blinkpy.common.net.rpc_mock import MockRpc from blinkpy.common.system.log_testing import LoggingTestCase f...
"""This module implements rl coach sync file specifically""" import io import logging import os import botocore from markov.boto.s3.constants import SYNC_FILES_LOCAL_PATH_FORMAT_DICT, SYNC_FILES_POSTFIX_DICT from markov.boto.s3.s3_client import S3Client from markov.log_handler.constants import ( SIMAPP_EVENT_ERRO...
import styled from 'styled-components' export const Container = styled.TouchableOpacity` padding-top: 16px; padding-bottom: 16px; padding-right: 16px; width: 140px; height: 180px; ` export const BannerItem = styled.Image` width: 100%; height: 170px; border-radius: 8px; ` export const Ti...
import Theme from '../styles/theme'; import Head from 'next/head'; export default function App({ Component, pageProps }) { return ( <> <Head> <title>Devin Veney - Web Dev</title> </Head> <Theme> <Component {...pageProps} /> </Theme> </> ); }
# Generated by Django 3.2.3 on 2021-05-23 12:37 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('website', '0020_salon_capacity'), ] operations = [ migrations.AddField( model_name='salon', ...
"use strict"; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ Object.defineProperty(exports, "__esModule", { value: true }); const architect_command_1 = require("../...
/** * @module startpage */ import $ from 'jquery'; import {startpage} from "./index"; import {config} from "./config"; /** * Class for start page */ export class Startpage { constructor() { /** * Class name * @memeberof Startpage * @type {string} */...
// @flow import Roarr from 'roarr'; const Logger = Roarr .child({ program: 'global-agent', }); export default Logger;
"use strict"; var _index = require("./index"); /** * Tester module for demonstrations and dev testing */ class Tester { /** * Start Example program */ start() { (0, _index.initSession)({ "connectionLimit": 50, "acquireTimeout": 60000, "host": "localhost...
# Copyright 2017,2018 IBM Corp. # # 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...
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.ex...
import { css } from '@emotion/core' export const cssInteractiveLabel = css` overflow: visible; .label-wrap { pointer-events: none; display: flex; height: 20px; width: 100%; position: absolute; justify-content: center; align-content: center; opacity: 0; transition: transform 0.15s ease-in, opacity 0.0...
// Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in non-decreasing order. //   // Example 1: // Input: nums = [-4,-1,0,3,10] // Output: [0,1,9,16,100] // Explanation: After squaring, the array becomes [16,1,0,9,100]. // After sorting, it becomes [0,1...
import React, { Component } from 'react'; import { connect } from 'react-redux'; import * as actions from '../../actions'; import { reduxForm, Field, FieldArray } from 'redux-form'; import { API_URL } from '../../config'; import { Heading, SmallHeading } from '../common/headings'; import { FormButton, FormSelect, Form...
/* * client.js: Client for Openstack networking * * (C) 2014 Hewlett-Packard Development Company, L.P. * */ var util = require('util'), urlJoin = require('url-join'), openstack = require('../../client'), NetworkClient = require('../networkClient').NetworkClient, _ = require('lodash'); ...
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:2332") else: access = Ser...
/** * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> * Build: `lodash modularize underscore exports="node" -o ./underscore/` * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> * Copyright 2009-2013 Jeremy Ashkenas, DocumentClou...
(function() { var loadDeferredStyles = function() { var addStylesNode = document.getElementById("deferred-styles"); var replacement = document.createElement("div"); replacement.innerHTML = addStylesNode.textContent; document.body.appendChild(replacement) addStylesNode.parentElement.removeChild(addStylesNode); };...
#!/usr/bin/env python # Siconos is a program dedicated to modeling, simulation and control # of non smooth dynamical systems. # Copyright 2016 INRIA. # 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 Li...
# -*- coding: utf-8 -*- # # SelfTest/Hash/common.py: Common code for Crypro.SelfTest.Hash # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedicat...
/** Copyright 2020 Tianshu AI Platform. 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 ...
import ccxt, math, statistics def yang_zhang(candles): normalized_open = [] normalized_high = [] normalized_down = [] normalized_close = [] rogers_satchell = [] #Calculating normalized values for x in range(1,len(candles)): normalized_open.append(math.log(candles[x][1]/c...
const fs = require('fs-extra'); const sequential = require('promise-sequential'); const ora = require('ora'); const { readJsonFile } = require('../extensions/amplify-helpers/read-json-file'); const spinner = ora(''); const { getProviderPlugins } = require('../extensions/amplify-helpers/get-provider-plugins'); async ...
import { Box } from 'rebass' import PropTypes from 'prop-types' import React, { Component } from 'react' import { TweenMax } from 'gsap' export class FadeAppear extends Component { constructor(props) { super(props) this.state = { hasShown: false, } this.groupRef = React.createRef() } compo...
from typing import Optional class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def invertTree(self, root: Optional[TreeNode]) -> Optional[TreeNode]: if not root: return root ...
//Simple example sum of 3 numbers let a = 5; let b = 6; let c = 7; let sum = a + b + c; console.log(sum);
/* eslint-disable */ import { Reader, util, configure, Writer } from 'protobufjs/minimal'; import * as Long from 'long'; export const protobufPackage = 'zigbeealliance.distributedcomplianceledger.pki'; const baseMsgProposeAddX509RootCert = { signer: '', cert: '', info: '', time: 0 }; export const MsgProposeAddX509RootC...
exports.up = function(knex) { return knex.schema.createTable('ongs', table => { table.string('id').primary(); table.string('name').notNullable(); table.string('email').notNullable(); table.string('whatsapp').notNullable(); table.string('city').notNullable(); table.string('uf', 2).notNullable()...
"""Entry point defined here.""" from paystackapi.bulkcharge import BulkCharge from paystackapi.charge import Charge from paystackapi.cpanel import ControlPanel from paystackapi.customer import Customer from paystackapi.invoice import Invoice from paystackapi.misc import Misc from paystackapi.page import Page from payst...
import VTooltip from 'v-tooltip' // Notifications plugin import Notifications from './Components/Admin/NotificationPlugin' // A plugin file where you could register global components used across the app import GlobalComponents from './globalComponents' // A plugin file where you could register global directives import ...
# coding: utf-8 """ Event Notification Service No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import im...
import React from 'react'; import { SafeAreaView, View, Animated, ActivityIndicator, Text, Linking, TouchableOpacity, PanResponder, Platform, KeyboardAvoidingView } from 'react-native'; import { LinearGradient } from 'expo-linear-gradient'; import { BlurView } from 'expo-blur'; import { Video } from ...
(function( $ ) { var radioCheck = /radio|checkbox/i, keyBreaker = /[^\[\]]+/g, numberMatcher = /^[\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?$/; var isNumber = function( value ) { if ( typeof value == 'number' ) { return true; } if ( typeof value != 'string' ) { return false; } ...