text stringlengths 3 1.05M |
|---|
function f0(x) {
switch (x) {
default:
throw new v2();
case 'aab':
return 2;
case 'aac':
return 3;
case 'baaa':
return 4;
case 'baab':
return 5;
case 'baac':
return 6;
case 'caaaa':
return 7;
case 'caaab':
return 8;
... |
$(document).ready(function() {
console.log('chart loaded');
function draw(id, series) {
var labels = ['Sangat Buruk', 'Buruk', 'Sedang', 'Baik', 'Sangat Baik'];
new Chartist.Pie('#' + id, {
series: series,
}, {
height: 250,
// donut: true,
... |
#
# 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 us... |
// @flow
import * as React from 'react';
import loadPageIntoElement from './loadPageIntoElement';
type WithAppLoaderOptions = {
elementId: string,
appUrl: string,
loadPage?: (string, string) => void,
LoadingComponent?: React.ComponentType<any>,
};
export const withAppLoader = ({
elementId,
appUrl,
load... |
# This file is part of Pynguin.
#
# Pynguin 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 version 3 of the License, or
# (at your option) any later version.
#
# Pynguin is distributed in the ho... |
const prayers = [
{
name: "Fajr",
time: "02:37:00"
},
{
name: "Zuhr",
time: "11:44:00"
},
{
name: "Asr",
time: "15:33:00"
},
{
name: "Maghrib",
time: "19:01:00"
},
{
name: "Isha",
time: "20:34:00"
}
];
const now = new Date("2018-06-25T12:24:00");
// const now ... |
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... |
angular.module('proton', [
'gettext',
'as.sortable',
'cgNotify',
'ngCookies',
'ngIcal',
'ngMessages',
'ngSanitize',
'ngScrollbars',
'pikaday',
'ui.router',
'ui.codemirror',
// Constant
'proton.constants',
'proton.core',
'proton.outside',
'proton.utils',
... |
import logging
import riberry
from ..task_queue import TaskQueue
log = logging.getLogger(__name__)
def background(queue: TaskQueue):
riberry.app.tasks.echo()
with queue.lock:
if not queue.limit_reached():
riberry.app.tasks.poll(track_executions=True, filter_func=lambda _: not queue.limit... |
# Copyright The OpenTelemetry 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 applicable law or agreed to in ... |
import { Link } from "gatsby"
import PropTypes from "prop-types"
import React from "react"
const Header = ({ siteTitle }) => (
<header
style={{
marginBottom: `1.45rem`,
}}
>
<div
style={{
margin: `0 auto`,
maxWidth: 960,
padding: `1.45rem 1.0875rem`,
}}
>
... |
(function (factory)
{
if (typeof define === 'function' && define.amd)
{
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else
{
// Browser globals
factory(jQuery);
}
}
(function ($)
{
var d = [],
doc = $(document),
ua = navigator.userAgent.toLowerCase(),
wndw = $(window),
w... |
const Employee = require("./Employee");
class Engineer extends Employee{
constructor(name, id, email, github) {
super(name, id, email);
this.github = github;
}
getGitHub() { return this.github; }
getRole() { return this.constructor.name; }
}
module.exports = Engineer; |
const fs = require('fs');
const path = require('path');
const marked = require('marked');
let workspacePath = path.join(__dirname, '../../workspace');
let data = {
files: [],
show:true,
}
const Nodes = {
template: `
<div id='nodes'>
<transition name="slide-fade2">
<div class='nodeList' v-if='show'>
... |
# -*- coding: utf-8 -*-
from simulator.environments.DtnAbstractSimEnvironment import SimEnvironment
import numpy as np
import pandas as pd
import os
from pathlib import Path
import random
from simulator.utils.DtnUtils import load_class_dynamically
from warnings import warn
class DtnSimEnviornment(SimEnvironment):
... |
from django.contrib.auth.models import User
from django.db import models
from django_extensions.db.models import TimeStampedModel
from django.utils.timezone import now
class SensorType(TimeStampedModel):
uid = models.SlugField(unique=True)
name = models.CharField(max_length=1000)
manufacturer = models.Cha... |
/* eslint-disable indent */
const equipSelect = $("#equipSelect");
const equipDiv = $("#equipDiv");
const updateEquipment = url => {
$.ajax({
url: `https://www.dnd5eapi.co${url}`,
method: "GET"
}).then(res => {
if (res.desc !== undefined) {
console.log(res.desc);
equipDiv.html(
`<tr... |
import React, {useState, useCallback} from 'react';
import {useAPI} from 'common/hooks/api';
import {Button, Col, Form, Input, Popconfirm, Row} from 'antd';
import formItem from 'hocs/formItem.hoc';
import {FORM_ELEMENT_TYPES} from 'constants/formFields.constant';
import {MasterHOC} from 'hocs/Master.hoc';
import {crea... |
import { Service } from 'denali';
export default class TestService extends Service {
name = 'test service';
}
|
# coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.20.7
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unitte... |
import os
import time
import uiautomator2 as u2
from util.ding_util import send_msg
import random
def send_ding(msg):
ding_token = "99de3b9549d59caf5b445ef2d24a68b64f89498a5fda4b43c0b3098a3a57657e"
ding_url = "https://oapi.dingtalk.com/robot/send?access_token={}".format(ding_token)
send_msg(ding_url, "提醒:... |
import tkinter as tk
from tkinter import ttk
from tkinter import messagebox
from datetime import date
from dateutil.relativedelta import relativedelta
import cdsave
import tkcalendar as tkc
class App:
def __init__(self, root):
""" initialize attributes and widjets """
#store the nu... |
//
// Copyright (c) 2016 Cisco Systems
// Licensed under the MIT License
//
/*
* a Cisco Spark webhook that leverages a simple library (batteries included)
*
* note : this example requires that you've set a SPARK_TOKEN env variable
*
*/
var SparkBot = require("../sparkbot/webhook");
// Starts your Webhook... |
month = int(input())
if month == 1:
print("January")
elif month == 2:
print("February")
elif month == 3:
print("March")
elif month == 4:
print("April")
elif month == 5:
print("May")
elif month == 6:
print("June")
elif month == 7:
print("July")
elif month == 8:
print("August")
elif month... |
#!/usr/bin/env python3
from discord.ext import commands
import discord
import re
import os
import aiohttp
from tokenfile import token
import inspect
bot = commands.Bot(command_prefix='!')
@bot.event
async def on_ready():
print('Bot ready!')
print('Logged in as ' + bot.user.name)
print('... |
var express = require('express');
var app = express();
app.set('port', (process.env.PORT || 5000));
app.use(express.static(__dirname + '/public'));
app.use(express.static(__dirname + '/node_modules'));
app.get('/', function(request, response) {
response.sendfile('./public/html/core.html');
});
app.listen(app.get(... |
export const colorsMap = [
{ color: "--primary-color", description: "Use this to emphasise main ui components" },
{
color: "--primary-on-secondary-color",
description: "Use this to emphasise main ui components on secondary background color"
},
{ color: "--primary-hover-color", description: "Use only as ... |
# # Copyright 2020 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 writing,... |
const template = require('./template.html');
export const AwwState = {
name: 'aww',
url: '/aww',
template,
controller: 'AwwStateCtrl',
controllerAs: 'aww'
}; |
import { fixedswap } from "../interfaces";
import Contract from "./Contract";
import ERC20TokenContract from "./ERC20TokenContract";
import IDOStaking from "./IDOStaking";
import Numbers from "../utils/Numbers";
import _ from "lodash";
import moment from 'moment';
const RESIDUAL_ETH = 0.00001;
import { Decimal } from '... |
'use strict';Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=tr... |
/* eslint-disable import/first */
import Taro from '@tarojs/taro';
import QiniuUpload from './qiniu_upload.js';
const qiniuCtx = new QiniuUpload();
export default class UpFile {
/**生成随机字符串 */
makeRandomName() {
return (
'tempwg63_' +
Date.now() +
'_' +
Ma... |
System.register(['./m2.js', './generated-m1.js'], function (exports, module) {
'use strict';
return {
setters: [function (module) {
exports('m2', module.default);
}, function () {}],
execute: function () {
}
};
});
|
import GroupNode from './GroupNode';
/**
*
*/
export default class HoleNode extends GroupNode {
} |
import React from 'react';
import { Redirect } from 'react-router-dom';
import { useState, useEffect } from "react";
import { useSelector, useDispatch } from 'react-redux';
import './Micro.css';
import Cropper from "react-cropper";
import "cropperjs/dist/cropper.css";
import { Modal, notification, Space } from 'antd'... |
// Load storybook config
import * as sbConfig from '../../../../../.storybook/storybook-config';
// Load template file
import template from './template.njk';
// Load stylesheet file
require('./_index.scss');
const componentName = 'Filter Menu';
const storyDescription = `${sbConfig.heading.lab}
${sbConfig.heading.bas... |
"""Support for a ScreenLogic heating device."""
import logging
from screenlogicpy.const import EQUIPMENT, HEAT_MODE
from homeassistant.components.climate import ClimateEntity
from homeassistant.components.climate.const import (
ATTR_PRESET_MODE,
CURRENT_HVAC_HEAT,
CURRENT_HVAC_IDLE,
CURRENT_HVAC_OFF,
... |
from django.contrib.auth.backends import RemoteUserBackend
import os
import collection_registry.middleware
from django.contrib.auth.models import Group
from django.core.mail import send_mail, EmailMultiAlternatives
class RegistryUserBackend(RemoteUserBackend):
def configure_user(self, user):
"""
Re... |
const alias = require('./common/webpack.alias');
module.exports = {
/**
* This is the main entry point for your application, it's the first file
* that runs in the main process.
*/
entry: './src/main/main.ts',
// Put your normal webpack config below here
module: {
rules: require('./common/webpack.... |
var myLocations = [
{
title: 'Gandhi Smriti',
lat: 28.601780,
lng: 77.214339
},
{
title: 'Rashtrapati Bhawan',
lat: 28.614360,
lng: 77.199621
},
{
title: 'Lord of the drinks',
lat: 28.631849,
lng: 77.216913
},
{
... |
import React from "react";
import { Formik } from "formik";
import classNames from "classnames";
import Checkbox from "../Checkbox";
import Input from "../Input";
import ThemeToggle from "../ThemeToggle";
import productSchema from "./todo-schema";
import hero from "../../img/hero.jpg";
import "./AppHeader.scss";
fu... |
import raf from 'raf';
import {
doesStringContainHTMLTag,
getDOMElementFromString,
getRandomInteger,
} from './../utils';
import './Typewriter.scss';
class Typewriter {
eventNames = {
TYPE_CHARACTER: 'TYPE_CHARACTER',
REMOVE_CHARACTER: 'REMOVE_CHARACTER',
REMOVE_ALL: 'REMOVE_ALL',
REMOVE_LAST_V... |
'use strict';
var inherits = require('util').inherits;
var EE = require('events').EventEmitter;
var async = require('async');
var VirtualDevice = require('./VirtualDevice');
var suspend = require('suspend');
/*
Events:
- data
Current tests:
two devices on the network
dev1 connects with will
dev2 co... |
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.0.8 (2019-06-18)
*/
!function(m){"use strict";var l=func... |
function getXmlHttp() {
var xmlhttp;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new X... |
var redisLib = require('redis');
var async = require('async');
var EventEmitter = require('events').EventEmitter;
var readFileSync = require('fs').readFileSync;
var joinPath = require('path').join;
var assert = require('assert');
// Load the lua scripts
var scriptsPath = joinPath(__dirname, 'scripts');
var submitCode ... |
__import__("pkg_resources").declare_namespace(__name__)
from contextlib import contextmanager
from infi.exceptools import chain
from .setupapi import functions, properties, constants
from infi.pyutils.lazy import cached_method
from logging import getLogger
ROOT_INSTANCE_ID = u"HTREE\\ROOT\\0"
GLOBALROOT = u"\\\\?\\GL... |
// Compiled by ClojureScript 1.10.520 {}
goog.provide('cljs.core.async.impl.timers');
goog.require('cljs.core');
goog.require('cljs.core.async.impl.protocols');
goog.require('cljs.core.async.impl.channels');
goog.require('cljs.core.async.impl.dispatch');
cljs.core.async.impl.timers.MAX_LEVEL = (15);
cljs.core.async.imp... |
!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return ... |
mycallback( {"ELECTION CODE": "G2010", "EXPENDITURE PURPOSE DESCRIP": "payroll taxes", "BENEFICIARY CANDIDATE OFFICE": "", "PAYEE ZIP": "66625", "MEMO CODE": "", "PAYEE STATE": "KS", "PAYEE LAST NAME": "", "PAYEE CITY": "Topeka", "PAYEE SUFFIX": "", "CONDUIT STREET 2": "", "CONDUIT STREET 1": "", "PAYEE FIRST NAME": ""... |
/**
* @author mrdoob / http://mrdoob.com/
* @author jetienne / http://jetienne.com/
* @author paulirish / http://paulirish.com/
*/
var MemoryStats = function () {
var msMin = 100;
var msMax = 0;
var container = document.createElement('div');
container.id = 'stats';
container.style.cssText = 'width:80px;o... |
module.exports = {
importer: {
isImporter() {
return true;
}
},
data: ['a', 'b', 'c'],
};
|
#!/usr/bin/env python3
# https://codeforces.com/problemset/problem/402/A
def f(l):
k,a,b,v = l
ns = (a+v-1)//v
return max(ns-b,(ns+k-1)//k)
l = list(map(int,input().split()))
print(f(l))
|
const router = require('express').Router();
const { Tag, Product, ProductTag } = require('../../models');
// The `/api/tags` endpoint
// find all tags
router.get('/', async (req, data) => {
try {
const tags = await Tag.findAll(
{include: [{ model: Product, as: "product_tags"}]}
)
data.status(200).json... |
'use strict';
/**
* Module dependencies
*/
var should = require('should'),
mongoose = require('mongoose'),
request = require('supertest')('http://localhost:3000'),
passport = require('passport'),
Campaign = mongoose.model('Campaign'),
User = mongoose.model('User');
var agent = require('supertest... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... |
# tasks.py
import collections
import json
import os
import sys
import uuid
from pathlib import Path
from nltk.corpus import stopwords
COMMON_WORDS = set(stopwords.words("english"))
BASE_DIR = Path(__file__).resolve(strict=True).parent
DATA_DIR = Path(BASE_DIR).joinpath("data")
OUTPUT_DIR = Path(BASE_DIR).joinpath("o... |
/**
* Created by WangFeng on 2017/1/21 0021.
*/
const exp = require('express');
const Student = require('./student');
const router = exp.Router();
router.get('/remove/:id', (req, res)=> {
var id = req.params.id;
Student.findByIdAndRemove(id, (err)=> {
if (err) {
res.json({result: 0});
... |
//>>built
require({cache:{
'url:dijit/form/templates/DropDownBox.html':"<div class=\"dijit dijitReset dijitInline dijitLeft\"\n\tid=\"widget_${id}\"\n\trole=\"combobox\"\n\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer'\n\t\tdata-dojo-attach-point=\"_... |
import React from 'react';
import RenderAuthorized from '@/components/Authorized';
import Exception from '@/components/Exception';
import { matchRoutes } from 'react-router-config';
import uniq from 'lodash/uniq';
import { formatMessage } from 'umi/locale';
import Link from 'umi/link';
import { getAuthority } from '..... |
import Vue from 'vue'
import Vuex from 'vuex'
import app from './modules/app'
import user from './modules/user'
import permission from './modules/permission'
import getters from './getters'
Vue.use(Vuex)
console.log(user)
const store = new Vuex.Store({
modules: {
app,
user,
permission
},
getters
})
... |
const {
Listener
} = require('discord-akairo');
var cLog = require("../helpers/log");
const generateNlp = require("../helpers/generateNlp");
var messagesPerMin = 0;
class NlpListener extends Listener {
constructor() {
super('nlp', {
emitter: 'client',
eventName: 'message'
... |
"""
Leetcode:
https://leetcode.com/problems/two-sum/
Question:
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
You can return the answer ... |
export { default as MasterPage } from './MasterPage'
export { default as UserMenu } from './UserMenu'
export { default as SearchBar } from './SearchBar'
export { default as MovieCard } from './MovieCard'
export { default as Footer } from './Footer'
export { default as MoviesList } from './MoviesList'
export { default a... |
import React from 'react';
export const Modal = (props) => {
const {dismissModal, submitModal, children} = props;
document.addEventListener('keypress', (e) => {
if(e.keyCode == 13){
submitModal();
}
});
return(
<div className="modal-mask">
<div className="modal">
{children}
... |
#!/usr/bin/env node
/*
* 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
... |
# -*- coding: utf-8 -*-
from unittest import mock
from unittest.mock import MagicMock
from unittest.mock import mock_open
from unittest.mock import patch
import pytest
from pytube import Caption
from pytube import CaptionQuery
from pytube import captions
def test_float_to_srt_time_format():
caption1 = Caption(
... |
var classes;
export default classes = {
"Anchor" : 1,
"Appearance" : 1,
"Arc2D" : 1,
"ArcClose2D" : 1,
"AudioClip" : 1,
"Background" : 1,
"BallJoint" : 1,
"Billboard" : 1,
"BlendedVolumeStyle" : 1,
"BooleanFilter" : 1,
"BooleanSequencer" : 1,
"BooleanToggle" : 1,
"BooleanTrigger" : 1,
"BoundaryEnhancemen... |
#!/usr/bin/env python
import os
import shutil
from glob import glob
from tempfile import mkdtemp
from collections import OrderedDict
import numpy as np
import pandas as pd
from gsw import z_from_p, p_from_z
from gutils import (
generate_stream,
get_decimal_degrees,
interpolate_gps,
masked_epoch,
s... |
import re
import string
import sys
import subprocess
import gzip
import os
# Extract scenario
re_filename = re.compile("^(\w+)\.(\d+)\.(\d+)\.([a-zA-Z0-9_\-\.\:\,]+)\.log\.gz$")
re_notdigit = re.compile("^[0-9]")
re_scenario_kv = re.compile("^([^-]*)-(.*)$")
# Parsing
re_scenario = re.compile("====> Scenario (.*)=(.*)... |
import{d as x,s as _,r as p,o as b,b as v,X as i,a5 as e,w as d,W as h,a9 as a,c as V,bc as f}from"./vendor.dce3d09c.js";const y=a("Option 1"),E=a("Option 2"),B=a("Option 1"),z=a("Option 2"),$=a("Option 1"),A=a("Option 2"),O=a("Option 1"),U=a("Option 2"),k=x({setup(g){const s=_("1"),r=_("1"),n=_("1");return(m,l)=>{cons... |
from pydavid import pydavid
from pydavid import valid_valuesi
|
export const errorLoading = err => console.error('Dynamic page loading failed', err)
export const loadRoute = module => module.default
|
const escape = require('shell-quote').quote
/**
* Need this to fix a bug where we can't commit this:
*
* `pages/examples/[example].tsx`.
*
* because of the square brackets `[` and `]`.
*
* <https://github.com/okonet/lint-staged/issues/676#issuecomment-574764713>
*
* NOTE:
*
* We can remove this entire file ... |
"""Quantities tracked during training."""
from cockpit.quantities.alpha import Alpha
from cockpit.quantities.cabs import CABS
from cockpit.quantities.distance import Distance
from cockpit.quantities.early_stopping import EarlyStopping
from cockpit.quantities.grad_hist import GradHist1d, GradHist2d
from cockpit.quantit... |
// DEV: This is actually testing our DNS and not a server but meh.
var expect = require('chai').expect;
var httpUtils = require('../utils/http');
describe('twolfsn.com (http)', function () {
httpUtils.save({
url: 'http://twolfsn.com',
followRedirect: false,
expectedStatusCode: 301
});
it('redirects ... |
import svelte from "rollup-plugin-svelte";
import resolve from "rollup-plugin-node-resolve";
import commonjs from "rollup-plugin-commonjs";
import livereload from "rollup-plugin-livereload";
import postcss from 'rollup-plugin-postcss';
import { terser } from "rollup-plugin-terser";
const svelteConfig = require("./svelt... |
"""These are utilities designed for carefully handling communication between
processes while multithreading.
The code for ``pool_imap_unordered`` is copied nearly wholesale from GrantJ's
`Stack Overflow answer here
<https://stackoverflow.com/questions/5318936/python-multiprocessing-pool-lazy-iteration?noredirect=1&lq... |
import merge from 'lodash/merge';
import VueApollo from 'vue-apollo';
import { within } from '@testing-library/dom';
import { createLocalVue, mount, shallowMount } from '@vue/test-utils';
import { createMockClient } from 'mock-apollo-client';
import { GlLoadingIcon } from '@gitlab/ui';
import waitForPromises from 'jest... |
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* @name: S15.4.4.5_A1.1_T1;
* @section: 15.4.4.5;
* @assertion: If length is zero, return the empty string;
* @description: Checking this use new Array() and [];
*/
//C... |
const bcrypt = require('bcryptjs');
const Users = require('../users/users-model');
module.exports = function restricted(req, res, next) {
const { username, password } = req.headers;
if (username && password) {
Users.findBy({ username })
.first()
.then(user => {
... |
import discord
from discord.ext import commands
import random
import requests
import json
import os
import keep_alive
from gifs import Gif_fetcher
|
export default class Validate {
static Validate = null;
x = null;
constructor() {
this.x = { message: "", code: "", data: "" };
}
setStatusIncorrect(err) {
this.setMessage(err);
this.setCode(400);
return { code: this.x.code, message: this.x.message }
}
setStatusCorrectLong(message = "... |
const fs = require('fs');
const path = require('path');
const validator = require('xsd-schema-validator');
const chalk = require('chalk');
const glob = require('glob-promise');
const xml2js = require('xml2js-es6-promise');
const _ = require('lodash');
const cliprogress = require('cli-progress');
const readdir = require... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Update encrypted deploy password in Travis config file
"""
from __future__ import print_function
import base64
import json
import os
from getpass import getpass
import yaml
from cryptography.hazmat.primitives.serialization import load_pem_public_key
from cryptography.h... |
/*
IE7/IE8/IE9.js - copyright 2004-2010, Dean Edwards
http://code.google.com/p/ie7-js/
http://www.opensource.org/licenses/mit-license.php
*/
;(function(L,r){var h=L.IE7={version:"2.1(beta4)",toString:bJ("[IE7]")};h.compat=8;var s=h.appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1]-0;if(/ie7_off/.test... |
import React, { useEffect } from 'react'
import { PropTypes } from 'prop-types'
import { connect } from 'react-redux'
import { BrowserRouter as Router, Route } from 'react-router-dom'
import { setToken, setUser } from 'src/reducers/loginReducer'
import { Container } from 'semantic-ui-react'
import LoginNav from 'sr... |
module.exports = {
assets: ['./assets/fonts/']
};
|
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
require("jasmine");
const HammerStick_1 = __importDefault(require("../../../patterns/bullish/HammerStick... |
import memberDefined from './member-defined';
export default function memberDefinedAndNotNull(obj, member) {
return memberDefined(obj, member) && obj[member] !== null;
}
|
import firebase from 'firebase';
import * as React from 'react';
class FirebaseRecaptchaVerifierModal extends React.Component {
verifier = null;
setRef = (ref) => {
if (ref) {
if (this.props.appVerificationDisabledForTesting !== undefined) {
firebase.auth().settings.appVerifi... |
#!/usr/bin/python
#
# Copyright 2010 Google Inc. 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 b... |
module.exports = {
future: {
// removeDeprecatedGapUtilities: true,
// purgeLayersByDefault: true,
// defaultLineHeights: true,
// standardFontWeights: true
},
purge: [],
theme: {
extend: {},
spinner: (theme) => ({
default: {
color: '#dae1e7', // color you want to make the ... |
'use strict'
import Vue from 'vue'
import axios from 'axios'
import { Message } from 'element-ui'
import store from '@/store'
import { getToken } from '@/utils/auth'
// create an axios instance
const service = axios.create({
timeout: 5000 // request timeout
})
service.interceptors.request.use(config => {
// Do som... |
from django.test import TestCase, Client
from django.contrib.auth import get_user_model
from django.urls import reverse
class AdminSiteTests(TestCase):
def setUp(self):
self.client = Client()
self.admin_user = get_user_model().objects.create_superuser(
email="admin@test.com",
... |
import React, { PureComponent } from 'react';
import Person from './Person/Person';
class Persons extends PureComponent {
constructor(props) {
super(props);
console.log('[Persons.js] Inside constructor()');
this.state = {
persons: [
{ id: '1', name: "Léo", age: 35 },
{ id: '2', na... |
/**
* Generate the docs ;-)
*
* @author Vojta Jina <vojta.jina@gmail.com>
*/
var path = require('path');
var q = require('q');
var fs = require('q-io/fs');
var namp = require('namp');
var pug = require('pug');
var semver = require('semver');
module.exports = function(grunt) {
// Helper Methods
var urlFrom... |
import React from 'react';
import PropTypes from 'prop-types';
import NotesContainer from '../Note/NoteContainer';
import Edit from '../../components/Edit';
import styles from './Lane.css';
class Lane extends React.Component {
render(){
const { connectDropTarget, lane, laneNotes, updateLane, addNote, deleteLane,... |
"""
NumPy
=====
Provides
1. An array object of arbitrary homogeneous items
2. Fast mathematical operations over arrays
3. Linear Algebra, Fourier Transforms, Random Number Generation
How to use the documentation
----------------------------
Documentation is available in two forms: docstrings provided
with the c... |
import React, { useMemo } from "react";
import PropTypes from "prop-types";
import clsx from "clsx";
import deprecatedPropType from "@material-ui/core/utils/deprecatedPropType";
import { withStyles, useTheme } from "@material-ui/core";
import { MoreOptionsVertical } from "@hv/uikit-react-icons";
import { getPrevNextFoc... |