text stringlengths 3 1.05M |
|---|
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const Template = require("./Template");
module.exports = class RuntimeTemplate {
constructor(outputOptions, requestShortener) {
this.outputOptions = outputOptions || {};
this.requestShortener = reque... |
import pytest
import time
from hexbytes import (
HexBytes,
)
def test_shh_sync_filter_deprecated(web3, skip_if_testrpc):
skip_if_testrpc(web3)
with pytest.warns(DeprecationWarning):
sender = web3.shh.newKeyPair()
sender_pub = web3.shh.getPublicKey(sender)
receiver = web3.shh.new... |
from django.contrib import admin
from populous.categories.models import Category
class CategoryAdmin(admin.ModelAdmin):
fieldsets = (
(None, {'fields': ('parent', 'name')}),
)
list_display = ('representation',)
search_fields = ('representation',)
admin.site.register(Category, CategoryAdmin)
|
import { TWEETS_LOADED } from './constants';
export const initialState = {
movieStarTweets: [],
musicStarTweets: [],
};
const homeReducer = (state = initialState, action) => {
switch (action.type) {
case TWEETS_LOADED: {
return {
...state,
movieStarTweets: action.movieStarTweets,
... |
"use strict";
/*:
* @plugindesc 自作の一枚画像をウィンドウに適用します。
* @author ei1chi
*
* @help このプラグインにはプラグインコマンドはありません。
*
* ============================================================
* OriginalWindowSkin.js
* v0.1.0
* ============================================================
* 自作の一枚画像をウィンドウの見た目に適用するプラグインで... |
import React from 'react'
import {render, fireEvent, within} from '@testing-library/react'
import Usage from '../final/09'
// import Usage from '../exercise/09'
test('renders', () => {
const {getByText, getByLabelText, container} = render(<Usage />)
const plus = getByText(/add item/i)
fireEvent.click(plus)
fir... |
/**
* Created by Peter Baus on 11/3/2015.
*/
$(document).ready(function(){
start();
});
function start() {
var pockeTest = $.pockeTest();
pockeTest.define.action('wait 2 seconds', function (assert) {
assert.wait(2000);
});
pockeTest.group('Testing of form');
pockeTest.test(... |
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel appli... |
Cypress.Commands.add('seedAndVisit', (seedData = 'fixture:todos') => {
cy.server();
cy.route('GET', '/api/todos', seedData);
cy.visit('/');
}); |
export { default as naturalEarth1 } from './naturalEarth1'
export { default as mercator } from './mercator'
export { default as equirectangular } from './equirectangular'
export { default as orthographic } from './orthographic'
|
//////////////////////////////////////////////////////////////////////////////
// Debug
//////////////////////////////////////////////////////////////////////////////
import utils from './Utils';
/**
* The debug class draws helpful info to the canvas.
* Sections:
* - time: time for drawing
* - zoom: zoom and dr... |
var gulp = require('gulp');
var watch = require('gulp-watch');
var shell = require('gulp-shell')
var paths = {
'src':['./models/**/*.js','./routes/**/*.js', 'keystone.js', 'package.json']
};
gulp.task('runKeystone', shell.task('node keystone.js'));
gulp.task('watch', [
]);
gulp.task('default', ['watch', 'runKe... |
const { readRoomDiagram } = require("./readRoomDiagram.js");
const { processRoomDiagram } = require("./processRoomDiagram.js");
async function doPart1(fileName) {
const data = await readRoomDiagram(fileName);
return processRoomDiagram(data, true);
}
exports.doOrganizeAmphipodsPart1 = doPart1;
async function doPar... |
const config = require('./../config');
const crawler = require('./crawler');
const parser = require('./parser');
const tracker = require('./tracker');
const knex = require('knex')(config.db);
const getCount = async () => {
const [count] = await knex('torrents').count('infohash');
const [count2] = await knex('torrent... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
try:
# Change main dir to this (need for Pentest Box)
import os
os.path.abspath(__file__)
from Classes import (Credits,
OKadminFinderClass,
MessengerClass)
import argparse
from colorama import Fore,... |
import requests
import colorama
import json
import random
def get_woeid(lat, long):
url = 'https://www.metaweather.com/api/location/search/?lattlong=' + \
str(lat)+','+str(long)+''
try:
response = requests.get(url)
except requests.exceptions.RequestException as e:
print(colorama.F... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.NotificationRenderer = exports.globalSettings = undefined;
var _aureliaPal = require('aurelia-pal');
var _aureliaTemplating = require('aurelia-templating');
var _bsNotification = require('./bs-notification');
var globalSetting... |
/** layuiAdmin.pro-v1.0.0 LPPL License By http://www.layui.com/admin/ */
;layui.define(["form", "upload"], function (t) {
var i = layui.$, e = layui.layer, n = (layui.laytpl, layui.setter, layui.view, layui.admin), a = layui.form,
s = layui.upload;
i("body"), a.render(), a.verify({
nickname: fun... |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import time
try:
from marionette import (expected,
Wait)
from marionette.by import ... |
/* global window, exports, define */
!function () {
var re = {
not_string: /[^s]/,
not_bool: /[^t]/,
not_type: /[^T]/,
not_primitive: /[^v]/,
number: /[diefg]/,
numeric_arg: /[bcdiefguxX]/,
json: /[j]/,
not_json: /[^j]/,
text: /^[^\x25]+/,
modulo: /^\x25{2}/,
placeholder: /^\x25(?:([1-9]\d*)\$|\(... |
# -*- coding: utf-8 -*-
from qcloudsdkcore.request import Request
class GetAccountSettingsRequest(Request):
def __init__(self):
super(GetAccountSettingsRequest, self).__init__(
'apigateway', 'qcloudcliV1', 'GetAccountSettings', 'apigateway.api.qcloud.com')
|
import Vue from 'vue';
import VueRouter from 'vue-router';
Vue.use(VueRouter)
import Home from './pages/Home';
import NotFound from './pages/NotFound';
const router = new VueRouter({
mode: 'history',
routes: [
{
path: '/',
name: 'home',
component: Home
},
... |
/* eslint-disable compat/compat */
/* eslint-disable camelcase */
import { Divider, Row, Tooltip } from 'antd';
import { connect } from 'dva';
import React, { Component } from 'react';
import globalUtil from '../../utils/global';
import oauthUtil from '../../utils/oauth';
import rainbondUtil from '../../utils/rainbond'... |
/*
* This file contains all the tips and apps of https://devrel-kpis.com
*
* 💡 CONTRIBUTE:
*
* - Add your tip to the BOTTOM of this file.
* - In the "avatar" field you can specify a username, email address or domain (we use unavatar.now.sh)
* - Get a unique id to use for each tip; this turns into the direct URL... |
require("../../lib/framework/assert.js");
require("../../lib/loader.js");
require("../../lib/kernel.js");
require("../../gen/module.js");
|
const mongoose = require("mongoose");
const { connectionUri } = require("../utils/dbParams");
const connect = async () => {
if (mongoose.connection.readyState === 0) {
try {
await mongoose.connect(connectionUri, {
useNewUrlParser: true,
useCreateIndex: true,
useFindAndModify: false... |
import numpy as np
import pytest
from kitt.image.objdetect.bbox import BBox, BBoxBase, NormalizedBBox
def test_create_invalid_normalized_bbox():
with pytest.raises(Exception):
NormalizedBBox(xmin=5, xmax=10, ymin=1, ymax=2)
def test_create_bbox_base_directly():
with pytest.raises(Exception):
... |
var namespaceSpecDRAM__mod =
[
[ "SpecDRAM_type", "structSpecDRAM__mod_1_1SpecDRAM__type.html", "structSpecDRAM__mod_1_1SpecDRAM__type" ],
[ "checkForSanity", "namespaceSpecDRAM__mod.html#ae0400b40ce3673b229b9dab1642c38ce", null ],
[ "constructSpecDRAM", "namespaceSpecDRAM__mod.html#a4a0981ca0da9204e689390b... |
import React, { Component } from 'react'
import classnames from 'classnames'
import _ from 'lodash'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import * as MapActions from '../../actions/map'
import { compareTimes as timeOptions } from '../../settings/options'
import { filters } fr... |
import React, { useEffect, useState } from "react";
import api from './services/api';
import "./styles.css";
function App() {
const [repositories, setRepositories] = useState([]);
useEffect(() => {
api.get('repositories').then(response => {
setRepositories(response.data);
})
}, []);
async fu... |
(new Foo).x;
|
# Generated by Django 2.1.5 on 2019-01-30 18:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('booking', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='booking',
old_name='beds',
... |
#### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/wearables/hat/shared_hat_twilek_s01.iff"
result.attribute_template_... |
const frappe = require('frappejs');
const Observable = require('frappejs/utils/observable');
const model = require('./index');
module.exports = class BaseDocument extends Observable {
constructor(data) {
super();
this.fetchValues = {};
this.setup();
Object.assign(this, data);
}
... |
"""
ASGI config for django_script_runner 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.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault(... |
module.exports = {
collectCoverageFrom: ["src/*.{ts}", "src/**/**.ts"],
preset: "ts-jest",
testEnvironment: "node",
setupFilesAfterEnv: ["./src/jest.setup.ts"],
};
|
import data_analysis_tool as dat
ALL_DATASETS = ['Ripe_Ris_monitors', 'Ripe_Atlas_probes', 'RouteViews_peers', 'Compare_All']
if __name__ == "__main__":
dat.plot_analysis(ALL_DATASETS) |
"""ml-model-quality-analysys
A package to perform quality analyses for Machine Learning models.
"""
__version__ = '0.0.1'
__author__ = 'María Grandury' |
import BaseEvent from "@pencil.js/base-event";
import Component from "@pencil.js/component";
import Container from "@pencil.js/container";
import MouseEvent from "@pencil.js/mouse-event";
import Rectangle from "@pencil.js/rectangle";
/**
* Abstract Input class
* @abstract
* @class
* @extends Container
*/
export d... |
import { PACKAGE_NAME } from './constants';
import get from 'lodash/get';
import merge from 'lodash/merge';
import validateStorage from './validateStorage';
const oldStorageKey = '@bw/core/analytics';
/**
* Manages a storage with a specific key and a time-to-live.
*
* @private
* @category Analytics
*/
class Stor... |
import { configureStore } from '@reduxjs/toolkit'
import postReducer from 'redux/posts/reducer';
export default configureStore({
reducer: {
posts: postReducer,
},
}) |
// Copyright 2019 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 ... |
from __future__ import print_function, division, absolute_import
from .extended_roadrunner import ExtendedRoadRunner
|
import Swal from "sweetalert2";
export const swalConfirmation = Swal.mixin({
customClass: {
cancelButton: 'btn btn-danger mx-2',
confirmButton: 'btn btn-success mx-2'
},
buttonsStyling: false,
cancelButtonText: 'Cancel',
confirmButtonText: 'Confirm',
showCancelButton: true,
type: 'question'
});
... |
/* @jsx createElement */
import {createElement, Component, useState, useReducer, useMemo, forwardRef, createRef, useRef, useEffect, useCallback, useImperativeHandle, useLayoutEffect} from 'rax';
import {renderToString} from '../index';
function Text(props) {
return <span>{props.text}</span>;
}
describe('hooks', ()... |
"""
Utility method for Sublime Text editor
"""
import re
import os.path
import sublime
import sublime_plugin
from zlib import adler32 # adler32 considered faster than crc32
# List of LiveStyle-supported file extensions
supported_syntaxes = ['css', 'less', 'scss']
_settings = None
_sels = {}
try:
isinstance("", bas... |
#!/usr/bin/env python
#
# Copyright 2013 CSIR Meraka HLT and Multilingual Speech Technologies (MuST) North-West University
#
# 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... |
var
Human = require('../../lib/models/human'),
passport = require('passport')
;
exports.validateLogin = function(identity, password, callback)
{
Human.validateLogin(identity, password)
.then(function(person)
{
callback(null, person);
})
.fail(function(err)
{
callback(err);
}).done();
};
ex... |
import Icon from '../components/Icon'
Icon.register({
'align-center': {
width: 448,
height: 512,
paths: [
{
d: 'M432 160c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16h-416c-8.8 0-16-7.2-16-16v-32c0-8.8 7.2-16 16-16h416zM432 416c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16h-416c-8.8 0-16-7.2-16-16v-3... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d20881e"],{a4a6:function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("v-data-table",{staticClass:"ma-5",attrs:{headers:t.headers,items:t.dataO,"items-per-page":5},scopedSlots:t._u([{key:"it... |
import time
import traceback
from typing import Dict
import coinbasepro
from coinbasepro.exceptions import CoinbaseAPIError
from cbpa.logger import logger
from cbpa.schemas.buy import Buy
from cbpa.schemas.config import Config
from cbpa.schemas.currency import FCC
from cbpa.services.account import AccountService
from... |
var denon = require('../../lib/app')
, config = require('./config');
var avr = new denon(new denon.transports.telnet(config));
avr.connect();
avr.on('connect', function() {
console.log('Connected');
avr.setPowerState(true, function(err, state) {
if (err) {
console.log(err.toString());
return;
... |
import cv2
import numpy as np
#-->0 = bilgisayar kamerası
#-->1 = usb ile takılmış kamera
#-->video ismi = bilgisayarda ki video
kamera = cv2.VideoCapture(0)
while True:
ret,kare = kamera.read()
cv2.rectangle(kare,(160,120),(480,360),[0,0,255],4)
bolge = kare[120:360,160:480]
... |
var a = { f: { g: 3 } };
a.f.h = 4;
a.f.g = 7;
|
angular.module('marbleCoreApp')
.factory('ProcessedPostsFactory', ['$resource', 'getInterceptor', ProcessedPostsFactory]);
function ProcessedPostsFactory($resource, getInterceptor) {
return $resource('/api/processedPosts', {}, {
deleteByTopic: {method: 'DELETE', params: {topicName: '@topicName'}, isArray: ... |
# coding: utf-8
from timeUtils import clock, elapsed
from matplotlib import pyplot as plt
try:
import pygeohash as geohash
except:
import geohash
class drawClusters():
def __init__(self, soloclusters = None, geoCounts = None, bitlen = None, clusters = None):
self.clusters = clusters
self... |
import React from "react"
import { useStaticQuery, graphql } from "gatsby"
import Layout from "../components/layout"
import SEO from "../components/Utility/seo"
import MaskFaq from "../components/Views/MaskFaq"
const Maskfaq = () => {
const query = useStaticQuery(graphql`
query {
banner: file(relativePath:... |
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.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&&Object.... |
const mongoose = require("mongoose");
const mongoosePaginate = require("mongoose-paginate-v2");
//create schema
const incomeSchema = new mongoose.Schema(
{
title: {
required: [true, "Title is required"],
type: String,
},
description: {
required: [true, "Description is required"],
... |
#
# 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... |
from django.contrib.localflavor.ca.forms import (CAPostalCodeField,
CAPhoneNumberField, CAProvinceField, CAProvinceSelect,
CASocialInsuranceNumberField)
from utils import LocalFlavorTestCase
class CALocalFlavorTests(LocalFlavorTestCase):
def test_CAProvinceSelect(self):
f = CAProvinceSele... |
// export modified jest config
module.exports = Object.assign({}, require('./jest.json'), {
coverageReporters: ['json-summary'],
});
|
/**
* @license Angular v7.1.2
* (c) 2010-2018 Google, Inc. https://angular.io/
* License: MIT
*/
import { __decorate, __param, __metadata, __extends, __values, __assign, __spread } from 'tslib';
import { InjectionToken, ɵisObservable, ɵisPromise, Directive, ElementRef, Renderer2, forwardRef, Inject, Optional, Inje... |
// Search UI Event Logger
// Tracks events, but no data is recorded
//
// Alex Roberts @ Creative Commons, 2010
//
// Some data may be used for processing, differentials and time tracking
// All logs are stored privately and for internal use only
//
// Requirements: jQuery
// Quick and dirty user id for a single page ... |
import "./setup";
import {expect} from "chai";
import {mount} from "avoriaz";
import moment from "moment";
import {insertHTML} from "./utils";
import BtrzDateRange from "../src/btrz-date-range";
const dummyLogger = {
warn() { return null; },
error() { return null; },
info() { return null; }
};
describe("BtrzDa... |
this.wp=this.wp||{},this.wp.editPost=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(... |
/*
*
* AthleteTeam
*
*/
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import {Tabs, Tab} from 'material-ui/Tabs';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import AthleteTeamList from './AthleteTeamList'
import ApplyTeamForm from './ApplyTeamForm'
import... |
var app = angular.module('dashboardApp',
['ui.bootstrap','ui.calendar','mgcrea.ngStrap','ngAnimate','ngSanitize']);
|
import React, {Component} from 'react';
import Login from './Login';
import { Panel } from 'react-bootstrap';
class Home extends Component {
constructor(props) {
super(props);
this.state = {
isAuthenticated: false,
user: '',
password:''
};
this.handleChange = this.handleChange.bind(this);
this.ha... |
const mongoose = require('mongoose');
const { Schema } = mongoose;
const productSchema = new Schema({
id: {
type: Number,
unique: true
},
name: String,
slogan: String,
description: String,
category: String,
default_price: String
}, {collection: 'product'});
const stylesSchema = new Schema({
... |
// Update with your config settings.
const pgConnection = process.env.DATABASE_URL;
module.exports = {
development: {
client: 'sqlite3',
connection: {
filename: './data/plants.db3'
},
useNullAsDefault: true,
migrations: {
directory: './data/migrations'
},
seeds: {
direc... |
import { createReducer } from '@reduxjs/toolkit'
import { SETTING_CATEGORIES, CONNECTION_STATE_TYPE } from 'shared/constants'
import { SettingsActions, ConnectionActions } from '../actions'
const initialState = {
categories: Object.values(SETTING_CATEGORIES),
tabs: [],
tabMessages: {},
tabTypes: {},
data: ... |
import React from "react"
import Svg, { Path } from "react-native-svg"
const iossharealt = props => (
<Svg width={props.size} height={props.size} fill={props.color} viewBox="0 0 512 512">
<Path d="M444.7 230.4l-141.1-132c-1.7-1.6-3.3-2.5-5.6-2.4-4.4.2-10 3.3-10 8v66.2c0 2-1.6 3.8-3.6 4.1C144.1 195.8 85 300.8 6... |
import base64
# import datetime
import hashlib
import hmac
import json
import random
import re
import time
import uuid
from pathlib import Path
from typing import Dict, List
from uuid import uuid4
import requests
from pydantic import ValidationError
from instagrapi import config
from instagrapi.exceptions import (
... |
from CTFd import create_app
from elasticsearch import helpers, Elasticsearch
from CTFd.utils import get_app_config
import csv
import glob
import os
import pandas as pd
import schedule
import sqlite3
import time
import uuid
def export():
app = create_app()
with app.app_context():
# Generate temp folde... |
'use strict';
exports.__esModule = true;
exports.SET_RESULTS = exports.NEXT_QUESTION = exports.ANSWER_COLLECTION = undefined;
exports.nextQuestion = nextQuestion;
exports.postAnswerGetQuestion = postAnswerGetQuestion;
var _axiosConfigInitial = require('./axiosConfigInitial');
var _axiosConfigInitial2 = _interopRequi... |
/*
Month/Year date format with slash "/" (also "-" and ".") between numbers
- 11/05
- 06/2005
*/
var moment = require('moment');
var Parser = require('../parser').Parser;
var ParsedResult = require('../../result').ParsedResult;
var PATTERN = new RegExp('(^|[^\\d/]\\s+|[^\\w\\s])' +
'([0-9]|0... |
#! /usr/local/bin/node
const _ = require('lodash')
const Docker = require('node-docker-api').Docker
const ConsulProvider = require('./providers/consul')
const Registrator = require('./registrator')
const EventsListener = require('./events-listener')
const argv = require('yargs')
.option('socket', {describe: 'path to... |
// Copyright 2015-2017 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity 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 version 3 of the License, or
// (at your option) any lat... |
"""
##################################################################################################
# Copyright Info : Copyright (c) Davar Lab @ Hikvision Research Institute. All rights reserved.
# Filename : __init__.py
# Abstract :
# Current Version: 1.0.0
# Date : 2021-03-19
###... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* This sample demonstrates how get a list of collections
*
* @summary gets a list of collections
*/
const PurviewAccount = require("@azure-rest/purview-Account");
const { DefaultAzureCredential } = require("@azure/identity");
const dot... |
from flask import Flask, request, render_template, redirect, session, url_for
from flask import request as request
import db
import datetime
import DBcm
from flask_mail import Mail, Message
import secrets
# crate app object
app = Flask(__name__)
# generate secret key
app.secret_key = "87ewQZr"
# configure email setti... |
import sys
import time
import operator
import pandas as pd
import numpy as np
import itertools
from sklearn.preprocessing import LabelEncoder, StandardScaler
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import *
from sklearn.model_selection import train_test_split
from sklearn.pipeline import ... |
const config = {
siteTitle: "Gatsby Advanced Starter", // Site title.
siteTitleShort: "GA Starter", // Short site title for homescreen (PWA). Preferably should be under 12 characters to prevent truncation.
siteTitleAlt: "GatsbyJS Advanced Starter", // Alternative site title for SEO.
siteLogo: "/logos/logo-1024.... |
/**
* 有的任务需要和页面交互,但是这种交互或存在不确定性(消息广播,页面内交互)
* 为了保证任务会被执行,创建此类
* @param callback
* 回调方法
* @returns {TimeLimitTask}
*/
function TimeLimitTask(callback) {
this.finished = false;
this.realCallback = callback;
var self = this;
window.setTimeout(function() {
self.callback();
}, 200);
}
TimeLimitTask.p... |
sap.ui.define(["sap/ui/webc/common/thirdparty/base/asset-registries/Icons"],function(t){"use strict";const q="system-2";const s="M32 448V64q0-14 9-23t23-9h384q12 0 22 8t10 21v389q0 14-10 22t-22 8H62q-13 0-21.5-10T32 448zm416 0V64H64v384h384zM176 160q11 0 19 8t8 19q0 20-18 25v31l34 21 58-34-26-17q-4-3-4-7v-58q-18-5-18-2... |
/*!
* Copyright 2016 Telerik AD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
import React from "react"
import "./css/TypesIcons.css"
const TypesIcons = props => {
const {height,width,backColor,color,TextColor} = props
return (
<div className="TypesIconsGroup">
<div
className="SmallIcon"
style={{
width: width,
height: height,
backgro... |
''' Provide base classes for the Bokeh property system.
.. note::
These classes form part of the very low-level machinery that implements
the Bokeh model and property system. It is unlikely that any of these
classes or their methods will be applicable to any standard usage or to
anyone who is not direc... |
/* eslint-disable import/no-anonymous-default-export */
import React from "react";
import { Row, Col } from "antd";
import HorizontalBar from "./HorizontalBar";
import StalkedChart from "./StalkedChart";
import VerticalBar from "./VerticalBar";
export default () => (
<div>
<Row>
<Col span={22} offset={1}>... |
import RPIO as GPIO
import RPIO.PWM as PWM
from HD44780 import HD44780
from Utils import delay_microseconds
class LCD_Protocol():
def __init__(
self, rs, enable, pins,
backlight=None, rw=None,
cols=16, lines=1, dotsize=0):
# Interal Variables
self.__rs = rs
... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{143:function(e,t,a){"use strict";a.r(t);var n=a(7),i=a.n(n),r=a(0),o=a.n(r),l=a(148),d=a(149),c=a(160),p=a(171),s=a(172),m=a(145),u=a(4),h=a.n(u),g=a(154),f=a(146),x=m.a.div.withConfig({displayName:"text-section-2__TextWrapper",componentId:"sc-1a6a5nl-0"})(["padd... |
import {
sankey,
sankeyCenter,
sankeyJustify,
sankeyLeft,
sankeyLinkHorizontal,
sankeyRight,
} from 'd3-sankey';
import isFunction from 'lodash/isFunction';
import isNull from 'lodash/isNull';
import isUndefined from 'lodash/isUndefined';
import isString from 'lodash/isString';
import isNumber from 'lodash/... |
describe('request data', function(){
it('gives correct request properties', function(){
requestData('my-key', 'benjaminf')
.should.have.properties({
method:'user.getrecenttracks',
user:'benjaminf',
api_key:'my-key',
limit:200,
page:0
})
})
it('gives a request prope... |
import React, { useState, useEffect } from 'react'
import DashBoardSectionVehicleHeading from '../../Atoms/admin/DashBoardSectionVehicleHeading';
import axios from 'axios';
import { getCookie } from '../../../jsfunctions/cookies';
export default function DashBoardVehicleInfoSectionHeadingMolecular(props) {
const [s... |
var argv = require("minimist")(process.argv.slice(2), { default: { show: 1 } });
var five = require("../lib/johnny-five");
var board = new five.Board();
board.on("ready", function() {
// MPR121QR2 3x3 Capacitive Touch Shield
var touchpad;
if (argv.show === 1) {
touchpad = new five.Touchpad({
controlle... |
/**
@module utils-poll.js contains all of the logic for starting and stopping a poll.
@author iAmMichaelConnor
*/
/**
@param {function} pollingFunction - function MUST return false for 'unsuccessful' results.
@param {number} interval - polling frequency (in milliseconds)
@param {object} args = an object of arguments w... |
import {gql} from "@apollo/client";
export const LOGIN_USER = gql`
mutation login($email: String!, $password: String!) {
login(email: $email, password: $password) {
token
user {
_id
username
}
}
}
`;
export const ADD_USER = gq... |
from django.db import models
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \
PermissionsMixin
from django.conf import settings
# Create your models here.
class UserManager(BaseUserManager):
def create_user(self, email, password=None, **extra_fields... |
def decompose(n):
return helper(n, n**2)
def helper(n, sum, arr=[]):
if sum==0:
return arr[::-1]
for i in range(n-1, -1, -1):
if i**2<=sum:
return helper(i, sum-i**2, arr+[i]) or helper(i, sum, arr) |