text stringlengths 3 1.05M |
|---|
/*eslint no-var:0, max-len:0 */
'use strict';
const { expect } = require('chai');
const Knex = require('../../../knex');
const _ = require('lodash');
const delay = require('../../../lib/execution/internal/delay');
const {
isPostgreSQL,
isOracle,
isRedshift,
isOneOfDbs,
isSQLite,
isMysql,
} = require('../.... |
import botocore
import datetime
import re
import logging
import boto3
logger = logging.getLogger()
logger.setLevel(logging.INFO)
class RDSBackup:
def __init__(self):
self.my_rds = boto3.client('rds')
def get_rds_instance(self,instances):
try:
result = Fal... |
#!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be found
# in the LICENSE file.
""" Analyze recent SkPicture bench data, and output suggested ranges.
The outputs can be edited and pasted to bench_expectations.t... |
from sqlalchemy import (
MetaData,
Table,
Column,
NVARCHAR,
Integer,
DateTime,
ForeignKey,
UniqueConstraint,
)
meta = MetaData()
def upgrade(migrate_engine):
meta.bind = migrate_engine
u = Table("user", meta, autoload=True)
t = Table(
"participant_import_definitio... |
import os
from mindware.components.feature_engineering.transformations.base_transformer import Transformer
from mindware.components.utils.class_loader import find_components, ThirdPartyComponents
"""
Load the buildin classifiers.
"""
rescaler_directory = os.path.split(__file__)[0]
_rescaler = find_components(__package... |
const Discord = require('discord.js');
const client = new Discord.Client();
const ly = require('wio.db');
const moment = require('moment');
const config = require("../config.json")
exports.run = (client, message, args) => {
try {
let user = message.author
const embed = new Discord.MessageEmbed()
.setAuthor(cli... |
"""
Django settings for ecommerce project.
Generated by 'django-admin startproject' using Django 3.1.4.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
import os
f... |
TSim.Train = function(name, station)
{
var root_ = this
var tmp = []
this.name = name
this.ret = false
this.currentLink = 0
this.percent = 0
this.state = 1
/*
** 0 - Arret
** 1 - Lent (1 px/s)
** 2 - Rapide (2 px/s)
*/
this.update = function() {
if (root_.state == 0)
return;
... |
'use strict';
module.exports = require('./lib');
module.exports.Node = require('./lib/node');
module.exports.Service = require('./lib/service');
module.exports.errors = require('./lib/errors');
module.exports.services = {};
module.exports.services.Bitcoin = require('./lib/services/bitcoind');
module.exports.services.... |
import React from "react";
import styles from "./styles.module.scss"
import PropTypes from "prop-types";
import LoginForm from "components/LoginForm";
import SignupForm from "components/SignupForm";
const Auth = (props, context) =>
<main className={styles.auth}>
<div className={styles.column}>
... |
#!/usr/bin/env node
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
// Makes the script crash on unhandled rejections instead of silently
// ignoring them. In the future... |
module.exports = {"0":{"0":"W","1":null,"2":null,"3":"G","4":"O","5":null},"1":{"0":null,"1":null,"2":null,"3":"G","4":"O","5":null},"2":{"0":null,"1":"Y","2":null,"3":"G","4":"O","5":null},"3":{"0":"W","1":null,"2":null,"3":null,"4":"O","5":null},"4":{"0":null,"1":null,"2":null,"3":null,"4":"O","5":null},"5":{"0":null... |
module.exports = {
parser: "@typescript-eslint/parser",
env: {
es6: true,
node: true
},
plugins: ["@typescript-eslint"],
extends: ["plugin:@typescript-eslint/recommended", "standard"],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly"
},
parserOptions: {
ecmaVersion: 2018... |
/**
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you 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... |
import path from 'path';
import test from 'ava';
import del from 'del';
import pathExists from 'path-exists';
import fn from '.';
const imgUrl = 'http://i3.pixiv.net/img-original/img/2016/03/31/00/31/46/56100246_p0.jpg';
const fakeUrl = 'http://i3.pixiv.net/img-original/img/2016/03/31/00/31/46/fake.jpg';
test.after('... |
angular.module('myAppControllers')
.controller('startPageController', ['$scope', '$http', function ($scope, $http) {
$scope.woot = 'This is Start Page';
}]); |
/* eslint-disable max-lines-per-function */
/* eslint-disable no-undef */
const { stringify, safeStringify } = require('../index');
describe('Make an array', () => {
it('Input object will be stringified', () => {
const result = stringify({ test: true });
expect(result).toStrictEqual(JSON.stringify({ test: t... |
# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
# spec/fixtures/responses/whois.srs.net.nz/status_invalid
#
# and regenerate the tests with the following script
#
# $ scripts/generate_tests.py
#
from nose.tools import *
from dateutil.parser import parse... |
import pytest
import re
from proknow import Exceptions
def test_create(app, workspace_generator):
pk = app.pk
# Verify returned WorkspaceItem
params, created = workspace_generator()
assert created.slug == params["slug"]
assert created.name == params["name"]
assert created.protected == params[... |
import sys
import pandas as pd
import numpy as np
import re
import chardet
from sqlalchemy import create_engine
def load_data(messages_filepath, categories_filepath):
''' Function that takes two CSV files from the given paths, creates two
dataframes, merges the two dataframes on their common ID and returns... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* @summary This sample demonstrates querying methods related to metric.
*/
// Load the .env file if it exists
const dotenv = require("dotenv");
dotenv.config();
const { MetricsAdvisorKeyCredential, MetricsAdvisorClient } = require("@az... |
import ruamel.yaml
import pprint
# Tokens mnemonic:
# directive: %
# document_start: ---
# document_end: ...
# alias: *
# anchor: &
# tag: !
# scalar _
# block_sequence_start: [[
# block_mapping_start: {{
# block_end: ]}... |
"""
Code modified from PyTorch DCGAN examples: https://github.com/pytorch/examples/tree/master/dcgan
Example Usage:
# For MNIST zeros and ones
# Improved GAN
CUDA_VISIBLE_DEVICES=1 python main.py --outf=/scratch0/ilya/locDoc/ACGAN/experiments/julytest13 --train_batch_size=32 --cuda --dataset mnist_subset --num_classes... |
import child from 'child_process'
import LocalRunner from '../src'
jest.mock('child_process', () => {
const childProcessMock = {
on: jest.fn(),
send: jest.fn(),
kill: jest.fn()
}
return { fork: jest.fn().mockReturnValue(childProcessMock) }
})
test('should fork a new process', () ... |
'use strict';
module.exports = {
shared: {
apiVersion: '1'
},
local: {
db: 'mongodb://localhost/bookStore'
},
testing: {
db: 'mongodb://localhost/bookStore-testing'
},
staging: {
db: 'mongodb://localhost/bookStore'
},
production: {
db: 'mongodb://localhost/bookStore'
}
}; |
from astropy import units as u
from numpy.linalg import norm
class LithobrakeEvent:
"""Terminal event that detects impact with the attractor surface.
Parameters
----------
R : float
Radius of the attractor.
"""
def __init__(self, R):
self._R = R
self._last_t = None
... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
* @format
*/
"use strict";
const { dirname, join, parse } = require("path");
module.exports = class HasteFS {
constructor(f... |
import request from '@/utils/request'
const baseUrl = require('@/api/config.js');
import axios from "axios";
import { getToken } from '@/utils/auth'
// 新增采购订单
export function addPurchaseOrder(option) {
return request.post(`/backend-order/purchaseOrder/save`, option);
}
// 更新采购订单
export function updatePurchaseOrder(o... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var prefix = 'tb';
var iconName = 'manual-gearbox';
var width = 512;
var height = 512;
var ligatures = [];
var unicode = null;
var svgPathData = 'M 106.65039 63.990234 C 71.56234 63.990236 42.66016 92.892416 42.660156 127.98047 C 42.660156 155... |
/**
* RepoListItem
*
* リポジトリの名前と、発行件数をリストします
*/
import React from 'react';
import PropTypes from 'prop-types';
import ListItem from 'components/ListItem';
import { IssueIcon } from 'components/Icons';
import './style.scss';
export default class RepoListItem extends React.PureComponent { // eslint-disable-line rea... |
/*!
* morgan
* Copyright(c) 2010 Sencha Inc.
* Copyright(c) 2011 TJ Holowaychuk
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2014 Douglas Christopher Wilson
* MIT Licensed
*/
/**
* Module dependencies.
* @private
*/
var auth = require('basic-auth')
var debug = require('debug')('morgan')
var deprecate = r... |
var searchData=
[
['full_5fmatch_1949',['full_match',['../block_8c.html#a1ec5cbfe5f4d8b25e30d7ff67ac69eb5',1,'block.c']]]
];
|
const express = require('express');
const SocketServer = require('ws');
const uuidv4 = require('uuid/v4');
// Set the port to 3001
const PORT = 3001;
let counter = 0;
// Create a new express server
const server = express()
// Make the express server serve static assets (html, javascript, css) from the /public fo... |
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import moox from 'moox';
import PropTypes from 'prop-types';
import { devToolsEnhancer } from 'redux-devtools-extension';
import App from './App';
import utils from './utils';
import schema from './models/schema';
m... |
// moment.js locale configuration
// locale : Morocco Central Atlas Tamaziɣt (tzm)
// author : Abdel Said : https://github.com/abdelsaid
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
... |
# Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
import pytest
from ch05_datastructures.solutions.ex04_remove_duplicates import remove_duplicates, remove_duplicates_with_dict
def inputs_and_expected():
return [([1, 1, 2, 3, 4, 1, 2, 3], [1, 2, 3, 4]),
([7, 5, 3,... |
import render from './render'
export default {
render
} |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var MentionsContextKey = Symbol('MentionsContextKey');
var _default = MentionsContextKey;
exports.default = _default; |
'use strict';
var Tester = require('../../src/tester');
var assert = require('assert');
new Tester()
.addPackage('add', function(a, b) { return a + b; }, '0.1.0')
.addPackage('sub', function(a, b) { return a - b; })
.addPackage('mul', function(a, b) { return a * b; }, '')
.addPackage('div', function(a, b) { r... |
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
i... |
import bisect
import Tkinter as tk
class NumberModel(object):
def __init__(self, val=0):
self.value = val
def increment(self):
self.value += 1
def decrement(self):
self.value -= 1
class GraphModel(object):
def __init__(self):
self.points = []
def add_point(self,... |
import React from 'react';
import { Link, graphql, navigate } from 'gatsby';
import { window } from 'browser-monads';
import Layout from '../components/layout';
import Nav from '../components/nav';
import SEO from '../components/seo';
import '../components/home/home.css';
import './archive.css';
import headerImg from ... |
import urllib.request
# 构建一个HTTPHandler处理器对象,支持处理HTTP请求
http_handler = urllib.request.HTTPHandler()
# 加上debuglever参数,还可以启动debug模式,默认值为0
#http_handler = urllib.request.HTTPHandler(debuglevel=1)
# 构建一个HTTPHandler处理器对象,支持处理HTTPS请求
#http_handler = urllib.request.HTTPSHandler()
# 调用urllib.request.build_opener()方法,创建支持处理... |
"use strict";
var Models = require("../models");
const getUsers = (res) => {
Models.Users.find({}, {}, {}, (err,data) => {
if (err) throw err;
res.send({result: 200 , data: data})
});
}
const createUsers = (data, res) => {
new Models.Users(data).save((err,data) => {
if(err) throw ... |
#!/usr/local/bin/python3
def fibonacci(quantidade, sequencia=(0, 1)):
# Importante: Condição de parada
if len(sequencia) == quantidade:
return sequencia
return fibonacci(quantidade, sequencia + (sum(sequencia[-2:]),))
if __name__ == '__main__':
# Listar os 20 primeiros números da sequência
... |
let homeController = require('./home-controller')
let usersController = require('./users-controller')
let articlesController = require('./articles-controller')
let profileController = require('./profile-controller')
let eventController = require('./event-controller')
module.exports = {
home: homeController,
users:... |
import { fetch } from "./fetch";
export function getLatestBlock(num) {
return fetch({
method: "post",
url: "LatestBlock",
data: {
num
}
});
}
export function getLatestMessage(num) {
return fetch({
method: "post",
url: "LatestMsg",
data: {
num
}
});
}... |
import React from 'react';
import { Form, Row, Col, Input, Button, Select, Checkbox } from 'antd';
import { camelize } from '../../utils';
import './style.css';
const FormItem = Form.Item;
const Option = Select.Option;
const formItemDefaultLayout = {
labelCol: {
span: 2
},
wrapperCol: {
sp... |
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-popups"),require("@syncfusion/ej2-inputs"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-lists")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-... |
/**
* Copyright IBM Corp. 2016, 2020
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*
* Code generated by @carbon/icon-build-helpers. DO NOT EDIT.
*/
'use strict';
var _32 = {
"elem": "svg",
"attrs": {
"xmlns": "http:/... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_tests_helpers_1 = require("@hint/utils-tests-helpers");
const utils_types_1 = require("@hint/utils-types");
const hintPath = utils_tests_helpers_1.getHintPath(__filename);
const ssllabsMock = (response) => {
return {
'.... |
import React from "react";
import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown';
import "../MusicPlayerPanel.css";
export const DropDownButton = (props) => {
return (
<React.Fragment>
<div className={"MusicPlayerPanel__open__dropDown"}>
<ArrowDropDownIcon onClick={props.toggleMu... |
import React from 'react';
import PropTypes from 'prop-types';
const UitWebSection = (props) => {
const { color, size, ...otherProps } = props
return React.createElement('svg', {
xmlns: 'http://www.w3.org/2000/svg',
width: size,
height: size,
viewBox: '0 0 24 24',
fill: color,
...otherProps... |
/*
*
* 给定一个无重复元素的有序整数数组,返回数组区间范围的汇总。
*
* 示例 1:
*
* 输入: [0,1,2,4,5,7]
* 输出: ["0->2","4->5","7"]
* 解释: 0,1,2 可组成一个连续的区间; 4,5 可组成一个连续的区间。
*
* 示例 2:
*
* 输入: [0,2,3,4,6,8,9]
* 输出: ["0","2->4","6","8->9"]
* 解释: 2,3,4 可组成一... |
export const texts = {
days: [
'Domingo',
'Lunes',
'Martes',
'Miércoles',
'Jueves',
'Viernes',
'Sábado'
],
howLongYear: 'Hace más de un año',
howLongMonth: 'Hace unos meses',
howLongWeek: 'Hace unas semanas',
howLongDay: 'Hace unos días',
howLongHour: 'Hace unas horas',
howLo... |
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
import pytest
from django.contrib.contenttypes.models import ContentType
from constants import user_system
from event_manager.event import Attribute, Event
from event_manager.events import (
bookmark,
build_job,
chart_view,
cluster,
experiment,
experiment_group,
experiment_job,
job,
... |
import argparse
import warnings
import matplotlib.pyplot as plt
import numpy as np
from libs.svm import SVM
from dataset.utils import DatasetLoader, DatasetUtils
from libs.plot import Plotter
###
warnings.filterwarnings("ignore")
np.random.seed(666)
datasets = [
DatasetLoader.linear(),
DatasetLoader.non_lin... |
/*
home.js文件专门用于处理 home首页的数据请求。
*/
import { request } from './request'
// 首页的某一个请求
export function getHomeMultidata() {
return request({
url: '/home/multidata'
})
}
export function getHomeGoods(type, page,) {
return request({
url: '/home/data',
params: {
type,
page
}
})
}
|
//! moment.js
;
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
global.moment = factory()
}(this, (function () {
'use strict';
var hookCallback;
function hooks() {
return... |
import { defineConfig } from 'vite';
import { svelte } from '@sveltejs/vite-plugin-svelte';
import sveltePreprocess from 'svelte-preprocess';
import WindiCSS from 'vite-plugin-windicss';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
WindiCSS(),
svelte({
preprocess: [sveltePrepr... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _createIcon = _interopRequireDefault(require("./util/createIcon"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _default = (0, _createIcon["defaul... |
import * as React from 'react';
import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';
import { arrayIncludes } from '../utils';
function getOrientation() {
if (typeof window === 'undefined') {
return 'portrait';
}
if (window.screen && window.screen.orientation && window.screen.orient... |
'use strict';
angular.module('MapBiomas.services')
.factory('ClassesService', ['$resource',
function ($resource) {
var Classes = $resource('mapbiomas/services/classes/:id', {
id: '@id'
}, {
paginate: {
url: "mapbiomas/servi... |
import * as React from "react"
import { graphql } from "gatsby"
//import parse from "react-html-parser"
// import parse from "html-react-parser"
// import { GatsbyImage, getImage } from 'gatsby-plugin-image'
// import { render } from "react-dom"
import Img from "gatsby-image"
const acfPost=({data})=>{
return(
<d... |
var ufs__extern_8h =
[
[ "BA_CLRBUF", "d6/dc6/ufs__extern_8h.html#acb5c2c558e6b9726f11b864282e0e228", null ],
[ "BA_METAONLY", "d6/dc6/ufs__extern_8h.html#ad8b107c1878c2604e4a31eca22eae6ec", null ],
[ "BA_SEQMASK", "d6/dc6/ufs__extern_8h.html#a46407f9fa3f9faac8f2970acda55c324", null ],
[ "BA_SEQMAX", "d... |
import json
class TestApi:
# UserList tests
def test_user_list_200(self, testapp, users):
resp = testapp.get('/v1/users')
data = json.loads(resp.get_data(as_text=True))
assert len(data) == 50
assert data[0].get('username') == "user0"
assert data[0].get('email') == "us... |
'use strict'
// Template version: 1.2.5
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
const devEnv = require('./dev.env')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
// 代理列表, 是否开启代理通过[./dev.env.js]配置
p... |
/*************************************************************
*
* MathJax/jax/output/CommonHTML/fonts/TeX/SansSerif-Regular.js
*
* Copyright (c) 2015-2016 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Lice... |
import React, { useState } from "react";
import Avatar from "@material-ui/core/Avatar";
import Button from "@material-ui/core/Button";
import CssBaseline from "@material-ui/core/CssBaseline";
import TextField from "@material-ui/core/TextField";
import FormControlLabel from "@material-ui/core/FormControlLabel";
import C... |
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
import _inherits from "@swc/helpers/src/_inherits.mjs";
import _create_super from "@swc/helpers/src/_create_super.mjs";
// @noEmit: true
// @allowJs: true
// @checkJs: true
// @noImplicitAny: true
// @strictNullChecks: true
// @Filename: a.js
var B... |
var path = require('path');
var ManifestPlugin = require('webpack-manifest-plugin');
module.exports = {
entry: path.resolve(__dirname, '../src/index.jsx'),
mode: 'development',
node: {
fs: "empty"
},
devtool: 'source-map',
output: {
path: path.resolve(__dirname, '../../public/assets'),
file... |
/**
* Message processing logic that deals with message representations at a higher
* level than just text/plain processing (`quotechew.js`) or text/html
* (`htmlchew.js`) parsing. We are particularly concerned with replying to
* messages and forwarding messages, and use the aforementioned libs to do the
* gruntwo... |
import aspose.words as aw
from docs_examples_base import DocsExamplesBase, MY_DIR, ARTIFACTS_DIR
class WorkingWithPdfLoadOptions(DocsExamplesBase):
def test_load_encrypted_pdf(self):
#ExStart:LoadEncryptedPdf
doc = aw.Document(MY_DIR + "Pdf Document.pdf")
save_options = aw.savi... |
from core.himesis import Himesis, HimesisPreConditionPatternLHS
import uuid
class HPP5_ConnectedLHS(HimesisPreConditionPatternLHS):
def __init__(self):
"""
Creates the himesis graph representing the AToM3 model HPP5_ConnectedLHS.
"""
# Flag this i... |
from copy import deepcopy
from typing import Dict, Any
import torch.nn as nn
from torch.nn.modules.batchnorm import BatchNorm2d
from torch.nn.modules.normalization import LayerNorm
class Norm_fn:
def __init__(self, norm_cfg: Dict[str, Any]):
self.norm_name = norm_cfg["name"]
self.norm_cfg = norm_... |
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField
from wtforms.validators import DataRequired, Length, EqualTo, Email
class RegisterForm(FlaskForm):
email = StringField('Email', validators=[DataRequired(),
Email(),
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=jobs-options.js.map |
const { Command } = require('discord.js-commando');
const { botname, botimage } = require('../../config');
const { MessageEmbed } = require('discord.js')
module.exports = class piCommand extends Command {
constructor(client) {
super(client, {
name: 'pi',
group: 'divers',
... |
const util = require("../../utils/ll.js");
var app = getApp();
var page = 1;
Page({
data:{
dataList: [],
},
zaima: function (e) {
var id = e.currentTarget.id;
var list = this.data.dataList;
var name = list[e.target.dataset.id].name;
console.log(7894156, name)
... |
import os
from typing import Callable, Dict, List
import config
from jobs.base.job import Job
from .gdoc import push_gdoc
# Functions for pushing individual source types
PUSH_FUNCS: Dict[str, Callable[[List[str], str, dict], None]] = {
"googledocs": push_gdoc,
}
class Push(Job):
"""
A job that pushes f... |
# Standard library imports
import csv
import json
import os
from typing import List, TextIO
# Third-party imports
import holidays
# Third party imports
import pandas as pd
# First-party imports
from gluonts.dataset.artificial._base import (
ArtificialDataset,
ComplexSeasonalTimeSeries,
ConstantDataset,
)... |
# -*- coding: utf-8 -*-
#test on python 3.4 ,python of lower version has different module organization.
import http.server
from http.server import HTTPServer, BaseHTTPRequestHandler
import socketserver
PORT = 8000
Handler = http.server.SimpleHTTPRequestHandler
Handler.extensions_map={
'.manifest': 'text/cache-m... |
#!/usr/bin/python
#
# Copyright 2012 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... |
import React from "react"
import Header from "../components/header"
import Layout from "../components/layout"
export default function PageNotFound() {
return (
<Layout>
<Header headerText="404" style={{ fontSize: `72px`, textAling: `center` }} />
<p>Ooops page not found</p>
</Layout>
)
}
|
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
'use strict'
const Joi = require('joi')
const { isSemver } = require('../test-validators')
const { ServiceTester } = require('../tester')
const t = (module.exports = new ServiceTester({
id: 'GithubTag',
title: 'Github Tag',
pathPrefix: '/github',
}))
t.create('Tag')
.get('/v/tag/expressjs/express.json')
.e... |
import React, { Component } from 'react';
import { findDOMNode } from 'react-dom';
import PropTypes from 'prop-types';
import isEqual from 'lodash/isEqual';
import isUndefined from 'lodash/isUndefined';
import { FormGroup } from 'reactstrap';
import classNames from 'classnames';
import AvFeedback from './AvFeedback';
... |
/*!
* bip70/index.js - bip70 for fcoin
* Copyright (c) 2016-2017, Christopher Jeffrey (MIT License).
* https://github.com/folm/fcoin
*/
'use strict';
/**
* @module bip70
*/
exports.certs = require('./certs');
exports.PaymentACK = require('./paymentack');
exports.PaymentDetails = require('./paymentdetails');
ex... |
import React from "react";
import { connect } from "react-redux";
import {createOrder, createOrderItem, editOrderItem} from '../store'
import ProductCardSingle from "./ProductCardSingle";
const SingleProduct = ({products, match}) => {
const product = products.find(product => product.id === match.params.productId)
... |
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import serialize from 'serialize-javascript';
import { allLanguages as languagesList } from 'shared/languagesList.js';
const determineHotAssets = query => ({
JS: [
'http://localhost:8080/pdfjs-dist.js',
'http://localhost:8080/npro... |
// jspredict.js makes `jspredict` global on the window (or global) object, while Meteor expects a file-scoped global variable
jspredict = this.jspredict;
try {
delete this.jspredict;
} catch (e) {
}
|
import React from 'react';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import ScreenWrapper from '../components/ScreenWrapper';
import withLocalize, {withLocalizePropTypes} from '../components/withLocalize';
import KeyboardAvoidingView from '../components/KeyboardAvoidingView';
import HeaderW... |
let nock = require('nock');
module.exports.testInfo = {"container":"container156776197897508123"}
nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true})
.put('/container156776197897508123')
.query(true)
.reply(201, "", [ 'Content-Length',
'0',
'Last-Modified',
'Fri, 06 S... |
city = str(input('Em que cidade você nasceu?')).strip().capitalize()
print('Santo' in city)
# cid = str(input('Cidade de Nascimento:')).strip()
# print(cid[:5].upper() == 'SANTO')
|
# global
import tensorflow as tf
from typing import Union, Tuple, Optional, List
# local
# noinspection PyShadowingBuiltins
def all(
x: Union[tf.Tensor, tf.Variable],
axis: Optional[Union[int, Tuple[int], List[int]]] = None,
keepdims: bool = False,
) -> Union[tf.Tensor, tf.Variable]:
if axis is None:... |
from copy import deepcopy
from typing import Optional, Callable, List
from dataclasses import dataclass
import io
from chess import pgn
from chess import engine as computer
from chess.pgn import Game
from blunder_wunder.types import MoveClassification, Color
from blunder_wunder.game import AnalysedMove, AnalysedGame
... |
'use strict';
// Consumables controller
angular.module('consumables').controller('ConsumablesController', ['$scope', '$stateParams', '$location', 'Authentication', 'Consumables',
function($scope, $stateParams, $location, Authentication, Consumables) {
$scope.authentication = Authentication;
// Create new Consuma... |
'use strict';
/**
* "Moteur" de template minimaliste le but est de simplifié la créatoin
* de "composant" pour par exemple coller à des données récupéré en ajax
* Pas fait pour gérer des gros templates,
* pas de compilation, pas de fonction.
* Dans un premier temps les variables et ensuite du code libre, gestion ... |
function Downloader() {
this.isActive = false;
this.realtime = false;
this.chunkStart = 0;
this.chunkSize = 0;
this.totalLength = 0;
this.chunkTimeout = 1000;
this.url = null;
this.callback = null;
this.eof = false;
this.setDownloadTimeoutCallback = null;
}
Downloader.prototype.setDownloadTimeoutCallback = f... |