text stringlengths 3 1.05M |
|---|
/**
* Copyright 2012-2022, Plotly, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
var d3 = require('d3');
var isNumeric = require('fast-isnumeric');
var Plots = require('../../plots/plots');
va... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[55],{"0f7c":function(e,t){},9178:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("transition",{attrs:{appear:"","enter-active-class":"animated fadeIn"}},[a("q-table",{staticClass:"my-sticky-he... |
#!/usr/bin/env python3
# This file is part of the Python aiocoap library project.
#
# Copyright (c) 2012-2014 Maciej Wasilak <http://sixpinetrees.blogspot.com/>,
# 2013-2014 Christian Amsüss <c.amsuess@energyharvesting.at>
#
# aiocoap is free software, this file is published under the MIT license as
# de... |
# 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.
from .fairseq_encoder import FairseqEncoder
import torch
import contextlib
class CompositeEncoderChi(FairseqEncoder):
"""
A wrapper ... |
/* Magic Mirror Config
*
* By Michael Teeuw http://michaelteeuw.nl
* Modified by Ron Record http://ronrecord.com
* MIT Licensed.
*
* For more information how you can configurate this file
* See https://github.com/MichMich/MagicMirror#configuration
*
*/
var config = {
// address: "localhost",
address: "0.0.0.... |
var ColorScheme;(function(){var t,e=[].slice,n={}.hasOwnProperty;ColorScheme=function(){function t(){var e,n;for(e=[],n=1;4>=n;n++)e.push(new t.mutablecolor(60));this.col=e,this._scheme="mono",this._distance=.5,this._web_safe=!1,this._add_complement=!1}var r,o,a,i,u,s;for(o=Array.isArray||function(t){return"[object Arr... |
/*********************************************************/
/* */
/* File with some misc functions. (Didn't know where */
/* to put them =P) */
/* */
/* By Nicholas Mol... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(gene... |
import os
from typing import List, Dict
from generator.commons import JinjaGenerator, TEMPLATE_PROPERTY_TYPE, \
TEMPLATE_PROPERTY_LINKED_TYPES, SchemaStructure, TEMPLATE_PROPERTY_EMBEDDED_TYPES
class HTMLGenerator(JinjaGenerator):
def __init__(self, schema_information:List[SchemaStructure], instances, curre... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bincrafters import build_template_default
def _is_shared_msvc_build(build):
return not(build.options['benchmark:shared'] == True and build.settings['compiler'] == 'Visual Studio')
if __name__ == "__main__":
builder = build_template_default.get_builder()
... |
import { ADD_TODO, REMOVE_TODO, TOGGLE_TODO, RENDER_TODO_LIST} from '../actions/actionsTypes'
const initialState = []
const ToDoReducer = (state=initialState, action) => {
switch (action.type){
case ADD_TODO:
return [
...state,{
id: action.id,
... |
# pylint: disable=no-self-use,invalid-name,protected-access
import os
import subprocess
import torch
import numpy
from allennlp.common.testing import AllenNlpTestCase
from allennlp.data import Vocabulary
from allennlp.training.metrics import SpanBasedF1Measure, Metric
from allennlp.models.semantic_role_labeler import... |
// @flow
//
// Copyright (c) 2018-present, Cruise LLC
//
// This source code is licensed under the Apache License, Version 2.0,
// found in the LICENSE file in the root directory of this source tree.
// You may not use this file except in compliance with the License.
import ArrowSplitHorizontalIcon from "@mdi/svg/... |
import time
from flask import Flask, make_response
app = Flask(__name__)
@app.route("/simple.png")
def simple():
import datetime
# import StringIO
import io
import random
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
from m... |
export default () => {
return [
{
id: '1',
title: 'Lord of the Rings',
pages: 500
},
{
id: '2',
title: 'Game of Thrones',
pages: 301
},
{
id: '3',
title: 'Hunger Games',
... |
import React, { useState, useEffect, useRef, createContext, useContext } from 'react';
import Realm, { BSON } from 'realm';
import { getUniqueId, getDeviceName } from 'react-native-device-info';
import { useAuth } from './AuthProvider';
import { useLocation } from '../hooks/useLocation';
import { Device } from '../mod... |
//
// iosAddTarget.js
// This hook runs for the iOS platform when the plugin or platform is added.
//
// Source: https://github.com/DavidStrausz/cordova-plugin-today-widget
//
//
// The MIT License (MIT)
//
// Copyright (c) 2017 DavidStrausz
//
// Permission is hereby granted, free of charge, to any person obtaining... |
/**
* Auto-generated action file for "Bitbucket" API.
*
* Generated at: 2019-05-07T14:39:44.323Z
* Mass generator version: 1.1.0
*
* flowground :- Telekom iPaaS / bitbucket-org-connector
* Copyright © 2019, Deutsche Telekom AG
* contact: flowground@telekom.de
*
* All files of this connector are licensed under... |
import { createContext } from 'react';
export const AnswersContext = createContext();
export const SurveyContext = createContext();
export const AssessmentNavigationContext = createContext();
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _Icon = _interopRequireDefault(require("../Icon"));
var _Text = _interopRequireDefau... |
import React from 'react';
import useIsomorphicContext from '../../../../src/use-isomorphic-context';
import SimpleContext from '../../context/simple-context';
export default function Simple() {
const state = useIsomorphicContext(SimpleContext);
return (
<section>
{!!state && state.x}
... |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
const SvgIconCustom = global.__MUI_SvgIcon__ || SvgIcon;
let CloudCircle = props =>
<SvgIconCustom {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.5 14H8c-1.66 0-3-1... |
const classes = require('src/gatsby/templates/snippets/classes').classes
const html = /* HTML */ `
<div class="demo--fade">
<div class="xt-row xt-row-6">
<div class="w-full">
<div
class="*** xt-card *** rounded${classes.cardRadius()} ${classes.cardSm()} ${classes.textDefault()} ${classes.... |
__NUXT_JSONP__("/85", (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){return {data:[{metaTitle:f,metaDesc:g,surahId:h,currentSurahFromList:{translation:i,arabic:j,latin:b,ayah_count:22,index:h,opening:"\u003Cspan class=\"gen\"\u003E\u003Cbr\u003E Surat Al Buruuj terdiri atas 22 ayat, termasuk golongan surat-surat Makkiyyah di... |
import request from './index'
const baseUrl = 'https://api.wroadw.com'
export default {
/** 【基础】获取用户openid */
getOpenId: data => request.post(`${baseUrl}/base/getOpenId`, data),
/** 【用户】添加用户信息,并且初始化任务给用户,只有在第一次进入时候生效 */
addUserBase: data => request.post(`${baseUrl}/user/addUserBase`, data),
/** 【用户】根据openi... |
# Generated by Django 3.2 on 2021-07-18 09:29
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('authentication', '0014_bill_paid'),
]
operations = [
migrations.AlterField(
model_name='profile',
name='image',
... |
var $$ = {
copyToClipboard: function(val) {
var t = document.createElement("textarea");
document.body.appendChild(t);
t.value = val;
t.select();
document.execCommand('copy');
document.body.removeChild(t);
toastr["info"]('클립보드에 복사되었습니다.');
},
convertToVolumeStr: function(fileVolume) {
var sizeStr;
v... |
#!/usr/bin/env python
import pika
connection = pika.BlockingConnection(pika.ConnectionParameters(
host='localhost'))
channel = connection.channel()
channel.exchange_declare(exchange='logs',
type='fanout')
result = channel.queue_declare(exclusive=True)
queue_name = result.... |
import { checkDataTable } from '../utils/schema-validators';
import Cell from './cell';
import createWebSocket from '../utils/web-socket-manager';
import {
dataTableCapabilityPath,
dataTableWebSocketPath,
dataTableHistoryPath,
} from '../constants/paths';
import dataTableNotificationTypes, {
DATA_TABLE_ALL,
D... |
import sys
from sqlalchemy import Column, ForeignKey, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy import create_engine
Base = declarative_base()
class User(Base):
"""Table of Users"""
__tablename__ = 'user'
name = Column(String(... |
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
var typedoc = typedoc || {};
typedoc.search = typedoc.search || {};
typedoc.search.data = {"kinds":{"65536":"Type literal"},"rows":[{"id":0,"kind":65536,"name":"__type","url":"globals.html#constructor.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","paren... |
const style = {
padding: 10,
border: "3px solid red"
};
const Alert = props => <div style={style}>{props.children}</div>;
export default Alert;
|
const wdk = require('wikidata-sdk')
module.exports = (pattern, filter, includeAllDetails, includeTypes) => data => {
// Special case: when the pattern is a property id, just log the property
if (wdk.isPropertyId(pattern) && data[pattern] != null) {
const prop = pattern
const obj = {}
obj[prop] = getVal... |
import BaseObject from "./BaseObject";
export default class Section extends BaseObject {
constructor(ioSource = {}) {
super(ioSource);
this.sMainSection = (ioSource.sMainSection || "");
this.sSubSection = (ioSource.sSubSection || "");
this.iSequence = (ioSource.iSequence || "");
}
} |
import ReactDOM from "react-dom";
import "./index.css";
import App from "./App";
import * as serviceWorker from "./serviceWorker";
import "bootstrap/dist/css/bootstrap.css";
import React from 'react';
ReactDOM.render(<App />, document.getElementById("root"));
// If you want your app to work offline and load faster, y... |
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import platform
# The viewer and trace viewer tar files and sha256sum depend on the
# version and ma... |
'use strict';
var uuidv4 = require('uuid/v4');
var _ = require('lodash');
var DividendCalc = require('../dividend-calculator');
/**
* A class that handles aspects related to race such as it's creation
* and dividends calculation.
* @constructor
* @param {string} name - A rememberable name for the race
* @param {... |
import React from "react";
import PropTypes from "prop-types";
import Helmet from "react-helmet";
import { graphql } from "gatsby";
import Layout from "../components/Layout";
import AaJumbotron from "../components/AaJumbotron/AaJumbotron";
import AaGallery from "../components/AaGallery/AaGallery";
import AaTextElement ... |
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.createTable('Students', {
RA: {
type: Sequelize.STRING,
allowNull: false,
primaryKey: true,
autoIncrement: false,
},
name: {
... |
/*
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
to use it in non-GPL project. Please contact sales@dhtmlx.com for details
*/
scheduler.attachEvent("onTemplatesReady",function(){var d=!0,e=scheduler.date.str_to_date("%Y-%m-%d"),h=scheduler.date.date_to_str("%Y-%m-%d");sc... |
describe('Visitor can view articles filtered by category', () => {
beforeEach(function () {
cy.server();
cy.route({
method: 'GET',
url: 'http://localhost:3002/api/v1/articles',
response: 'fixture:list_of_articles.json',
status: 200
})
cy.route({
method: 'GET',
url: ... |
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Flit(MakefilePackage):
"""Floating-point Litmus Tests (FLiT) is a C++ test infrastructure... |
from flask import make_response
from flask.json import jsonify
from flask_login import logout_user
from app.modules.login_manager import login_required
from . import main
@main.route('/', methods=["GET"])
def index():
return make_response(jsonify({"ok": True}), 200)
@main.route('/logout')
@login_required()
def ... |
#!/usr/bin/python3
#
# Copyright 2018 Lim Wei Chiang
#
# 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 appl... |
import React from "react"
import Layout from "../components/layout/layout"
import SEO from "../components/seo/seo"
import styles from "./pages-styles/pagestyles-css-modules.module.css"
import { GiSeahorse } from "react-icons/gi"
import NavbarBookingForm from "../components/navbar-booking-form/navbar-booking-form"
impor... |
/**********************
* CREATE EDITOR FILES
**********************/
require('./bootstrap');
const createDist = require('./create-dist');
const createScripts = require('./create-scripts');
const createStyles = require('./create-styles');
/* INIT
*******/
const init = async () => { // :void
console.log(`
---... |
import $ from 'jquery';
import fx from 'animation/fx';
import {
createWrapper,
initTestMarkup,
isDesktopEnvironment,
TOOLBAR_TOP_LOCATION,
TOOLBAR_BOTTOM_LOCATION } from '../../helpers/scheduler/helpers.js';
import { getSimpleDataArray } from '../../helpers/scheduler/data.js';
import resizeCallbacks... |
//生成随机数字的动画
function numAnimation(ranx, rany, randomNum) {
// 获取相应的二维数组对应的数字格
let numberCell = document.getElementById("number-" + ranx + "-" + rany)
// 给数字格添加样式
numberCell.innerHTML = randomNum
numberCell.style.backgroundColor = getCellBgc(randomNum)
numberCell.style.color = getCellColor(randomNum)
setTi... |
const express = require('express');
const app = express.Router();
const cors = require('cors');
const comp = require('compression');
const bp = require('body-parser');
const Control = require('../Controllers/Index');
const control = new Control();
app.use(cors());
app.use(comp());
app.use(bp.json());
app.get('/e', ... |
import React from 'react';
import License from '../components/license';
import Layout from '../components/layout';
import SEO from '../components/seo';
const content = [
'Cupcake ipsum dolor sit amet gummi bears candy.',
'Gummi bears jelly apple pie toffee candy canes.',
'Marshmallow oat cake pie lollipop ice cr... |
# John Gresl 7/17/2018
# File name usages in: (change the text in these if you rename this file)
# corr_signal_types.py
import copy
import numpy as np
import scipy.signal
import sys
# Helper Functions
def extend_window(w, r):
# Inputs:
# w: An array of 2 elements. Normally, this wil... |
import React from "react";
import './selector.css';
const StoriesSelector = ({ perPage, handler }) => (
<div className="per-page-wrapper row">
<select defaultValue={perPage} onChange={e => handler(+e.target.value)}>
<option value="5">5</option>
<option value="10">10</option>
<option val... |
import React from "react";
import PropTypes from "prop-types";
// @material-ui/core components
import { makeStyles } from "@material-ui/core/styles";
import LinearProgress from "@material-ui/core/LinearProgress";
import styles from "assets/jss/nextjs-material-dashboard-pro/components/customLinearProgressStyle.js";
c... |
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name='senscritique',
version='0.5.2',
author='Wok',
author_email='wok@tuta.io',
description='SensCritique Takeout on PyPI',
keywords=['senscritique', 'takeout', 'takeaway'],
long_descrip... |
/* eslint-disable flowtype/require-valid-file-annotation */
/**
* NOTE: This service is used both by the Electron client
* and server, so it must only contain Node-compatible (read: non-ES6)
* code. If at some future time this requires some large amount
* of ES6 code, we can make a client-side wrapper.
*/
const ch... |
from torch.utils.tensorboard.writer import SummaryWriter, hparams
from ice.llutil.argparser import args as ice_args
class BoardWriter(SummaryWriter):
def __init__(self, log_dir=None, comment='', purge_step=None, max_queue=10, flush_secs=120, filename_suffix=''):
super().__init__(log_dir, comment, purge... |
var a02634 =
[
[ "C_BLOB", "a02634.html#a63f1b33139301b04a7c79d98d9d5a4d9", null ],
[ "C_BLOB", "a02634.html#a681f76dbc3f0a44f4901b206511c6a4c", null ],
[ "C_BLOB", "a02634.html#a636318e2768f3677bc24ee7047aa78cb", null ],
[ "area", "a02634.html#a47b55282fdfb36a93dd88eac1f4dca47", null ],
[ "bounding... |
"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
*/
Object.defineProperty(exports, "__esModule", { value: true });
const build_webpack_1 = require("@angula... |
import React from 'react'
const DEFAULT_SIZE = 24
export default ({
fill = 'currentColor',
width = DEFAULT_SIZE,
height = DEFAULT_SIZE,
style = {},
...props
}) => (
<svg
viewBox={ `0 0 ${ DEFAULT_SIZE } ${ DEFAULT_SIZE }` }
style={{ fill, width, height, ...style }}
{ ...props }
>
<path d... |
/*
* 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 ma... |
import random
import warnings as test_warnings
from contextlib import ExitStack
from http import HTTPStatus
import pytest
import requests
from rotkehlchen.fval import FVal
from rotkehlchen.serialization.serialize import process_result_list
from rotkehlchen.tests.utils.aave import (
AAVE_TEST_ACC_1,
AAVE_TEST_... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = exports.aggregateRequiredColumns = exports.getFilterDataFunc = exports.getValueAggrFunc = exports.pointPosResolver = exports.pointPo... |
/**
* Wayback Machine
*
* Opens the latest snapshot of the current URL from Internet Archive.
* Clicking the bookmarklet while viewing an archive redirects to the
* live page.
*
* Author: Mathias Fredriksson
* Version: 0.0.0
*/
let loc = window.location.href;
// Safari error pages don't expose the URL :(...
i... |
import Controller from '@ember/controller';
import {inject as service} from '@ember/service';
export default class DashboardController extends Controller {
@service feature;
@service session;
} |
import subprocess
cmd = r'"C:\Program Files (x86)\SourceMonitor\SourceMonitor.exe" /C sourcemonitor_commands.xml'
subprocess.call(cmd, shell = True) |
// modules are defined as an array
// [ module function, map of requireuires ]
//
// map of requireuires is short require name -> numeric require
//
// anything defined in a previous bundle is accessed via the
// orig method which is the requireuire for previous bundles
(function outer (modules, cache, entry) {
//... |
const { glob } = require("glob");
const { promisify } = require("util");
const { Client } = require("discord.js");
const globPromise = promisify(glob);
/**
* @param {Client} client
*/
module.exports = async (client) => {
// Commands
const commandFiles = await globPromise(`${process.cwd()}/command... |
#manejo de las transacciones
#manejo de las cantidades
#manejo de los precios
#DJANGO MODELS
from django.db.models import Count , Avg , Min ,Sum
from orderbook_veinte.orderbook.models import Transactions ,Orders , OrderStatus
class TransactionsManger :
"""
Utilities to general transactions in the ord... |
/**
* Returns an array containing 3x values: *red*, *green*, *blue*, *alpha* with each color value in range of [0..255]
* @param hexColor - css color hex string (with or without leading '#')
* @param [alpha=255] - alpha value in range [0..255]
*/
export default (hexColor, alpha = 255) => {
const offset = hexColo... |
import polib
import deepl
import getopt
import sys
DEEPL_API_TOKEN = 'ADD YOUR API KEY HERE!'
global argv
global opts
global args
argv = sys.argv[1:]
opts, args = getopt.getopt(argv, "f:l:")
def translate(text, lang):
translator = deepl.Translator(DEEPL_API_TOKEN)
return str(translator.translate_text(text, ... |
import React, { Fragment } from 'react';
import { withRouter } from 'react-router-dom';
import { ProfileCard } from "../photo";
import { EmpathySpanButton } from "../empathy";
import { arrayToLocalString } from "../util_func/date_time_func";
const RenderCommentBar = ({ comment, loginId, location, handle }) => (
<... |
/**
* Generated by Apache Royale Compiler from org\apache\royale\html\beads\models\DataProviderModel.as
* org.apache.royale.html.beads.models.DataProviderModel
*
* @fileoverview
*
* @suppress {missingRequire|checkTypes|accessControls}
*/
goog.provide('org.apache.royale.html.beads.models.DataProviderModel');
/* ... |
var createError = require('http-errors');
var express = require('express');
var path = require('path');
var cookieParser = require('cookie-parser');
var logger = require('morgan');
var indexRouter = require('./routes/index');
var usersRouter = require('./routes/users');
var catalogRouter = require('./routes/catalog');... |
import pandas as pd
from src.constants import (
DATE_READ_SETTINGS,
DATE_TIME_READ_SETTINGS,
ELECTRIC_INTERVAL_DATA_CSV_NAME,
METER_TO_LOCATION_CSV_NAME,
OCCUPANCY_DATA_CSV_NAME,
STEAM_DATA_CSV_NAME,
TENANT_ELECTRIC_INTERVAL_DATA_CSV_NAME,
)
def read_raw_excel_data_to_csv():
"""
R... |
import os
from conans import CMake, ConanFile, tools
required_conan_version = ">=1.33.0"
class LibrdkafkaConan(ConanFile):
name = "librdkafka"
license = "BSD-2-Clause"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/edenhill/librdkafka"
description = "Librdka... |
module.exports = function (babel) {
let t = babel.types
return {
visitor: {
CallExpression (path) {
const node = path.node
const callee = node.callee
if (!t.isMemberExpression(callee)) return
const method = callee.property
const obj = callee.object
if (!t.i... |
import React from 'react'
import Layout from '../components/layout'
import {graphql,useStaticQuery, Link} from 'gatsby'
import blogStyles from './blog.module.scss'
import Head from '../components/head'
const BlogPage=()=>{
const data =useStaticQuery(graphql`
query{
allContentfulBlogPost(
sort... |
(this.webpackJsonpfrontend=this.webpackJsonpfrontend||[]).push([[0],{23:function(e,t,n){e.exports=n(46)},28:function(e,t,n){},29:function(e,t,n){e.exports=n.p+"static/media/logo.5d5d9eef.svg"},30:function(e,t,n){},31:function(e,t,n){},32:function(e,t,n){},38:function(e,t,n){},45:function(e,t,n){},46:function(e,t,n){"us... |
import React, { useState,useContext,useEffect } from 'react';
// import { SelectionState } from '@devexpress/dx-react-grid';
import { SearchState,
SelectionState,
SortingState,
IntegratedFiltering,
IntegratedSorting,
PagingState,
IntegratedPaging,
DataTypeProvider } from '@devexpress/dx-react-grid';
import... |
// Problem 1. Planar coordinates
function solve(args) {
var input = args.map(Number),
x1 = input[0],
y1 = input[1],
x2 = input[2],
y2 = input[3],
segment1,
x3 = input[4],
y3 = input[5],
x4 = input[6],
y4 = input[7],
segment2,
x... |
const axios = require('axios');
let hap;
let Service, Characteristic;
class MiVacuum {
constructor(log, config, api) {
this.status = {
run_state: 5,
mode: 0,
err_state: 2103,
battery_life: 85,
box_type: 3,
mop_type: 1,
s_... |
"""
Test the running status of Monit service
"""
import logging
import pytest
from tests.common.helpers.assertions import pytest_assert
logger = logging.getLogger(__name__)
pytestmark = [
pytest.mark.topology('any')
]
def test_monit_status(duthost):
monit_status_result = duthost.shell("sudo monit status",... |
import React from 'react';
import DocsSnippet from 'components/Documentation/DocsSnippet.js';
export default class CodePaginations extends React.Component {
state = {
color: 'pink',
type: 'html',
};
render() {
let codeToShow =
`<div ` +
(this.state.type !== 'react' ? 'class' : 'className... |
'use strict';
module.exports = function(Client) {
};
|
"use strict";
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _VisionContainer = _interopRequireDefault(require("./containers/VisionContainer"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }... |
#!/usr/bin/env python3.7
# Copyright 2021, Gurobi Optimization, LLC
# This example reads a MIP model from a file, solves it in batch mode,
# and prints the JSON solution string.
#
# You will need a Cluster Manager license for this example to work.
import sys
import time
import json
import gurobipy as gp
from gurobip... |
'use strict';
//Procedures and templates service used to communicate Procedures and templates REST endpoints
angular.module('procedures-and-templates').factory('ProceduresAndTemplates', ['$resource',
function($resource) {
return $resource('procedures-and-templates/:proceduresAndTemplateId', { proceduresAndTemplateI... |
import express from 'express';
// ------------ Importing Controllers ------------//
import authController from '../controllers/authController.js';
import { forwardAuthenticated, ensureAuthenticated } from '../config/checkAuth.js';
import { ensureCaptchaClicked } from '../helpers/captcha.js';
const authRouter = expres... |
"use strict";
class FramesManager {
constructor() {
this.frames = {
totalFrames: () => { return 0; }
};
this.onReset = [];
}
set(frames) {
this.frames = frames;
for (let i = 0; i < this.onReset.length; i++) {
this.onReset[i]();
}
}
}
function blobToImage(blob) {
return n... |
import createREGL from 'regl'
import loadResources from './load-resources'
import createCamera from './camera'
import createDrawCommon from './draw-common'
import createDrawBackground from './draw-background'
import createDrawBunny from './draw-bunny'
const regl = createREGL()
const camera = createCamera(regl)
const d... |
import { fn } from '../setup';
import getData from "./helper/getData";
import setData from "./helper/setData";
import { handleObjectDataLoop } from "../helper";
import { isString, isUndefined } from "@varunsridharan/js-is";
fn.data = function( name, value ) {
if( !name ) {
if( !this[ 0 ] ) {
return;
}
const ... |
import React, { memo } from 'react';
import sections from '../../../data/rightSections';
import SectionIcon from '../../shared/SectionIcon';
import styles from './RightNavbar.module.css';
import SyncIndicator from './SyncIndicator';
const RightNavbar = () => (
<div className={styles.container}>
<div className="g... |
import React, { useRef, useState, useEffect } from 'react'
import api from 'lib/api'
import { useValues } from 'kea'
import { Loading, stripHTTP } from 'lib/utils'
import { Modal, Button, Spin } from 'antd'
import { EventElements } from 'scenes/events/EventElements'
import * as d3 from 'd3'
import * as Sankey from 'd3-... |
"use strict";
const DataStoreType = require("./lib/config/config").DataStoreType;
const Core = require("./lib/Core").Core;
const ErrorManager = require("./lib/common/ErrorManager").ErrorManager;
const utils = require( "./lib/common/Utils");
/**
* @enum { String }
*
*/
let Type = {
home: "home",
work: "work... |
import React from 'react';
import PropTypes from 'prop-types';
export default function HTML(props) {
return (
<html {...props.htmlAttributes}>
<head>
<meta charSet="utf-8" />
<meta httpEquiv="x-ua-compatible" content="ie=edge" />
<meta
name="viewport"
content="wi... |
'use strict';
const should = require('chai').should(); // eslint-disable-line
describe('hexo-notify', () => {
// Tests.
it('should notify.', () => {
return true;
});
});
|
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = void 0;
var ThemeBController_1 = require("ThemeBController");
Object.defineProperty(ex... |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the Lic... |
word_size = 8
num_words = 512
output_extended_config = True
output_datasheet_info = True
netlist_only = True
nominal_corner_only = True |