text stringlengths 3 1.05M |
|---|
// MIT License
//
// Copyright (c) 2019 Jayne Doe
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, m... |
/*
Empezamos con ES6!
https://flaviocopes.com/es6
*/
// ECMAScript o ES, es un conjunto de especificaciones que salen año tras año.
// ECMAScript6 o ES2015, fue el conjunto de features más grande hasta el momento.
// Concepto de scope o ámbito. Si qu
var carrera = 'Front end avanzado'
function mostrarNombres() {
... |
export default {
route: {
dashboard: '系统主页',
profile: '个人中心'
},
navbar: {
setting: '系统设置',
github: '项目地址',
logOut: '退出登录',
profile: '个人中心',
docs: '项目文档',
theme: '换肤',
size: '布局大小',
deleteCache: '清除缓存'
},
login: {
title: 'zuihou-admin-cloud',
logIn: '立即登录',
t... |
const orm = require("../config/orm.js");
const burger = {
all: function(cb) {
orm.selectAll("burgers", function(res) {
cb(res);
});
},
// The variables cols and vals are arrays.
create: function(cols, vals, cb) {
orm.insertOne("burgers", cols, vals, function(res) {
cb(res);
... |
m1 = scirun_add_module("CreateLatVol")
m2 = scirun_add_module("ReportFieldInfo")
scirun_connect_modules(m1, 0, m2, 0)
scirun_execute_all()
f1 = scirun_get_module_input_value_by_index(m2, 0)
m3 = scirun_add_module("ReadField")
scirun_set_module_state(m3, "Filename", "%SCIRUNDATADIR%/Fields/density.pts")
m4 = scirun_add... |
const USER_MAP = {
loginData: {"success":true, "data": { access_token: '123456' }},
logoutData: {"msg":"已退出登录","code":200,"data":null,"success":true}
}
export const login = req => {
return USER_MAP.loginData
}
export const logout = req => {
return USER_MAP.logoutData
}
|
export {default} from './Favorites' |
"""FI-specific Form helpers."""
from __future__ import unicode_literals
import re
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, RegexField, Select
from django.utils.translation import ugettext_lazy as _
from .fi_municipalities import ... |
require('@babel/register');
({
ignore: /node_modules/
});
require('@babel/polyfill');
const HDWalletProvider = require('@truffle/hdwallet-provider');
let mnemonic = 'gloom problem brown turtle chaos rare remember essay gloom clinic tail gauge';
let testAccounts = [
"0x4672ee50cbd7e1099ec10116c9908f01540103686054... |
# Copyright 2020 kubeflow.org.
#
# 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,... |
'use strict';
module.exports = {
id: 'test',
label: 'Test',
component: {
getDefaultProps: function getDefaultProps() {
return {
content: {
text: 'Test'
}
};
},
getMenuItems: function getMenuItems() {
return [{ id: 'test', label: 'Test' }];
},
render... |
import Block from "./ImageUpload";
import Button from "./ImageUploadButton";
import './ImageUpload.scss';
const Plugin = {
installBlocks(config) {
config.use(Block);
},
installBarButton(config) {
config.use(Button);
},
};
export default Plugin;
|
import React, { Component } from 'react'
import { Button, Dropdown, Form, Input, Table, Loader } from 'semantic-ui-react'
import '../../../Assets/Css/AdminTools/ManageUsers.css'
import { Link } from "react-router-dom"
import i18n from '../../../Component/i18n/i18n';
export class ManageAlteredStatus extends Component {... |
/** When your routing table is too long, you can split it into small modules **/
import Layout from '@/layout'
const goodsRouter = {
path: '/goods',
component: Layout,
redirect: '/goods',
name: '商品管理',
meta: {
title: '商品管理',
icon: 'nested'
},
children: [
{
path: 'add',
component:... |
var Opcodes;
(function (Opcodes) {
// Statements
Opcodes[Opcodes["Text"] = 0] = "Text";
Opcodes[Opcodes["Append"] = 1] = "Append";
Opcodes[Opcodes["Comment"] = 2] = "Comment";
Opcodes[Opcodes["Modifier"] = 3] = "Modifier";
Opcodes[Opcodes["Block"] = 4] = "Block";
Opcodes[Opcodes["Component"]... |
var searchData=
[
['rand_5fhalfpoint_363',['RAND_HALFPOINT',['../sim-operations_8c.html#a6db8fbe9028cc259012cbdf075c222b2',1,'RAND_HALFPOINT(): sim-operations.c'],['../group__maths.html#ga6db8fbe9028cc259012cbdf075c222b2',1,'RAND_HALFPOINT(): sim-operations.h']]],
['rows_364',['rows',['../struct_decimal_m... |
import "./FilterToolbar.scss";
import React, { useState, useContext, useEffect } from "react";
import { Link } from "react-router-dom";
import { API_URL } from "../../../constants";
import FilterContext from "../../../components/FilterContext";
import Autocomplete from "../../../components/Autocomplete";
import Fallbac... |
// Corner detection based on Leaflet Draw's Edit.Rectangle.js Class:
// https://github.com/Leaflet/Leaflet.draw/blob/master/src/edit/handler/Edit.Rectangle.js
import Edit from './L.PM.Edit';
Edit.Rectangle = Edit.Poly.extend({
// initializes Rectangle Markers
_initMarkers() {
const map = this._map;
const ... |
"""
Project: stock_prediction
File: data_test.py
Created by: louise
On: 05/03/18
At: 2:14 PM
"""
import unittest
from torch.utils.data import DataLoader
from src.data import SP500Multistep
class TestSP500Multistep(unittest.TestCase):
def test_SP500Multistep(self):
# Parameters
... |
// Generated on 2014-10-09 using generator-ember 0.8.5
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
// # Globbing
// for performance reasons we'r... |
import React from 'react';
export default function ChevronsUpRight({
size = 24,
color = 'currentColor',
...restProps
}) {
return (
<svg
xmlns='http://www.w3.org/2000/svg'
className='icon icon-tabler icon-tabler-chevrons-up-right'
width={size}
height={size}
viewBox='0 0 24 24'
... |
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["exports", "../createIcon"], factory);
} else if (typeof exports !== "undefined") {
factory(exports, require("../createIcon"));
} else {
var mod = {
exports: {}
};
factory(mod.exports, global.createIc... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("va... |
import React from "react";
const BoxTitle = ({ text }) => {
return (
<div className="text-[0.9375rem] tracking-[0.01em] inline-block px-1.5 py-1 leading-none border border-black dark:border-white uppercase">
{text}
</div>
);
};
export default BoxTitle;
|
var express = require('express');
var bodyParser = require('body-parser');
var path = require('path');
var mongojs = require('mongojs');
var expressValidator = require('express-validator');
const { check, validationResult } = require('express-validator/check');
var Classes = require('./classes.js'); // all my user-defi... |
import React, { Component, Fragment } from "react";
import { connect } from "react-redux";
import { Link, withRouter } from "react-router-dom";
import * as Icon from "react-feather";
import { BlockAlertComponent } from "../../../components";
import DataTable from "react-data-table-component";
import {
setActiveModal,... |
module.exports = {
siteMetadata: {
title: `Today's Weather in Chicago`,
/* pathPrefix: '/static-gatsby-weather',*/
},
plugins: [
{
resolve: 'gatsby-source-openweathermap',
options: {
apikey: '<your api key here>',
location: 'Chicago',
units: 'imperial',
type: 'w... |
"""Tests for certbot.util."""
import argparse
import errno
import sys
import unittest
try:
import mock
except ImportError: # pragma: no cover
from unittest import mock
import six
from six.moves import reload_module # pylint: disable=import-error
from certbot import errors
from certbot.compat import filesyste... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.inferTarget = exports.DEFAULT_TARGET = void 0;
/*
* Copyright (c) 2021, Groupon, Inc.
* All ri... |
import math
import torch
from torch.optim import Optimizer
from datamanagement import load # not an open source yet
import adabound
import eval_net # not an open source yet
import model_new # not an open source yet
from dw import eval as dwe
path_checkpoint = './same folder where you have your script/'
def train_net... |
import PermissionList from '../../config/permission-list'
const getPermList = () => {
const list = []
const flist = {}
PermissionList.map(p => {
if (p.main) list.push(p.main)
list.push(Object.values(p.perms))
if (p.subperms) {
p.subperms.map(s => {
if (s.... |
var data = {
"body": "<path d=\"M6.09 19h12l-1.3 1.29a1 1 0 0 0 1.42 1.42l3-3a1 1 0 0 0 0-1.42l-3-3a1 1 0 0 0-1.42 0a1 1 0 0 0 0 1.42l1.3 1.29h-12a1.56 1.56 0 0 1-1.59-1.53V13a1 1 0 0 0-2 0v2.47A3.56 3.56 0 0 0 6.09 19zm-.3-9.29a1 1 0 1 0 1.42-1.42L5.91 7h12a1.56 1.56 0 0 1 1.59 1.53V11a1 1 0 0 0 2 0V8.53A3.56 3.56 0 ... |
"use strict";
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySy... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[40],{Q1uX:function(t,n,i){"use strict";i.r(n),i.d(n,"ion_card",(function(){return o})),i.d(n,"ion_card_content",(function(){return a})),i.d(n,"ion_card_header",(function(){return c})),i.d(n,"ion_card_subtitle",(function(){return d})),i.d(n,"ion_card_title",(function(... |
const test = require('tape');
const path = require('path');
const helpers = require('./helpers');
let tags = [];
async function tagsMatch() {
await process.chdir(path.join(process.cwd(), './mapbox-gl-js'));
const latest = await helpers.latestStableTag();
const current = await helpers.currentTag();
if ... |
/* Class to generate random numbers, but you can control the chances of which number you will generate */
class ControllableRandomness {
/**
* Initialises the array that numbers are selected from.
* @param {number} min Minimun number, gets truncated.
* @param {number} max Maximum number, gets truncated.
... |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const identifierUtils = require("./util/identifier");
class RecordIdsPlugin {
constructor(options) {
this.options = options || {};
}
apply(compiler) {
const portableIds = this.options.portableIds;... |
var expect = chai.expect;
describe('c3.export()', function () {
it('does something', function () {
expect(true).to.equal(false);
});
});
|
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
const Packager = require('./Packager');
const path = require('path');
const fs = require('../utils/fs');
class Ra... |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dbtest.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the
... |
var timeoutCallbacks = new Map();
var timerId = 0;
var TimerTargetImpl = (function (_super) {
__extends(TimerTargetImpl, _super);
function TimerTargetImpl() {
_super.apply(this, arguments);
}
TimerTargetImpl.initWithCallback = function (callback, id, shouldRepeat) {
var handler = TimerTa... |
import subprocess
import pytest
def run_test_script(name):
# os.chdir()
p=subprocess.Popen(["python","tests/{}".format(name)])
(stdout, stderr) = p.communicate()
assert p.returncode ==0, stderr
# print(stderr)
names=["demo.py",
"play_gym.py",
"play_gym_pend.py",
# "play_gym_atari.py",
"play_gym_rea... |
import _ from 'lodash';
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import YTSearch from 'youtube-api-search';
import SearchBar from './components/search_bar';
import VideoList from './components/video_list';
import VideoDetail from './components/video_detail';
const API_KEY = 'AIzaSyBDG... |
(function($){$.fn.iframePostForm=function(options){var response,returnReponse,element,status=true,iframe;options=$.extend({},$.fn.iframePostForm.defaults,options);if(!$("#"+options.iframeID).length){$("body").append('<iframe id="'+options.iframeID+'" name="'+options.iframeID+'" style="display:none" />')}return $(this).... |
window.__NUXT__=(function(a,b,c,d,e){return {staticAssetsBase:"https:\u002F\u002Fwww.baca-quran.id\u002Fstatic\u002F1627814429",layout:"default",error:b,state:{notification:{show:a,title:c,message:c},isShowSidebar:a,isSupportWebShare:a,headerTitle:"Baca Qur'an",page:"home",lastReadVerse:b,settingActiveTheme:{name:"dark... |
"use strict";
//# sourceMappingURL=Bucket.js.map |
/*
* /MathJax-v2/jax/output/HTML-CSS/fonts/STIX/General/Italic/CombDiactForSymbols.js
*
* Copyright (c) 2009-2018 The MathJax Consortium
*
* 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 th... |
import sys
import cx_Freeze
# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
if sys.platform == "win32":
base = "Win32GUI"
# http://msdn.microsoft.com/en-us/library/windows/desktop/aa371847(v=vs.85).aspx
shortcut_table = [
("DesktopShortcut", ... |
"""
Algorithms to extract various features of interest for outlier detection methods.
"""
from os import makedirs
from os.path import exists as pexists, join as pjoin, splitext
import numpy as np
from visualqc import config as cfg
from visualqc.utils import read_image, scale_0to1
def t1_histogram_whole_scan(in_mr... |
import React, { useState } from 'react';
import { useLoginMutation } from '../apollo/mutations/login';
import { useSignupMutation } from '../apollo/mutations/signup';
import Loading from './loading';
import Error from './error';
const LoginForm = ({ changeLoginState }) => {
const [email, setEmail] = useState('');
... |
var searchData=
[
['button_0',['button',['../structwte_1_1input_1_1lastbuttonpress.html#ab9f40637996d48e1fa405a494d2e8256',1,'wte::input::lastbuttonpress']]]
];
|
import messages from 'ringcentral-integration/modules/Conference/messages';
export default {
[messages.requireAdditionalNumbers]: "Selecteer de extra inbelnummers.",
[messages.scheduledSuccess]: "De conference is gepland."
};
// @key: @#@"[messages.requireAdditionalNumbers]"@#@ @source: @#@"Please select the addit... |
#! /usr/local/bin/python3
from board import Board
from model import (
Gem,
Card,
Noble,
)
from player import (
Player,
Action,
ActionParams,
)
import json
import unittest
class EndToEndTest(unittest.TestCase):
def test_end_to_end(self):
action_params = []
with open('test... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const ReactComponent = props => (react_1.default.crea... |
from operator import itemgetter
from .validation.NumberValidator import NumberValidator
from .validation.StringValidator import StringValidator
class Curtain:
'''
A class to represent a curtain
Attributes
----------
wall_index: int
wall upon which curtain will be placed, 0 right, 1 left, ... |
/**
* DragDropOverrides.js
*
* Released under LGPL License.
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
/**
* This module contains logic overriding the drag/drop logic of the editor.
*
* @private... |
const uart_native = process.binding(process.binding.uart)
const {EventEmitter} = require('events');
function UART(port, options) {
EventEmitter.call(this);
let self = this;
options = options || {};
this._native = new uart_native.UART(port, options, function (data) {
self.emit('data', data);
});
}
// Inh... |
/*!
* This file is part of Cytoscape.js 2.3.1.
*
* Cytoscape.js 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.
*
* Cy... |
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
})... |
from random import choice
from tictactoe.game import Game
from tictactoe.player import HumanPlayer, RoboticPlayer
from tictactoe.board import X, O
def get_name_and_symboll_class(quantity_human):
name_for_robotic = ["George(rob)", "Alexey(rob)", "Teo(rob)", "Mike(rob)",
"Gleb(rob)", "Anna(r... |
const commentButtonHandler = async function(event) {
event.preventDefault();
const postId = document.querySelector('input[name="post-id"]').value;
const content = document.querySelector('#comment-text').value;
if (content) {
await fetch('/api/comments', {
method: 'POST',
body: JSON.stringify({... |
export const getVerticalBarChartData = (themes) => ({
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
datasets: [
{
label: 'USA',
backgroundColor: themes.primary,
borderColor: 'transparent',
data: ... |
// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// No reason to stress-opt this; save some time.
// Flags: --no-stress-opt
load('test/mjsunit/wasm/wasm-module-builder.js');
// We generate the module... |
angular.module('vesselController', []).controller('mainController', ['$scope','$http','Vessels', function($scope, $http, Vessels) {
$scope.vessel = Vessels;
$scope.update = function(vessel) {
$scope.vessel.info = false;
Vessels.update(vessel._id, vessel);
};
$scope.infoType = function(key){
if (key =... |
/** @constructor */
ScalaJS.c.scala_runtime_NonLocalReturnControl$mcS$sp = (function() {
ScalaJS.c.scala_runtime_NonLocalReturnControl.call(this);
this.value$mcS$sp$f = 0
});
ScalaJS.c.scala_runtime_NonLocalReturnControl$mcS$sp.prototype = new ScalaJS.inheritable.scala_runtime_NonLocalReturnControl();
ScalaJS.c.sca... |
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("iview/locale",["vue"],t):"object"==typeof exports?exports["iview/locale"]=t(require("vue")):e["iview/locale"]=t(e.Vue)}(this,function(e){return function(e){function t(r){if(o[r... |
export default (PIXI) => { //TODO: get rid of lazy init
return class Bullet extends PIXI.Container { //TODO: rename to Projectile
constructor(fromX, fromY, toX, toY, textureName, time) {
super();
this.fromX = fromX
this.fromY = fromY
this.toX = toX
... |
class Classe:
def __init__(self):
self._atributo = 'Valor inicial'
@property
def atributo(self):
return self._atributo
@atributo.setter
def atributo(self, valor):
self._atributo = valor
self.atualizar()
@atributo.deleter
def atributo(self):
print(... |
(self.webpackChunkdocusaurus_template=self.webpackChunkdocusaurus_template||[]).push([[72286],{3905:function(e,t,r){"use strict";r.d(t,{Zo:function(){return p},kt:function(){return d}});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e... |
import { electrodeBridge } from 'react-native-electrode-bridge';
import WalmartItemRequests from './WalmartItemRequests';
import WalmartItemEvents from './WalmartItemEvents';
const REQUESTS = new WalmartItemRequests(electrodeBridge);
export function requests() {
return REQUESTS;
}
const EVENTS = new WalmartItemE... |
/*
* 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.
*/
'... |
const t=window.OrangoDemoTools.h;import{a as e,b as n,c as o,g as i,h as a,d as r,f as c,e as s}from"./chunk-1e906afd.js";var u=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],l=u.join(","),d="undefined"==typeof Element... |
'use strict';
var test = require('tape');
var parse = require('../../parser.js');
test('foo : Bar & Baz', function t(assert) {
var content = 'foo : Bar & Baz';
var result = parse(content).statements[0];
assert.equal(result.type, 'assignment');
assert.equal(result.identifier, 'foo');
assert.deepE... |
// @flow
import * as React from "react";
import Document from "models/Document";
const MARK_AS_VIEWED_AFTER = 3 * 1000;
type Props = {|
document: Document,
children?: React.Node,
|};
class MarkAsViewed extends React.Component<Props> {
viewTimeout: TimeoutID;
componentDidMount() {
const { document } = th... |
import { combineReducers } from 'redux'
import todos from './todos.js'
import visibilityFilter from './visibilityFilter.js'
const todoApp = combineReducers({
todos,
visibilityFilter
})
export default todoApp
|
from keras.layers import Conv2D
from keras.layers import Activation
from keras.layers import SpatialDropout2D
from keras.models import Model
from .blocks import Transpose2D_block
from .blocks import Upsample2D_block
from ..utils import get_layer_number, to_tuple
def build_unet(backbone, classes, skip_connection_laye... |
import * as f from '@f'
import addEventListener from './addEventListener'
import stopPropagation from './stopPropagation'
/**
* Adicionar um evento ao elemento com a tratativa do stopPropagation
*
* @name addEventListenerWithStop
* @function
* @access private
* @param {HTMLElement} element Elemento que tera um e... |
export const NAME_MAPPING = {
black: ' noir',
red: ' rouge',
green: ' vert',
yellow: ' jaune',
blue: ' bleu',
magenta: ' magen',
cyan: ' cyan',
white: ' blanc',
grey: ' gris',
bright_black: ' b-noir',
bright_red: 'b-rouge',
bright_green: ' b-vert',
bright_yellow: 'b-jaune',
bri... |
import asyncio
import contextlib
import logging
import typing as t
from abc import abstractmethod
from functools import partial
from bot.utils import CogABCMeta
log = logging.getLogger(__name__)
class Scheduler(metaclass=CogABCMeta):
"""Task scheduler."""
def __init__(self):
# Keep track of the chi... |
import { assert, isSimpleName, detectExpressionType } from '../utils.js'
export function makeEachBlock(data, option) {
let source = [];
let nodeItems = data.body;
while(nodeItems.length) {
let n = nodeItems[0];
if(n.type == 'text' && !n.value.trim()) nodeItems.shift();
else break... |
// Auto reload the app in dev, related to "config.paths.watched".
import "phoenix_html"
// Generic elm app code, works with render_elm in PageView
window.elmApps = {};
var elmAppElements = document.getElementsByClassName("js-elm-app");
for(var i = 0; i < elmAppElements.length; i += 1) {
var element = elmAppElements... |
gettext.load({'<span class="alert">Warning!</span> Device will be rebooted after update':"<span class='alert'>Внимание!</span> После обновления устройство будет перезагружено!",Autoupdate:"Autoupdate",Cancel:"Cancel","Change log":"Список изменений","Check image":"Проверка образа","Current version":"Current version",Dat... |
import { Component } from "react";
import PropTypes from "prop-types";
export default class ContentGroup extends Component {
static propTypes = {
component: PropTypes.any.isRequired,
componentProps: PropTypes.object,
content: PropTypes.array,
onSubmit: PropTypes.func,
onAddComponent: PropTypes.fu... |
/*
Highcharts JS v5.0.7 (2017-01-17)
(c) 2009-2016 Torstein Honsi
License: www.highcharts.com/license
*/
(function(L,a){"object"===typeof module&&module.exports?module.exports=L.document?a(L):a:L.Highcharts=a(L)})("undefined"!==typeof window?window:this,function(L){L=function(){var a=window,B=a.document,A=a.naviga... |
import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="blr-sghmc", # Replace with your own username
version="0.0.5",
author="Aaron Liu, Christy Hu",
author_email="tl254@duke.edu, dh275@duke.edu",
description="Bayesian Logisti... |
import Backbone from 'backbone';
import * as utils from './utils';
import pcapi from 'pcapi';
import Mapper from './map';
import sidePanelTemplate from './templates/sidebar.jst!';
import * as config from './configuration';
/* global cfg, i18n */
export class UploadLayerView extends Backbone.View {
initialize () ... |
from django.contrib.auth.models import AbstractUser
from django.db import models
from django.utils.translation import gettext_lazy as _
class User(AbstractUser):
class Gender(models.TextChoices):
MALE = "M", _("male")
FEMALE = "F", _("female")
OTHER = "O", _("other")
class Language(mo... |
# Copyright (C) 2020 by Triet Pham
#
# Reference:
# S. Chaturantabut and D.C. Sorensen. Nonlinear model reduction
# via discrete empirical interpolation.
# SIAM Journal on Scientific Computing, 32(5):2737-2764, 2010.
#
# Base class of DEIM approximation.
import sys
sys.path.append("../")
import matplotlib.pyplo... |
import 'should';
import { describe, it, beforeEach } from 'mocha';
import { stub } from 'sinon';
import Material from './index';
import chainMethods from '../../test-util/chain-methods';
describe('Material', () => {
let material;
beforeEach(() => {
material = new Material();
});
it('has no properties d... |
const NATS = require("nats");
const chai = require("chai");
const chaiHttp = require("chai-http");
const should = chai.should();
const expect = chai.expect;
chai.use(chaiHttp);
const app = require("../worker");
describe("nats", () => {
it("should not connect to the nats service", (done) => {
let nc = NATS.connec... |
import React from 'react';
import { Layout, Row, Col } from 'antd';
import { PhoneOutlined, HomeOutlined, MailOutlined } from '@ant-design/icons';
import { RiOpenSourceFill } from 'react-icons/ri';
import Configuration from '../../components/Configuration';
import logo from '../../assets/images/netunologolight.svg';
im... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import json
import os
import logging
import re
import six
import yaml
from .. import consts
from ..utils import patch_path
logger = logging.getLogger(__name__)
class Getter(six.Iterator):
""" base of getter object
Idealy, to subclass a getter... |
mycallback( {"TOTAL FED-NONFED AMOUNT": "33.82", "Activity is Direct Candidate Support": "", "PAYEE CITY": "Sacramento", "EXPENDITURE DATE": "20110104", "PAYEE SUFFIX": "", "EXPENDITURE PURPOSE DESCRIP": "Telephone", "PAYEE LAST NAME": "", "PAYEE FIRST NAME": "", "Activity is Direct Fundraising": "", "BACK REFERENCE SC... |
import * as React from 'react';
import Switch from '@material-ui/core/Switch';
export default function ControlledSwitches() {
const [checked, setChecked] = React.useState(true);
const handleChange = (event) => {
setChecked(event.target.checked);
};
return (
<Switch
checked={checked}
onCha... |
'use strict';
/** @module where */
const _ = require('lodash');
const parseKey = require('../util/parse-key');
const ops = require('./operations');
/**
* Generate a predicate for a query against an ordinary table.
*
* @param {Object} condition - A condition object (generated by parseKey).
* @return {Object} A pr... |
import time
from unittest.mock import patch, MagicMock, call
from mpf.tests.MpfTestCase import MpfTestCase
from mpf.tests.loop import MockSerial
class SmartMatrixSerial(MockSerial):
def __init__(self):
super().__init__()
self.type = None
self.receive_data = b''
def write_ready(self):... |
$(function(){
$('#js_hideShowFilter').on('click',function(){
var $btn = $(this),
$filterForm = $('#filterFormContainer');
$btn.toggleClass('typcn-arrow-up-thick typcn-arrow-down-thick hide show');
$filterForm[$btn.hasClass('hide') ? 'show' : 'hide']();
$btn.text($btn.hasClass('hide') ? 'Szűrőpanel összecs... |
const mongoose = require("mongoose");
const Schema = mongoose.Schema;
const NotesSchema = new Schema({
owner: {
type: String,
required: true,
},
name: {
type: String,
required: true,
},
content: {
type: String,
required: true,
},
date: {
type: Date,
default: Date.now,
... |
import * as asmCrypto from '../asmcrypto.all.es8';
import chai from 'chai';
const expect = chai.expect;
describe('SHA256', () => {
const sha256_vectors = [
['e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', asmCrypto.string_to_bytes('')],
['ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb4... |
# An object that wraps the PShape.
class Wiggler(object):
def __init__(self):
# For 2D Perlin noise
self.yoff = 0
# Its location
self.x = width / 2
self.y = height / 2
# The "original" locations of the vertices make up a circle.
# We are using a list to keep ... |