text stringlengths 3 1.05M |
|---|
/* ========================================================================== */
// Mapping Helper Functions (from AWSConsoleRecorder)
/* ========================================================================== */
var outputs = [];
var tracked_resources = [];
var global_used_refs = [];
var cfnspacing = " ";
func... |
/**
* Copyright 2017 California Institute of Technology.
*
* This source code is licensed under the APACHE 2.0 license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
//IMPORTANT: Note that with Redux, state should NEVER be changed.
//State is considered immutable. Instead,
//create ... |
/*
* Copyright 2021 Ilya Tsivilskiy @Kei https://github.com/kurono
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 la... |
require('@babel/register');
({
ignore: /node_modules/
});
require('@babel/polyfill');
const HDWalletProvider = require('@truffle/hdwallet-provider');
let mnemonic = 'idea kiwi bottom trip fan remember night equip hockey end army ghost';
let testAccounts = [
"0xfa87f3a92c5d09840ed604bedbe4d585f7cba300ff9ef81dc645... |
const express = require('express')
const app = express()
const port = 3000
app.get('/', (req, res) => {
res.send('Hi, My name is Suyash Kelvin Savant.\n this is me testing node.js App on AWS')
})
app.listen(port, () => {
console.log(`Example app listening at http://localhost:${port}`)
}) |
import SchemaConfirmationPage from "../generated_pages/confirmation_email/schema-confirmation.page";
import SummaryPage from "../generated_pages/confirmation_email/summary.page";
import ThankYouPage from "../base_pages/thank-you.page";
import ConfirmationEmailPage from "../base_pages/confirmation-email.page";
import C... |
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.mapboxgl = f()... |
import { connect } from 'react-redux';
import PreviewButton from '../Component/PreviewButton';
import TemplateBuilder from '../Util/TemplateBuilder';
import { exportTemplate } from '../Store/util';
const getTemplateHtml = state => {
// Need to pass function since the template build depends on the DOM
return () => ... |
var ServerResponse = require('http').ServerResponse,
STATUS_CODES = require('http').STATUS_CODES,
fs = require('fs'),
path = require('path'),
mime = require('mime'),
inherit = require('../utils').inherit,
decorate = require('../utils').decorate;
va... |
(function(){
var Assert = YUITest.Assert,
TokenStream = parserlib.css.TokenStream,
CSSTokens = parserlib.css.Tokens;
//-------------------------------------------------------------------------
// New testcase type to make it easier to test patterns
//-------------------------------... |
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
from ...visualization import *
def figure(func):
""" Decorator for creating axis. """
def wrapper(*args, ax=None, **kwargs):
if ax is None:
fig, ax = plt.subplots(figsize=(2., 1.25))
func(*... |
from .transformer import *
from .image_transformer import *
from .complexity_transformer import *
from .augmentation_transformer import * |
/* Webarch Admin Dashboard
/* This JS is only for DEMO Purposes
-----------------------------------------------------------------*/
$(document).ready(function() {
var graph;
var rick;
loadServerChart();
loadSampleChart();
loadAnimatedWeatherIcons();
//Ricksaw Chart for Server Load - Autoupdate
function loadSe... |
from flask import request
from altfe.interface.root import interRoot
@interRoot.bind("rateLimit", "PRE")
class pre_rate_limit(interRoot):
"""
预处理部分,负责 rate limit 管理。
"""
def __init__(self):
self.conf = self.loadConfig(self.getENV("rootPath") + "app/config/switch.yml")
self.maxRequest... |
function getKOChanceText(damage, attacker, defender, field, move, hits, isBadDreams) {
if (isNaN(damage[0])) {
return 'something broke; please tell Austin';
}
if (damage[damage.length - 1] === 0) {
return 'aim for the horn next time';
}
if (damage[0] >= defender.maxHP && (move.usedTimes === 1 && move.metronom... |
import React, { Component } from 'react'
import styled from 'styled-components'
import Header from './components/Header'
import Resume from './components/Resume'
import Projects from './components/Projects'
import Blog from './components/Blog'
import {
BrowserRouter as Router,
Route
} from 'react-router-dom'
import... |
/**
* Created by marija on 22.02.18.
*/
var p1 = Promise.resolve(18);
var p2 = Promise.reject(17);
var callbackArguments = [];
var argument1 = function (err) {
callbackArguments.push(arguments)
expect(err).to.exist;
done();
};
var argument2 = r_0;
var argument3 = function (error) {
callbackArgu... |
/*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of co... |
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import React from 'react';
import Admin from './Admin';
// import App from "../App";
// import NotFound from './NotFound';
const Router = () => (
<BrowserRouter>
<Switch>
<Route exact path="/" component={Admin} />
<Route path="/admin" c... |
jQuery.fn.vectorMap('addMap', 'barloc_1506_2012_merc_en',{"width": 310.0, "pathes": {"LAS MERCEDES": {"path": "M283.59,216.3l0.23,-0.25l0.58,-0.62l0.35,-0.36l0.0,-0.0l0.59,-0.61l0.04,-0.04l0.0,-0.0l0.5,-0.53l0.77,-0.81l0.82,-0.84l1.02,-1.05l0.02,-0.03l0.08,-0.1l0.43,-0.45l0.0,-0.0l0.0,-0.0l0.79,-0.84l2.03,1.92l-0.09,0.... |
import { EmptyError } from '../util/EmptyError';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
export function throwIfEmpty(errorFactory) {
if (errorFactory === void 0) { errorFactory = defaultErrorFactory; }
return operate(function (source, subscriber)... |
# USDA_ERS_FIWS.py (flowsa)
# !/usr/bin/env python3
# coding=utf-8
"""
USDA Economic Research Service (ERS) Farm Income and Wealth Statistics (FIWS)
https://www.ers.usda.gov/data-products/farm-income-and-wealth-statistics/
Downloads the February 5, 2020 update
"""
import pandas as pd
import numpy as np
import zipfile... |
{"version":3,"sources":["imopenlines.component.widget.bundle.js"],"names":["exports","GetObjectValues","source","destination","value","hasOwnProperty","push","_VoteType","Object","freeze","none","like","dislike","DeviceOrientation","horizontal","portrait","_DeviceType","mobile","desktop","LanguageType","russian","ukrai... |
export function isMobile() {
if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) { //移动端
return true;
}
return false;
}
export function resetSize(vm) {
var img_width, img_height, bar_width, bar_height, block_width, block_height,circle_radius; //图片的宽度、高度,移动条的宽度、高度
var parentWidt... |
console.log(document.cookie);
count = 0;
let Users = [];
if (getCookie('users')===undefined){
setCookie('users', JSON.stringify(Users));
}
else {
Users = JSON.parse(getCookie('users'));
}
class User{
score = 0;
constructor(nick, pass) {
if (nick.length*pass.length!==0){
this.nickname = nick;
... |
const path = require('path')
const { DEV_LIB } = process.env
module.exports = {
resolve: {
alias:
DEV_LIB !== 'true'
? {}
: {
qs: path.resolve(__dirname, '../../node_modules/qs/dist/qs'),
react: path.resolve(__dirname, '../../node_modules/react'),
'react... |
'use strict';
const EventEmitter = require('events');
const puppeteer = require('puppeteer');
const moduleRaid = require('@pedroslopez/moduleraid/moduleraid');
const jsQR = require('jsqr');
const Util = require('./util/Util');
const InterfaceController = require('./util/InterfaceController');
const { WhatsWebURL, Def... |
// TODO: Write code to define and export the Manager class. HINT: This class should inherit from Employee.
const Employee = require("./Employee");
class Manager extends Employee {
constructor(name, id, email, officeNumber) {
super(name, id, email);
this.officeNumber = officeNumber;
};
getO... |
/// Copyright (c) 2012 Ecma International. All rights reserved.
/**
* @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-83.js
* @description Object.create - 'enumerable' property of one property in 'Properties' is a non-empty string (8.10.5 step 3.b)
*/
function testcase() {
var accessed = false;
var ... |
(function (ng) {
var mod = ng.module("librosModule");
mod.constant("librosContext", "api/999/libros");
mod.controller('libroNewCtrl', ['$scope', '$http', 'librosContext', '$state', '$rootScope',
function ($scope, $http, librosContext, $state, $rootScope) {
$rootScope.edit = false;
... |
/**
* Auto-generated action file for "Microsoft Graph API" API.
*
* Generated at: 2019-08-07T14:53:12.022Z
* Mass generator version: 1.1.0
*
* flowground :- Telekom iPaaS / microsoft-graph-api-connector
* Copyright © 2019, Deutsche Telekom AG
* contact: flowground@telekom.de
*
* All files of this connector ar... |
/* global $ */
(function () {
var scripts = document.getElementsByTagName('script')
var script = scripts[scripts.length - 1]
var jsPath = script.hasAttribute ? script.src : script.getAttribute('src', 4) // ie下通过getAttribute('src', 4)才能获取全路径
jsPath = jsPath.substr(0, jsPath.lastIndexOf('/') + 1)
/** ********... |
from hikari.events.message_events import GuildMessageCreateEvent
from bot.haiku.engine import Haiku
from bot.haiku.models import HaikuKey
haiku = Haiku()
async def handle(event: GuildMessageCreateEvent) -> None:
"""Handle incoming events."""
if event.content is None:
return
content = event.cont... |
// Used only if personal-api-token is the host, experimental
import('@jahia/app-shell/bootstrap').then(res => {
window.jahia = res;
res.startAppShell(window.appShell.remotes, window.appShell.targetId);
});
|
require('dotenv').config()
const fs = require('fs')
const { google } = require('googleapis')
const { tmpdir } = require('os')
const { join } = require('path')
/**
* Fetches the latest email from the technology ministry gmail account
* which has the dining menu
*/
const MENU_EMAIL_SUBJECT = 'menu'
const MENU_MIMETY... |
/**
* Room Battle
* Pokemon Showdown - http://pokemonshowdown.com/
*
* This file wraps the simulator in an implementation of the RoomGame
* interface. It also abstracts away the multi-process nature of the
* simulator.
*
* For the actual battle simulation, see sim/
*
* @license MIT
*/
'use strict';
/** @ty... |
define({_widgetLabel:"Filter",allExprsMustBeTrue:"Svi ovi izrazi moraju da budu tačni:",anyExprsMustBeTrue:"Bilo koji od ovih izraza mora je tačan:"}); |
import React from 'react'
import withLocation from './with-location'
import { SearchProvider } from '../../context/search-context'
const withSearch = Comp => props => {
const CompWithLocation = withLocation(({ search }) => (
<SearchProvider>
<Comp {...props} search={search} />
</SearchProvider>
))
... |
import React from "react"
import styled from "styled-components"
import {Container, CenteringContainer, GreenLineContainer } from "../../../styles/globalstyles"
const TextContainer = styled.div`
position: relative;
width: 763px;
height: auto;
margin: auto;
margin-top: 64px;
margin-bottom: 152px;
padding-... |
import pytest
from django.test import Client
from django.urls import reverse
from config import settings
def test_correct_middleware_exists():
assert settings.MIDDLEWARE == [
"elasticapm.contrib.django.middleware.TracingMiddleware",
"django.middleware.security.SecurityMiddleware",
"whiten... |
/**
* @file
* @name UE.Editor
* @short Editor
* @import editor.js,core/utils.js,core/EventBase.js,core/browser.js,core/dom/dtd.js,core/dom/domUtils.js,core/dom/Range.js,core/dom/Selection.js,plugins/serialize.js
* @desc 编辑器主类,包含编辑器提供的大部分公用接口
*/
(function () {
var uid = 0, _selectionChangeTimer;
... |
module.exports = {
filename: "dart.skeleton.config.js",
getTemplate: function (conf = {}) {
return `
module.exports = {
url: "${conf.url}",
output: {
filepath: "${conf.filepath.toString()}",
injectSelector: "#app",
},
// background: "#ccc",
// animation: "opacity 1.5s linear infinite",
// header: {
/... |
/**
* @name exports
* @summary ValueSetExpansionParameter Class
*/
module.exports = class ValueSetExpansionParameter {
constructor(opts) {
// Create an object to store all props
Object.defineProperty(this, '__data', { value: {} });
// Define getters and setters as enumerable
Object.defineProperty(this, '_... |
import Ember from 'ember';
export default Ember.Component.extend({
// -------------------------------------------------------------------------
// Dependencies
didRender() {
let component = this;
component.$('[data-toggle="tooltip"]').tooltip({
trigger: 'hover'
});
},
// -----------------... |
from PIL import Image
import numpy as np
def get_color (x, y, size_of_part, array):
shade = 0
for i in range(x, x + size_of_part):
for j in range(y, y + size_of_part):
red = array[i][j][0]
green = array[i][j][1]
blue = array[i][j][2]
col_pix = (... |
/* data */
const days = ['09/01(Wed)', '09/02(Thu)', '09/03(Fri)', '09/06(Mon)', '09/07(Tue)', '09/08(Wed)', '09/09(Thu)', '09/10(Fri)', '09/13(Mon)', '09/14(Tue)', '09/15(Wed)', '09/16(Thu)', '09/17(Fri)', '09/20(Mon)', '09/21(Tue)', '09/22(Wed)', '09/23(Thu)', '09/24(Fri)', '09/27(Mon)', '09/28(Tue)', '09/29(Wed)', '... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.valueToEstree = void 0;
const isPlainObject = require("is-plain-obj");
/**
* Convert a value to an ESTree node
*
* @param value - The value to convert
* @param options - Additional options to configure the output.
* @returns The E... |
from django.apps import AppConfig
class FinancialsConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "keymetrics.financials"
|
function showLoginError() {
$("#login-form h4").html("Login: <span class='login-error'>username or password error</span>")
}
|
angular.module('issueTrackingSystem.authenticatedModule', [])
.config(['$stateProvider', function ($stateProvider) {
$stateProvider
.state('authenticated', {
abstract: true,
template: '<ui-view/>',
controller: "AuthenticatedCtrl",
... |
module.exports = function(user) {
// TODO: Return all Repositories belinging to user
} |
define('a', ['_'], function(_) {
/** @constructor */
function A () {}
/**
* @param {string} s
* @return {string}
*/
A.prototype.a = function a (s) {
return _.trim(s);
};
});
|
import React from 'react'
import { useState } from "react"
import PropTypes from 'prop-types'
import Layout from '../components/Layout'
import Content, { HTMLContent } from '../components/Content'
export const DirectionsPageTemplate = ({ location }) => {
const [directions, setDirections] = useState(null);
const [e... |
import React, {Fragment, useEffect } from 'react';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
import './App.css';
import Navbar from './components/Layouts/Navbar'
// import Landing from './components/layout/Landing'
import Register from './components/forms/register';
import Login from ... |
/* eslint no-process-env: 0 */
require('dotenv').config();
const environment = ['NODE_ENV', 'DATABASE', 'PORT'];
environment.forEach(name => {
if (!process.env[name]) {
throw new Error(`${name}: ${process.env[name]}`);
}
});
module.exports = {
NODE_ENV: process.env.NODE_ENV,
DATABASE: process.env.DATABA... |
"""
Copyright (c) 2016 Jet Propulsion Laboratory,
California Institute of Technology. All rights reserved
"""
import importlib
import unittest
from os import environ, path
import nexusproto.NexusContent_pb2 as nexusproto
import numpy as np
from nexusproto.serialization import from_shaped_array
class TestConversion(... |
/**
* @name ensureReporter
* @description Set reporter on request body
* @author lally elias <lallyelias87@gmail.com>
*
* @param {object} request valid http request
* @param {object} response valid http response
* @param {Function} next next middlware to invoke
* @returns {Function} next middlware to invoke
*
... |
$(function () {
$(document).submit(function (event) {
event.preventDefault();
// get the value of the input box using jQuery
let itemElement = $("[name = 'item-input']");
let itemValue = itemElement.val();
//check that user has input a value before proceeding
if (itemValue.length !== 0) {
... |
import AbstractModule from '../core/AbstractModule';
import GridAxis from './GridAxis';
import TimeAxis from './TimeAxis';
import * as ui from 'waves-ui';
const scales = ui.utils.scales;
/** @private */
class ZoomState extends ui.states.BaseState {
constructor(block, timeline, scrollBar = null) {
super(timeline... |
const domain = document.location.origin;
// function api() {
// $.get(domain + "/api/jadwal/calendar").done((getdata))
// console.log($.get(domain + "/api/jadwal/calendar").done((getdata)));
// }
// Function untuk get data libur dari proses matching pada controller
async function cekHariLibur(date) {
... |
/**
* rcm is a base library to help with the issues with Angular when Angular is not
* in charge of all domain changes. It is NOT a perfect solution, so use these
* only as required.
* - helps with exposing Angular methods and properties
* - helps with AJAX loading of Angular scripts
* - helps with loa... |
"""
SVD + Projections as described in section 3.2.5 and 4.3 in my dissertation.
"""
import config
from scipy.sparse.linalg import svds
import numpy as np
from tqdm import tqdm
__author__ = 'Haoran Peng'
__email__ = 'gavinsweden@gmail.com'
__license__ = 'MIT'
config.S = dict()
I, O = config.I, config.O
info = []
for ... |
import { downloadLocal } from './utils/get';
import ora from 'ora';
import inquirer from 'inquirer';
import fs from 'fs';
import chalk from 'chalk';
import symbol from 'log-symbols';
import { promisify } from "util";
const exist = promisify(fs.stat);
// 命令行交互配置项
const question = [
{
type: 'input',
name: 'au... |
module.exports = [{"isClass":true,"priority":10000.0006,"key":"topCircle","style":{left:"40%",top:"2.25%",height:"12%",width:"21%",}},{"isClass":true,"priority":10000.0007,"key":"form1","style":{left:"5%",right:"5%",top:"8%",height:"65%",width:"90%",}},{"isClass":true,"priority":10000.0008,"key":"dojo-cover","style":{i... |
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
requir... |
var styles = {
"Connected": "Polaris-Connected",
"Item": "Polaris-Connected__Item",
"Item-primary": "Polaris-Connected__Item--primary",
"newDesignLanguage": "Polaris-Connected--newDesignLanguage",
"Item-connection": "Polaris-Connected__Item--connection",
"Item-focused": "Polaris-Connected__Item--focused"
};... |
import React from "react"
import { graphql, useStaticQuery, Link } from "gatsby"
// import Card from "react-bootstrap/Card"
import { Container, Row } from "react-bootstrap"
import teamStyles from "./team.module.scss"
const Team = () => {
const data = useStaticQuery(graphql`
query {
allContentfulTeamMember... |
# coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import serialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import ... |
# coding=utf-8
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
from typing import TYPE_CHECKING, overload, Any, Dict, Optional, Union
from azure.core.exceptions import (
ClientAuthenticationError,
ResourceNotF... |
import Ember from 'ember';
import DS from 'ember-data';
import { combineURLParts } from 'dsember-core/utils/url-utils';
function addNamespaceToRetrieveLink(applicationAdapter, hash) {
if (Ember.isPresent(hash.retrieveLink)) {
let namespace = applicationAdapter.get('namespace');
hash.retrieveLink = combineURL... |
import React from 'react';
import { withRouter } from 'react-router-dom';
import { compose } from 'recompose';
import { withFirebase } from '../Firebase';
import AuthUserContext from './context';
import * as ROUTES from '../../constants/routes';
const withAuthorization = condition => Component => {
class WithAuthori... |
import os
try:
from time import perf_counter as time_now
except ImportError:
# fall back to using time
from time import time as time_now
from statsd import StatsClient
HOSTNAME = os.environ.get("MFCOM_HOSTNAME", "unknown")
MFMODULE = os.environ["MFMODULE"]
ADMIN_HOSTNAME_IP = os.environ.get("%s_ADMIN_HOS... |
const Helper = (function () {
function getCookie(name) {
const value = `; ${document.cookie}`;
const parts = value.split(`; ${name}=`);
if (parts.length === 2) return parts.pop().split(";").shift();
}
return {
getCookie,
};
})();
function onClickImg(evt) {
const img = evt.target;
const moda... |
/* 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
* distribut... |
import React from 'react'
import Layout from '../components/layout'
const BlogPage = () => {
return(
<div>
<Layout>
<h1>My Blog</h1>
<p>Post will show up here later on ...</p>
</Layout>
</div>
)
}
export default BlogPage
// localhost:8000/blog |
import React from 'react';
import CircularProgressExampleSimple from 'components/LoaderList';
import TravelCard from 'components/TravelCard';
const TravelCardItem = (props) => {
if(typeof props.travel === "undefined") {
return (<div>No travels </div>)
} else if(!props.loading && props.travel !== null) {
r... |
async function restoreOptions () {
const res = await browser.storage.local.get('tab-limit')
document.querySelector("#tab-limit").value = res['tab-limit'] || browser.runtime.getManifest().DEFAULT_TAB_LIMIT
}
async function saveOptions () {
const newValue = document.querySelector("#tab-limit").value
await browse... |
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; |
# Copyright 2021 DeepMind Technologies Limited
#
# 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... |
/*!
* trans-amp
* Copyright(c) 2018 Philip Brown
* MIT Licensed
*/
'use strict';
//********************************
// DEPENDENCIES
//********************************
const url = require('url'), //Parses url strings
sizeOfImage = require('image-size'), //Detects dimensions of an image fro... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var React = require('react');
var createCache = _interopDefault(require('@emotion/cache'));
var utils = require('@emotion/uti... |
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("clojure",function(t){var n=["false","nil","true"],r=[".","catch","def","do","if","monitor-enter... |
/* eslint import/extensions:0, no-unused-vars:0 */
// Quick Take
import { strict as assert } from "assert";
import {
left,
right,
leftSeq,
rightSeq,
chompLeft,
chompRight,
leftStopAtNewLines,
rightStopAtNewLines,
} from "../dist/string-left-right.esm.js";
// get the closest non-whitespace character t... |
module.exports = {"acrossmap":null,"admin":false,"answers":{"across":["GLACE","JAWS","SSNS","OBAMA","RIVAL","ALAI","ATIT","ARIES","ALIENCRAFTSPACE","KENNY","FOSSIL","STEEPLE","STATUE","ANOD","RHEOSTAT","MRROGERSHOODNEIGHBOR","WTA","ARTE","EEN","SILO","HANDOFFREMARK","PGS","MSU","OPORTO","TARAWA","SORBET","SONATINA","UM... |
"""Auto-generated file, do not edit by hand. OM metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_OM = PhoneMetadata(id='OM', country_code=968, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='(?:1505|[279]\\d{3}|500)\\d{4}|8007\\d{4... |
#!/usr/bin/env python3
#
# --- Day 19: Beacon Scanner / Part Two ---
#
# Sometimes, it's a good idea to appreciate just how big the ocean is.
# Using the Manhattan distance, how far apart do the scanners get?
#
# In the above example, scanners 2 (1105,-1205,1229) and 3 (-92,-2380,-20)
# are the largest Manhattan distan... |
const express = require('express');
const app = express();
app.get('/', (req, res) => {
res.sendFile('index.html', { root : __dirname});
});
let port = process.env.PORT || 5000;
app.listen(port, () => {
console.log(__dirname);
console.log("Listening Port " + port);
}); |
const Good = require('../models/Good')
const Thank = require('../models/Thank')
const Welldoer = require('../models/Welldoer')
const errorHandler = require('../utils/errorHandler')
module.exports.getByWelldoerId = async function(req, res) {
try {
const goods = await Good.find({
welldoer: req.pa... |
var _require = require('./util'),
is = _require.is,
idx = _require.idx,
arr = _require.arr,
breaks = _require.breaks,
dec = _require.dec,
media = _require.media,
merge = _require.merge;
module.exports = function (key, prop, boolValue) {
return function (props) {
prop = prop || key;
... |
self.__precacheManifest = [
{
"revision": "f3c18b98bab33c0fbedde9cb67bdfcf2",
"url": "./static/media/simonSound3.f3c18b98.mp3"
},
{
"revision": "0f57fb4a7255333e171a",
"url": "./static/css/main.ab82c150.chunk.css"
},
{
"revision": "7f2d5555c27346feaf9b",
"url": "./static/js/1.7f2d5555.... |
const baseStyle = {
borderRadius: 'radii.1',
fontFamily: 'fontFamilies.ui',
lineHeight: 'lineHeights.0',
fontSize: 'fontSizes.1',
border: '1px solid transparent',
color: 'colors.default',
paddingX: 12,
transition: 'box-shadow 80ms ease-in-out',
_placeholder: {
color: 'colors.gray600'
},
_dis... |
import React, { memo, useState, useEffect } from "react";
import PropTypes from "prop-types";
import { withRouter } from "react-router-dom";
import { connect } from "react-redux";
import { compose } from "redux";
import { createStructuredSelector } from "reselect";
import Modal from "../../components/Modal";
import {
... |
import React, {
Component,
} from 'react';
import {
AppRegistry,
ListView,
StyleSheet,
Text,
TouchableOpacity,
TouchableHighlight,
View
} from 'react-native';
import { SwipeListView, SwipeRow } from 'react-native-swipe-list-view';
class App extends Component {
constructor(props) {
super(props);
this.ds ... |
/**
* Swirepay API
* Swirepay REST APIs' are resource-oriented URLs that accept JSON-encoded request bodies, return JSON-encoded responses, and use standard HTTP response codes, authentication, and verbs. You can use the Swirepay API in test mode, which does not affect your live data or interact with the banking netw... |
/**
* is.js - v0.2.1
* Check your data against regular expressions or known keywords.
* http://github.com/rthor/isjs
*
* Licensed under the MIT license.
* Copyright (c) 2013 Ragnar Þór Valgeirsson (rthor)
* http://rthor.is
*/
!function(a){a.is=a.fn.is=function(){if(0===this.length)return this;var a,b,c,d=!1;if... |
var classINETDNS_1_1DNSCache =
[
[ "DNSCache", "d1/d57/classINETDNS_1_1DNSCache.html#ac4151ea39f6fd746bad28ca90dd7dd25", null ],
[ "~DNSCache", "d1/d57/classINETDNS_1_1DNSCache.html#af66c904dee4d4bb1e7b135cf786b5ff4", null ],
[ "evict", "d1/d57/classINETDNS_1_1DNSCache.html#acde2348928d487caf90084642191f5e1... |
import Point from './Point'
import {ctx} from '../canvas'
import colors from '../misc/colors'
function Line(x,y,x1,y1, color = "#444"){
this.x = x;
this.y = y;
this.x1 = x1;
this.y1 = y1;
this.vector = new Point(x1 - x, y1 - y);
this.color = color;
this.width = 2;
}
Line.prototype.draw = function() {
... |
var numbers = [1, 2, 3, 4, 5];
function reverse(array) {
var reversedArray = [];
for (var i = array.length - 1; i >= 0; i--) {
reversedArray.push(array[i]);
}
return reversedArray;
}
console.log(reverse(numbers));
|
from torch.optim.lr_scheduler import (CosineAnnealingLR,
CosineAnnealingWarmRestarts, CyclicLR,
OneCycleLR, ReduceLROnPlateau, StepLR)
def get_schedulers_dict(cfg, samples_per_epoch):
base_lr = cfg.args.lr
gamma = cfg.train.gamma
... |
import os
import random
import time
import cv2
import numpy as np
import logging
import argparse
import datetime
import torch
import torch.backends.cudnn as cudnn
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.parallel
import torch.optim
import torch.utils.data
from tensorboardX import SummaryWr... |