text stringlengths 3 1.05M |
|---|
var apply = require('./_apply'),
arrayMap = require('./_arrayMap'),
baseIteratee = require('./_baseIteratee'),
rest = require('./rest');
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
* Creates a function that iterates over `pairs... |
const { Router } = require('express');
const fileUpload = require('../../middleware/file-upload');
const parseCsv = require('../../middleware/parse-file');
const validateUserInput = require('../../middleware/validate-input');
const {
createByCsv,
createByEntry,
} = require('../../controllers/transaction-controller... |
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).rextap=e()}(this,function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?functio... |
#!/usr/bin/env python
import fileinput
import sys
import subprocess
import glob
import os.path
from optparse import OptionParser
#import os
#import shutil
#import re
#from optparse import OptionParser # Deprecated with python 2.7
#import argparse # Requires python 2.7 or greater
#-----------------------------------... |
'use strict';
// https://github.com/shelljs/shelljs
require('./check-versions')();
require('shelljs/global');
env.NODE_ENV = 'production';
const path = require('path');
const config = require('../config');
const ora = require('ora');
const webpack = require('webpack');
const webpackConfig = require('./webpack.prod.co... |
import React, { useEffect } from "react";
import "./style/MainBoxOffice.scss";
import { useSelector, useDispatch } from "react-redux";
import { Link, useHistory } from "react-router-dom";
import {
selectMovie,
clearSelectedMovies,
} from "../../../Reducer/bookingReducer";
import { getSearchMovie } from "../../../Re... |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v0.6.0-rc2
*/
(function() {
'use strict';
/**
* @ngdoc module
* @name material.components.content
*
* @description
* Scrollable content
*/
angular.module('material.components.content', [
'material.core'
])
.directive('m... |
import React, {Component} from 'react';
import './App.css';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import TextField from 'material-ui/TextField';
import RaisedButton from 'material-ui/RaisedButton';
import Paper from 'material-ui/Paper';
import Polarity from "./components/Polarity";
... |
/*
*Autor: Italo
*Fecha: 16-08-2018
*Modulo: Models Hora evento
*Información:
*/
'use strict'
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var HoraSchema = Schema({
hora: {
type: String,
},
empresa:{
type: Schema.ObjectId,
ref:'empresa',
requir... |
mycallback( {"CONTRIBUTOR OCCUPATION": "Diagnostic Radiologist", "CONTRIBUTION AMOUNT (F3L Bundled)": "249.96", "ELECTION CODE": "", "MEMO CODE": "", "CONTRIBUTOR EMPLOYER": "Vista Radiology", "DONOR CANDIDATE STATE": "", "CONTRIBUTOR STREET 1": "2408 Houser Rd", "CONTRIBUTOR MIDDLE NAME": "", "DONOR CANDIDATE FEC ID":... |
import React, { Component } from 'react'
import './BountyPage.css'
const json = require('../../../contracts.json');
import { Link } from 'react-router';
const Buffer = require('buffer/').Buffer;
import Web3 from 'web3';
const web3 = new Web3(new Web3.providers.HttpProvider("https://mainnet.infura.io"));
const IPFS... |
var path = require('path')
var express = require('express')
var session = require('express-session')
var nunjucks = require('express-nunjucks')
var routes = require('./app/routes.js')
var favicon = require('serve-favicon')
var app = express()
var bodyParser = require('body-parser')
var browserSync = require('browser-sy... |
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bind/callBound');
var $SyntaxError = GetIntrinsic('%SyntaxError%');
var getGlobalSymbolDescription = GetIntrinsic('%Symbol.keyFor%', true);
var thisSymbolValue = callBound('%Symbol.prototype.valueOf%', true);
var symToStr = call... |
# coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 6
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_1_1
from i... |
// Copyright © 2019 The Things Network Foundation, The Things Industries B.V.
//
// 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
//
// Un... |
"use strict";
var Q = require('q');
var Constants = require('./Constants.js');
var RouterArgs = require('./RouterArgs.js');
var lrException = require('./errorException.js');
var showHelp = require('./help.js');
var selectProject = ... |
# -*- coding: utf-8 -*-
from collections import Counter, defaultdict, OrderedDict
from itertools import count
import torch
import torchtext.data
import torchtext.vocab
from onmt.io.DatasetBase import PAD_WORD, BOS_WORD, EOS_WORD
from onmt.io.TextDataset import TextDataset
from onmt.io.ImageDataset import ImageDatase... |
/*
Highstock JS v9.1.2 (2021-06-16)
Money Flow Index indicator for Highcharts Stock
(c) 2010-2021 Grzegorz Blachliski
License: www.highcharts.com/license
*/
'use strict';(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highchar... |
const request = require('supertest');
const server = 'http://localhost:3000'
describe('Route integration', () => {
describe('/', () => {
describe('GET', () => {
it('response with 200 status and text/html content type', () => {
return request(server)
.get('/')
.expect('Content-Ty... |
const util = require('./util');
const checkMaximumBlaseball = (analysis, eventData) => {
let balls, bases, outs, strikes;
if (eventData.topOfInning) {
// away is batting
balls = eventData.awayBalls;
bases = eventData.awayBases;
outs = eventData.awayOuts;
strikes = eventData.awayStrikes;
} e... |
/*
* @Author: 祸灵
* @Date: 2021-02-08 17:06:42
* @LastEditTime: 2021-04-04 13:42:14
* @LastEditors: 祸灵
* @Description: 函数柯里化
* @FilePath: \UC-font\components\uct\libs\lodash\curry.js
*/
/**
* function getSum(a, b, c) {return a + b + c}
* const curried = curry(getSum)
* console.log(curried(1, 2, 3));//6
* cons... |
function Z5(){}
function JLb(){}
function ILb(){}
function kTb(){}
function _Zb(){}
function h$b(){}
function QLb(){return fY}
function j6(){return IR}
function YLb(){return wW}
function pTb(){return lX}
function f$b(){return dY}
function l$b(){return eY}
function TLb(a){PLb(this,a)}
function j$b(a){pLb(a);return a}
fu... |
/**
* @license @product.name@ JS v@product.version@ (@product.date@)
*
* (c) 2009-2018 Torstein Honsi
*
* License: www.highcharts.com/license
*/
'use strict';
import '../../themes/sand-signika.js';
|
/**
* Plugins
*/
window.Selectize = require('./selectize');
// Require the other jQuery plugins
var selectizeHeader = require('./selectize.header');
|
"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.hasOwn... |
exports.newAlgorithmicTradingBotModulesOrdersSimulations = function (processIndex) {
/*
When we are backtesting or paper trading, we need to simulate what would have happened at the exchange.
*/
let thisObject = {
actualSizeSimulation: actualSizeSimulation,
actualRateSimulation: actualR... |
// flow-typed signature: 9db1e985bec2504cfff7fb8711fb81e3
// flow-typed version: <<STUB>>/@babel/runtime_v^7.0.0/flow_v0.81.0
/**
* This is an autogenerated libdef stub for:
*
* '@babel/runtime'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work w... |
/**
* ng-key-enter allow us to pass a function in on an enter key to do what we want for AngularJS
*
* Copyright © 2014 Stewan Pacheco <talk@stpa.co>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the “Software”), to deal
* ... |
from pipupgrade.model.package import (
_get_pypi_info,
_get_package_version,
_get_pip_info
)
from pipupgrade.__attr__ import (
__name__ as NAME,
__author__
)
from pipupgrade import semver
from pipupgrade._pip import InstallRequirement
from pipupgrade.model.package import Package
import sys
from ... |
import axios from 'axios';
// 自定义Axios实例
const AJAX = axios.create({
baseURL: "",
timeout: 30000,
withCredentials: ""
});
// 添加请求拦截器
AJAX.interceptors.request.use(function (config) {
return config;
}, function (error) {
return Promise.reject(error);
});
// 添加响应拦截器
AJAX.interceptors.response.use(... |
const imagesOptions = {
'back.jpg': {
desktop: {
x: 0,
y: 0,
scale: 1
},
origin: {
x: 0,
y: 0
},
visible: true
},
'logo.png': {
desktop: {
x: 130,
y: 15,
... |
/**
* mParticle
* mParticle Event API
*
* OpenAPI spec version: 1.0.1
* Contact: support@mparticle.com
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', '../../src/mparticle'], factory);
} else if (typeof module === 'object' && module.expo... |
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,i){return t&&r(e.prototype,t),i&&r(e,i... |
import axios from '@/libs/api.request'
export const getTableData = () => {
return axios.request({
url: 'get_table_data',
method: 'get'
})
}
export const getTableData1 = () => {
return {
url: 'get_table_data1',
method: 'get'
}
}
export const getDragList = () => {
return axios.request({
u... |
const { resolve } = require('path')
module.exports = {
rootDir: resolve(__dirname, '../../../'),
srcDir: resolve(__dirname),
css: ['~assets/a.styl'],
render: {
resourceHints: false
},
styleResources: {
stylus: ['~assets/variables.styl']
},
modules: ['@@'],
build: {
quiet: false,
optim... |
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the ... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
// Copyright 2017-2022 @polkadot/apps-config authors & contributors
// SPDX-License-Identifier: Apache-2.0
// structs need to be in order
/* eslint-disable sort-keys */
const definitions = {
types: [{
// on ... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[208],{301:function(t,e){var n,o,i,r,a;(function(){"use strict";var t=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function e(e){var n=t.has(e);return e=/^[a-z][.0-9_a-z]*-[\-.0-... |
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.
require("@rails/ujs").start... |
'use strict';
const { calculateHMAC, verifyHMAC } = require('./lib/operations/hmac');
const { generateRSAKeyPair } = require('./lib/operations/key-pair');
module.exports = {
integrity: {
calculateHMAC,
verifyHMAC
},
keygen: {
generateRSAKeyPair
}
}
|
export const email = value =>
value && !/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(value)
? 'Invalid email address'
: void 0;
export const required = value => value ? void 0 : 'Required'; |
'use strict';
var benchmark = require('benchmark');
var bitcore = require('..');
var bitcoinjs = require('bitcoinjs-lib');
var bcoin = require('bcoin');
var async = require('async');
var fullnode = require('fullnode');
var blockData = require('./block-357238.json');
var maxTime = 20;
console.log('Benchmarking Block/... |
const pathModule = require('path');
/* global describe, it */
const expect = require('../unexpected-with-plugins');
const AssetGraph = require('../../lib/AssetGraph');
describe('assets/Svg', function() {
it('should handle a combo test case with an Svg asset', async function() {
const assetGraph = new AssetGraph(... |
import React from 'react'
import NavBar from '../components/NavBar2'
import Img from '../images/mailchimp.svg'
import Footer from '../components/Footer'
import style from '../css/netflix.module.css'
import {Link} from 'gatsby'
import PageTransition from 'gatsby-plugin-page-transitions';
import asana from '../images/... |
function scopeDemo() {
console.log(x)
let a = 3, b = 4, c = 5;
console.log(a);
console.log(b);
console.log(c);
var x = 2;
if(true) {
var x = 0;
}
}
|
/**
* @license
* Copyright 2018 Google Inc.
*
* 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 use, copy, modify, merge... |
import cookie from 'js-cookie';
const TOKEN_KEY = 'token';
// 获取 token
export const getToken = () => cookie.get(TOKEN_KEY);
// 移除 token
export const removeToken = () => cookie.remove(TOKEN_KEY);
|
const fs = require("fs-extra");
module.exports = () => {
fs.copySync('./node_modules/bootstrap/dist/fonts/','./assets/fonts/');
return Promise.resolve();
} |
import { styles } from "https://deno.land/x/ansi_styles/mod.ts";
import { text } from './mod.js';
console.log(`${styles.green.open}${await text("Crawford.","standard")}${styles.green.close}`);
|
import React from "react";
import {
Modal,
View,
Platform,
DatePickerIOS,
DatePickerAndroid
} from "react-native";
import { Text } from "native-base";
import variable from "../theme/variables/platform";
export class DatePicker extends React.Component {
constructor(props) {
super(props);
this.state ... |
from abc import ABC, abstractmethod
from numbers import Number
from typing import Collection, Generic, List, NamedTuple, Tuple, TypeVar, Union
import numpy as np
import pandas as pd
from copulae.copula.estimator import EstimationMethod, fit_copula
from copulae.copula.exceptions import InputDataError
from copulae.copu... |
from flask.ext.login import LoginManager
from pocket_change import sqlalchemy_db
from datetime import datetime, timedelta
from flask import current_app, session
user_data_timeout = timedelta(minutes=5)
login_timeout = timedelta(days=30)
class PocketChangeUser(object):
authenticators = []
def __init... |
#!/usr/bin/python
#
# Copyright 2018-2022 Polyaxon, Inc.
#
# 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 ... |
// @flow
import React, { Fragment } from 'react';
import { WorkspaceTitle } from '../styles';
import Workspace from '../../../../ui/blocks/Workspace';
import strings from '../../../../../translations/fi';
import { toDisplayDateTime } from '../../../../../utils/date';
type Props = {
workspaceList: Array<Object>,
... |
import os
from TwitchRequest import TwitchRequest
from dotenv import load_dotenv
load_dotenv()
CLIENT_ID = os.getenv("CLIENT_ID")
CLIENT_SECRET = os.getenv("CLIENT_SECRET")
def main():
twitch_request = TwitchRequest(CLIENT_ID, CLIENT_SECRET)
# Search channel
channel_name = input("Insert channel name: ")... |
// Part 1
I=document.querySelector('.puzzle-input').innerText,w=~~Math.sqrt(I),w+=w%2;for(x=y=i=0;i<(w+1)**2-I;i++)x+=i<w?1:i>=2*w&i<3*w?-1:0,y+=i>=3*w?-1:i>=w&i<2*w?1:0;a=Math.abs,a(w/2-x)+a(w/2-y)
// Part 2
for(I=document.querySelector('.puzzle-input').innerText,S={'0,0':1},x=y=w=0;w<I;w+=2)for(i=0;i<4*w&S[[x,y]]<=I... |
import React from 'react'
import './TextContainer.css'
export default class TextContainer extends React.Component {
constructor(props) {
super(props)
}
getClassName() {
return this.props.isSingle ? 'text_container_outer text_container_single' : 'text_container_outer text_container_multiple'
}
render... |
const { Router } = require('express');
const UserController = require('./users.controller');
const { createControllerProxy } = require('../helpers/controllers.proxy');
const userRouter = Router();
const multer = require('multer');
const path = require('path');
const { authorize, avatarMin } = require('./users.mid... |
/**
* MessageBox.js
*
* Released under LGPL License.
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
/**
* This class is used to create MessageBoxes like alerts/confirms etc.
*
* @class tinymce.ui.Me... |
const movies = [
{name: 'La La Land', year: 2016},
{name: 'Deadpool', year: 2016},
{name: 'Ant-Man', year: 2015}
];
/*
* Create a generator "loop"
* Generators are functions which can be exited and later re-entered to where it
* was left off.
*/
function* loop (arr) {
console.log('first call!');
for (co... |
const fs = require("mz/fs");
const util = require('util');
const exec = util.promisify(require('child_process').exec);
async function main(){
const fileName = process.argv[2];
// Create a Parser object from our grammar.
if(!fileName){
console.log("Ingese un archivo .capz");
return;
}
... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["front-text"],{"165f":function(t,e,n){},"3f22":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:... |
(() => {
'use strict';
const logger = require('winston');
const program = require('commander');
const CloudAtCost = require('./lib/cloudatcost');
program
.option('-s, --server-id [serverId]', 'Server ID')
.option('-a, --action [action]', 'Action')
.parse(process.argv);
const cloudAtCost = new... |
const entry = require('./output/Main/index');
console.log(process.env.NODE_ENV);
// This calls to the built code
entry.main(); |
const mongoose = require('mongoose');
const { ObjectId } = mongoose.Schema;
const orderSchema = new mongoose.Schema({
transactionId: {},
amount: {
type: Number,
required: true,
},
address: {
type: String,
required: true,
},
updated: {
type: Date,
... |
const expect = require('chai').expect;
const path = require('path');
const common = require('../../common.js');
const TagsMatcher = common.require('runner/matchers/tags.js');
describe('test TagsMatcher', function() {
describe('reading module tags and skiptags from settings', function() {
const testCases = [
... |
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import re
from llnl.util.filesystem import mkdirp, touch
import spack.cmd.license
import spack.paths
from... |
# Copyright 2017 Google LLC.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
#... |
'use strict';
/**
* @module image-generator
* @author Alteh Union (alteh.union@gmail.com)
* @license MIT (see the root LICENSE file for details)
*/
const path = require('path');
const textToImage = require('text-to-image');
const jimp = require('jimp');
const { Canvas } = require('canvas');
const fs = require('fs... |
import Effects_common_class from './abstract/css.js';
class Effects_contrast_class extends Effects_common_class {
contrast() {
var params = [
{name: "value", title: "Percentage:", value: 40, range: [-100, 100]},
];
this.show_dialog('contrast', params);
}
convert_value(value) {
var system_value;
if (v... |
"use strict"
const messages = require("..").messages
const ruleName = require("..").ruleName
const rules = require("../../../rules")
const rule = rules[ruleName]
testRule(rule, {
ruleName,
config: ["always"],
accept: [ {
code: "@import url(x.com?a=b,c=d)",
}, {
code: "@media (max-width: 600px) {}",
... |
import React from 'react'
export default function Servicephotosection() {
return (
<div className="row">
<div className="col-10 col-sm-10 mx-auto">
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#car... |
module.exports.run = async (bot, message, args) => {
let botMessage = args.join(" ");
message.delete().catch(); // Deletes the Message
message.channel.send(botMessage.substr(botMessage.indexOf(" ") + 1)); // Slice the Prefix + Command and Sends the Message
console.log("Said something");
return;
}
m... |
// THIS FILE IS AUTO GENERATED
import { GenIcon } from '../lib';
export function MdKitchen (props) {
return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24"},"child":[{"tag":"path","attr":{"d":"M18 2.01L6 2c-1.1 0-2 .89-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.11-.9-1.99-2-1.99zM18 20H6v-9.02h12V20zm0-11H6V4h12... |
'use strict';
//本地环境配置
module.exports = {
"mock" : {
"port" : 8032, //启动端口
"apiPath" : "../api", //mock文件存放目录
"jsonPath" : "../interface/", //接口配置文件存放目录
"route" : { //路由配置
"/api?mockData=:name" : "fn mockStart",
"/api/:name/:file" : "fn getFile"
}
},
"mockMap" : [
{
"host" : "10.207.28.60",
... |
const test = require("ava");
const Config = require("../../src/Config");
const PageTitle = require("../../src/Tags/PageTitle");
test.beforeEach(t => {
t.context.config = new Config({ title: "Site title" });
});
test("A provided title should be used", t => {
const pageTitle = new PageTitle(t.context.config);
let... |
function cambiarestado(estado, idvacuna) {
var token = $('#token').val();
var id = $(idvacuna).val();
$.ajax({
url: "http://localhost:8000/vacunaestado",
headers: {'X-CSRF-TOKEN': token},
type: 'GET',
dataType: 'JSON',
data: {estado: estado, id: id},
success: ... |
'use strict';
angular.module('insight.blocks').controller('BlocksController',
function($scope, $rootScope, $routeParams, $location, Global, Block, Blocks, BlockByHeight) {
$scope.global = Global;
$scope.loading = false;
if ($routeParams.blockHeight) {
BlockByHeight.get({
blockHeight: $routeParams.bl... |
import styled from 'styled-components';
const Wrapper = styled.div`
position: relative;
margin-bottom: 27px;
label {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 1.3rem;
font-weight: 500;
}
nav + div {
height: 34px;
background-color:... |
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
{
exports.GREATEST_LOWER_BOUND = 1;
exports.LEAST_UPPER_BOUND = 2;
/**
* Recursive implementation of bi... |
import React, { useEffect, useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import {
Input,
Label,
Modal,
ModalHeader,
ModalBody,
ModalFooter,
Button,
Select,
} from "@windmill/react-ui";
import { Minus, Check, X, Pencil } from "phosphor-react";
import {
getServerPort... |
/*
* Backpack - Skyscanner's Design System
*
* Copyright 2016-2019 Skyscanner Ltd
*
* 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
*
... |
#!/usr/bin/python
"""
Script to copy images to Wikimedia Commons, or to another wiki.
Syntax:
python pwb.py imagetransfer {<pagename>|<generator>} [<options>]
The following parameters are supported:
-interwiki Look for images in pages found through interwiki links.
-keepname Keep the filenam... |
from signbank.dictionary.models import GlossFrequency
from json import dumps
def regionality_score(percentages, skip_zeroes = True):
if skip_zeroes:
percentages = list(filter(lambda a: a != 0, percentages))
expected_score = 1/len(percentages)
maximum_total_deviation = (len(percentages)-1)... |
const promisic=function(n){return function(t={}){return new Promise((c,r)=>{const s=Object.assign(t,{success:n=>{c(n)},fail:n=>{r(n)}});n(s)})}},px2rpx=function(n){const{screenWidth:t}=wx.getSystemInfoSync();return 750/t*n};export{promisic,px2rpx}; |
/**
* Created by vedi on 10/10/15.
*/
'use strict';
module.exports = () => (req, res, next) => {
// Code was taken from here: https://github.com/jshttp/basic-auth/blob/master/index.js
req = req.req || req;
let auth = req.headers.authorization;
if (!auth) {
return next();
}
// malformed
const par... |
//
// Copyright (c) 2019 by SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with t... |
import * as types from './actionTypes';
import transactionApi from '../api/transactionApi';
import { loadReviewsSuccess } from './reviewActions';
import { updateReviewsSuccess } from './reviewActions';
import { loadMessagesSuccess } from './messageActions';
import { updateMessagesSuccess } from './messageActions';
ex... |
import resolve from "rollup-plugin-node-resolve";
import babel from "rollup-plugin-babel";
import commonjs from "rollup-plugin-commonjs";
import pkg from "./package.json";
import postcss from "rollup-plugin-postcss";
// eslint-disable-next-line import/no-anonymous-default-export
export default {
input: "src/lib/inde... |
from ignite.engine import Events, Engine
from protozoo.tiktorch_config_keys import ModelZooEntry
def get_trainer(model_zoo_entry: ModelZooEntry) -> Engine:
def training_step(trainer: Engine, batch) -> float:
print("STEP")
ipt, tgt = batch
trainer.state.optimizer.zero_grad()
pred =... |
'use strict';
const Redis = require(`ioredis`)
, Tool = require(`../Tool`)
, FileAdapter = require(`./ConfigFileAdapter`)
, RedisAdapter = require(`./ConfigRedisAdapter`)
, ConfigParam = require(`./ConfigParam`)
;
let runtimeConfig = {}
, redisAdapter = null
, fileAdapter = null
, configFi... |
from __future__ import absolute_import, division, print_function
from .slip_viewer.frame import chooser_wrapper as _chooser_wrapper
try:
import resource
import platform
def debug_memory_usage():
# getrusage returns kb on linux, bytes on mac
units_per_mb = 1024
if platform.system()... |
function f(arr) {
var x = arr[0];
if (typeof x) {};
Math.abs(x);
}
f([1.2]);
|
from django.conf import settings
from django.conf.urls import url, include
from django.conf.urls.i18n import i18n_patterns
from django.http import HttpResponseBadRequest, HttpRequest, HttpResponse
from django.views.generic import TemplateView, RedirectView
from django.utils.module_loading import import_string
import os... |
import os as dir_os
import pickle as dir_pickle
def project_root_dir():
return dir_os.getcwd()
def data_dir():
return dir_os.path.abspath(project_root_dir() + "/data")
def raw_data_dir():
return dir_os.path.abspath(data_dir() + "/raw")
def processed_data_dir():
return dir_os.path.abspath(data_dir() ... |
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import Identicon from '../../../../components/ui/identicon'
import Button from '../../../../components/ui/button/button.component'
import TextField from '../../../../components/ui/text-field'
import { isValidAddress } from '../../../../help... |
from typing import Type
from ufdl.jobtypes.util import parse_args
from ..base import UFDLJobContract
from ..error import ContractParsingException
from ..initialise import name_type_translate
def parse_contract(contract_string: str) -> UFDLJobContract:
if not isinstance(contract_string, str):
raise Contr... |
import requests
from fake_useragent import UserAgent, FakeUserAgentError
from random import choice
from re import search
from retry import retry
class MyIP(object):
ip = 'N/A'
__servers = [
'http://ipecho.net/plain', 'http://websiteipaddress.com/WhatIsMyIp',
'http://getmyipaddress.or... |
module.exports = {
name: 'teste',
run: async toolbox => {
const { print, parameters } = toolbox
// toolbox api: https://infinitered.github.io/gluegun/#/toolbox-api
// print.info('info')
// print.success('success')
// print.error('error')
// print.fancy('fancy')
// print.warning('warnin... |
'use strict';
const Controller = require('egg').Controller;
class HomeController extends Controller {
async index() {
this.ctx.body = 'hi, ' + this.app.plugins.nsqpp.name;
}
}
module.exports = HomeController;
|