text stringlengths 3 1.05M |
|---|
import os.path
import numpy as np
from numpy import testing
from scipy import ndimage
import skimage
from skimage import data_dir, img_as_uint
from skimage.morphology import grey, selem
from skimage._shared._warnings import expected_warnings
lena = np.load(os.path.join(data_dir, 'lena_GRAY_U8.npy'))
bw_lena = lena ... |
var searchData=
[
['_5fblk_5f',['_BLK_',['../utils_8hpp.html#a2dfde2ed6ee5712d2e45e3a66345b86b',1,'_BLK_(): utils.cpp'],['../utils_8cpp.html#a338317f3d2836b42a6fedfc149360730',1,'_BLK_(): utils.cpp']]]
];
|
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.load... |
(function(d){d['sr']=Object.assign(d['sr']||{},{a:"Постављање фајла је неуспешно:",b:"Слика трака са алтакама",c:"Табела трака са алаткама",d:"Подебљано",e:"Курзив",f:"Додај слику или фајл",g:"Цитат",h:"Одреди стил",i:"Стилови",j:"модул са сликом",k:"Одреди текст испод слике",l:"Слика у пуној величини",m:"Бочна слика",... |
const sourceType = [['camera'], ['album'], ['camera', 'album']]
const camera = [['front'], ['back'], ['front', 'back']]
// eslint-disable-next-line
const duration = Array.apply(null, {length: 60}).map(function (n, i) {
return i + 1
})
Page({
onShareAppMessage() {
return {
title: '拍摄/选择视频',
path: '... |
# coding=utf-8
# *** WARNING: this file was generated by test. ***
# *** 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 _utilities
__all__ = [
'Sandwi... |
import Axios from 'axios'
/**
* Export all action types here if you want to use the consts in the reducers
* eg: `export const FETCH_POSTS = 'FETCH_POSTS'`
*/
/**
* The action types exported above are subscribed to by the reducers.
* the functions exported below are used by the components themselves.
*/
/* Def... |
# -*- coding: utf-8 -*-
"""
idfy_rest_client.models.create_open_id_client_request
This file was automatically generated for Idfy by APIMATIC v2.0 ( https://apimatic.io )
"""
class CreateOpenIdClientRequest(object):
"""Implementation of the 'CreateOpenIdClientRequest' model.
TODO: type... |
import React from 'react'
import {
View,
StyleSheet,
Text,
TouchableHighlight,
} from 'react-native'
export const MovieItem = ({title, year, onPress})=>(
<TouchableHighlight
activeOpacity={0.8}
underlayColor='#eee'
onPress={onPress}
>
<View style={styles.container}... |
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/dict',
method: 'post',
data
})
}
export function del(id) {
return request({
url: 'api/dict/' + id,
method: 'delete'
})
}
export function edit(data) {
return request({
url: 'api/dict',
me... |
var searchData=
[
['width_0',['width',['../structyapre_1_1font_1_1_char_data.html#ad8846277bce83ed97bfa4a31873d608e',1,'yapre::font::CharData']]],
['worker_5fthreads_1',['worker_threads',['../namespaceyapre_1_1scheduler.html#ae9d7a907c14da93e85f76365c887d433',1,'yapre::scheduler']]]
];
|
/*! @license MIT ©2014-2016 Ruben Verborgh, Ghent University - imec */
/* An ExternalHdtDatasource uses an external process to query an HDT document. */
let Datasource = require('@ldf/core').datasources.Datasource,
fs = require('fs'),
path = require('path'),
N3Parser = require('n3').Parser,
RdfString =... |
if __name__ == '__main__':
fitsfile = '/media/Oceanus/UCT/Observing/data/Feb_2017/J0614-2725/SHA_20170209.0006.bff.fits'
w = wcs.WCS(naxis=2)
# see: https://www.aanda.org/articles/aa/full/2002/45/aah3859/aah3859.html
# for definitions
# array location of the reference point in pixels
w.wcs.crp... |
"""
LeetCode Problem: 1365. How Many Numbers Are Smaller Than the Current Number
Link: https://leetcode.com/problems/how-many-numbers-are-smaller-than-the-current-number/
Language: Python
Written by: Mostofa Adib Shakib
Time Complexity: O(NlogN)
Space Complexity: O(N)
"""
class Solution:
def smallerNumbersThanCur... |
// @flow
import * as TeamsGen from '../actions/teams-gen'
import * as Constants from '../constants/teams'
import * as I from 'immutable'
import * as Types from '../constants/types/teams'
import * as Flow from '../util/flow'
const initialState: Types.State = Constants.makeState()
const rootReducer = (state: Types.Stat... |
var searchData=
[
['tlscontext_1372',['TlsContext',['../classAws_1_1Crt_1_1Io_1_1TlsContextOptions.html#a1d7d91d71900833f4fa7d85bc6aacbbc',1,'Aws::Crt::Io::TlsContextOptions::TlsContext()'],['../classAws_1_1Crt_1_1Io_1_1TlsConnectionOptions.html#a1d7d91d71900833f4fa7d85bc6aacbbc',1,'Aws::Crt::Io::TlsConnectionOptions... |
var searchData=
[
['off_5ftarget',['OFF_TARGET',['../Read_8h.html#a0411cd49bb5b71852cecd93bcbf0ca2daadbd600af2549a2570745b73ae182b09',1,'Read.h']]]
];
|
# -*- coding: utf-8 -*-
#
# Python-OVH documentation build configuration file, created by
# sphinx-quickstart on Tue Aug 26 13:44:18 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
... |
import { cloneDeep } from 'lodash';
/**
* Default client values.
* MUST ALWAYS BE VALID
*
* Note: A 'positive number' money value can have more than
* two decimal places.
*/
const CLIENT_DEFAULTS = {
// Property Name | Default Value | Valid Value Description
current: {
// Current ... |
/*
* Copyright (C) 2020 Vanderbilt University, All rights reserved.
*
* Authors:
* Umesh Timalsina
*/
/* globals define */
/* eslint-env browser */
define([
'./ElectricCircuits.META',
'./ElectricCircuits.Constants'
], function (
ElectricCircuitsMETA,
CONSTANTS
) {
const POSITIONS = CONSTANTS.PO... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = R... |
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
'... |
from __future__ import annotations
from spark_auto_mapper_fhir.fhir_types.uri import FhirUri
from spark_auto_mapper_fhir.value_sets.generic_type import GenericTypeCode
from spark_auto_mapper.type_definitions.defined_types import AutoMapperTextInputType
# This file is auto-generated by generate_classes so do not edi... |
const AWS = require('aws-sdk');
const es = require('elasticsearch');
const esConnection = require('http-aws-es');
module.exports.dynamoToElasticSearch = (event, context, callback) => {
const myCredentials = new AWS.EnvironmentCredentials('AWS'); // Lambda provided credentials
const esC = es.Client({
hosts: 'se... |
// const profileDataArgs = process.argv.slice(2);
// const printProfileData = profileDataArr => {
// // This...
// for (let i = 0; i < profileDataArr.length; i += 1) {
// console.log(profileDataArr[i]);
// }
// console.log('================');
// // Is the same as this...
// profileDataArr.forEach(pr... |
require(`dotenv`).config()
module.exports = ({ netlifyOptions = {} }) => ({
plugins: [
{
resolve: `gatsby-source-netlify`,
options: {
apiKey: process.env.NETLIFY_ACCESS_KEY,
opts: netlifyOptions,
},
},
{
resolve: `gatsby-source-circleci`,
options: {
a... |
import path from 'path';
import {
MongoIdImplementation,
MongooseMongoIdInterface,
KnexMongoIdInterface,
PrismaMongoIdInterface,
} from './Implementation';
import { Text } from '@keystonejs/fields';
const pkgDir = path.dirname(require.resolve('@keystonejs/fields-mongoid/package.json'));
export const MongoId =... |
import * as tslib_1 from "tslib";
/**
* @license Angular v4.4.3
* (c) 2010-2017 Google, Inc. https://angular.io/
* License: MIT
*/
import { platformCoreDynamicTesting } from '@angular/compiler/testing';
import { Inject, Injectable, NgModule, createPlatformFactory } from '@angular/core';
import { TestComponentRender... |
import attr
from typing import Any
from jstruct import JList, JStruct
from typing import Optional, List
@attr.s(auto_attribs=True)
class Request:
partnerID: Optional[str] = None
requestID: Optional[str] = None
serviceCode: Optional[str] = None
timestamp: Optional[str] = None
msgDigest: Optional[st... |
const Constants = require('./constants');
const chalk = require('chalk');
const moment = require('moment');
const util = require('util');
class Logger {
static _cleanArgs(args) {
const texts = [];
for (const arg of args) {
if (typeof arg === 'string') {
texts.push(arg);
continue;
... |
let project = new Project('kex-notifications');
project.addSources('src');
resolve(project);
|
from flask_philo.db.postgresql.orm import BaseModel
from sqlalchemy import Column, ForeignKey, Integer, String
from sqlalchemy.orm import relationship
class Artist(BaseModel):
__tablename__ = 'artist'
name = Column(String(256))
description = Column(String(256))
albums = relationship('Album', backref=... |
import React from 'react'
import Icon from 'react-icon-base'
const FaHistory = props => (
<Icon viewBox="0 0 40 40" {...props}>
<g><path d="m37.3 20q0 3.5-1.4 6.7t-3.6 5.4-5.5 3.7-6.7 1.3q-3.8 0-7.3-1.6t-5.8-4.5q-0.2-0.3-0.2-0.5t0.2-0.5l3.1-3.1q0.2-0.2 0.5-0.2 0.4 0.1 0.5 0.3 1.7 2.1 4 3.3t5 1.1q2.4 0 4.5... |
import pandas as pd
import numpy as np
import psycopg2
from sklearn.model_selection import KFold
import Constants
import sys
from pathlib import Path
output_folder = Path(sys.argv[1])
output_folder.mkdir(parents=True, exist_ok=True)
# update database credentials if MIMIC data stored in postgres database
conn = psycop... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
config.py
"""
import numpy as np
import os
import json
# --- Set constants ---
TARGET_FPS = 60
TIME_STEP = 1.0 / TARGET_FPS
WIDTH, HEIGHT = 6, 4
BALL_RADIUS = 0.25
BORDER = 0.20
SIGMA = np.array([[0.2758276,0],[0,0.6542066]])
# hyper-parameter
T = 40
TIMEOUT = 960
ig_m... |
import { useState, useEffect } from 'react';
function useSocket(url, handleMessage = () => {}) {
const [webSocket] = useState(new WebSocket(url));
useEffect(() => {
webSocket.onopen = () => {
console.log('Connected');
}
webSocket.onmessage = (payload) => {
cons... |
window.__imported__ = window.__imported__ || {};
window.__imported__["masks/layers.json.js"] = [
{
"children": [
{
"children": [],
"id": "E295FDF2-8CFA-4D56-B282-EEE877F81682",
"image": {
"frame": {
"h... |
module.exports = {
displayName: 'domain-sport-category-admin',
preset: '../../../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
... |
/**
* Module dependencies.
*/
var env = process.env;
/**
* Expose heroku helper
*/
module.exports = {
protocol: env.PROTOCOL,
host: env.HOST,
publicPort: env.PUBLIC_PORT,
privatePort: env.PORT,
mongoUrl: env.MONGO_URL ? env.MONGO_URL : env.MONGOHQ_URL,
mongoUsersUrl: env.MONGO_USERS_URL,
'deploymen... |
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2021, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version ... |
# Copyright 2021 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 writing, ... |
window.bears = {}
chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
window.bears[request.url] = request.count
})
chrome.browserAction.onClicked.addListener(function (tab) {
chrome.tabs.create({url: 'popup.html'})
}) |
/**
* @fileoverview Convert text by binding expressions with context.
* @author NHN FE Development Lab <dl_javascript@nhn.com>
*/
'use strict';
var inArray = require('../array/inArray');
var forEach = require('../collection/forEach');
var isArray = require('../type/isArray');
var isString = require('../type/isStri... |
/* eslint-env jest */
const fs = require('fs')
const pem = require('.')
const endline = '-----'
const label = 'PEM'
const buf = Buffer.from('pemfile')
const pemfile = `${endline}BEGIN ${label}${endline}\r\n${buf.toString('base64')}\r\n${endline}END ${label}${endline}`
const realpem = fs.readFileSync('./pubkey.pem')
t... |
const Dropbox = require('dropbox')
const { blobToString } = require('cloudpas-utils')
const { DbStorage } = require('./db-storage')
const DB_PATH = '/db'
class DropboxDbStorage extends DbStorage {
constructor ({ accessToken }) {
super()
this._dbx = new Dropbox({ accessToken })
}
async loadDb () {
... |
/**
* @class Ext.field.trigger.Component
* @extend Ext.field.trigger.Base
* @alias trigger.component
* A form field trigger that contains a Component
*/
/**
* @cfg {Ext.Component} component
* @accessor
*/
|
HandlebarsIntl.__addLocaleData({"locale":"seh","pluralRuleFunction":function(n,ord){if(ord)return"other";return n==1?"one":"other"},"fields":{"year":{"displayName":"Chaka","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}},"year-short":{... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _fs = require('fs');
var _fs2 = _interopRequireDefault(_fs);
var _path = require('path');
var _path2 = _interopRequireDefault(_path);
var _ajv = require('ajv');
var _ajv2 = _interopRequireDefault(_ajv);
var _ValidationError = req... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _classCallCheck(instance, Construct... |
'use strict';
let chai = require('chai');
let expect = chai.expect;
let SchemaEvent = require('../lib/events/SchemaEvent');
let TopicEvent = require('../lib/events/TopicEvent');
describe('SchemaEvent', () => {
describe('construct instance', () => {
it('should extend a TopicEvent', () => {
let event = new ... |
import pytest
from mock import patch
from datetime import datetime, timezone
from robot_server.system import time, errors
@pytest.fixture
def mock_system_time():
return datetime(2020, 8, 14, 21, 44, 16, tzinfo=timezone.utc)
@pytest.fixture
def mock_set_system_time(mock_system_time):
with patch.object(time, ... |
import pyarrow as pa
import pyarrow.parquet as pq
from deco.sources import Dataset
import sys
import numpy as np
class ParquetWriter:
def __init__(self, parent, filename, column_names = None):
self.filename = filename
self.parent = parent
self.column_names = column_names
def ... |
// $Id: pseudoxmlhttp.js,v 1.1 2004/11/17 15:55:03 harryf Exp $
// Status: right now - hopelessly flawed - do not use
// Many ideas taken from JSRS: http://www.ashleyit.com/rs/
function PseudoXmlHttpRequest() {
if (!document.createElement) {
throw "document.createElement not supported by "+navigator.userA... |
import m from 'mithril';
import prop from 'mithril/stream';
import _ from 'underscore';
import { catarse } from '../api';
import h from '../h';
import models from '../models';
import nationalityRadio from '../c/nationality-radio';
import addressVM from '../vms/address-vm';
import addressFormInternational from './addres... |
/*!
* socket.io-node-client
* Copyright(c) 2011 LearnBoost <dev@learnboost.com>
* MIT Licensed
*/
/**
* Module dependencies.
*/
const transports = {
'websocket': require('./transports/websocket')
, 'htmlfile': require('./transports/htmlfile')
, 'xhr-polling': require('./transports/xhr-polling')
, 'xh... |
#Exercício046
from time import sleep
import emoji
print('\033[32mCONTAGEM REGRESSIVA PARA O ANO NOVO:\033[m')
sleep(1)
for c in range(10, 0 - 1, -1):#repete os números de 10 até o 0
print(c)
sleep(1)
print(emoji.emojize("\033[31m:boom::boom::boom:KABUM:boom::boom::boom:", use_aliases=True))
print(emoji.emojize(... |
from ecdsa import SigningKey, SECP256k1
import sha3
import qrcode
import socket
from threading import Thread
socket = socket.socket()
try:
serverIP = '127.0.0.1'
port = 3000
socket.connect((serverIP, port))
socket.send("Wallet Generator".encode('ascii'))
print("Connected to server")
except Except... |
(function($) {
var aux = {
// navigates left / right
navigate : function( dir, $el, $wrapper, opts, cache ) {
var scroll = opts.scroll,
factor = 1,
idxClicked = 0;
if( cache.expanded ) {
scroll = 1; // scroll is always 1 in full mode
factor = 3; // the width of the exp... |
import React, { Component } from "react";
import PropTypes from "prop-types";
import {
TouchableHighlight,
Platform,
TouchableNativeFeedback,
View
} from "react-native";
import { connectStyle } from "native-base-shoutem-theme";
import mapPropsToStyleNames from "../utils/mapPropsToStyleNames";
import variable f... |
var SGP4 = require('sgp4');
// Sample ISS TLE Data from March 26, 2016
var issLine1 = "1 25544U 98067A 16092.70325827 .00016717 00000-0 10270-3 0 9043";
var issLine2 = "2 25544 51.6422 79.5083 0002610 15.3326 344.7906 15.54337099 33086";
//
// ISS
// 1 25544U 98067A 16092.70325827 .00016717 00000-0 ... |
import setuptools
# Reads the content of your README.md into a variable to be used in the setup below
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name='shazib_seriesbox', # should match the package folder
packages=['shazib_s... |
// Set new default font family and font color to mimic Bootstrap's default styling
Chart.defaults.global.defaultFontFamily = 'Nunito', '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
Chart.defaults.global.defaultFontColor = '#858796';
// Pie Chart Example
var ctx = doc... |
import { getAttributes } from '@carbon/icon-helpers';
import PropTypes from 'prop-types';
import React from 'react';
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { retu... |
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const path = require("path");
module.exports = {
entry: ["eventsource-polyfill", "./src/index.js"],
output: {
path: path.resolve(__dirname, "dist"),
filename: "bundle.js",
},
module: {
rules: [
{
test: /\.js$/,
i... |
var Utils = require('./utils');
var ColumnSets = require('./columnSets');
/*
* First half of 1910
* All column sets:
*
* Sumburgh Head - Pembroke
* Scilly - Spurn Head
*
* Pressure Temp, Pressure Dry Wet:
*
* Haparanda - Thorshavn
*
* Max Min Rainfall:
*
* Haparanda - Skudesnaes
*/
... |
/*exported RuleResult */
/**
* Constructor for the result of Rules
* @param {Rule} rule
*/
function RuleResult(rule) {
'use strict';
/**
* The ID of the Rule whom this result belongs to
* @type {String}
*/
this.id = rule.id;
/**
* The calculated result of the Rule, either PASS, FAIL or NA
* @type {S... |
// Features:
// 1. category axis
// 2. ceil values of translate/x/y to int for half pixel antialiasing
// 3. multiline tick text
var tickTextCharSize;
function c3_axis(d3, params) {
var scale = d3.scale.linear(), orient = "bottom", innerTickSize = 6, outerTickSize, tickPadding = 3, tickValues = null, tickFormat, ti... |
const moment = require('moment')
const React = require('react')
const ReactDOM = require('react-dom')
const {getInstance} = require('../services/contract')
const {getDefaultAccount} = require('../services/account')
const {uploadJson} = require('../services/ipfs')
const Spinner = require('./Spinner.js')
const Comments... |
from typing import List
import datetime
import os
import random
import logging
import torch
from torch.optim.lr_scheduler import ReduceLROnPlateau
from flair.models.sequence_tagger_model import SequenceTagger
from flair.data import Sentence, Token, TaggedCorpus, Label
from flair.training_utils import Metric, init_out... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.modules.module import Module
from torch.nn.parameter import Parameter
def grl_hook():
def fun1(grad):
return -1 * grad.clone()
return fun1
class GraphConvolution(Module):
"""
Simple GCN layer, similar to https:... |
import React, { Component } from "react";
import API from "../utils/API";
import SearchForm from "../components/SearchForm";
import Table from "../components/Table";
class Search extends Component {
state = {
search: "",
results: [],
};
// When the component mounts, get a list of all available base empl... |
import React from 'react';
import createSvg from './utils/createSvg';
export default createSvg(<path d="M15 11V5l-3-3-3 3v2H3v14h18V11h-6zm-8 8H5v-2h2v2zm0-4H5v-2h2v2zm0-4H5V9h2v2zm6 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V9h2v2zm0-4h-2V5h2v2zm6 12h-2v-2h2v2zm0-4h-2v-2h2v2z" />, 'LocationCity', '0 0 24 24'); |
(function(d){d['cs']=Object.assign(d['cs']||{},{a:"Soubor nelze nahrát:",b:"Panel nástrojů obrázku",c:"Panel nástrojů tabulky",d:"Počet slov: %0",e:"Počet znaků: %0",f:"Kurzíva",g:"Tučné",h:"Citace",i:"Zvolte nadpis",j:"Nadpis",k:"Vložit obrázek nebo soubor",l:"Odkaz",m:"ovládací prvek obrázku",n:"Zvětšit odsazení",o:"... |
// gulp mcss plugin
var through = require('through2');
var gutil = require('gulp-util');
var path = require('path');
var fs = require('fs');
var PluginError = gutil.PluginError;
var extend = function(o1, o2, override){
for(var i in o2) if(override || o1[i] === undefined){
o1[i] = o2[i]
}
return o1;
}
modul... |
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: path.join(__dirname, 'src/docs'),
output: {
path: path.join(__dirname, 'docs'),
filename: 'bundle.js',
},
module: {
rules: [
{ test: /\.(js|jsx)$/, use: 'babel-loader', exclude: /node_modules/... |
import React from 'react';
const DISQUS_CONFIG = [
'shortname',
'identifier',
'title',
'url',
'category_id',
'onNewComment'
];
let __disqusAdded = false;
function copyProps(context, props, prefix = '') {
Object.keys(props).forEach(prop => {
context[prefix + prop] = props[prop];
});
if (typeof props.onNewC... |
/* global _ */
const defaultLocale = {
'GeolocateControl.FindMyLocation': _('My location', 'mapbox'),
};
export default defaultLocale;
|
"""Plotting utilities."""
import os
import matplotlib.patches as mpatches
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
def plot_and_compare(
unbiased_preds, biased_preds, site, cell_line, epoch, save_path, mode, bs
):
biased_ratio = np.round(100 * (np.sum(biased... |
import hypothesis
from hypothesis import strategies
from checkio.electronic_station.restricted_sum import checkio
@hypothesis.given(numbers=strategies.lists(strategies.integers()))
def test_checkio(numbers):
assert checkio(numbers) == sum(numbers)
|
var express = require('express');
var router = express.Router();
router.get('/', function(req,res,next){
res.render('register', { title: "Welcome" , activeLink: 'register' });
});
module.exports = router; |
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 25.3.3.2
description: >
A TypeError should be thrown if the generator is resumed abruptly while
running.
---*/
var iter;
function* g() {
iter.return(42);
}
i... |
'use strict';
goog.provide('Blockly.Arduino.LiquidCrystal');
goog.require('Blockly.Arduino');
Blockly.Arduino['liquidcrystal_config'] = function(block) {
var pinType = Blockly.Arduino.PinTypes.LCD;
var rs = block.getFieldValue('LCD_RS');
var en = block.getFieldValue('LCD_EN');
var d4 = block.getFieldValue(... |
const gulp = require('gulp');
const log = require('fancy-log');
const webpack = require('webpack');
const setProduction = (cb) => {
process.env.NODE_ENV = 'production';
if (cb) {
cb();
}
};
const webpackOnBuild = done => (err, stats) => {
if (err) {
throw new log.error(err);
}
... |
var is = require('joi');
module.exports = is.object({
_id: is.string().regex(/^country_[A-Z]{2}$/),
country_code: is.string().uppercase().length(2),
doc_type: 'country',
country_name: is.string().regex(/[A-Z].*/),
continent_code: is.string().uppercase().length(2),
});
|
import React from 'react';
import { mount } from 'enzyme';
import Upload from '..';
import Form from '../../form';
import { errorRequest, successRequest } from './requests';
import { setup, teardown } from './mock';
const delay = timeout => new Promise(resolve => setTimeout(resolve, timeout));
const fileList = [{
u... |
"""\
aug-cc-pV6Z basis set for use with PyQuante
Apr 7 2010 Jussi Lehtola
This program is part of the PyQuante quantum chemistry program suite.
PyQuante version 1.2 and later is covered by the modified BSD
license. Please see the file LICENSE that is part of this
distribution.
"""
basis_data = {1: [('S',
... |
# -*- coding: utf-8 -*-
"""A getter for UniProt."""
from xml.etree import ElementTree # noqa:S405
import requests
from bioversions.utils import Getter, VersionType
__all__ = [
"UniProtGetter",
]
class UniProtGetter(Getter):
"""A getter for UniProt."""
bioregistry_id = "uniprot"
name = "UniProt"... |
'''
Created on Jan 19, 2015
@author: jcabezas
'''
import unittest
import test_style
import test_utils
if __name__ == '__main__':
for module in [ test_style, test_utils ]:
suite = unittest.TestLoader().loadTestsFromModule(module)
unittest.TextTestRunner(verbosity=2).run(suite) |
import initialize, {
accountsPage,
accountPage,
app,
modalPage,
walletConnectPasteLinkModal,
wcClientMock,
wcConnectedPage,
} from "../common.js";
describe("WalletConnect", () => {
initialize("walletconnect", {
userData: "1AccountBTC1AccountETH",
});
it("goes to walletconnect modal", async () ... |
angular.module('app.controllers.lasthits', ['app.services.data', 'app.services.options'])
.controller('LastHitsController', ['$scope', 'Data', 'Options', function ($scope, Data, Options) {
console.log('cs chart controller', $scope)
//$scope.lastHitData = [];
Data.data.getLastHitData($scope);
$scope.$... |
'''This is a shell for orchestrating experiments on AWS EC 2'''
import os
import shutil
from functools import partial
from subprocess import run, call
from time import sleep, time
from joblib import Parallel, delayed
import boto3
from utils import *
import warnings
import yaml
warnings.filterwarnings(action='ignore... |
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
ext... |
module.exports = function zeros(expression) {
let arr = expression.split('*');
let pair={};
for (let i = 0; i < arr.length; i++) {
if (arr[i].slice(-2) == '!!') {
pair[arr[i] + '(' + i + ')'] = 2;
}
else {
pair[arr[i] + '(' + i + ')'] = 1;
}
};
let Couter2 = 0;
let Counter5 = 0;... |
const winston = require('winston');
const logger = winston.createLogger({
transports: [
new winston.transports.Console({ format: winston.format.simple() })
]
});
module.exports = logger;
|
'use strict'
module.exports = {
NODE_ENV: '"production"',
BASE_API: '"http://merchant-admin.topockettest.com/api"',
}
|
!function(e){function t(t){for(var n,l,c=t[0],s=t[1],i=t[2],u=0,d=[];u<c.length;u++)l=c[u],Object.prototype.hasOwnProperty.call(r,l)&&r[l]&&d.push(r[l][0]),r[l]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(m&&m(t);d.length;)d.shift()();return o.push.apply(o,i||[]),a()}function a(){for(var e,t... |
/**
* @author mrdoob / http://mrdoob.com/
*/
/*
///Face3对象的构造函数.用来在四维空间内通过参数a,b,c,d, normal, color, materialIndex创建一个四角面对象.Face4对象的功能函数采用
///定义构造的函数原型对象来实现.
///
/// NOTE:Face4方法已经删除,使用Face3替代,这里保留为了向下兼容.
///
/// 用法: var a=0,b=1,c=2,d=3;var normal = new THREE.Vector3( 0, 1, 0 ); var color = new THREE.Color( 0xffaa00 )... |
import React from 'react'
export default function anonymous(params
/**/) {
var evalColor = function () {
if (typeof params.color === 'function') {
return params.color;
} else {
return function () {
return params.color;
};
}
}();
var _extends = Object.assign || functi... |
try:
from pymoo.optimize import minimize
from pymoo.model.problem import Problem
using_pymoo = True
except ImportError:
using_pymoo = False
if using_pymoo:
from pymoo.optimize import minimize
from pymoo.model.problem import Problem
import numpy as np
from pymoo.factory import get_algor... |
/*
Template Name: STUDIO - Responsive Bootstrap 4 Admin Template
Version: 1.3.0
Author: Sean Ngu
Website: http://www.seantheme.com/studio/
*/
var handleToastsInit = function() {
$('[data-init="toast"]').toast('show');
};
var handleToastToggle = function() {
$(document).on('click', '[data-toggle="toast"]', function(... |