text
stringlengths
3
1.05M
const colorNames = require(`color-names`); const xml2js = require(`xml2js`); module.exports.name = `e:cue`; module.exports.version = `0.3.1`; const colors = {}; for (const hex of Object.keys(colorNames)) { colors[colorNames[hex].toLowerCase().replace(/\s/g, ``)] = hex; } module.exports.import = function importEcue...
import AccountPageObject from '../../../support/pages/account.page-object'; import SettingsPageObject from '../../../support/pages/module/sw-settings.page-object'; describe('Account: Edit profile\'s Vat Id', () => { beforeEach(() => { return cy.createCustomerFixtureStorefront().then(() => { ret...
/** * 小程序配置文件 */ // 此处主机域名修改成腾讯云解决方案分配的域名 var host = 'https://336423237.watersoup.club'; var config = { // 下面的地址配合云端 Demo 工作 service: { host, // 登录地址,用于建立会话 loginUrl: `${host}/weapp/login`, // 测试的请求地址,用于测试会话 requestUrl: `${host}/weapp/user`, // 上传图片接口 uploadUrl: `${host}/weapp/up...
/* * forgerock-react-native-sample * * kba.js * * Copyright (c) 2021 ForgeRock. All rights reserved. * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ import React, { useState } from 'react'; import { FormControl, Input, Select } from 'nat...
var selectron = require("../index") var sel = selectron() , ul = document.getElementById("list") ul.addEventListener("click", function (evt) { if (evt.target.tagName === "LI") { sel.select(evt.target) } }) sel.on("select", function (li) { li.classList.add("selected") }) sel.on("unselect", fu...
import os from pandaharvester.harvestercore import core_utils from .base_messenger import BaseMessenger from pandaharvester.harvesterconfig import harvester_config from pandaharvester.harvestermisc.k8s_utils import k8s_Client # from pandaharvester.harvestercore.queue_config_mapper import QueueConfigMapper # from panda...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=Buttons.js.map
function scroll_to_class(element_class, removed_height) { var scroll_to = $(element_class).offset().top - removed_height; if($(window).scrollTop() != scroll_to) { $('html, body').stop().animate({scrollTop: scroll_to}, 0); } } function bar_progress(progress_line_object, direction) { var number_of_steps = progres...
// Copyright 2010 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of ...
(window.webpackJsonp=window.webpackJsonp||[]).push([[77],{192:function(t,e,s){"use strict";s.r(e);var a=s(0),r=Object(a.a)({},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"content"},[t._m(0),t._v(" "),s("Bit"),t._v(" "),t._m(1),t._v(" "),t._m(2),t._v(" "),t._m(3),t._v(" "),t._m(4...
import React from "react"; function Scores(props) { return ( <div className="scores"> <div className="score score--current">{props.score}</div> <div className="score score--best">{props.best}</div> </div> ); } export default Scores;
// Copyright (c) 2012 Ecma International. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- es5id: 15.2.3.5-4-254 description: > Object.create - one property in 'Properties' is an Arguments object which implements its own [[Get]] method to access the 'get' p...
$(document).ready(function () { $('#trierCommande').on('click',function(){ var element = $(this).val(); $.ajax({ type : "post", url : "http://127.0.0.1:8000/commercant/commandes/trier", data : { element : element }, success ...
const HtmlWebpackPlugin = require('html-webpack-plugin'); const VuetifyLoaderPlugin = require('vuetify-loader/lib/plugin'); const VueLoaderPlugin = require('vue-loader/lib/plugin'); const path = require('path'); module.exports = { entry: './docs/src/index.js', module: { rules: [ {test: /\.j...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Create publication quality figure.""" import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl from matplotlib.font_manager import FontProperties from matplotlib.transforms import Bbox from matplotlib.ticker import MultipleLocator # from matplotlib.t...
export default { cyan: '#0DA1C3', lightgrey: '#F4F5F7', yellow: '#EBE047', white: '#FFFFFF', }
// @flow import randomColor from 'randomcolor' import React, {PureComponent} from 'react' import {Polyline, Tooltip} from 'react-leaflet' import * as activeActions from '../../actions/active' import * as mapActions from '../../actions/map' import * as tripPatternActions from '../../actions/tripPattern' import {ensure...
from hwtypes import Bit, BitVector import magma as m from mantle2.queue import Queue import fault as f import pysv def test_queue_simple(): tester = f.SynchronousTester(Queue(4, m.Bits[2])) tester.advance_cycle() for i in range(4): tester.circuit.enq.data = i tester.circuit.enq.valid = 1 ...
import copy import typing as t from functools import wraps import inspect import logging from .validation import check_instance_of def create_instance(cls: t.Any, *args): """ Create an instance of a new class dynamically using random arguments. Note: This creation will be difficult for classes that p...
import React from "react"; import styled from "styled-components"; const ProgramNumWorkoutsSection = ({ numberOfWorkouts }) => { return ( <SectionContainer> <FooterLabel label="true">Workouts</FooterLabel> <FooterLabel>{numberOfWorkouts}</FooterLabel> </SectionContainer> ); }; export default P...
""" 2021/01/18 This script plots the network response to basic shapes and the movement of them. Look under load_data._load_basic_shapes for all the possibilities of basic shapes. """ import numpy as np import tensorflow as tf import os from plots_utils.plot_cnn_output import plot_cnn_output from utils.load_config imp...
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2de9b4ea"],{"11b2":function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",{ref:"slotWrapper"},[t._t("default")],2)])},n=[],i={name:"relocator",props:{container:{default:"body"}},computed:{conta...
import { createGlobalStyle } from 'styled-components'; import fontRegular from '../assets/fonts/SourceSansPro-Regular.ttf'; import fontBold from '../assets/fonts/SourceSansPro-Bold.ttf'; const Typography = createGlobalStyle` @font-face { font-family: SourceSansPro; src: url(${fontRegular}); } ...
module.exports = { parser: '@typescript-eslint/parser', extends: [ 'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin 'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that...
module.exports = { parser: 'typescript-eslint-parser', plugins: ['typescript'], rules: { 'typescript/no-unused-vars': 'error', }, };
import 'https://cdnjs.cloudflare.com/ajax/libs/xterm/3.14.5/xterm.min.js' import 'https://cdnjs.cloudflare.com/ajax/libs/xterm/3.14.5/addons/fit/fit.min.js' import 'https://cdnjs.cloudflare.com/ajax/libs/xterm/3.14.5/addons/fullscreen/fullscreen.min.js' import 'https://cdnjs.cloudflare.com/ajax/libs/xterm/3.14.5/addons...
app.factory('contentItemService', ['$http', function contentItemService($http) { var base_path = siteRoot + "api/content"; var service = { search: search, get: get, insert: insert, update: update, remove: remove, save: save }; return service; // im...
'use strict'; const logger = require('../logger'), validation = require('./validation'), tokens = require('./../services/tokenSessions'), bcrypt = require('bcryptjs'), errors = require('../errors'), User = require('../models').user, saltRounds = 10, time = require('./../../config').common.expiration; co...
/*global define*/ define([ '../Core/defaultValue', '../Core/defineProperties', '../Core/VertexFormat', '../Shaders/Appearances/PerInstanceFlatColorAppearanceFS', '../Shaders/Appearances/PolylineColorAppearanceVS', '../Shaders/PolylineCommon', './Appearance...
# -*- coding: utf-8 -*- """ Created on Thu Mar 25 18:26:14 2021 @author: Emmanuel """ board = {(x-3, y-3, x-y) for x in range(7) for y in range(7) if abs(x-y) <=3} def neighbors_1(x, y, z): res = set() for i in [-1, 1]: res.update({(x, y-i, z+i), (x+i, y+i, z), (x+i, y, z+i)}) return...
{ "targets": [ { "target_name": "<(module_name)", "sources": [ "<(module_name).cc" ], 'include_dirs': [ '<(custom_include_path)', "../../node_modules/node-addon-api/" ], 'product_dir': '<(module_path)', 'cflags!': [ '-fno-exceptions' ], 'cflags_cc!': [...
// JavaScript Document var connect=require('connect'); var serveStatic=require('serve-static'); connect().use(serveStatic('code')).listen(5000); console.log("static file server is running at port 5000");
import numpy as np from cliffwalk.cliffwalk import GridWorld def egreedy_policy(q_values, state, epsilon=0.1): if np.random.random() < epsilon: return np.random.choice(4) else: return np.argmax(q_values[state]) def sarsa_td0(env, actions=['UP', 'DOWN', 'RIGHT', 'LEFT'], ...
export default function (email) { return ` <html> <head> <meta charset="utf-8"> <style> .wrapper { max-width: 600px; margin: 0 auto; } .grayBg a { color: rgba(0, 0, 0, 0.5); } a { color: #fff; } table ...
/** * Copyright 2015 Telerik AD * * 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 ...
const post = require('./post'); const { errors, ERROR_UNKNOWN_WORD, ERROR_REPEATED_WORD, ERROR_CAPITALIZATION, ERROR_TOO_MANY_ERRORS, } = require('./errors'); const YASPELLER_HOST = 'speller.yandex.net'; const YASPELLER_PATH = '/services/spellservice.json/'; const DEFAULT_FORMAT = 'plain'; const...
""" The system RoBERTa trains on the AGB dataset with softmax loss function. At every 1000 training steps, the model is evaluated on the AGB dev set. """ from torch.utils.data import DataLoader import math from sentence_transformers import models, losses from sentence_transformers import SentencesDataset, LoggingHandl...
'use strict' /* global hexo */ const debug = require('debug')('docs') const helpers = require('../lib/helpers') let pathFn = require('path') let _ = require('lodash') function startsWith (str, start) { return str.substring(0, start.length) === start } hexo.extend.helper.register('page_nav', function () { const...
'use strict'; module.exports = class MessageEventCommand { constructor () { return { nome: 'messageDelete', run: this.run }; } async run (newMessage) { const channelDB = await global.db.get(`logs-${newMessage.guildID}`) || '927209681754132530'; const channel = await global.zuly.getRESTChannel(channelDB...
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
(function (t) { // bg t.add("This value should be false.", "\u0421\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0442\u0430 \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0431\u044a\u0434\u0435 \u043b\u044a\u0436\u0430 (false).", "validators", "bg"); t.add("This value should be true.", "\u0421\u0442\u043e\u0439\u043d...
from __future__ import absolute_import from __future__ import print_function import logging.config import logging import pydoc import os import unittest import sys import re #Look for MG5/MG4 path _mg5_path = os.sep.join(os.path.realpath(__file__).split(os.sep)[:-3]) sys.path.append(_mg5_path) _file_path = os.path.dirn...
import getOr from 'lodash/fp/getOr'; import { NAME } from './constants'; export const getPage = getOr('', `${NAME}.payload.page`); export const getType = getOr('', `${NAME}.type`);
'use strict'; module.exports = { extends: 'octane', rules: { 'no-invalid-interactive': { ignoredTags: ['form'], }, }, };
/** * Bootstrap Table English translation * Author: Zhixin Wen<wenzhixin2010@gmail.com> */ (function ($) { 'use strict'; $.fn.bootstrapTable.locales['en-US'] = { formatLoadingMessage: function () { return 'Loading, please wait...'; }, formatRecordsPerPage: function (pageN...
/* -------------------------------------------------------------------------- */ /* Copyright 2002-2021, OpenNebula Project, OpenNebula Systems */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may ...
import React from "react"; import { Container, Card, Button, Row } from "react-bootstrap"; import fn from '../../Assets/Images/LandingPageFue.jpg'; import locale from '../../Assets/Images/LandingPagejpg.jpg'; import popquiz from '../../Assets/Images/popquiz.jpg'; import teamprofile from '../../Assets/Images/teamProfile...
module.exports = function(grunt) { grunt.registerTask( 'default', [ 'clean', 'copy', 'hapi', 'watch'] ); grunt.registerTask( 'build', [ 'clean', 'copy' ] ); grunt.registerTask( 'run', [ 'hapi', 'watch' ]); grunt.initConfig({ watch: { hapi: { files: [ ...
// Copyright 2018-2021 Polyaxon, Inc. // // 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 agre...
#!/usr/bin/python """Looks for sensor with ADDRESS1 and changes it's address to ADDRESS2 then changes it back to ADDRESS1""" import minimalmodbus import serial from time import sleep ADDRESS1 = 1 ADDRESS2 = 2 minimalmodbus.CLOSE_PORT_AFTER_EACH_CALL = True minimalmodbus.PARITY=serial.PARITY_NONE minimalmodbus.STOPB...
import React, { Component } from 'react'; import styles from './styles/index.css'; class Bar extends Component { render() { const { editing, onToggle } = this.props; const btnClass = editing ? styles.buttonActive : styles.button; return ( <div className={styles.bar}> <button className={bt...
const DrawCard = require('../../drawcard.js'); class StoneCrows extends DrawCard { setupCardAbilities(ability) { this.reaction({ when: { afterChallenge: event => ( event.challenge.winner === this.controller && this.isAttacking() && ...
$(document).ready(function () { $(window).scroll(function () { if (this.scrollY > 20) { $(".navbar").addClass("sticky"); } else { $(".navbar").removeClass("sticky"); } }); $(".menu-toggler").click(function () { $(this).toggleClass("active"); $(".navbar-menu").toggleClass("active"); }); });
/* ================================================================= * Template JS * * Template: Sepia - Photography Portfolio HTML Website Template * Author: Themetorium * URL: http://themetorium.net * ================================================================= */ /* Table of Content ==================== ...
//// [tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts] //// //// [fileJs.js] a ? (b) : c => (d) : e => f // Not legal JS; "Unexpected token ':'" at last colon //// [fileTs.ts] a ? (b) : c => (d) : e => f //// [fileJs.js] a ? function (b) { return (d); }...
import Component from '@glimmer/component'; import { action } from '@ember/object'; export default class BlockChangesPropertyComponent extends Component { @action onValue(_, [ value ]) { this.args.onPropertyChange(this.args.key, value); } }
{"mlist":[],"rlist":{},"page":{"page":1,"count":0,"size":10,"type":0,"id":5488}}
""" Copyright (C) king.com Ltd 2019 https://github.com/king/s3vdc License: MIT, https://raw.github.com/king/s3vdc/LICENSE.md """ from lib.data_utils import DataUtils from lib.traindev_config_parser import TrainDevConfigParser from lib.tf_feature_columns import TfFeatureColumns from lib.data_source import DataSource f...
const { Right, Left, fold } = require('./either'); test('TODO: Add either lib tests', () => { void Right; void Left; void fold; expect(1).toBe(1); });
"use strict"; // This icon file is generated automatically. Object.defineProperty(exports, "__esModule", { value: true }); var SyncOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41...
(window["webpackJsonphelander-spa-test"]=window["webpackJsonphelander-spa-test"]||[]).push([[0],{66:function(e,t,a){e.exports=a(83)},71:function(e,t,a){},72:function(e,t,a){},83:function(e,t,a){"use strict";a.r(t);var n=a(0),o=a.n(n),r=a(10),i=a.n(r),l=(a(71),a(72),a(24)),s=a(115),c=a(119),m=a(120),u=a(122),d=a(118),p=...
const path = require('path'); module.exports = { client: 'sqlite3', connection: { filename: path.resolve(__dirname, 'src', 'database', 'database.sqlite') }, migrations: { directory: path.resolve(__dirname, 'src', 'database', 'migrations') }, useNullAsDefault: true, };
/** * Copyright (c) Facebook, Inc. and its affiliates. */ const fs = require('fs'); const GithubSlugger = require('github-slugger'); function walk(dir) { let results = []; const list = fs.readdirSync(dir); list.forEach(function (file) { file = dir + '/' + file; const stat = fs.statSync(file); if (...
const func = { //不能为空 empty(val = "") { let isNull = false; switch (val) { case '': isNull = true; break; case null: isNull = true; break; case 'null': isNull = true; ...
import {Page, NavController, ActionSheet, Modal} from 'ionic/ionic'; import {PreviewModal} from './preview'; import {Itunes} from '../../itunes/itunes'; @Page({ templateUrl: 'build/pages/search/search.html', viewProviders: [] }) export class SearchPage { constructor(nav: NavController, itunes: Itunes) { this...
const axios = require('axios') const constants = require('core-module/constants') const HError = require('core-module/HError') const utils = require('core-module/utils') const {getUploadFileConfig} = require('core-module/upload') module.exports = function (BaaS) { /** * 上传文件。 * @memberof BaaS * @param {FileP...
module.exports = { parser: "@typescript-eslint/parser", extends: [ "eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended", "prettier/@typescript-eslint", "plugin:prettier/recommended" ], plugins: [ "react", "@typescript-eslint", "prettier", ...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.web.static}. """ import errno import inspect import mimetypes import os import re import sys import warnings from io import BytesIO as StringIO from unittest import skipIf from zope.interface.verify import verifyObject f...
// app/calc.js function sum (arr) { return arr.reduce(function(a, b) { return a + b }, 0) } module.exports.sum = sum
from typing import Any, List, Literal, TypedDict from .FHIR_Element import FHIR_Element from .FHIR_Reference import FHIR_Reference from .FHIR_string import FHIR_string # Demographics and other administrative information about an individual or animal receiving care or other health-related services. FHIR_Patient_Link =...
# flake8: noqa """main function (need setup.py)""" from .main import main
import { axiosWithAuth } from "../utils/axiosWithAuth"; export const SET_ADMIN = "SET_ADMIN"; export const GET_USERS = "GET_USERS"; export const ADMIN_DEL_USER = "ADMIN_DEL_USER"; export const getUsers = data => dispatch => { axiosWithAuth() .get("https://bookedup-pt9.herokuapp.com/api/users/") .then(res =>...
//! moment.js locale configuration //! locale : Arabic [ar] //! author : Abdel Said: https://github.com/abdelsaid //! author : Ahmed Elkhatib //! author : forabi https://github.com/forabi import moment from '../moment'; var symbolMap = { '1': '١', '2': '٢', '3': '٣', '4': '٤', ...
require("./Footer.tea"); const {Block,Text,Logo,BlockColor,Switch,Dialog} = require("../../internal"); class Footer extends Block { static get title() { return _t('Footer') } static get description() { return _t('The final block') } configForm() { return html` <${Dialog}> ...
""" Copyright 2020 The OneFlow 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 applicable law or agr...
!function(e){"function"==typeof define&&define.amd?define(["../widgets/datepicker"],e):e(jQuery.datepicker)}(function(e){return e.regional.nl={closeText:"Sluiten",prevText:"\u2190",nextText:"\u2192",currentText:"Vandaag",monthNames:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktobe...
GOODREADS_API_KEY = 'YOUR GOODREADS API KEY' BING_SEARCH_API_KEY = 'YOUR BING SEARCH API KEY'
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages import glob import ntpath def get_module_name(module_path): """ Return the module name of the module path """ return ntpath.split(module_path)[1].split(".")[0] def snake_to_camel(word): """ Convert a w...
from gyun.iaas.connection import APIConnection from gyun.conn import auth from . import constants as const from __builtin__ import str class AppConnection(APIConnection): def __init__(self, app_id, secret_app_key, zone, host='api.qc.gyun.com', port=443, protocol='https', pool=No...
import os from pathlib import Path import toml import typer ISWIN = os.name == "nt" PYPROJECT_PATH = Path(__file__).parent.parent.joinpath("pyproject.toml") pycln = toml.load(PYPROJECT_PATH)["tool"]["poetry"] __name__ = pycln["name"] __version__ = pycln["version"] __doc__ = pycln["description"] def version_callbac...
# pylint: disable=W0613 # Copyright (C) 2018 The Android Open Source Project # # 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 require...
/* artifact generator: C:\My\wizzi\v6\node_modules\wizzi-js\lib\artifacts\js\module\gen\main.js primary source IttfDocument: c:\my\wizzi\v6\plugins\wizzi-js\src\ittf\lib\artifacts\js\module\gen\codegen\statements\loops.js.ittf */ 'use strict'; var util = require('util'); var verify = require('wizzi-utils').veri...
import React from 'react'; import 'slick-carousel/slick/slick.css'; import 'slick-carousel/slick/slick-theme.css'; import Slider from 'react-slick'; import { NavLink } from 'react-router-dom'; export default function newItemsSlider(props) { var settings = { dots: true, infinite: true, speed: 500, sli...
const homeApi = client => { return { getHomePage: async () => { const {item} = await client .item('untitled_content_item') .toPromise(); return mapHomePage(item); }, }; }; const mapHomePage = contentItem => { return { hero: mapHomeH...
const functions = require('firebase-functions'); // FitstTask function findingNextOddInSequence (arr) { if(arr.length > 0){ const j = arr.length - 1, n = arr.pop(); return +n + findingEvenFromIndex(j); }else{ return false; } } function findingEvenFromIndex(i) { if(!isN...
/*- * Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved. * * Licensed under the Universal Permissive License v 1.0 as shown at * https://oss.oracle.com/licenses/upl/ */ 'use strict'; const assert = require('assert'); const PackedInteger = require('./packed_integer'); const ResizableBuff...
const transform = require('./src/transform'); const readGeojson = require('./src/readGeojson'); const writeGtfs = require('./src/writeGtfs'); const constants = require('./src/constants'); function geojsonToGtfs(geojson, outputPath = null, userConfig = {}) { const input = typeof geojson === "string" ? readGeojson...
// knockout-amd-helpers 0.6.2 | (c) 2014 Ryan Niemeyer | http://www.opensource.org/licenses/mit-license define(["knockout"],function(a){var b=window.require||window.curl,c=a.utils.unwrapObservable,d=function(a,b){var c,d=function(){return a.apply(this,b||[])};return d.prototype=a.prototype,c=new d,c.constructor=a,c},e...
# -*- coding: utf-8 -*- from __future__ import print_function import os import sys import tempfile import warnings import numpy from numpy import testing as npt import tables from tables import Atom, ClosedNodeError, NoSuchNodeError from tables.utils import byteorders from tables.tests import common from tables.te...
import cocotb from cocotb.triggers import Timer, Edge def gcd(a: int, b: int) -> int: while a != b: if a > b: a = a - b else: b = b - a return a async def toggle(signal): """Flips the value of binary signal wire""" if signal.value == 0: signal.value = ...
//Generates a letter-only (sms url friendly) key for ids const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; module.exports = len => { let result = ''; for (let i = 0; i < len; i++) { const pos = Math.floor(Math.random() * len); result += characters.slice(pos, pos + 1); }...
#!/usr/bin/env python # -*- coding: utf-8 -*- import time for i in xrange(5): print i time.sleep(1);
/** When your routing table is too long, you can split it into small modules **/ import Layout from '@/layout' const gxq = { path: '/gxq', component: Layout, redirect: '/gxq/gxqzzb', name: 'gxq', meta: { title: '高新区', icon: 'table' }, children: [ { path: 'gxqzzb', component: () =...
import os import subprocess from typing import Optional, List class CompilerBase(object): """ Base class for a compiler. """ supported_extensions: List[str] = [] default_flags: List[str] = [] def __init__(self, src_path: str, *, output_ext: str = '.e', flags: Optional[str] = None, t...
var webpack = require('webpack'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var HtmlWebpackPlugin = require('html-webpack-plugin'); // 环境变量配置,dev / online var WEBPACK_ENV = process.env.WEBPACK_ENV || 'dev'; // 获取html-webpack-plugin参数的方法 var getHtmlConfig = function(name, title) { retu...
from __future__ import absolute_import, division, print_function import numpy as np import scipy.linalg from nnmnkwii.util import apply_each2d_padded, apply_each2d_trim from nnmnkwii.util.linalg import cholesky_inv, cholesky_inv_banded from nose.plugins.attrib import attr def _get_windows_set(): windows_set = [ ...
export const getEmptyInputs = form => { let emptyInputs = [] for (const [key, value] of Object.entries(form)) { console.log(`${key}: ${value}`) } for (const [key] of Object.entries(form)) { console.log(`${key}`) } return emptyInputs }
"""Stuff to parse Sun and NeXT audio files. An audio file consists of a header followed by the data. The structure of the header is as follows. +---------------+ | magic word | +---------------+ | header size | +---------------+ | data size | +--------...
import React, { PropTypes, Component } from 'react'; import { connect } from 'react-redux'; // Import Components import PostList from '../../components/PostList'; import PostCreateWidget from '../../components/PostCreateWidget/PostCreateWidget'; // Import Actions import { addPostRequest, fetchPosts, deletePostRequest...
define( ({ common: { ok: "ΟΚ", cancel: "Ακύρωση", next: "Επόμενο", back: "Πίσω" }, errorCode: "Κωδικός", errorMessage: "Μήνυμα", errorDetail: "Λεπτομέρεια", widgetPlaceholderTooltip: "Για να το ρυθμίσετε, μεταβείτε στα Widget και κάντε κλικ στο αντίστοιχο σύμβολο", ...