text stringlengths 3 1.05M |
|---|
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import whatkey, { unprintableKeys } from 'whatkey';
import {
ContainerMain, ContainerContent, Holder,
Input, InputArea, MainInput,
OutputLine, PreOutputLine, Prompt,
} from './styled-elements';
class Content extends Component {
stati... |
# -*- coding: utf-8 -*-
from django.db import models
from django.db.models import F
from django.contrib.auth import get_user_model
from django.conf import settings
from django.core.files.uploadedfile import InMemoryUploadedFile
from django.urls import reverse
from django.utils.encoding import python_2_unicode_compatibl... |
#!/usr/bin/python
import sys
import os
if len(sys.argv) == 0:
quit("Usage: %s [Version]" % os.path.dirname(__file__))
v = sys.argv[0]
os.chdir(os.path.dirname(__file__))
filedata = []
with open('build.gradle', 'rb') as f:
for l in f.readlines():
if "//$VERSION$" in l:
l = 'version = %s ... |
export { default } from './PostPage';
|
# 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 t... |
/*
This file is part of Ext JS 4.2
Copyright (c) 2011-2013 Sencha Inc
Contact: http://www.sencha.com/contact
Commercial Usage
Licensees holding valid commercial licenses may use this file in accordance with the Commercial
Software License Agreement provided with the Software or, alternatively, in accordanc... |
var languages = [
{
name: 'C',
color: '#555555',
link: 'https://en.wikipedia.org/wiki/C_(programming_language)',
summary: 'C is a general-purpose, procedural computer programming language.'
},
{
name: 'C#',
color: '#178600',
link: 'https://docs.microso... |
var path = require('path')
var webpack = require('webpack')
module.exports = {
devtool: 'source-map',
entry: [
'./index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webp... |
from .core import contour
from .ensemble import grid
from .interactive import interactive_contours, interactive_streamlines, Backend, Stream
|
import { Button, Heading3, Heading5 } from "@emjpm/ui";
import React from "react";
import { Box, Flex, Text } from "rebass";
export const MesureDeleteForm = (props) => {
const { handleSubmit, handleCancel } = props;
return (
<Flex flexWrap="wrap">
<Box bg="cardSecondary" p="5" width={[1, 3 / 5]}>
... |
"use strict";
/*
* This file is part of ORY Editor.
*
* ORY Editor 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.
*
* O... |
module.exports = function(sequelize, DataTypes) {
const today = new Date();
const OfficeNeighborScheduleResultDay = sequelize.define("OfficeNeighborScheduleResultDay", {
date: {
type: DataTypes.DATEONLY,
allowNull: false,
defaultValue: today
},
inOffi... |
$.fn.outerFind = function(selector) {
return this.find(selector).addBack(selector);
};
function updateId(target) {
if ($(target).find('.nav-tabs').length !== 0) {
$(target).outerFind('section[id^="tabs"]').each(function() {
var componentID = $(this).attr('id');
var $tabsNavItem =... |
import toDate from '../toDate/index.js';
import toInteger from '../_lib/toInteger/index.js';
/**
* @name roundToNearestMinutes
* @category Minute Helpers
* @summary Rounds the given date to the nearest minute
*
* @description
* Rounds the given date to the nearest minute
*
* ### v2.0.0 breaking changes:
*
* -... |
import logging
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
from sentry_sdk.integrations.logging import LoggingIntegration
from sentry_sdk.integrations.redis import RedisIntegration
from .base import * # noqa
from .base import env
# GENERAL
# ---------------------------------------... |
import FWCore.ParameterSet.Config as cms
BtagPerformanceESProducer_MISTAGCSVL = cms.ESProducer("BtagPerformanceESProducer",
# this is what it makes available
ComponentName = cms.string('MISTAGCSVL'),
# this is where it gets the payload from
PayloadName = cms.stri... |
#!/usr/bin/env node
require("regenerator-runtime/runtime");
const com = require("commander");
const program = new com.Command();
const pkg = require("../package.json");
const { start, stop } = require("./input");
program
.version(pkg.version)
.command("start")
.description("START background process for push-n... |
const CypressTestRailReporter = require('./src/cypress-testrail-reporter');
module.exports = CypressTestRailReporter;
|
import Helper, { states } from "./_helper";
describe("External | Shared | ORM | Has Many | Named Reflexive Explicit Inverse | delete", () => {
let helper;
beforeEach(() => {
helper = new Helper();
});
afterEach(() => {
helper.shutdown();
});
states.forEach(state => {
test(`deleting children up... |
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const CleanWebpackPlugin = require("clean-webpack-plugin");
const settings = {
distPath: path.join(__dirname, "dist"),
srcPath: path.join(__dirname, "src")
};
function srcPathExtend(subpath) {
return path.join(settings... |
var app = app || {};
(function(){
app.TestButton = React.createClass({displayName: "TestButton",
handleClick: function() {
this.props.submitTestTask(this.props.btnType);
},
render: function() {
return ( React.createElement("button", {onClick: this.handleClick,
... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.checkIndexUiState = checkIndexUiState;
var _capitalize = _interopRequireDefault(require("./capitalize"));
var _logger = require("./logger");
var _typedObject = require("./typedObject");
function _interopRequireDefault(obj) { ret... |
module.exports = function warmup(temperature) {
// your implementation here
var t=(temperature*9)/5+32;
return t;
};
|
import path from "path"
import { Logger } from "@cantrips/core"
export default class Module {
constructor(moduleName, version) {
this.name = moduleName
this.version = version
}
async _loadModule(delegate) {
return new Promise(resolve => {
Logger.debug(`Loading module: ${this.name} from ${this... |
#!/usr/bin/env python3
# Copyright (c) 2014-2016 The MagnaChain Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the zapwallettxes functionality.
- start two magnachaind nodes
- create two transactions on no... |
'''
Create a function called 'getInt' that works like the built-in function 'input'.
The function should take only a integer as parameter.
'''
def readInt(text: str):
number = input(text).strip()
while number.isdigit() is not True:
print('\033[31mError\033[m. Please choose a \033[32mvalid int... |
// @flow
import io from 'socket.io-client';
import feathers from '@feathersjs/client';
type ClientApp = {
client: ?Object,
socket: ?Object,
};
const app: ClientApp = {
client: null,
socket: null,
};
export default function feathersClient() {
if (typeof window !== 'undefined' && !app.client) {
const socket = i... |
/*
@licstart The following is the entire license notice for the JavaScript code in this file.
The MIT License (MIT)
Copyright (C) 1997-2020 by Dimitri van Heesch
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to... |
import random
import string
import os
from hangman_photos import HANGMAN_PHOTOS
LOGO = """
_ _
| | | |
| |__| | __ _ _ __ __ _ _ __ ___ __ _ _ __
| __ |/ _` | '_ \ / _` | '_ ` _ \ / _` | '_ \
| | | | (_| | | | | (_| | ... |
// Copyright Joyent, Inc. and other Node contributors.
//
// 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, modi... |
# 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 u... |
import { createContext } from 'react';
export const SuperFieldContext = createContext({
id: null,
hasError: false,
setError: null,
isFocused: false,
onFocus: null,
onBlur: null,
onInputFill: null,
onInputEmpty: null,
isInputFilledIn: false,
isShrank: false,
onLabelShrank: null,
onLabelExpand: null,
isRead... |
angular.module('courseViewer').component('courseViewerApp', {
templateUrl: 'templates/course-viewer-app.html'
}); |
import { GET_ERRORS, CLEAR_ERRORS } from '../actions/types';
const initialState = {
msg: false,
status: "",
id: ""
}
export default function(state = initialState, action) {
switch(action.type) {
case GET_ERRORS:
return {
msg: action.payload.msg,
status: action.payload.st... |
import React from 'react';
import FloatingScreenshot from './components/FloatingScreenshot';
function HomeImageSection() {
return (
<div>
<FloatingScreenshot />
<style jsx>{`
`}</style>
</div>
);
}
export default HomeImageSection;
|
/*
* 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 ... |
// modules are defined as an array
// [ module function, map of requires ]
//
// map of requires is short require name -> numeric require
//
// anything defined in a previous bundle is accessed via the
// orig method which is the require for previous bundles
// eslint-disable-next-line no-global-assign
parcelRequire =... |
from datetime import datetime
import dateutil.parser
import itertools
import requests
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.template.defaultfilters import... |
from temboo.Library.Uber.User.GetActivity import GetActivity, GetActivityInputSet, GetActivityResultSet, GetActivityChoreographyExecution
from temboo.Library.Uber.User.GetProfile import GetProfile, GetProfileInputSet, GetProfileResultSet, GetProfileChoreographyExecution
|
"""
Create the numpy.core.multiarray namespace for backward compatibility. In v1.16
the multiarray and umath c-extension modules were merged into a single
_multiarray_umath extension module. So we replicate the old namespace
by importing from the extension module.
"""
import functools
import warnings
from . import o... |
import Vue from 'vue'
import Vuex from 'vuex'
import finish from './finish.js';
import photo from './photo.js';
import picture from './picture.js';
import video from './video.js';
import goods from './goods.js';
import setting from "./setting";
import menus from "./menus";
import getters from './getters.js';
Vue.use(V... |
// @author breunigs
// @name Draw tools
// @category Draw
// @version 0.8.0
// @description Allow drawing things onto the current map so you may plan your next move. Supports Multi-Project-Extension.
// HOOK: pluginDrawTools
// custom hook for draw tools to share it's activity with o... |
# -*- coding: utf-8 -*-
import os
import subprocess
import sys
from time import sleep
import six
import six.moves.urllib.error
import six.moves.urllib.parse
import six.moves.urllib.request
from collective.solr.utils import activate
from plone.api.portal import set_registry_record
from plone.app.contenttypes.testing im... |
###############################################################################
##
## Copyright (C) 2014-2016, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## ... |
import React, { Component } from 'react';
import styled from 'styled-components';
import posed, { PoseGroup } from 'react-pose';
import TodoItem from './TodoItem';
const StyledTodoList = styled.div`
position: absolute;
top: calc(50% + 2em);
height: calc(50% - 2em);
left: 50%;
width: 40%;
transform: trans... |
/*
* Some CBOR testcases converted from extras/cbor Makefile
*/
function dec(hexInput, expect) {
var t1 = CBOR.decode(Duktape.dec('hex', hexInput));
var t2 = Duktape.enc('jx', t1);
var t3 = Duktape.enc('jx', expect);
print(hexInput, t2, t3);
if (t2 !== t3) {
print('MISMATCH');
}
}
f... |
import { fixture } from "can";
fixture("POST /services/users", function(request, response){
console.log('[fixture] request', request);
if(!request.data.password){
response(400, '{type: "Bad Request", message: "Can not create a user without a password"}');
}else{
response({
id: 123,
email: request.data.em... |
const errors = require('@feathersjs/errors');
module.exports = async function(context) {
try {
const user = await context.app.service('user').get(context.data.userId);
const friend = await context.app.service('user').get(context.data.friendId);
let userChatRooms = await context.app.service('user-chat-r... |
export const c_alert_m_inline__icon_Color = {
"name": "--pf-c-alert--m-inline__icon--Color",
"value": "#009596",
"var": "var(--pf-c-alert--m-inline__icon--Color)"
};
export default c_alert_m_inline__icon_Color; |
import React from "react";
import PropTypes from "prop-types";
import TextRenderer from "./internals/TextRenderer";
/**
* The 'NewScrambler' will replace the current 'Scrambler' component.
* The internals of the current Scrambler was split since it simply did
* too much on its own and did not allow for a more wide... |
angular.module("managerApp").config($stateProvider => {
$stateProvider
.state("dbaas.logs.detail.aliases", {
url: "/aliases",
redirectTo: "dbaas.logs.detail.aliases.home",
views: {
logsContent: {
templateUrl: "app/dbaas/logs/detail/alia... |
/*
* Copyright (c) 2009 Tom Coote (http://www.tomcoote.co.uk)
* This is licensed under GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free... |
const yaml = require('js-yaml');
const fs = require('fs');
const os = require('os');
const path = require('path');
const lodash = require('lodash');
// defaults used in case of error point to the localhost daemon & its certs
let self_hostname = 'localhost';
global.daemon_rpc_ws = `wss://${self_hostname}:25470`;
global... |
import React from "react"
import { Col } from "react-bootstrap"
import styled from "styled-components"
const Section = styled.section`
background-color: #F1F1E9;
padding: 80px 0;
`
const CustomContainer = styled.div`
max-width: 650px;
margin: 0 auto;
padding-right: var(--bs-gutter-x,.75rem);
... |
module.exports=function(opt){
opt=opt||{};
var error=opt.error||console.error;
var debug=opt.debug||false;
var pattern=/\{{2}[\s\S]+?\}{2}/g;
return function(req,res,next){
if(res.body && pattern.test(res.body)){
res.body=res.body.replace(pattern,function(block){
... |
"""
Write a function to find the longest common prefix
string amongst an array of strings.
If there is no common prefix, return an empty string "".
Example 1:
Input: ["flower","flow","flight"]
Output: "fl"
Example 2:
Input: ["dog","racecar","car"]
Output: ""
Explanation: There is no common prefix among the input str... |
exports.menu3 = (id, A187, tampilTanggal, whatsapp, youtube, tampilWaktu, instagram, nomer, aktif) => {
return `
❉──────────❉
*${A187}*
❉──────────❉
📆 *${tampilTanggal}*
📌STATUS BOT AKTIF: *${aktif}*
╔════════════════
║ *MENU3*
╠════════════════
║╭──❉ *18+* ❉──
║│➸ _*!indohot*_
║│➸ ... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = require('babel-runtime/helpers/extends');
var _extends3 = _interopRequireDefault(_extends2);
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
var _objectWithoutProperties3 = _inte... |
var files_dup =
[
[ "include", "dir_d44c64559bbebec7f509842c48db8b23.html", "dir_d44c64559bbebec7f509842c48db8b23" ],
[ "src", "dir_68267d1309a1af8e8297ef4c3efbcdba.html", "dir_68267d1309a1af8e8297ef4c3efbcdba" ],
[ "test", "dir_13e138d54eb8818da29c3992edef070a.html", "dir_13e138d54eb8818da29c3992edef070a" ... |
import io from "socket.io-client";
export const socketService = {
connect,
};
//window.location.hostname
function connect() {
return new Promise((resolve, reject) => {
const socket = io("http://localhost:5000", {
query: { token: JSON.parse(localStorage.getItem("user")).token },
});
socket.on("con... |
const assert = require('assert');
const autocomplete = require('./../app/index');
describe('CitiesHandler', () => {
it('should return results', () => {
assert.deepEqual(
autocomplete.search(''),
[]);
assert.deepEqual(
autocomplete.search('Pr'),
[]);
... |
import PropTypes from 'prop-types';
import React from 'react';
import NumberBlockWrapper from './NumberBlockWrapper';
import Button from './Button';
import Input from './Input';
class NumberBlock extends React.Component {
constructor(props) {
super(props);
this.state = {
editingValue: null,
}
}
... |
var dustObj = function()
{
this.x = []
this.y = []
this.amp = []
this.Num = []
this.alpha
}
dustObj.prototype.num = 30
dustObj.prototype.init = function()
{
for(var i = 0; i < this.num; i++)
{
this.x[i] = Math.random() * canWidth
this.y[i] = Math.random() * canHeight
this.amp[i] = Math.rando... |
var dir_42761cbf96bc5660f72a2d1a926765c0 =
[
[ "has_operator.h", "has__operator_8h_source.html", null ]
]; |
#!/usr/bin/env python2
# The Notices and Disclaimers for Ocean Worlds Autonomy Testbed for Exploration
# Research and Simulation can be found in README.md in the root directory of
# this repository.
import rospy
import actionlib
from control_msgs.msg import FollowJointTrajectoryAction, FollowJointTrajectoryGoal
cla... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
Web2Py framework modules
========================
"""
__all__ = ['A', 'B', 'BEAUTIFY', 'BODY', 'BR', 'CAT'... |
(function($) {
"use strict";
// Page Preloader
$(window).load(function() {
$(".preloader_1").delay(300).fadeOut();
$("#loader").delay(600).fadeOut("slow");
});
// Parallax
$.stellar({
horizontalScrolling: false,
verticalOffset: 100
});
// Menu Hover
$('.dropdown').on('show.bs.dro... |
// ------------------------------------
// Constants
// ------------------------------------
export const ITEMS_HAS_ERRORED = 'ITEMS_HAS_ERRORED'
export const ITEMS_IS_LOADING = 'ITEMS_IS_LOADING'
export const ITEMS_FETCH_DATA_SUCCESS = 'ITEMS_FETCH_DATA_SUCCESS'
// ------------------------------------
// Actions
// -... |
__author__ = 'ychfan'
# Interface for accessing the YouTubeVIS dataset.
# The following API functions are defined:
# YTVOS - YTVOS api class that loads YouTubeVIS annotation file and prepare data structures.
# decodeMask - Decode binary mask M encoded via run-length encoding.
# encodeMask - Encode binary mask... |
"use strict";
module.exports.mixin = function mixin(target, source) {
const keys = Object.getOwnPropertyNames(source);
for (let i = 0; i < keys.length; ++i) {
Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i]));
}
};
module.exports.wrapperSymbol = Symbol("wrappe... |
'use strict';
const autoprefixer = require('autoprefixer');
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const InterpolateHtmlPlugin = require('react-dev-utils... |
const findTabbable = require('../helpers/tabbable');
module.exports = function(node, event) {
const tabbable = findTabbable(node);
if (!tabbable.length) {
event.preventDefault();
return;
}
const finalTabbable = tabbable[event.shiftKey ? 0 : tabbable.length - 1];
const leavingFinalTabbable = (
finalTabbable ... |
/**
* Exercice sur les chaines de caractères.
* Trouvez la façon de faire la plus optimal.
* Il peut y avoir plusieur façon de faire.
*/
var tailleString = function (texte) {
return texte.length;
}
var remplaceECar = function (texte) {
return texte.replace("e"," ");
}
var concatString = function (texte1, te... |
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
function minimumNumber(arr) {
const countOfNumbers = Number(arr[0]);
arr.shift();
let sortedArray = arr.sort((a, b) => {
return a - b;
});
let minimumNum = sortedArray[0];
console.log(minimumNum);
}
minimumNumber([2, 100, 99]);
minimumNumber([3, -10, 20, -30]);
minimumNumb... |
const { vec2 } = require('gl-matrix');
const range = require('lodash/range');
const SVG = require('../../utils/SVG');
module.exports = () => {
const DURATION = 3;
const WIDTH = 30;
const HEIGHT = 30;
const NUM_LINES = 20;
const svg = SVG.svg({
dataAnimationDuration: `${DURATION}s`,
viewBox: '-50 -... |
// @flow
import {
Uniform1i,
Uniform1f,
Uniform2f,
UniformMatrix4f
} from '../uniform_binding';
import {extend} from '../../util/util';
import browser from '../../util/browser';
import type Context from '../../gl/context';
import type Painter from '../painter';
import type {UniformValues, UniformLocat... |
memberSearchIndex = [{"p":"org.opensextant.extractors.geo.rules","c":"NameRule","l":"A1_suffixes"},{"p":"org.opensextant.extractors.geo.rules","c":"NameRule","l":"A2_suffixes"},{"p":"org.opensextant.extractors.geo","c":"PlaceCandidate","l":"ABBREVIATION_MAX_LEN"},{"p":"org.opensextant.util","c":"SolrProxy","l":"add(Col... |
export class HttpService {
_handleErrors(res){
if(!res.ok) throw new Error(res.statusText);
return res;
}
get(url){
return fetch(url)
.then(res => this._handleErrors(res))
.then(res => res.json());
}
} |
"""Tests over MTCNN detector"""
#pylint: skip-file
import os
import json
import pytest
import numpy as np
from fdet.utils.errors import DetectorValueError
import fdet
def _assert_detections(dets_a, dets_b):
for det_a, det_b in zip(dets_a, dets_b):
assert det_a['box'] == pytest.approx(det_b['box'], rel=0... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ic_extension_off = void 0;
var ic_extension_off = {
"viewBox": "0 0 24 24",
"children": [{
"name": "rect",
"attribs": {
"fill": "none",
"height": "24",
"width": "24"
},
"children": []
}, {
... |
$(function(){
/*异步加载权限信息 生成权限树形*/
authFunction();
$('.skin-minimal input').iCheck({
checkboxClass: 'icheckbox-blue',
radioClass: 'iradio-blue',
increaseArea: '20%'
});
/*提交表单添加角色*/
$("#saveRole").click(function(){
var name=$("#RoleName").val();
var code=$("#code").val();
var description = $("#d... |
'use strict';
/* jshint ignore:start */
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
/* jshint ignore:end */
var _ = require('lodash'); /* jshint ignore:line */
var Holodeck = require('../../../../holodeck'); /* jshint ignore:line */
var Request... |
"""This file contains author specific functions which are needed when parsing the bibfile.
"""
import glob
import codecs
import re
import os
def get_list_researchers(members_path):
"""Get all researched md files available in given member path
Checks if pub_name is availabe in md file and if true uses that a... |
const Casco = require('casco');
require('dotenv').config();
const app = Casco();
// middleware router function
// the only thing a router needs to do is set req.route and call next()
// if req.route is set, you can use named app handlers as shown below
function router(req, res, next) {
// Lets assume a protocol li... |
import React from "react";
import Svg, { Path } from "react-native-svg";
const RecF = ({ color, ...props }) => (
<Svg viewBox="0 0 64 64" {...props}>
<Circle cx={32} cy={32} r={32} fill={color} />
</Svg>
);
export default RecF;
|
# coding: utf-8
# In[1]:
import QUANTAXIS as QA
import threading
import pandas as pd
import time
# In[2]:
# utf-8
import QUANTAXIS as QA
market = QA.QA_Market(if_start_orderthreading=True)
portfolio = QA.QA_Portfolio()
# 创建两个account
# 这里是创建一个资产组合,然后在组合里面创建两个account 你可以想象成股票里面的两个策略账户
# 然后返回的是这个账户的id
a_1 = po... |
import math
import numpy as np
EPS = 1e-8
class MCTS():
"""
This class handles the MCTS tree.
"""
def __init__(self, game, nnet, args):
self.game = game
self.nnet = nnet
self.args = args
self.Qsa = {} # stores Q values for s,a (as defined in the paper)
sel... |
const Recaptcha = require('recaptcha-verify');
const url = require("url");
const crypto = require("crypto");
const util = require("../../util");
module.exports = function (vars, pool) {
const recaptcha = new Recaptcha({
secret: vars.captcha.key,
verbose: true
});
return function (req, res... |
import * as firebase from 'firebase';
import { push } from 'react-router-redux';
import { browserHistory } from 'react-router';
import locStore from 'store';
import { firebaseAuth, firebaseDb } from '../firebase/firebase';
import * as types from './types';
import { LOCAL_STORAGE_AUTH_STATE_KEY } from '../constants/gen... |
from boa3.builtin import public
from boa3.builtin.interop.role import Role, get_designated_by_role
from boa3.builtin.type import ECPoint
@public
def main(role: Role, index: int) -> ECPoint:
return get_designated_by_role(role, index)
|
var Alloy = require('alloy'),
Backbone = Alloy.Backbone,
_ = Alloy._;
<%= WPATH %>
function Controller() {
<%= Widget %>
require('alloy/controllers/' + <%= parentController %>).apply(this, Array.prototype.slice.call(arguments));
var <%= parentVariable %> = arguments[0] ? arguments[0]['<%= parentVariable %>'] :... |
# -*- coding: utf-8 -*-
"""
Pillar data from vCenter or an ESXi host
.. versionadded:: 2017.7.0
:depends: - pyVmomi
This external pillar can pull attributes from objects in vCenter or an ESXi host and provide those attributes
as pillar data to minions. This can allow for pillar based targeting of minions on ESXi ho... |
/**
* @license Apache-2.0
*
* Copyright (c) 2020 The Stdlib 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 a... |
# -*- coding: utf-8 -*-
# Copyright © 2012-2015 Roberto Alsina and others.
# 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 t... |
/**
* @fileoverview Shim on Blockly to permit shadow blocks in flyout
* @author miguel.ceriani@gmail.com (Miguel Ceriani)
*/
'use strict';
var Blockly = require('blockly');
/**
* Show and populate the flyout.
* @param {!Array|string} xmlList List of blocks to show.
* Variables and procedures have a custom s... |
import { StyleSheet } from 'react-native';
let styles;
export default StyleSheet.create({
container: {
flex: 1,
},
developers: {
padding: 20,
fontSize: 20,
color: '#657786',
borderWidth: 1,
borderColor: '#E1E8ED',
fontWeight: 'bold'
},
developersContainer: {
ba... |
/*
* Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
*/
define([], function () {
return {};
});
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["about"],{f820:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},s=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"about"},[n("h1",[t._v("This is an about page")]... |
import test from 'ava'
import { graphql } from 'graphql'
import schemaRelay from '../test-api/schema-paginated/index'
import { partial } from 'lodash'
import { errCheck } from './_util'
const run = partial(graphql, schemaRelay)
test('it should get a scalar list and resolve it', async t => {
const { data, errors } =... |