text stringlengths 3 1.05M |
|---|
import React from 'react';
import { IndexRoute, Route } from 'react-router';
import {
App,
Home,
NotFound,
} from './containers';
export default (store) => (
<Route path="/" component={App}>
{ /* Home (main) route */ }
<IndexRoute component={Home} />
{ /* Catch all route */ }
<Route pa... |
f = open("/dev/ttyUSB0",'r')
fw = open("incoming.dat",'w+',0)
line = f.readline()
fw.write('____________________________________________\n')
while line:
print (line),
line = f.readline()
|
"""
This module is used a central access point for all Qt classes and values.
"""
import PyQt5.Qt as QtBase
from PyQt5.Qt import * # noqa
from PyQt5.Qt import Qt as constants
__all__ = [
'constants',
*dir(QtBase),
]
|
import { observer, computed, get, set, getProperties, setProperties } from '@ember/object';
import { later, debounce } from '@ember/runloop';
import { reads, gt, or } from '@ember/object/computed';
import { inject as service } from '@ember/service';
import Controller from '@ember/controller';
import {
filterObject,
... |
/*
* @license
* Copyright (c) 2016 ryan hs <mr.ryansilalahi@gmail.com>
* MIT License
* https://github.com/ryanhs/TicTacToe3D.git
*/
(function(){
'use strict';
var GUI = function(containerID){
var scene, renderer, composer;
var camera, cameraControls;
var tiles = [];
var control = {};
var mouseClickLi... |
var callbackArguments = [];
var argument1 = function callback(a,b,c) {
callbackArguments.push(JSON.stringify(arguments))
argument3 = null
return a*b+c
};
var argument2 = 0;
var argument3 = function callback(a,b,c) {
callbackArguments.push(JSON.stringify(arguments))
base_1[0][1] = null
return a-b/c
};
var argume... |
/**
* 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
*/
// flowlint ambiguous-object-type:error
'use strict';
var _interopRequireDefault = require("@babel/runtime/helpe... |
"use strict";
angular.module('app.informes.supertel', ['ui.router'])
.config(function ($stateProvider, $urlRouterProvider) {
$urlRouterProvider.when('/informes/supertel/', '/informes/supertel');
$stateProvider
.state('app.informes.supertel', {
abstrac... |
const SQS = require('aws-sdk/clients/sqs');
const sqs = new SQS();
const FIFO_QUEUE_NAME = 'node_fifo-queue.fifo'; // The queue name must end with ".fifo" suffix if it is a FIFO queue.
const STANDARD_QUEUE_NAME = 'node_standard-queue';
const fifoQueueRequest = {
QueueName: FIFO_QUEUE_NAME,
Attributes: {
... |
export function isNumber(value) {
return typeof value === "number" && isFinite(value);
}
|
import React, { Component } from 'react';
import SvgIcon from 'material-ui/SvgIcon';
import { connect } from 'react-redux';
export class MidiIcon extends Component {
render() {
return (
<SvgIcon {...this.props} viewBox="0 0 100 100">
<path
fill="white"
d="M50 1.045C22.69 1.045.5... |
"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// tslint:disable
// TODO: cleanup this file, it's copied as is from Angular CLI.
Object.defineProperty... |
/*
* jquery UI
*/
if(dwr==null){var dwr={}}if(dwr.engine==null){dwr.engine={}}if(DWREngine==null){var DWREngine=dwr.engine}dwr.engine.setErrorHandler=function(a){dwr.engine._errorHandler=a};dwr.engine.setWarningHandler=function(a){dwr.engine._warningHandler=a};dwr.engine.setTextHtmlHandler=function(a){dwr.engine._te... |
import issues from './issues';
import milestones from './milestones';
import projects from './projects';
export default {
issues,
milestones,
projects,
};
|
"""
Summary.
Body
"""
|
/**
* Implement Gatsby's Browser APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/browser-apis/
*/
// You can delete this file if you're not using it
import './src/main.css'
import 'slick-carousel/slick/slick.css'
import 'bootstrap/dist/css/bootstrap.min.css'
// import "./src/css/bootstrap.min.css"
// imp... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.10/esri/copyright.txt for details.
//>>built
define({addTags:"Legg til tagger",noTagsFound:"Ingen eksisterende merker samsvarer.",required:"Ett eller flere merker kreves."}); |
from openmdao.utils.assert_utils import assert_rel_error
import unittest
import numpy as np
from openaerostruct.geometry.utils import generate_mesh
from openaerostruct.integration.aerostruct_groups import AerostructGeometry, AerostructPoint
import openmdao.api as om
from openaerostruct.utils.constants import grav_co... |
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/serverDeploy',
method: 'post',
data
})
}
export function del(ids) {
return request({
url: 'api/serverDeploy',
method: 'delete',
data: ids
})
}
export function edit(data) {
return request({
... |
import gdb
from .struct import GdbStructMeta
from .utils import TextTable, cast
from .cmd import UserCommand, CommandDispatcher
PAGESIZE = 0x1000
class TLBHi():
def __init__(self, val):
self.val = cast(val, 'unsigned long')
@property
def vpn(self):
return self.val & 0xffffe000
@pr... |
/**
* Copyright 2014 Qiyi Inc. All rights reserved.
*
* @file: Night.Action.js
* @path: demo/arm2/js/
* @desc: Action静态对象,声明对象以及绑定事件、对外接口等
* @author: jarry@baobaoyun.com
* @date: 2014-7-14
*/
define(
[],
function() {
Example = Arm.create('Module', {
name: 'Example'
... |
function changeStatus(id) {
var status = $('#status' + id).val();
$.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
type: 'GET',
url: url+'/'+id,
data: {
status: status
},
beforeSend: function() {
$('.preL').fad... |
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import Checkbox from '../checkbox'
import RadioButton from '../radio'
class NodeLabel extends PureComponent {
static propTypes = {
id: PropTypes.string.isRequired,
actions: PropTypes.array,
title: PropTypes.string,
label:... |
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
/*
* This example will create a Greengrass StreamManager stream called "SomeStream".
* It will then start writing data into that stream and StreamManager will
* automatically export the written data t... |
import { DataTypes, Model } from 'sequelize'
import bcrypt from 'bcrypt'
import jwt from 'jsonwebtoken'
import crypto from 'crypto'
export default class User extends Model {
static init(connection) {
super.init(
{
name: DataTypes.STRING,
email: DataTypes.STRING,
password: DataTypes.VIRTUAL,
passw... |
const Discord = require('discord.js')
const { DiscordBattleShip } = require("discord-battleship");
module.exports = {
name: 'battleship',
aliases: [],
reqPerm: "NONE",
args: "<member>",
desc: "Play a game of battleship!",
module: "Fun",
example: [],
cooldown: 10000,
run:... |
// flow-typed signature: 4c9507ccf7e9bd59f0a215c29da96a86
// flow-typed version: <<STUB>>/sequelize-cli_v^5.5.0/flow_v0.104.0
/**
* This is an autogenerated libdef stub for:
*
* 'sequelize-cli'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work wi... |
# Copyright 2015 The TensorFlow Authors. 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 by applica... |
import deepFreeze from 'deep-freeze';
import { getCurrentTypingUsers } from '../typingSelectors';
import { homeNarrow, privateNarrow, groupNarrow } from '../../utils/narrow';
describe('getCurrentTypingUsers', () => {
test('return undefined when current narrow is not private or group', () => {
const state = deep... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
const takeType = (array, ...types) => array.filter(item => types.indexOf(item.type) !== -1);
var _default = takeType;
exports.default = _default; |
import * as tslib_1 from "tslib";
import * as React from 'react';
import { StyledIconBase } from '../../StyledIconBase';
export var FilterBAndW = React.forwardRef(function (props, ref) {
var attrs = {
"fill": "currentColor",
};
return (React.createElement(StyledIconBase, tslib_1.__assign({ iconAttrs... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const queryRepeat_1 = require("./queryRepeat");
const schema_1 = __importDefault(require("../../../__fix... |
var _sttcl_time_8h =
[
[ "TimeDuration", "classsttcl_1_1_time_duration.html", "classsttcl_1_1_time_duration" ],
[ "operator*", "_sttcl_time_8h.html#ac4ff2ba744e1d90e108963519d499c96", null ],
[ "operator+", "_sttcl_time_8h.html#ae5353ab7569dd9c3a99e5d1a2542fbe8", null ],
[ "operator-", "_sttcl_time_8h.h... |
import math
import random
import time
import struct
import os.path
from os import listdir
from os.path import isfile, isdir, join, split, splitext
import json
from pathlib import Path
import threading
import numpy as np
import cv2
import hnswlib
import networkx as nx
import plyvel
from tensorflow.keras.applications i... |
"use strict";
var crypto = require('crypto');
var secure = require('../config/secure');
module.exports = function(sequelize, DataTypes) {
var User = sequelize.define('user', {
// uuid: {
// type: DataTypes.UUID,
// primaryKey: true
// },
username : DataTypes.STRING,
password : DataTypes.STRIN... |
import torch
import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self, context_shape, latent_shape):
super(Model, self).__init__()
self.LReLU = nn.LeakyReLU(0.01)
#self.linear_c1 = nn.Linear(context_shape, context_shape - int((context_shape - latent_s... |
import React from 'react';
import { Scrollbars } from 'react-custom-scrollbars';
import Modal from 'react-modal';
import './editCardModal.css';
const customStyles = {
content: {
top: '50%',
left: '50%',
right: 'auto',
bottom: 'auto',
marginRight: '-50%',
transform: ... |
import React from 'react';
import SvgIcon from '../../SvgIcon';
const MapsDirectionsTransit = (props) => (
<SvgIcon {...props}>
<path d="M12 2c-4.42 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h12v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-3.58-4-8-4zM7.5 17c-.83 0-1.5-.67-1.5-1.5S6.67 14 7.5 14s1.5.67 1.5 1... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["app"],{0:function(t,e,n){t.exports=n("56d7")},"028b":function(t,e,n){"use strict";var a=n("3f4d"),o=n.n(a);o.a},"18d5":function(t,e){t.exports="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLE... |
import Attempter from '../src/attempter';
import AttemptsFailedError from '../src/exceptions/attempts-failed';
import sinon from 'sinon';
import chai, { assert } from 'chai';
import chaiAsPromised from 'chai-as-promised';
chai.use(chaiAsPromised);
describe('Attempter', () => {
describe('#run', () => {
it('should c... |
import React from 'react'
const ThemeContext = React.createContext()
export default ThemeContext
export const ThemeConsumer = ThemeContext.Consumer
export const ThemeProvider = ThemeContext.Provider
|
import socket
import signal
import sys
import asyncio
from diskcache import Cache
from quick_serve.modules import Connection
class Server:
"""Server, the main component that handles listening for connections and accepting them
:param config: Configuration Class
:param log: Log Class
"""
def __ini... |
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import Footer from './components/footer'
Vue.config.productionTip = false
Vue.component('footer', Foote... |
// setTimeout() 将任务放入队列,时间到了从队列中回调运行
// 即异步:先存起来,时间到了在执行
// setTimeout() 只运行一次,时间有误差,每次运行会有本身运行误差
function f() {
var d = new Date();
console.log(d);
}
// 参数为毫秒
// setTimeout(f, 5000);
// console.log(new Date());
// 定时器 ../html/定时器.html
/*
var timer;
function startTime(){
var now = ne... |
exports.getResourceValue = function(name) {
return resourceValues[name] || 0;
}
exports.getUnitValue = function(name) {
return unitsValues[name] || 0;
}
let resourceValues = {
copper: 1/2.90,
lead: 1/2.90,
sand: 1/3.42,
coal: 1/2.52,
titanium: 1/2.23,
thorium: 1/1.99,
}
resourceValues.... |
const categories = {
'docs': {
name: 'Documentation',
id: 34567
},
'contributing': {
name: 'Contribute',
id: 43567
},
'guides': {
name: 'Guides',
id: 456789
},
'api': {
name: 'API',
id: 9456
}
}
export default categories; |
const web3 = require('../connections/web3')
const mongoose = require('mongoose')
const TR = require('../abi/TokenRegistry')
const Network = require('../models/network')
const Stake = require('../models/stake')
const Project = require('../models/project')
const User = require('../models/user')
const Task = require('../m... |
class EvaluationMetric(object):
"""
Evaluation Metric
"""
def __init__(self):
self.available_time = 0
self.reset()
def update_available_time(self, available_time):
self.available_time = available_time
def reset(self):
self.scheduled_testcases = []
self.... |
const path = require('path');
const fs = require('fs');
const express = require('express');
const bodyParser = require('body-parser');
const axios = require('axios');
const filePath = path.join(__dirname, process.env.TASKS_FOLDER, 'tasks.txt');
const app = express();
app.use(bodyParser.json());
const extractAndVer... |
"""Tests for cell_img.image_grid.ts_index_lib."""
import copy
from absl.testing import absltest
from cell_img.image_grid import ts_index_lib
import numpy as np
import pandas as pd
class Single1DTest(absltest.TestCase):
def test_get_index_individually(self):
lookup = ts_index_lib._Single1D(
['zero', '... |
import expect from 'expect';
import {JsonProperty, MapperEntity} from "../src/json-mapper-object";
class Student {
@JsonProperty('name')
fullName=void 0;
constructor() {
this.fullName = void 0;
}
}
class Address {
@JsonProperty('first-line')
firstLine;
@JsonProperty('second-line')... |
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
import React from 'react';
const RefreshIcon = props => (
<svg {...props.size || { width: '24px', height: '24px' }} {...props} viewBox="0 0 24 24">
{props.title && <title>{props.title}</title>}
<path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.8... |
import ProjectService from '@/services/project.service'
export const state = () => ({
projects: [],
selected: [],
current: {},
loading: false
})
export const getters = {
isDeletable(state) {
const isProjectAdministrator = project => project.current_users_role.is_project_admin
return state.selected.l... |
/**
* @license Apache-2.0
*
* Copyright (c) 2018 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... |
const _ = require('lodash');
const path = require('path');
const mkdirp = require('mkdirp');
module.exports = function() {
var props = this.props;
props._ = {
kebabCase: _.kebabCase
};
// Write a .gitignore
this._writeDotFiles = () => {
this.fs.copy(this.templatePath('.gitignore'), this.destinationPath('.gi... |
import React from 'react';
import { InfoLabel, Icon, Token } from 'fundamental-react';
import { Spinner, useGetList, useMicrofrontendContext } from 'react-shared';
import EventSubscriptions from 'shared/components/EventSubscriptions/EventSubscriptions';
import './Service.details.scss';
import { ServiceApiRules } from ... |
var express = require('express');
var sessions = require('client-sessions');
var bodyParser = require('body-parser');
var compression = require('compression');
var path = require('path');
var parseThings = require('./routes/parse');
var geocodeData = require('./routes/geocode');
var facebookData = require('./routes/fa... |
Router.configure({
layoutTemplate: 'layout'
});
Meteor.startup(function () {
if (Meteor.isClient) {
var location = Iron.Location.get();
if (location.queryObject.platformOverride) {
Session.set('platformOverride', location.queryObject.platformOverride);
}
}
});
Router.map(function() {
this.ro... |
#!/usr/bin/env node
const Bundler = require('parcel-bundler');
const express = require('express');
const cors = require('cors');
const { argv } = require('yargs');
const { copyFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } = require('fs');
const crypto = require('crypto');
const { spawnSync } = require... |
# Copyright 2016, 2017 Intel Corporation
#
# 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 ... |
from ..models import *
from django.contrib.auth.models import User, Group
from rest_framework import serializers
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('url', 'username', 'email', 'groups')
class GroupSerializer(serializers.HyperlinkedMod... |
import Component from 'metal-component';
import Soy from 'metal-soy';
import 'OtherComponent';
import templates from './MissingParams.soy';
import {Config} from 'metal-state';
class Test extends Component {
}
Test.STATE = {
name: Config.string().required(),
title: Config.string().required()
};
Soy.register(Test... |
# 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... |
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(t){"use strict";function e(){va... |
/* eslint-env mocha */
import React from 'react';
import PropTypes from 'prop-types';
import {
act,
buildQueries,
cleanup,
createEvent,
fireEvent as rtlFireEvent,
queries,
render,
} from '@testing-library/react/pure';
// holes are *All* selectors which aren't necessary for id selectors
const [queryDescri... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EntityMetadataValidator = void 0;
var MissingPrimaryColumnError_1 = require("../error/MissingPrimaryColumnError");
var CircularRelationsError_1 = require("../error/CircularRelationsError");
var DepGraph_1 = require("../util/DepGraph");... |
import sys
from elegantrl.agent import *
from elegantrl.env import PreprocessEnv, build_env
from elegantrl.run import Arguments, train_and_evaluate, train_and_evaluate_mp
"""[ElegantRL.2021.09.18](https://github.com/AI4Finance-LLC/ElegantRL)"""
def demo_continuous_action_off_policy(): # 2021-09-07
args = Argume... |
import logging
from google.appengine.ext import webapp
from google.appengine.ext.deferred import application as gae_deferred_application
import settings
def app(environ, start_response):
old_level = logging.root.level
logging.root.setLevel(settings.LOG_LEVEL)
return gae_deferred_application(environ, sta... |
""" Main entry point for an SME script """
import logging
import os
import sys
import matplotlib.pyplot as plt
import numpy as np
from scipy.stats import norm
from pysme import sme as SME
from pysme import util
from pysme.abund import Abund
from pysme.continuum_and_radial_velocity import match_rv_continuum
from pysme... |
// Generated by LiveScript 1.4.0
var os, fs, http, https, chalk, express, highland, commander, child_process, io, DaemonPlugin, program, i$, x$, ref$, len$, that, y$, runTests, checkModules;
os = require('os');
fs = require('fs');
http = require('http');
https = require('https');
chalk = require('chalk');
express = req... |
import os
import json
import logging
from botocore.vendored import requests
from slacker import Slacker
from dateutil.parser import parse
from datetime import timedelta
'''
token : OAuth access token for bot
channel : channel name in slack (including '#')
timeDifference : national standard time - GMT
'''
TOKEN = os.... |
var br = React.DOM.br;
var div = React.DOM.div;
var select = React.DOM.select;
var option = React.DOM.option;
var CountryState = React.createClass({
displayName: 'CountryState',
getInitialState: function() {
return({
countries: ["USA", "India"],
states: ["Arizona", "Colorado"]});
},
handl... |
/* globals __DEV__ */
import Phaser from 'phaser'
import config from '../config'
// import lang from '../lang'
/* game assets */
import Wall from '../sprites/Wall'
import Background from '../sprites/Background'
import Player from '../sprites/Player'
/* generators */
import AsteroidGenerator from '../generators/Astero... |
import React from 'react';
import styled from 'styled-components';
const Wrapper = styled.div`
position: relative;
min-width: 100%;
min-height: 10px;
`
const Animation = styled.div`
animation-duration: 1s;
animation-fill-mode: forwards;
animation-iteration-count: infinite;
animation-name: ... |
import React from "react";
import { TodoProvider } from "../TodoContext";
import { AppUI } from './AppUI';
function App() {
return (
<TodoProvider>
<AppUI/>
</TodoProvider>
);
}
export default App;
|
import os
import sys
import pkgutil
from collections import OrderedDict
pkg_dir = os.path.dirname(__file__)
for (module_loader, name, ispkg) in pkgutil.iter_modules([pkg_dir]):
pkgutil.importlib.import_module('.' + name, __package__)
# -----------------------------------------------------------------------------
... |
var baseURL="http://221.130.129.139:8888/webServer_bz";
//var baseURL="http://192.168.0.26:8080/webServer_bz";
//参数key 分页key
var keyPageNumber="pageNumber";
//ID key
var keyId="id";
var keyType="";
var pageNumber = 0;
var accessToktypeen = "";
var request={
//创造json对象
createParamJson:function(key,value){
var js... |
document.getElementsByTagName("button")[0].addEventListener("click", staircase);
document.getElementById("dataset").addEventListener("change", changeData);
document.getElementById("random").addEventListener("change", randomSubset);
/**
* Makes the first bar chart appear as a staircase.
*
* Note: use only the DOM AP... |
from quicktext.classifier.text_classifier import TextClassifier
from quicktext.engine.trainer import Trainer
|
"""
This file creates the required folder structure and setups the experiment data
This reads the london air quality data from:
../../datasets/london_air_pollution
and constructs train-test splits stored in pickles inside ./data/
"""
import pandas as pd
import numpy as np
import pickle
from pathlib import Path
im... |
"""HTTP Client library"""
import json
from .exceptions import handle_error
try:
# Python 3
import urllib.request as urllib
from urllib.parse import urlencode
from urllib.error import HTTPError
except ImportError:
# Python 2
import urllib2 as urllib
from urllib2 import HTTPError
from url... |
import { StyleSheet } from 'react-native'
export default StyleSheet.create({
pr_0: {
paddingRight: 0,
},
pr_4: {
paddingRight: 4,
},
pr_8: {
paddingRight: 8,
},
pr_12: {
paddingRight: 12,
},
pr_16: {
paddingRight: 16,
},
pr_20: {
paddingRight: 20,
},
pl_0: {
paddin... |
from __future__ import print_function
import tensorflow as tf
import tensorflow.keras as keras
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout, Flatten
from tensorflow.keras.layers import Conv2D, MaxPooling2D
import os
import numpy as np
# Adapted from: https://keras.io... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[167],{618:function(t,e,n){"use strict";n.r(e);var s=n(25),i=Object(s.a)({},(function(){var t=this.$createElement,e=this._self._c||t;return e("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[[e("div",[this._v("组件库更新日志")])]],2)}),[],!1,null,null,nul... |
function CreateModelCtrl($scope, $q, Session) {
$scope.module = {
name: '',
type: 'model',
description: ''
};
$scope.createModule = function () {
if (!Session.getActiveProject()) {
return $q.reject('No active project');
}
return Session.createNewModule($scope.module.name, $scope.mo... |
const mongoose = require('mongoose')
const Schema = mongoose.Schema;
const DirectorSchema = new Schema({
name:String,
surname:String,
createTime:{
type:Date,
default:Date.now
}
})
module.exports = mongoose.model('Director',DirectorSchema) |
function solve() {
let parent = document.getElementById('exercise').children;
let encodeSent = parent[0];
let decodeRead = parent[1];
let encodeSentButton = encodeSent.getElementsByTagName('button')[0];
encodeSentButton.addEventListener('click', encodeAndSent);
let decodeReadButton = decodeRea... |
const {
GraphQLString,
GraphQLList,
GraphQLNonNull,
GraphQLInputObjectType,
} = require('graphql');
/**
* @name exports
* @summary TestScriptmetadata Input Schema
*/
module.exports = new GraphQLInputObjectType({
name: 'TestScriptmetadata_Input',
description: '',
fields: () => ({
_id: {
type: require('./... |
'use strict';
var Curry = require("bs-platform/lib/js/curry.js");
var Sinon = require("wonder-bs-sinon/lib/js/src/sinon.js");
var Sinon$1 = require("sinon");
var Wonder_jest = require("wonder-bs-jest/lib/js/src/wonder_jest.js");
var JobAPI$Wonderjs = require("../../../../src/api/JobAPI.js");
var ArrayService$Wonderjs ... |
"""
Module for serialization and deserialization of KNX/IP packets.
It consists of a header and a body.
Depending on the service_type_ident different types of body classes are instanciated.
"""
from __future__ import annotations
from typing import TYPE_CHECKING
from xknx.exceptions import CouldNotParseKNXIP, Incompl... |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "mscgen");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT("empty chart",
"[k... |
# -*- coding: utf-8 -*-
#
# This file is part of Karesansui.
#
# Copyright (C) 2009-2012 HDE, 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 lim... |
import React, {useEffect, useState} from 'react';
import { AppState, BackHandler } from 'react-native';
import { Container } from './styles';
import io from './../../utils/io';
import Header from './../../components/Header';
import Content from './../../components/Content';
import SendForm from './../../components/Sen... |
// Copyright 2011 The Closure Library Authors. 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 requ... |
/**
* @flow
*/
import AppController from './app.controller';
import LocalStorageHelper from '../helpers/local-storage.helper';
describe('App Controller', function() {
let controller;
const saveBtn = {};
const getBtn = {};
const clearBtn = {};
describe('#constructor', function() {
it('should set up han... |
var reconnect = require('reconnect/sock')
var rEdit = require('r-edit')
var fs = require('fs')
var host = 'localhost'
var edit = rEdit()
edit.on('update', update)
var file = 'blah.js'
var writing = false, waiting = false
function update () {
if(writing) return waiting = true
writing = true; waiting = false
set... |
module.exports = require('./lib/sequelize-backend');
|
// https://github.com/kesh-lang/kesh/wiki/Documentation#operators
// answer = 42
answer === 42
// answer /= '42'
answer !== '42'
// answer ~= '42'
answer == '42'
// answer ~≠ '42'
answer != '42'
// not true
!true
// true and false
true && false
// true or false
true || false
// truthy: []
// if ~truthy then pri... |
import * as models from "../../../models";
import Promise from 'bluebird';
import userGroups from './../../../models/User/userGroups';
import * as contests from '../../contest/methods';
export function createGroupRequest(req, res, next) {
let params = Object.assign(
Object.assign(req.params, req.body), {
u... |