text stringlengths 3 1.05M |
|---|
from __future__ import print_function
import os
import argparse
import torch
from data import cfg_mnet, cfg_re50
from layers.functions.prior_box import PriorBox
from models.retinaface import RetinaFace
parser = argparse.ArgumentParser(description='Test')
parser.add_argument('-m', '--trained_model', default='./weights/... |
import * as d3_base from "./web_modules/d3.js"
import * as d3geo from "./web_modules/d3-geo-projection.js";
import * as xnet from "./xnet.js"
import noUiSlider from './web_modules/nouislider.js';
import './web_modules/nouislider/distribute/nouislider.css.proxy.js';
import './customSliders.css.proxy.js';
import * as ut... |
/* eslint-disable complexity */
const timescrape3 = time => {
if (!time) {
return ''
}
let totalTime = time.slice(2).toString()
let min =
totalTime.length < 3
? Number(totalTime.slice(0, 1))
: Number(totalTime.slice(0, 2))
let hours
if (min > 60) {
hours = Math.floor(min / 60)
mi... |
var cfg = require('./config');
// Setup Express
var express = require('express');
var app = express();
var publicDir = '/build';
app.use('/js', express.static(__dirname + '/js'));
app.use('/css', express.static(__dirname + '/css'));
app.use(express.static(__dirname + publicDir));
app.get('/*', function(req, res) {
... |
import PanelRightPage from '../pages/panel-right.vue';
import ChannelsPage from '../pages/channels';
import SingUpPage from '../pages/signup'
import Chat from '../pages/chat'
import {auth} from '../database'
export default [
{
path: '/',
name: 'register',
component: SingUpPage,
asyn... |
const path = require("path");
/** @type {import('@adonisjs/framework/src/Env')} */
const Env = use('Env');
/** @type {import('@adonisjs/ignitor/src/Helpers')} */
const Helpers = use('Helpers');
module.exports = {
/*
|--------------------------------------------------------------------------
| Default Connectio... |
#!/usr/bin/env python
#
# Copyright (c) 2001 - 2016 The SCons Foundation
#
# 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 to us... |
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[35],{
/***/ "./node_modules/@ionic/core/dist/esm/ion-loading-ios.entry.js":
/*!********************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/ion-loading-ios.entry.js ***!
\*****************************... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
import React from 'react';
import ReactDOM from 'react-dom';
import * as testHelpers from '../test-helpers';
const ExampleComponent = () => {
return (
<foobar data-test-section="example-section-parent">
<test data-test-section="example-section"></test>
</foobar>
);
};
describe('utils/test-helpers', ... |
const authReducer = (auth = {}, { type, payload }) => {
switch (type) {
case 'SIGN_UP_OK':
return { ...auth, isLogged: true, message: payload.message };
case 'SIGN_UP_BAD':
return { ...auth, message: payload.message };
case 'CLEAN_AUTH_MESSAGE':
return { ...auth, message: '' };
case ... |
from Person import Person
from Pet import Pet
import xml.etree.ElementTree as ET
import sys
class SaveXml:
@staticmethod
def main(args):
person = Person("Willie Wildcat", 42, Pet("Reggie", 4, "Shorkie"))
print("Saving person:")
print(person)
person_elem = ET.Eleme... |
#!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... |
from rlbot.agents.base_agent import SimpleControllerState
from controllers.aim_cone import AimCone
from strategy.objective import Objective
from strategy.utility_system import UtilityState
from util import predict
from util.info import Ball, Goal
from util.rlmath import sign, clip
from util.vec import Vec3, norm
cla... |
import torch
import functools
import warnings
import copy
import numpy as np
import intel_extension_for_pytorch._C as core
from .. import conf
from .. import utils
def _get_default_recipe(configures):
# For int8 quantization, will save the date after doing calibration step,
# if default_recipe is True, it will... |
#! /usr/bin/env python
# Script to launch AllenNLP Beaker jobs.
import argparse
import os
import json
import random
import tempfile
import subprocess
import sys
from allennlp.common.params import Params
# This has to happen before we import spacy (even indirectly), because for some crazy reason spacy
# thought it w... |
// Utils
import memoize from '../../utils/memoize'
import upperFirst from '../../utils/upper-first'
import warn from '../../utils/warn'
import { arrayIncludes } from '../../utils/array'
import { getBreakpointsUpCached } from '../../utils/config'
import { select, selectAll, isVisible, setAttr, removeAttr, getAttr } from... |
import PropTypes from "prop-types"
const availableApplePayNetworks = [
"american_express",
"discover",
"master_card",
"visa"
]
const availableApplePayAddressFields = [
"all",
"name",
"email",
"phone",
"postal_address"
]
export const initOptionsPropTypes = {
publishableKey: PropTypes.string.isRequi... |
/* globals
$
window
*/
import { utils } from '../../fut';
import { BaseScript, Database } from '../core';
import { FutbinSettings } from './settings-entry';
export class FutbinPrices extends BaseScript {
constructor() {
super(FutbinSettings.id);
this._squadObserver = null;
}
activate(state) {
super... |
import json
class PayloadError(Exception):
http_code = None
details = None
response = None
def __init__( self, description=None, response=None ):
if not description:
description = self.__class__.__name__
if response:
self.response = response
self.deta... |
import $ from 'jquery';
import { Foundation } from 'foundation-sites/js/foundation.core';
import { rtl, GetYoDigits, transitionend } from 'foundation-sites/js/foundation.util.core';
import { Box } from 'foundation-sites/js/foundation.util.box'
import { onImagesLoaded } from 'foundation-sites/js/foundation.util.imageLoa... |
import numpy as np
from . import lib
from . import model
from . import data
########################################################################################
class CeilingModel(model.Model):
############################################
def __init__(self, dataset):
super(CeilingModel, self).__i... |
describe('Dataset', function() {
var www = WWW(), mockSuggestions, mockSuggestionsDisplayFn;
mockSuggestions = [
{ value: 'one', raw: { value: 'one' } },
{ value: 'two', raw: { value: 'two' } },
{ value: 'three', raw: { value: 'three' } }
];
mockSuggestionsDisplayFn = [
{ display: '4' },
{... |
"use strict";
const os = require('os');
const cluster = require('cluster');
cluster.setupMaster({
exec: 'index.js'
});
cluster.on('exit', function(worker) {
console.log('worker ' + worker.id + ' died');
cluster.fork();
});
for (let i = 0; i < os.cpus().length; i++) {
cluster.fork();
}
|
jQuery(document).ready(function () {
/* If there are required actions, add an icon with the number of required actions in the About activello page -> Actions required tab */
var activello_nr_actions_required = activelloWelcomeScreenObject.nr_actions_required;
if ((typeof activello_nr_actions_required !== ... |
sap.ui.define([], function() {
"use strict";
var oCoreInternals;
// get access to the real core object to access the control list
sap.ui.getCore().registerPlugin({
startPlugin: function(oRealCore) {
oCoreInternals = oRealCore;
},
stopPlugin: function() {
oCoreInternals = undefined;
}
});
return {... |
/**
* Created by simba on 6/28/16.
*/
var electronWorkers = require('electron-workers')({
connectionMode: 'ipc',
pathToScript: 'worker.js',
timeout: 15000,
numberOfWorkers: 5
});
var express = require('express'); // call express
var app = express(); // define our app u... |
/*! Summernote v0.8.10 | (c) 2013- Alan Hong and other contributors | MIT license */
!function(e){e.extend(e.summernote.lang,{"ar-AR":{font:{bold:"عريض",italic:"مائل",underline:"تحته خط",clear:"مسح التنسيق",height:"إرتفاع السطر",name:"الخط",strikethrough:"فى وسطه خط",subscript:"مخطوطة",superscript:"حرف فوقي",size:... |
import { shallowMount } from '@vue/test-utils';
import 'src/app/component/media/sw-media-folder-item';
const { Module } = Shopware;
// mocking modules
const modulesToCreate = new Map();
modulesToCreate.set('sw-product', { icon: 'default-symbol-products', entity: 'product' });
modulesToCreate.set('sw-mail-template', {... |
from .Node import Node
from ..pgcollections import OrderedDict
def isNodeClass(cls):
try:
if not issubclass(cls, Node):
return False
except:
return False
return hasattr(cls, 'nodeName')
class NodeLibrary:
"""
A library of flowchart Node types. Custom libraries may be... |
'use strict';
const utils = require('../util/utils');
const DEFAULT_FLUSH_INTERVAL = 20;
module.exports = Service;
function Service(app, opts) {
if (!(this instanceof Service)) {
return new Service(app, opts);
}
opts = opts || {};
this.app = app;
this.flushInterval = opts.flushInterval || DEFAULT_FLUS... |
// definition http://translate.sourceforge.net/wiki/l10n/pluralforms
module.exports = {
rules: {
"ach": {
"name": "Acholi",
"numbers": [
1,
2
],
"plurals": function(n) { return Number(n > 1); }
},
"af": {
... |
const qrcode = require("qrcode-terminal");
const moment = require("moment");
const cheerio = require("cheerio");
const imageToBase64 = require('image-to-base64');
const get = require('got')
const fs = require("fs");
const dl = require("./lib/downloadImage.js");
const fetch = require('node-fetch');
const urlenco... |
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib 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://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... |
'use strict';
var _ = require('lodash');
var jade = require('jade');
var path = require('path');
var conf = require('simple-configure');
var beans = conf.get('beans');
var publicUrlPrefix = conf.get('publicUrlPrefix');
var misc = beans.get('misc');
var Renderer = beans.get('renderer');
function Message(body, member) ... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports['default'] = {
today: 'Heute',
now: 'Jetzt',
backToToday: 'Zurück zu Heute',
ok: 'OK',
clear: 'Zurücksetzen',
month: 'Monat',
year: 'Jahr',
timeSelect: 'Zeit wählen',
dateSelect: 'Datum wählen',
monthSelect: 'Wäh... |
import _ from 'lodash';
import moment from 'moment';
import {stateReducer} from 'truefit-react-utils';
import {DAY_SELECTED} from '../actions';
import {DAYS} from '../../shared/constants';
const INITIAL = _.find(DAYS, d => d.isSame(moment(), 'day')) || DAYS[0];
export default stateReducer(INITIAL, {
[DAY_SELECTED]:... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Partially based on AboutMethods in the Ruby Koans
#
from runner.koan import *
def my_global_function(a,b):
return a + b
class AboutMethods(Koan):
def test_calling_a_global_function(self):
self.assertEqual(5, my_global_function(2,3))
# NOTE: Wron... |
import { CrosTab } from '@analys/crostab'
import { DB, LITE } from '@glossa/enum-data-scopes'
import { BALANCES, CASHFLOWS, INCOMES } from '@glossa/enum-fin'
import { balancesDb } from './balances.db'
import { balancesLite } from './balances.lit... |
(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... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const testing_1 = require("@nestjs/testing");
const test_utils_1 = require("../../../test/test.utils");
const database_service_1 = require("../../../database/database.service");
const kasabe_test_module_1 = require("../../kasabe_test.modu... |
/**
* @license
* 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 applicab... |
function avoidObstacles(inputArray) {
const sortedArray = inputArray.sort();
let jumpLen = 2;
while (true) {
const jumpedThrough = sortedArray.every(
obstacle => obstacle % jumpLen !== 0
);
if (jumpedThrough) return jumpLen;
jumpLen += 1;
}
}
|
/**
* ProcessWire Panels
*
* Alternative to modal windows. Creates iframe panels that load URLs.
* Clicking outside the panel closes it. By default, panels load the requested
* URL on mouseover of the a.pw-panel toggle link, unless the pw-panel-reload
* class is specified (in which case it loads on click).
*... |
// --- Directions
// Given a string, return the character that is most
// commonly used in the string.
// --- Examples
// maxChar("abcccccccd") === "c"
// maxChar("apple 1231111") === "1"
function maxChar(str) {
const obj = {};
let max = 0;
let maxChar = '';
for(let char of str) {
if (!obj[char]) {
... |
import Head from 'next/head';
import {getLayout} from '@/layouts/TopBarOnlyLayout';
import {ReportsHr} from '@/subPages/Reports/ReportsHr';
const Reports = () => (
<>
<Head>
<title>Raporty dla HR</title>
</Head>
<ReportsHr />
</>
);
Reports.getLayout = getLayout;
export default Reports;
|
module.exports = {
env: { node: true },
extends: [
"plugin:vue/recommended",
"eslint:recommended",
"plugin:prettier/recommended",
"prettier/vue",
"plugin:import/errors",
"plugin:import/warnings",
],
rules: {
"no-console": "off",
"no-debugger": "off",
"prettier/prettier": "warn",
},
parserOptions... |
from django.db import models
from django.contrib.auth.models import User
class Product(models.Model):
user = models.ForeignKey(User, on_delete=models.SET_NULL, null=True)
name = models.CharField(max_length=200, null=True, blank=True)
image = models.ImageField(null=True, blank=True, )
brand = models.Ch... |
export function calculateColumnWidth({ width, columns }) {
if (width) {
return width
} else {
let unknownColumnsWidth = 0
const columnsWidth = columns.map(column => {
if (!column.width) {
unknownColumnsWidth++
} else {
return typeof column.width === 'number' ? `${column.wid... |
import numpy as np
X = np.arange(1, 16).reshape(5, 3, order='F')
print(X)
Y = X[[1, 3]]
print(Y)
|
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
"plugins": [["module:react-native-dotenv"]]
};
|
const webpack = require("webpack");
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const LodashModuleReplacementPlugin = require("lodash-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const config = {
devtool: 'eval-source-map',
entry: ["... |
finApp.directive('confirmPassword', [function () {
return {
restrict: 'A',
scope:true,
require: 'ngModel',
link: function (scope, elem , attrs, control) {
var checker = function () {
var e1 = scope.$eval(attrs.ngModel);
var e2 ... |
import datetime
from sys import platform
import logging as logme
from urllib.parse import urlencode
from urllib.parse import quote
mobile = "https://mobile.twitter.com"
base = "https://api.twitter.com/2/search/adaptive.json"
def _sanitizeQuery(_url, params):
_serialQuery = ""
_serialQuery = urlencode(params,... |
/**
* JavaScript Client Detection
* (C) viazenetti GmbH (Christian Ludwig)
*/
(function (window) {
{
var unknown = '-';
// screen
var screenSize = '';
if (screen.width) {
width = (screen.width) ? screen.width : '';
height = (screen.height) ? screen.height ... |
import React from 'react';
export default () => {
document.title = 'Not Found';
return (
<div className="misc-page">
<h1>Not Found</h1>
<h3>...</h3>
</div>
)
}; |
from django.templatetags.static import static
from ..settings import FILER_ADMIN_ICON_SIZES
class IconsMixin:
"""
Can be used on any model that has a _icon attribute. will return a dict
containing urls for icons of different sizes with that name.
"""
@property
def icons(self):
r = {}
... |
"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... |
import os
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.utils.rnn as rnn_utils
from src.models.las import ListenAttendSpell
from src.models.ctc import CTCDecoder
class MultiTaskLearning(ListenAttendSpell):
def __init__(
self,
input... |
import React from 'react';
import './App.css';
import VideoChat from './VideoChat';
const App = () => {
return (
<div className="app">
<header>
<h1>Video Chat with Hooks</h1>
</header>
<main>
<VideoChat />
</main>
<footer>
<p>
Made with{' '}
... |
from selenium import webdriver
# 1. webdriver 的一些设置
profile = webdriver.FirefoxProfile()
# 2表示自定义文件夹 0表示保存到桌面
profile.set_preference('browser.download.folderList', 2)
# 设置默认的保存文件夹
profile.set_preference('browser.download.dir', "/Users/yi/Downloads")
# 不要过问, 直接下载保存到本地
profile.set_preference('browser.helperApps.neverAsk... |
import React from "react";
import ReactDOM from "react-dom";
import { Provider } from "react-redux";
import store from "./store";
import Application from "./application";
import "react-confirm-alert/src/react-confirm-alert.css";
export default element =>
ReactDOM.render(
<Provider store={store}>
<Applicati... |
# 3-SAT avec Grover en Qiskit d'IBM
# inspired from Nannincini paper "An introduction of Quantum Computing, without Physics" 2017
from qiskit import *
from qiskit import IBMQ
import sys
from qiskit import QuantumRegister, ClassicalRegister , QuantumCircuit
from qiskit import Aer
from qiskit.tools import visualizatio... |
//! moment.js locale configuration
var t,e;t=this,e=function(t){return t.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,week... |
import { kebabCase } from '../utils/util';
/**
* 获取迁移属性或者方法。
*
*/
export default {
mounted() {
// 开发环境下
if (process.env.NODE_ENV === 'production') return;
if (!this.$vnode) return;
const { props = {}, events = {} } = this.getMigratingConfig();
// 获取当前组件的配置
const { data, componentOptions } ... |
import React from "react";
import { Link } from "react-router-dom";
export const Home = () => {
return (
<div className="homeButtons">
<Link className="homeLink" to="/login">
Login
</Link>
<Link className="homeLink" to="/register">
Register
</Link>
<Link className="h... |
def safe_index(arr, idx, default=None):
if len(arr) > idx:
return arr[idx]
return default
def put_if_exist(key, value, dst):
if value:
dst[key] = value
|
// This is an unstable JS only base implementation! Data is session only
// TODO: Use console.warn in NODE_ENV=development
const store = {};
// We're assuming that users are using async/await, so are throwing the error. Maybe reject is better though, or using async functions + throw + Babel transpiling this repo?
con... |
import PropTypes from "prop-types";
import React, { useCallback, useEffect, useMemo, useState } from "react";
import styled from "styled-components";
import { ScreenReaderOnly } from "../ScreenReaderOnly";
import { Text } from "../Text";
import { box, breakpoints, fonts, spacings } from "../theme.js";
import { debounc... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnPrope... |
#-----------------------------------------------------------------------------
# Copyright (c) 2013-2019, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
#
# The full license is in the file COPYING.txt, distributed with this s... |
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'quicktable', 'en-ca', {
more: 'More...'
} );
|
describe("Shields", function() {
var shields;
var ship;
var defaultEnergyLevel = 4000;
beforeEach(function() {
ship = new Ship(new Game());
shields = new Shields(ship);
});
it("have a reference to a ship", function() {
expect(shields.ship).not.toBeNull();
});
it("are down by default", fu... |
jQuery(function() {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
}); |
class Solution:
def isValid(self, s: str) -> bool:
stack = []
for i in s:
if i == '(':
stack.append('(')
elif i == '[':
stack.append('[')
elif i == '{':
stack.append('{')
elif i == ')':
if... |
import path from "path";
import fs from "fs";
import React from "react";
import { renderToString } from "react-dom/server";
import { StaticRouter } from "react-router-dom";
import Routes from "./client/routes";
const clientRenderer = (req, res) => {
console.log("In Client Render");
const filePath = path.resolve(__... |
from . import EncodingError
from collections import OrderedDict
def encode(obj, encoding='utf-8', strict=True):
coded_byte_list = []
def __encode_str(s: str) -> None:
"""Converts the input string to bytes and passes it the __encode_byte_str function for encoding."""
b = bytes(s, encoding)
... |
module.exports = [
{
id: 1,
lat: '-22.4128093',
lng: '-42.9711956',
name: 'Lar das meninas',
description:
'Presta assistência a criança de 06 a 15 anos que se encontra em situação de risco e/ou vulnerabilidade social.',
iamges: [
'https://images.unsplash.com/photo-1600712243189-aaa... |
/*!
* Chart.Funnel.js
* A funnel plugin for Chart.js(http://chartjs.org/)
* Version: 1.0.2
*
* Copyright 2016 Jone Casaper
* Released under the MIT license
* https://github.com/xch89820/Chart.Funnel.js/blob/master/LICENSE.md
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.expor... |
import browser from 'sinon-chrome';
global.browser = browser;
import H from '../helper.js';
import {CSSRULE_TYPE} from '../../src/js/lib/constants.js';
import RequestParams from '../../src/js/lib/request-params.js';
import WhiteSpace from '../../src/js/lib/white-space.js';
import Capturer from '../../src/js/capturer/s... |
import React from 'react';
import styled from '@emotion/styled';
import { StaticQuery, graphql } from 'gatsby';
import Link from './link';
import Loadable from 'react-loadable';
import logo from "../logo_360_w.png";
import config from '../../config.js';
import LoadingProvider from './mdxComponents/loading';
const help... |
'use strict';
module.exports = function (context, payload, done) {
context.dispatch('UPDATE_FUNCTION', payload);
done();
};
|
'use strict';
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.createTable('Activities', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
userId: {
type: Sequelize.INTEGER,
all... |
import test from 'tape'
import Yl from './lib'
test('complete iteration', t => {
const n = 1000
t.plan(n + 1)
let ret = Yl(i => {
t.ok(i + 1, 'iteration ' + (n - i))
return i ? !i : 'done'
}, n)
t.equal(ret, 'done', 'return value is ok')
})
test('aborted early iteration', t => {
const n = 1000
... |
import React, { Component } from 'react'
import ListContacts from './ListContacts'
import * as ContactsAPI from './utils/ContactsAPI'
import CreateContact from './CreateContact'
import { Route } from 'react-router-dom'
class App extends Component {
state = {
contacts: []
}
componentDidMount() {
Contact... |
import React, { useEffect } from 'react'
import styled from "styled-components"
import {StatsData} from "../data/StatsData"
import Aos from "aos"
import "aos/dist/aos.css"
const Stats = () => {
useEffect(() => {
Aos.init({})
}, [])
return (
<StatsContainer>
<Heading
... |
const {css} = require("styled-components")
const link = css`
a:not(.anchor) {
color: rgba(0, 0, 0, 0.8);
box-shadow: inset 0 -2px ${({theme}) => theme.colors.primary};
&:hover {
box-shadow: inset 0 -25px 0 ${({theme}) => theme.colors.primary};
}
}
`
export {link}
|
/* Copyright (c) 2012 the authors listed at the following URL, and/or
the authors of referenced articles or incorporated external code:
http://en.literateprograms.org/Quickhull_(Javascript)?action=history&offset=20120410175256
Permission is hereby granted, free of charge, to any person obtaining
a copy of this softwar... |
##########################################################################
# If not stated otherwise in this file or this component's Licenses.txt
# file the following copyright and licenses apply:
#
# Copyright 2016 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not... |
"use strict";
var _helpers = require("./util/helpers");
(0, _helpers.test)('tag selector', 'h1', function (t, tree) {
t.deepEqual(tree.nodes[0].nodes[0].value, 'h1');
t.deepEqual(tree.nodes[0].nodes[0].type, 'tag');
});
(0, _helpers.test)('multiple tag selectors', 'h1, h2', function (t, tree) {
t.deepE... |
/**
* @license RequireJS text 2.0.13+ Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/requirejs/text for details
*/
/*jslint regexp: true */
/*global require, XMLHttpRequest, ActiveXObject,
define, window, process, Packages,
... |
# Copyright 2015 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... |
# Generated by Django 2.2.6 on 2019-11-13 03:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('orders', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='order',
name='country',
fiel... |
import { useState, useEffect } from "react";
import * as fcl from "@onflow/fcl";
export default function useCurrentUser() {
const [currentUser, setCurrentUser] = useState({ loggedIn: null });
useEffect(() => fcl.currentUser().subscribe(setCurrentUser), []);
return currentUser;
}
|
# -*- coding: utf-8 -*-
# Copyright (C) 2019 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Tests for import/export endpoints.
Endpoints:
- /api/people/person_id/imports
- /api/people/person_id/exports
"""
import json
from datetime import datetime
import ddt
imp... |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
(function () {
'use strict';
// From https... |
const socialTransformers = {
facebook: id => `https://facebook.com/${id}`,
twitter: id => `https://twitter.com/${id}`,
youtube: id => `https://www.youtube.com/user/${id}`,
instagram: id => `https://instagram.com/${id}`,
github: id => `https://github.com/${id}`,
bitcoin: id => `https://blockchain.info/addres... |
from lxml import objectify
from tcxparser import TCXParser
from datetime import datetime
from math import radians, cos, sin, asin, sqrt
import matplotlib.pyplot as plt
import numpy as np
from scipy.interpolate import interp1d
import math
import bisect
class Data:
def __init__(self):
self._latitudeV... |
#!/usr/bin/env python
# Copyright 2013 the V8 project authors. 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... |
'use strict';
$(document).ready(function() {
var MONTHS = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
var config = {
type: 'line',
data: {
labels: ["January", "February", "March", "April", "May", "June", "J... |