text stringlengths 3 1.05M |
|---|
import json
import shutil
from copy import deepcopy
from pathlib import Path
from typing import List
from urllib.parse import urlparse
import requests
from instagrapi import config
from instagrapi.exceptions import ClientNotFoundError, StoryNotFound, UserNotFound
from instagrapi.extractors import (
extract_story_... |
"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.IBufferDecoder = Symbol('IBufferDecoder');
exports.IProcessServiceFactory = Symbol('IProcessServiceFactory');
exports.IPythonExecutionFacto... |
/*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'toolbar', 'eu', {
toolbarCollapse: 'Tolestu tresna-barra',
toolbarExpand: 'Zabaldu tresna-barra',
toolbarGroups: {
d... |
var callbackArguments = [];
var argument1 = function (element) {
callbackArguments.push(arguments)
_remove(element.target, gesture.defaultEvent);
array.forEach(gesture.subEvents, function (type) {
_remove(element.target, gesture.defaultEvent + '.' + type);
}, this);
};
var argument2 = false... |
Color = (function () {
var cls = function Color () {
}
return cls
})()
exports.Color = Color
Rect = (function () {
var cls = function Rect () {
}
return cls
})()
exports.Rect = Rect
_DevicePickerDisplayStatusOptions = function () {
this.none = 0
this.showProgress = 1
this.showDisconnectButton = 2
... |
from __future__ import annotations
import logging
import os
import re
from dataclasses import dataclass
from functools import cache, lru_cache
from io import StringIO
from pathlib import Path
from typing import List
import numpy as np
import pandas as pd
import win32com.client as win32
from docx.api import Document
f... |
"""
Hyperbolic Functions
"""
from sage.symbolic.function import GinacFunction, BuiltinFunction
from sage.rings.infinity import Infinity
from sage.symbolic.expression import Expression
from sage.symbolic.constants import pi, I
from sage.rings.integer_ring import ZZ
import math
class HyperbolicFunction(BuiltinFunction... |
module.exports = require("./dist/config/eslint")
|
/**
* Script which executes unit tests for all functions in the subsystem.
*/
const assert = require('assert');
const tweeter = require('../tweeter');
const twitterConfig = require('../twitterConfig');
const facebookPoster = require('../facebookPoster');
const facebookConfig = require('../faceb... |
module.exports = {
printWidth: 120,
semi: true,
singleQuote: true,
tabWidth: 4,
trailingComma: "es5"
};
|
import React from "react";
import fs from "fs";
import path from "path";
import matter from "gray-matter";
import marked from "marked";
import Link from "next/link";
export default function PostPage({
frontmatter: { title, date, cover_image },
content,
slug,
}) {
return (
<>
<Link href="/">
<... |
/* eslint-disable jsx-a11y/anchor-is-valid */
import React, { Component, Fragment } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { fetchEntityTypesData, addOrganizationData } from '../../services/Location'
import ReactCSSTransitionGroup from 'react-addons-css-t... |
/*!
* jquery.inputmask.min.js
* https://github.com/RobinHerbots/jquery.inputmask
* Copyright (c) 2010 - 2016 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.4-113
*/
!function(a){"function"==typeof define&&define.amd?define(["jquery","inputmask"],a):"ob... |
import Vue from 'vue';
import Vuex from 'vuex';
import VueRouter from 'vue-router';
import ElementUI from 'element-ui'
import 'normalize.css';
import 'element-ui/lib/theme-default/index.css';
import './less/app.less';
import App from './components/app.vue';
import { EventEmitter } from 'fbemitter';
import Promise from ... |
from sys import maxsize
class Contact:
def __init__(self, firstname=None, middlename=None, lastname=None, nickname=None,
photo=None, title=None, company=None, address=None,
t_home=None, t_mobile=None, t_work=None, t_fax=None,
email=None, email2=None, email3=None... |
// @flow
import { BigNumber } from "bignumber.js";
import invariant from "invariant";
import type {
AccountLike,
AccountLikeArray,
Account,
Unit,
SubAccount,
TokenCurrency,
} from "../types";
import { getEnv } from "../env";
import { encodeTokenAccountId } from "./accountId";
import { isAccountDelegating } ... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _createSvgIcon = _interopRequireDefault(require("../../createSvgIcon"));
var _ObjectGroup = _interopRequireDefault(require("@rsuite/icon-font/lib/legacy/Obj... |
"use strict";
const messages = require("..").messages;
const ruleName = require("..").ruleName;
const rules = require("../../../rules");
const rule = rules[ruleName];
testRule(rule, {
ruleName,
config: [true],
accept: [
{
code: "@keyframes { 0% { top: 0; } }"
},
{
code: "@viewport { or... |
/*
* Copyright 2019 EPAM Systems
*
* 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 ... |
"""
Singleton difference
""" |
import puppeteer from 'puppeteer'
export const debug = process.env.DEBUG === 'true'
export const appUrl = process.env.URL || 'http://localhost:3000'
// puppeteer.launch opts
// see: https://github.com/GoogleChrome/puppeteer/blob/v1.3.0/docs/api.md#puppeteerlaunchoptions
const defaults = {
headless: !debug,
slowMo... |
from typing import Optional
from fastapi import Depends, FastAPI, HTTPException, status
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
from pydantic import BaseModel
fake_users_db = {
"johndoe": {
"username": "johndoe",
"full_name": "John Doe",
"email": "joh... |
from questionnaire import Questionnaire
q = Questionnaire()
def two(options):
if len(options) < 2:
return 'You must choose at least 2 options'
def join(options):
return ', '.join(options)
q.many('options', 'Option 1', 'Option 2', 'Option 3', prompt='Choose some options').validate(two).transform(jo... |
# Generated by Django 2.0 on 2019-12-09 08:54
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('questions', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='answer',
options={'ordering': ['-likes']},
... |
import { shallowMount } from '@vue/test-utils'
import Comp from './Menu.vue'
describe('Menu.vue', () => {
it('matches snapshot', () => {
const wrapper = shallowMount(Comp)
expect(wrapper.element).toMatchSnapshot()
})
}) |
const t = require('@babel/types');
const { NodePath } = require('@babel/traverse');
const isFunctionComponent = require('../utils/isFunctionComponent');
const isClassComponent = require('../utils/isClassComponent');
const traverse = require('../utils/traverseNodePath');
const getReturnElementPath = require('../utils/ge... |
import Vue from 'vue'
import Router from 'vue-router'
import TabBar from '@/view/TabBar'
import Test from '@/view/test/Test'
import ClassNav from '@/view/test/ClassNav'
import User from '@/view/mypage/myson/User'
import Order from '@/view/mypage/myson/Order'
// import Ad from '@/view/firstpage/firstson/Ad'
// 路由懒加载
con... |
import CSVToHashTable from './csvtohashtable.js';
class CSVToHashTablePlugin extends Phaser.Plugins.BasePlugin {
constructor(pluginManager) {
super(pluginManager);
}
start() {
var eventEmitter = this.game.events;
eventEmitter.once('destroy', this.destroy, this);
}
add(conf... |
const ScriptConverter = new Function();
ScriptConverter.State = new Object();
ScriptConverter.State.NOT_ATTACHED = 0;
ScriptConverter.State.PREPARED = 1;
ScriptConverter.State.CONVERTING = 2;
ScriptConverter.State.VALID = 3;
ScriptConverter.State.ILLEGAL = 4;
ScriptConverter.State.BAD_TYPE = 5;
ScriptConverter.State.P... |
# Copyright (c) 2012-2021, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from .aws import Action as BaseAction
from .aws import BaseARN
service_name = "AWS IoT TwinMaker"
prefix = "iottwinmaker"
class Action(BaseAction):
def __init__(self, action: str = None) -> None:
... |
const styles = theme => ({
// Parent container
parent: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
width: '55%',
padding: '30px',
margin: '20px auto',
borderRadius: '15px',
backgroundColor: '#FFFFFF',
boxShadow: '0 1p... |
(function () {
"use strict";
angular.module('sdk-example.common')
.filter('countyData', countyDataFilter);
countyDataFilter.$inject = ['numberFilter', 'currencyFilter'];
function countyDataFilter(numberFilter, currencyFilter) {
return function(input, dataType) {
// if input... |
/*
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
*/
/* eslint-env node */
'use strict';
var utils = require('../utils.js');
var logging = utils.log... |
from collections import OrderedDict
from django.conf import settings
from django.http import Http404
from django.urls import path
from rest_framework.authentication import SessionAuthentication
from wagtail.api.v2.views import PagesAPIViewSet
from wagtail.core.models import Page
from .actions.copy import CopyPageAPI... |
module.exports.userService = require('./user.service');
module.exports.notificationService = require('./notification.service');
|
// alert("hello world"); ctrl+ k +c
//Number
console.log(typeof 3);
console.log(3.9);
console.log(typeof Infinity);
console.log(typeof NaN);
//Strings
console.log("Hola mi Benja");
console.log(typeof "Bienvenidos");
//Booleans
console.log(true);
console.log(typeof false);
//Null and Undefined
console.log(undefined)... |
$(function(){
$('table').each(function() {
if($(this).find('thead').length > 0 && $(this).find('th').length > 0) {
// Clone <thead>
var $w = $(window),
$t = $(this),
$thead = $t.find('thead').clone(),
$col = $t.find('thead, tbody').clone();
// Add class, remove margins, reset width and ... |
import PyCACalebExtras.SetBackend
plt = PyCACalebExtras.SetBackend.SetBackend()
import PyCACalebExtras.Common as cc
import PyCACalebExtras.Display as cd
import PyCA.Core as ca
import PyCA.Common as common
import numpy as np
from PyCAApps import SolveSpline, SplineToHField
import sys
from BFI_reg_landmarks import get_ne... |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File : audiofeature_mlp.py
@Time : 2020/09/25 11:18:57
@Author : Wang Minxuan
@Version : 1.0.0
@Contact : mx.wang@cyber-insight.com
@License : (C)Copyright 2019-2020, CyberInsight
@Desc : None
'''
# here put the import lib
impor... |
class C1 {
constructor(countdown) {
if (countdown > 0) {
this.c2 = new C2(countdown - 1)
}
else {
this.c2 = 0;
}
console.log('c1');
}
}
class C2 {
constructor(countdown) {
this.countdown = countdown;
this.c1 = new C1(countdown - 1);
console.log('c2');
}
}
let c = ne... |
HTTP/1.1 200 OK
Date: Sat, 24 Nov 2018 07:45:21 GMT
Server: Apache
Last-Modified: Mon, 02 Oct 2017 16:28:29 GMT
ETag: "a0c3660a-6d5-55a92dd5ae540"
Accept-Ranges: bytes
Content-Length: 1749
Vary: Accept-Encoding,User-Agent
Content-Type: application/x-javascript
"use strict";function _classCallCheck(e,r){if(!(e instance... |
from .check_sample_indexes import run_check_sample_indexes
|
$(document).ready(function () { //#cuando ya este listo el documento que ejecute todas las acciones
const URL = 'https://backend-proyecto2.herokuapp.com/'; //#variable constante que contiene la URL
$('#registro').click(function () {
var user = $('#user').val();
var name = $('#name').val();
... |
import { fileListToObject } from '@/common/utils/readFile'
const modulesFiles = require.context('./admin/', false, /\.js$/)
const modules = fileListToObject(modulesFiles)
export default modules
|
import React, { useState, useEffect } from 'react';
import { InputBlock, InputGroup, Button } from './styles';
export default function DevForm({ onSubmit }) {
const [github_username, setGithubUsername] = useState('');
const [techs, setTechs] = useState('');
const [latitude, setLatitude] = useState('');
const... |
/*
* Activiti app component part of the Activiti project
* Copyright 2005-2015 Alfresco Software, Ltd. All rights reserved.
*
* 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; either
... |
var getConfig = require('./webpack-config')
var customConfig = require('./customConfig')
var elev = `<script> var _elev = window._elev || {};(function() {
var i,e;i=document.createElement("script"),i.type='text/javascript';i.async=1,i.src="https://static.elev.io/js/v3.js",e=document.getElementsByTagName("script"... |
import {
MODULE_NAME,
STRATEGIES } from './constants'
import { extractComponentOptions } from './components'
import { getPageOptions, getLocaleCodes } from './utils'
export const makeRoutes = (baseRoutes, {
locales,
defaultLocale,
routesNameSeparator,
strategy,
parsePages,
pages,
pagesDir,
differen... |
import {firestore} from "../../../keys";
import {call, put, takeEvery} from "redux-saga/effects";
import _ from 'lodash';
import * as actions from "./actions";
import * as types from "./types";
import {subDays, startOfWeek} from "date-fns";
export const fetchHotDecks = ({payload}) => {
const now = +Date.now();
// ... |
"""Support for Solcast PV forecast sensors."""
from __future__ import annotations
import logging
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
SensorEntityDescription,
)
from typing import Final
from homeassistant.const import ENERGY_KILO_WATT_HOUR, ENERGY_WATT_HOUR, ATTR... |
import StellarSdk from 'stellar-sdk';
import * as multisig from '@futuretense/stellar-multisig';
import horizon from '../../core/services/horizon';
import storage from '../../core/services/storage';
import selectFunderModal from './select-funder.html';
const range = (l, r) => new Array(r - l).fill().map((_, k) => k ... |
class MessageParser {
constructor(actionProvider) {
this.actionProvider = actionProvider;
}
parse(message) {
const lowerCaseMessage = message.toLowerCase();
if (lowerCaseMessage.includes("hello")) {
this.actionProvider.greet();
}
if (lowerCaseMessage.includes("... |
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
import * as React from 'react';
import { ConfigConsumer } from '../config-provider';
import Icon from '../ico... |
$(document).ready(function ()
{
$('#fone').mask("(999) 999-9999");
$('#postal').mask("999-99999");
}); |
""" Module to help tests check script output
Provides class to be instantiated in tests that check that scripts can be run
and give correct output. Usually works something like this in a test module::
import mymodule
from scripttester import ScriptTester
runner = ScriptTester(mymodule)
Then, in the test... |
import Ember from 'ember';
// This is used by the dropdown initializer (and subsequently popovers) to manage closing & toggling
import BodyEventListener from 'ghost/mixins/body-event-listener';
export default Ember.Service.extend(Ember.Evented, BodyEventListener, {
bodyClick: function (event) {
/*jshint un... |
"use strict";
const htmlTagNames = require("html-tag-names");
const htmlElementAttributes = require("html-element-attributes");
const { getParserName, isFrontMatterNode } = require("../common/util");
const {
CSS_DISPLAY_TAGS,
CSS_DISPLAY_DEFAULT,
CSS_WHITE_SPACE_TAGS,
CSS_WHITE_SPACE_DEFAULT,
} = require("./co... |
function SvgNoteOutlined(props) {
return (
<svg
xmlns='http://www.w3.org/2000/svg'
height='1em'
viewBox='0 0 24 24'
width='1em'
className='svg-icon'
{...props}>
<path d='M0 0h24v24H0V0z' fill='none' />
<path d='M16 4H4c-1.1 0-2 .9-2 2v12.01c0 1.1.9 1.99 2 1.99h16c1.1 0 2-.9 2-2v-8l-6-6zM4 18.... |
/**
* Use this file to configure your truffle project. It's seeded with some
* common settings for different networks and features like migrations,
* compilation and testing. Uncomment the ones you need or modify
* them to suit your project as necessary.
*
* More information about configuration can be found at:
... |
import React, { useState, useEffect } from "react";
import styles from "./Features.module.css";
const FeatureList = [
{
title: "Want a better Tezos development experience?",
description:
"Don’t know where to start building on Tezos? Want a smarter way to integrate your tools? If so, Taqueria is for you... |
HOSTS = ['*']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'hc',
'USER': 'charlesmuthini',
'PASSWORD': '',
'TEST': {'CHARSET': 'UTF8'}
}
}
# DJMAIL_REAL_BACKEND = 'django_ses_backend.SESBackend'
# AWS_SES_ACCESS_KEY_ID = "put-ac... |
/*
* 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 writing, software
* distributed u... |
import { CLICK, BIND, SUBSCRIBE } from "el/sapa/Event";
import { EditorElement } from "el/editor/ui/common/EditorElement";
import './ColorSingleEditor.scss';
export default class ColorSingleEditor extends EditorElement {
initState() {
return {
params: this.props.params,
color: th... |
const path = require('path');
const webpack = require('webpack');
module.exports = {
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['env']
}
}
... |
import { linkTo } from '@storybook/addon-links';
import Welcome from './Welcome';
export default {
title: 'Welcome',
component: Welcome,
};
export const toStorybook = () => ({
components: { Welcome },
template: '<welcome :showApp="action" />',
methods: { action: linkTo('Button') },
});
toStorybook.story =... |
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ re... |
import argparse
import asyncio
import grp
import logging
import os
import pwd
import random
import re
import string
import sys
import urllib
from fnmatch import fnmatch
from typing import Dict
from typing import List
from typing import Tuple
import aiohttp
import yaml
from aiohttp import ClientSession
from aiohttp imp... |
"""
Mask R-CNN
Display and Visualization Functions.
Copyright (c) 2017 Matterport, Inc.
Licensed under the MIT License (see LICENSE for details)
Written by Waleed Abdulla
"""
import os
import sys
import random
import itertools
import colorsys
import numpy as np
from skimage.measure import find_contours
import matplo... |
'use strict';
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var iconHelpers = require('@carbon/icon-helpers');
var PropTypes = _interopDefault(require('prop-types'));
var React = _interopDefault(require('react'));
function _typeof(obj) { if (typeof... |
// Copyright 2021 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 React from 'react'
const banner=(props)=> {
return (
<section className="hero-1">
<div>
<h2>{props.title}</h2>
<p>{props.sub}</p>
<div>{props.children}</div>
</div>
</section>
)
}
export default banner;
|
/**
* ID
*
* The id service is used for user identification and authorization.
*/
var util = require('util'),
Base58Utils = require('../util/base58'),
RippleAddress = require('../util/types').RippleAddress;
var module = angular.module('id', ['authflow', 'blob', 'oldblob']);
module.factory('rpId', ['$root... |
module.exports = {
images: {
domains: ["cloudflare-ipfs.com", "etherscan.io"],
},
assetPrefix: "",
basePath: "",
};
|
import React, { Component } from 'react';
import { fetchJson } from '../utils';
export default class RelatedServices extends Component {
state = { services: [] };
componentWillMount() {
const service = window.location.host.includes('localhost') ? 'local' : 'enighet';
fetchJson(`https://files.... |
/*!
* Copyright 2016 Apereo Foundation (AF) Licensed under the
* Educational Community 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://opensource.org/licenses/ECL-2.0
*
* Unless required by applicab... |
from __future__ import unicode_literals
import re
try:
from urllib.parse import urlsplit, urlunsplit
except ImportError: # Python 2
from urlparse import urlsplit, urlunsplit
from mogwai._compat import string_types, text_type, float_types, integer_types, array_types, bool_types, print_
from mogwai.exception... |
from flask import Flask
from flask_pymongo import PyMongo
app = Flask(__name__)
app.secret_key = "secret key"
app.config["MONGO_URI"] = "mongodb://localhost:27017/flasktuts"
mongo = PyMongo(app)
|
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.conf import settings
from django.views.generic import TemplateView
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^... |
#
#
#
from __future__ import absolute_import, division, print_function, \
unicode_literals
import dns.name
import dns.query
import dns.zone
import dns.rdatatype
from dns.exception import DNSException
from collections import defaultdict
from os import listdir
from os.path import join
import logging
from ..recor... |
'use strict';
const _ = require('lodash');
const chalk = require('chalk');
const inquirer = require('inquirer');
const namespaceToName = require('yeoman-environment').namespaceToName;
const globalConfig = require('../utils/global-config');
module.exports = app => {
app.insight.track('yoyo', 'clearGlobalConfig');
... |
/* Ionicons v6.0.0 */
export const ionAccessibilityOutline = 'M256 56 m-40, 0 a40,40 0 1,0 80,0 a40,40 0 1,0 -80,0@@fill:none;stroke:currentColor;stroke-linejoin:round;stroke-width:32;&&M204.23 274.44c2.9-18.06 4.2-35.52-.5-47.59-4-10.38-12.7-16.19-23.2-20.15L88 176.76c-12-4-23.21-10.7-24-23.94-1-17 14-28 29-24 0 0 88... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Schema = void 0;
const CustomError = require("./Error");
const utils = require("./utils");
const Internal = require("./Internal");
const Document_1 = require("./Document");
const Model_1 = require("./Model");
class DynamoDBType {
c... |
const toBeInstanceOf = (received, expected) => received instanceof expected;
export default toBeInstanceOf;
|
var searchData=
[
['idlistrequest',['IDListRequest',['../class_request_1_1_i_d_list_request.html',1,'Request']]],
['incaggregateval',['incAggregateVal',['../classfeature__extractors_1_1_extractor_1_1_extractor_1_1_session_features.html#a7d4f6f7bc8639f698f74228a9f14e60a',1,'feature_extractors::Extractor::Extractor::... |
/*
* Flush stats to datadog (http://datadoghq.com/).
*
* To enable this backend, include 'datadog' in the backends
* configuration array:
*
* backends: ['datadog']
*
* This backend supports the following config options:
*
* datadogApiKey: Your DataDog API key
*/
var net = require('net'),
util = requi... |
const axios = require("axios");
const chalk = require("chalk");
/**
* Gets Global Summary from the Covid19 API
*/
const getSummary = async () => {
try {
const res = await axios.get("https://api.covid19api.com/summary");
return res.data.Global;
} catch (err) {
console.log(chalk.red.bold("An Error Occu... |
const cardSettings = [
{
text: 'Qiita',
type: '1',
url: 'https://qiita.com',
contents: 'プログラミングに関する知識を記録・共有するためのサービスです。記事を投稿もすることが出来ます。',
},
{
text: 'はてなテクノロジー',
type: '1',
url: 'https://b.hatena.ne.jp/hotentry/it',
contents: '他サイトのI... |
if (el.classList) {
el.classList.toggle(className)
} else {
var classes = el.className.split(' ')
var existingIndex = -1
for (var i=classes.length; i--;){
if (classes[i] === className)
existingIndex = i;
}
if (existingIndex >= 0)
classes.splice(existingIndex, 1)
else
... |
from stable_baselines.ppo2_snapshot.ppo2_snapshot import PPO2_SH
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@styled-icons/remix-fill/FolderAdd"), exports);
|
import BaseLfo from '../../core/BaseLfo';
const sqrt = Math.sqrt;
const cos = Math.cos;
const PI = Math.PI;
// Dct Type 2 - orthogonal matrix scaling
function getDctWeights(order, N, type = 'htk') {
const weights = new Float32Array(N * order);
const piOverN = PI / N;
const scale0 = 1 / sqrt(2);
const scale = ... |
/* global IACHandler, SimpleKeyNavigation */
(function(exports) {
'use strict';
function $(id) {
return document.getElementById(id);
}
var TYPE = {
'NORMAL': 'notification',
'ALERT': 'alert-notification'
};
// =============== IAC Connector ====================================
/**
* IACCo... |
const handler = (router, routesContext) => {
router.get('/transfer/:transferId', async (ctx, next) => {
const res = await routesContext.db.getTransferState(ctx.params.transferId);
if (res === null) {
ctx.response.body = { message: 'Transfer not found' };
ctx.response.status =... |
let appRoot = require('app-root-path');
let constants = require(`${appRoot}/local_modules/constants`);
let request = require('request');
//mongodb connection
let MongoClient = require('mongodb').MongoClient;
module.exports = (app) => {
app.get('/view/:regno', (req,res)=>{
var regno = req.params['regno'];... |
// pages/clouddatabase/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// 初始化数据库
const db = wx.cloud.database();
// 获得 history 集合对象
const db_history = db.collection('history');
// 引入 dayjs
const dayjs = require('dayjs');
... |
module.exports = {
title: 'Build Tracker',
tagline: 'Track your application’s performance budgets and prevent unexpected bloat.',
url: 'https://buildtracker.dev',
baseUrl: '/',
favicon: 'img/favicon.png',
organizationName: 'paularmstrong', // Usually your GitHub org/user name.
projectName: 'build-tracker'... |
// 1.计数器位置,操作,应用
// 在每一个Job的save方法里面,会使用Incr q:ids进行唯一Id的分配,一般保持顺序Id
// 2.redis定制zset操作,如何保持数据统一不出错。
// 因为实际的数据都是存储在job:${id}的hash结构中,zset里面管理的是排序信息,使用优先级作为score。然后,固定使用
// 自定义的createFIFO,stripFIFO方法包裹id。在定时器里面,堆任务和job的管理没有出错,及时得处理掉各个状态的job.避免
// 一个job两种状态.清理的方法也重要。无论是key,hash,zset,相关的资源需要清理完毕。
// 3.如何管理queue,job的状态
/... |
# 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... |
from chainercv.evaluations.eval_detection_voc import calc_detection_voc_ap # NOQA
from chainercv.evaluations.eval_detection_voc import calc_detection_voc_prec_rec # NOQA
from chainercv.evaluations.eval_detection_voc import eval_detection_voc # NOQA
from chainercv.evaluations.eval_semantic_segmentation import calc_se... |
#===============================================================================
#======================== Benchmark for paRallel I/O ===========================
#===============================================================================
# Author: Marc B.R. Joos
#
# Created/last modified: jun 26, 2013/jul 22, 2013... |