text stringlengths 3 1.05M |
|---|
/*
* Copyright 2019 TWO SIGMA OPEN SOURCE, 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... |
const audioCtx = new (window.AudioContext || window.webkitAudioContext)();
// C3 - C6
// https://pages.mtu.edu/~suits/notefreqs.html
const sounds = [
130.81,
146.83,
164.81,
174.61,
196.00,
220.00,
246.94,
261.63,
293.66,
329.63,
349.23,
392.0,
440.0,
493.88,
523.25,
587.33,
659.25,
... |
/**
The MIT License (MIT)
Copyright (c) 2014 Michiel Visser
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, merg... |
module.exports = ["a-2", require("./b")] |
from __future__ import print_function
import argparse
import data_loader
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
import torchvision
import time
# Command setting
parser = argparse.ArgumentParser(description='Finetune')
parser.add_argument('-model', '-m', type=str, help='mod... |
/*!
* jQuery JavaScript Library v3.6.0
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2021-03-02T17:08Z
*/
( function( global, factory ) {
"use strict";
if... |
import React, { PureComponent } from 'react';
import { connect } from 'dva';
import { Form, Input, Card, Modal, Row, Col, InputNumber } from 'antd';
import PicturesWall from '@/components/PicturesWall/PicturesWall';
@connect(({ assetDatamaint }) => ({
assetDatamaint,
}))
@Form.create()
class PayEdit extends PureComp... |
import{r as i,h as e,H as s}from"./p-cc373a46.js";import{f as n,s as l,d as o}from"./p-b72f83c8.js";const t=class{constructor(s){i(this,s),this.fields='[{"id":1,"icon":"ph-folder","name":"Cats","children":[{"id":2,"icon":"ph-file","name":"Color cats","children":[{"id":3,"name":"Yellow cats"},{"id":4,"name":"Black cats"... |
// Copyright JS Foundation and other contributors, http://js.foundation
//
// 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 r... |
# Copyright (c) 2018 PaddlePaddle 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 app... |
var searchData=
[
['a',['a',['../struct_s_u_plane3_d.html#ac20abbfe5c53954c051f39a67e360651',1,'SUPlane3D']]],
['alpha',['alpha',['../struct_s_u_color.html#a77a421e57b9fcb475804ac425b337e9b',1,'SUColor']]],
['alpha_5findex',['alpha_index',['../struct_s_u_color_order.html#a5f91ee410b31d46865bdf7fb0d6fa333',1,'SUCo... |
from typing import Union
from functools import reduce
from operator import mul
import numpy as np
from numpy.lib.stride_tricks import sliding_window_view
from jesse.helpers import get_candle_source, slice_candles, same_length
def pwma(candles: np.ndarray, period: int = 5, source_type: str = "close", sequential: bo... |
/**
* This source code is the intellectual property of Appcelerator, Inc.
* Copyright (c) 2014-2015 Appcelerator, Inc. All Rights Reserved.
* See the LICENSE file distributed with this package for
* license restrictions and information about usage and distribution.
*/
var pkg = require('../package.json'),
debug =... |
const fs = global.nodemodule["fs-extra"];
module.exports.config = {
name: "goibot",
version: "1.0.1",
hasPermssion: 0,
credits: "....",
description: "goibot",
commandCategory: "Noprefix",
usages: "noprefix",
cooldowns: 5,
};
module.exports.handleEvent = function({ api, event, args, Threads }) {
var {... |
$(function(){
$(".header_box").load("header.html",function(){
main();
navText("首页");
});
$(".footer").load("footer.html");
carousel();//图片轮播
})
//banner图片轮播
function carousel(){
var number=$(".banner ul li").size()-1;//图片的数量
var cur=0;//当前显示的图片
var timer=0;//定时器
//下一... |
"""
Django settings for app project.
Generated by 'django-admin startproject' using Django 3.0.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
# Bui... |
def outUImath(mathout):
print("Your current balance is " + str(mathout))
input("Budget Badger will now close") |
from datetime import timedelta
from jirabuddy.bot import respond_to, every, PeriodicPlugin, RegexPlugin
@respond_to("^sup$")
def view_ticket(_, msg):
msg.reply("SUP ;/")
@respond_to("(^[0-9 ]*)\+([0-9 ]*)")
def plus(_, msg, first: str, second: str):
"""Calculate a simple Plus equation"""
if first.isdig... |
module.exports={title:"Trino",slug:"trino",svg:'<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Trino</title><path d="M14.124 16.8529a.1615.1615 0 1 1 .1576.1614.1577.1577 0 0 1-.1576-.1614zm-5.607-.1576a.1614.1614 0 1 0 0 .3228.1614.1614 0 0 0 0-.3228zm10.1341-.6648v1.9869c-.031.5788-.524... |
/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'indent', 'ja', {
indent: 'インデント',
outdent: 'インデント解除'
} );
|
export default function PreviewImage({visible, setVisible = () => {}, children}) {
const close = () => {
setVisible(false)
}
if (!visible) {
return [];
}
return (
<div
role="dialog"
aria-modal="true"
aria-labelledby="modal-headline"
... |
import tensorflow as tf
class LogHistory(tf.keras.callbacks.Callback):
def on_train_begin(self, logs={}):
self.batches = []
self.epochs = []
def _store_logs(self, storage, batch_or_epoch, logs={}):
if [key for key in logs if "changed_quantization_ration" in key]:
storage.a... |
import { connect } from 'react-redux';
import Notes from './Notes';
import { editNote, updateNoteRequest, deleteNoteRequest, moveWithinLane } from './NoteActions';
const mapDispatchToProps = {
editNote,
updateNote: updateNoteRequest,
deleteNote: deleteNoteRequest,
moveWithinLane,
};
export default connect(
... |
import { useState, useEffect } from "react"
export default function useScoresByYear(data) {
const [points, setPoints] = useState(data)
// on mount or change
useEffect(() => setPoints(data), [data])
const getYear = year => points.filter(score => score.year === `${year}`)[0]
return { points, getYear }
}
|
const request = require('supertest');
const express = require('express');
const Profiles = require('../../api/profile/profileModel');
const profileRouter = require('../../api/profile/profileRouter');
const server = express();
server.use(express.json());
jest.mock('../../api/profile/profileModel');
// mock the auth mid... |
#! /usr/bin/env python3
import sys
import re
def vet_nucleotide_sequence(sequence):
"""
Return None if `sequence` is a valid RNA or DNA sequence, else raise exception.
Parameters
----------
sequence : str
A string representing a DNA or RNA sequence (upper or lower-case)
Returns
... |
import glob
import os
import re
import sys
from lxml import etree
from functions import replace_files
class VersionBumper:
module_list = [
"AWSAPIGateway",
"AWSAutoScaling",
"AWSCloudWatch",
"AWSCognitoAuth",
"AWSCognitoIdentityProvider",
"AWSComprehend",
... |
import React from 'react';
import {useStaticQuery, graphql} from 'gatsby';
import {Row, Column} from '../Sections'
import {H3, H4, Paragraph} from '../Heading'
import graphic from "../../assets/images/graphic.png"
import Trend from 'react-trend';
import {Colors} from '../Styling'
import {Card} from '../Card'
export de... |
js2me.createClass({
/*
* public static Connection open(String name) throws IOException
*/
$open$Ljava_lang_String_$Ljavax_microedition_io_Connection_: function (url) {
var parts = url.text.split(':');
/*if (parts[0] === 'socket') {
return new javaRoot.$javax.$microedition.$io.$SocketConnectionImpl(parts[1]... |
// this is where fetches go
export const fetchCharacters = () => {
return (dispatch) => {
return fetch("http://localhost:3000/characters")
.then((response) => response.json())
.then((characters) => {
console.log(characters);
dispatch({ type: "FETCH_CHARACTERS", payload: characters });... |
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot c... |
import { StyleSheet } from "react-native";
const styles = StyleSheet.create({
container: {
flexDirection: "row",
alignItems: "center",
},
profile: {
width: 40,
height: 40,
},
title: {
marginLeft: 10,
textAlign: "center",
fontSize: 20,
fontWeight: "bold",
},
});
export defau... |
import React from 'react';
import { Route, Link, Redirect } from 'react-router-dom';
import Home from '../home';
import About from '../../components/about';
import Login from '../../containers/login';
import Logout from '../../containers/login/logout';
import { appStore } from '../../index';
const PrivateRoute = ({co... |
const { Model, DataTypes } = require("sequelize");
const sequelize = require("../config/connection");
class Nanny extends Model {}
Nanny.init(
{
id: {
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true,
autoIncrement: true,
},
username: {
type: DataTypes.STRING,
... |
import request from "@/utils/request"
export function PostInstallEquip (data) {
return request({
url: "/installEquip",
method: "post",
data: data
})
} |
#!/usr/bin/env python
from __future__ import division, print_function, unicode_literals
import time
import signal
import sys
import os
import shutil
import platform
import errno
import select
import logging
import threading
try:
from ConfigParser import SafeConfigParser as _ConfigParser, NoOptionError
class ... |
'use strict';
var path = require('path');
var jest = require('jest');
var algoliasearch = require('algoliasearch');
var staticJestConfig = require('../jest.config');
var enableIntegrationTest =
process.env.ONLY_UNIT !== 'true' &&
process.env.INTEGRATION_TEST_API_KEY &&
process.env.INTEGRATION_TEST_APPID;
var p... |
/**
* gets the first attachment document from the most recent case message to set as the default viewerDocumentToDisplay
*
* @param {object} providers the providers object
* @param {object} providers.props the cerebral props object
* @returns {object} object containing viewerDocumentToDisplay
*/
export const getD... |
# Copyright 2019 The FastEstimator 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 appl... |
let tabs = {};
chrome = this.browser || this.chrome;
const inspectFile = 'inspect.js';
const activeIcon = 'active-64.png';
const defaultIcon = 'default-64.png';
const inspect = {
toggleActivate: function(id, type, icon) {
this.id = id;
chrome.tabs.executeScript(id, {file: inspectFile}, function() {
chr... |
/* eslint-env jest */
const fs = require('fs');
const path = require('path');
const webpack = require('webpack');
const rimraf = require('rimraf');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackAdditionalTemplatePlugin = require('../');
const OUTPUT_DIR = path.join(__dirname, './dist');
d... |
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sweetalert2=e()}(this,function(){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){ret... |
import mxnet as mx
import numpy as np
import argparse
caffe_flag = True
try:
import caffe
from caffe.proto import caffe_pb2
except ImportError:
caffe_flag = False
import caffe_parse.caffe_pb2
def protoBlobFileToND(proto_file):
data = ''
file = open(proto_file, "r")
if not file:
ra... |
#!/usr/bin/env python3
# Copyright (c) 2018 Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
"""Select action handler."""
from mbl.cli.utils import device, file_handler
from . import list_action
def execute(args):
"""Entry point for the select command."""
list_o... |
import Modal from './modal.js'; //Importa a função
const modal = Modal(); //Guarda a função na constante.
//Mapeando para usar modal para confirmar leitura também
const modalTitle = document.querySelector('.modal h2');
const modalDescription = document.querySelector('.modal p');
const modalButton = document.querySele... |
'use strict';
// parser.js tests
const { expect } = require('chai');
const parser = require('../app/util/parser');
// Tests
describe('parser.js tests', () => {
it('should check if parser can parse a given file', (done) => {
// Parse
const data = parser.loadConfig('config/config.yml');
// Check
expec... |
import React from "react";
import Box from "@mui/material/Box";
import Tabs from "@mui/material/Tabs";
import Tab from "@mui/material/Tab";
import { Routes, Route, useNavigate, useLocation } from "react-router-dom";
import ChangePasswordPage from "./ChangePasswordPage";
import ProfilePage from "./ProfilePage";
import ... |
// Generated on 2014-05-20 using generator-angular 0.8.0
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
var modRewrite = requir... |
import React from 'react';
import Footer from './Footer';
import Header from './Header';
const firebaseConfig = {
apiKey: 'AIzaSyBMUDD8WupWFaz3y9sT7R0IB_HyjgWzYuY',
authDomain: 'protab-8fb31.firebaseapp.com',
databaseURL: 'https://protab-8fb31.firebaseio.com',
projectId: 'protab-8fb31',
storageBucket: 'prota... |
import React from 'react'
class PriceTag extends React.Component {
render() {
let priceClass = "price-tag";
if (parseFloat(this.props.currencyPrice) < 0) {
priceClass += " green";
} else {
priceClass += " red"
}
return(
<div className="pri... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.music = void 0;
var music = {
"viewBox": "0 0 20 20",
"children": [{
"name": "path",
"attribs": {
"d": "M18.405,2.799C18.293,2.359,17.749,2,17.195,2H2.805c-0.555,0-1.099,0.359-1.21,0.799L1.394,4h17.211L18.405,2.799... |
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... |
/**
* Sign in action types.
*/
export const TRY_TO_SIGN_IN = "TRY_TO_SIGN_IN";
export const SUCCEDED_TO_SIGN_IN = "SUCCEDED_TO_SIGN_IN";
export const FAILED_TO_SIGN_IN = "FAILED_TO_SIGN_IN";
/**
* Sign out action types.
*/
export const TRY_TO_SIGN_OUT = "TRY_TO_SIGN_OUT";
export const SUCCEDED_TO_SIGN_OUT = "SUCCE... |
import rdkit.Chem.AllChem as rdkit
def test_get_atoms(case_data):
"""
Test :meth:`.Molecule.get_atoms`.
Parameters
----------
case_data : :class:`.CaseData`
A test case. Holds the molecule to test and the correct
SMILES.
Returns
-------
None : :class:`NoneType`
"... |
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import React from "react";
import ReactDOM from "react-dom";
import {Route, IndexRoute, Link} from "react-router";
import Relay from "react-relay";
import injectTapEventPlugin from 'react-tap-event-plugin';
import {Relask, RedirectComponent} from "babe... |
'''
This program should be executed after the tagParse execution is done.
Before running this program, please execute the following statements in PostgreSQL to create tables.
This program is to parse the labelled_by relationship of the Stack Overflow network.
------------------------------------------------------------... |
/*!
* Copyright 2010 LearnBoost <dev@learnboost.com>
*
* 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... |
import configureStore from '@shopgate/pwa-common/store';
import historyReducer from '@shopgate/pwa-common/reducers/history';
import productReducers from '@shopgate/pwa-common-commerce/product/reducers';
import { HISTORY_PUSH_ACTION } from '@shopgate/pwa-common/constants/ActionTypes';
import { updateHistory } from '@sho... |
# Copyright 2011 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
"""Utilties for manipulating WebAssembly binaries from python.
"""
f... |
/**
* Auto-generated action file for "NBA Stats" API.
*
* Generated at: 2019-05-07T14:43:11.215Z
* Mass generator version: 1.1.0
*
* flowground :- Telekom iPaaS / nba-com-connector
* Copyright © 2019, Deutsche Telekom AG
* contact: flowground@telekom.de
*
* All files of this connector are licensed under the A... |
import React from 'react';
export default function ({ message }) {
return (
<div>{message}</div>
);
}
|
deepmacDetailCallback("5cf938000000/24",[{"d":"2013-08-31","t":"add","a":"1 Infinite Loop\nCupertino CA 95014\n\n","c":"UNITED STATES","o":"Apple, Inc"},{"d":"2015-08-27","t":"change","a":"1 Infinite Loop\nCupertino CA 95014\n\n","c":"US","o":"Apple, Inc"},{"d":"2015-09-01","t":"change","a":"1 Infinite Loop\nCupertin... |
class BaseResponse {
constructor(status, statusCode, data = null, message = 'Operation Completed Successfully') {
this.status = status;
this.statusCode = statusCode;
this.data = data;
this.message = message;
}
}
module.exports = {
BaseResponse,
}; |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import unittest
import warnings
from six import StringIO
from conans.client import tools
from conans.client.output import ConanOutput
from conans.client.tools.oss import cpu_count
from conans.client.tools.win import build_sln_command
from conans.errors import C... |
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distribu... |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* Inventariomecanico Schema
*/
var InventariomecanicoSchema = new Schema({
name: {
type: String,
default: '',
required: 'por favor ingrese el nombre de la parte',
trim: true
},... |
import { h } from 'vue'
export default {
name: "ClockTimeTwelve",
vendor: "Mdi",
type: "",
tags: ["clock","time","twelve"],
render() {
return h(
"svg",
{"xmlns":"http://www.w3.org/2000/svg","width":"24","height":"24","viewBox":"0 0 24 24","class":"v-icon","fill":"currentColor","data-name":"mdi... |
var System={
SYMBOLS:" ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789?!@,-.:;<=>[\\]/_#$%&'()*+\"~",
versions:{},
COMPRESSMETHODS:[
// Best first
{label:"Sequence packed",SEQUENCERECTANGLE:false,SEQUENCEPACKER:true,BINARYPACKER:"none"},
{label:"Sequence packed, zipped",SEQUENCERECTANGLE:false,SEQUENCEPACKER:... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _range2 = require('lodash/range');
var _range3 = _interopRequireDefault(_range2);
exports.default = SegmentedProgressBar;
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-... |
/**
* Copyright 2021 F5 Networks, 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 agr... |
/*
* RaiBlocks extended functions in JavaScript
* https://github.com/SergiySW/RaiBlocksJS
*
* Released under the BSD 3-Clause License
*
*/
// Global variables: block_count, count, unchecked, frontier_count, frontiers, peers
var RaiBlocks = RaiBlocks || {}
Rai.prototype.initialize = function () {
}
// Extended funct... |
/**
* Copyright 2019 The AMP HTML 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 require... |
#! /usr/bin/env node
const {
showExit,
commands,
args,
run,
message
} = require('./src/modules');
if (args.includes('-v')) {
const version = require('./package.json').version;
showExit(message.version, version);
}
if (args[0] === 'help') {
showExit(message.help);
}
if (args[0] === 'deploy') {
cons... |
module.exports = {
siteMetadata: {
title: "Vivek Mittal's Blog",
description: "A blog site containing all the blogs written by Vivek Mittal",
url: "https://vivek-writes.netlify.com",
image: "/feature.jpg",
twitter: "@vivek96_",
instagram: "@vivek06_",
github: "@vivek1909",
author: "Viv... |
/*
Plugin Name: Animated Headlines
Written by: Codyhouse - (https://codyhouse.co/demo/animated-headlines/index.html)
*/
jQuery(document).ready(function($) {
//set animation timing
var animationDelay = 2500,
//loading bar effect
barAnimationDelay = 3800,
barWaiting = barAnimationDelay - 3000, //3000 is the dur... |
import { combineReducers } from 'redux';
import isRequesting from './is-requesting';
import attachmentRequest from './attachment-request';
import crid from './crid';
import officerId from './officer-id';
import relatedComplaints from './related-complaints';
import editModeOn from './edit-mode-on';
export default com... |
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as DjangoUserAdmin
from . import models
class UserAdmin(DjangoUserAdmin):
fieldsets = (
(None, {"fields": ("email", "password")}),
(
"Personal info",
{"fields": ("first_name", "last_name")},
... |
module.exports = {
root: true,
env: {
browser: true,
node: true,
mocha: true,
},
extends: [
"plugin:vue/recommended",
"eslint:recommended",
"@vue/typescript/recommended",
"@vue/prettier",
"@vue/prettier/@typescript-eslint",
"plugin:@typescript-eslint/eslint-recommended",
... |
import React from "react"
import PropTypes from "prop-types"
import Header from "../header"
import Footer from "../footer"
import { Wrapper } from "./styles"
import { GlobalStyle } from "../../styles/global"
const Layout = ({ children }) => {
return (
<>
<Header />
<Wrapper>
<main>{children}... |
// tarpit
let hooks_to_delay = [
'connect', 'helo', 'ehlo', 'mail', 'rcpt', 'rcpt_ok',
'data', 'data_post', 'queue', 'unrecognized_command', 'vrfy', 'noop',
'rset', 'quit'
];
exports.register = function () {
// Register tarpit function last
const plugin = this;
const cfg = plugin.config.get('... |
import React from 'react'
import Link from 'react-router/lib/Link'
import {pure} from 'recompose'
import urls from 'utils/urls'
const {home} = urls
export const Header = pure(({loggedIn, logout, username}) =>
<nav className='navbar navbar-inverse'>
<div className='container-fluid'>
<div className='navbar-hea... |
/* imports common modules */
var electron = require('electron')
var ipc = electron.ipcRenderer
/* define window.chrome
this is necessary because some websites (such as the Google Drive file viewer, see issue #378) check for a
Chrome user agent, and then do things like if(chrome.<module>) {}
so we need to def... |
/* eslint no-console:0 */
require('../src/server/babel')
require('../src/server/globals')
const { json } = require('../src/service/api')
json('status').then(
res => console.info('API server is up and running', res),
err => console.error('Failed to ping API server', err)
)
|
var e=function(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)},t=function(t,r){this.sourceIndex=0,this.tag=0,this.bitCount=0,this.destLen=0,this.lengthTree=new e,this.distanceTree=new e,this.source=void 0,this.dest=void 0,this.source=t,this.dest=r},r=new e,n=new e,o=new Uint8Array(30),a=new Uint16Arra... |
const http = require('http')
http
.createServer(function (req, res) {
console.log(req.headers)
res.writeHead(200, { 'Content-Type': 'text/plain' })
res.end(
[
'Hello World',
process.env.FOO,
process.env.HTTP_PROXY,
'x-forwarded-host: ' + req.headers['x-forwarded-host... |
import React from "react"
import { colors } from "../../utils/presets"
import { WebpackIcon, ReactJSIcon, GraphQLIcon } from "../../assets/tech-logos"
import Card from "../card"
import CardHeadline from "../card-headline"
import TechWithIcon from "../tech-with-icon"
import FuturaParagraph from "../futura-paragraph"
c... |
$(function () {
$('.js-basic-example').DataTable({
responsive: true
});
}); |
/**
* Using Rails-like standard naming convention for endpoints.
* GET /api/tags -> index
* POST /api/tags -> create
* GET /api/tags/:id -> show
* PUT /api/tags/:id -> upsert
* PATCH /api/tags/:id -> patch
* DELETE /api/tags/:id ... |
import React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Growler from './growler.jsx';
import * as growlerActionCreators from '../actions/growler.action';
const mapStateToProps = state => ({
growler: state.growler,
});
const mapDispatchToProps = dispatch =>... |
import React from 'react';
import Link from '@docusaurus/Link';
import { morfeo } from '@morfeo/react';
import { enableMorfeoDevTool } from '@morfeo/dev-tools';
import '@morfeo/preset-default';
import CookieConsent from 'react-cookie-consent';
enableMorfeoDevTool();
const buttonStyle = morfeo.resolve({ corner: 'm' })... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import atexit
from .platform import platform
__all__ = ['set_up', 'get_context']
_context = None
def _tear_down():
global _context
_context.tear_down()
_context._vm.tear_down() # no-qa
platform.tear_down()
def set_up():
"""
... |
import ifElse from '../ifElse';
describe('utils/function/ifElse', () => {
it('should call first function base on condition', () => {
const cond = jest.fn(() => true);
const onT = jest.fn(() => 8);
const onF = jest.fn();
expect(ifElse(cond, onT, onF)(1, 2, 3)).toBe(8);
expec... |
/**@preserve GeneXus Java 10_3_12-110051 on December 12, 2020 12:55:45.27
*/
gx.evt.autoSkip = false;
gx.define('hconsultaprocessoconv', false, function () {
this.ServerClass = "hconsultaprocessoconv" ;
this.PackageName = "" ;
this.setObjectType("web");
this.setOnAjaxSessionTimeout("Warn");
this.hasEn... |
/*
* # Semantic UI - 1.8.0
* https://github.com/Semantic-Org/Semantic-UI
* http://www.semantic-ui.com/
*
* Copyright 2014 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
!function(e,n,t,i){"use strict";e.fn.accordion=function(t){{var o,a=e(this),s=(new Date).getTime(),r... |
(this.webpackJsonpdashboard=this.webpackJsonpdashboard||[]).push([[85],{557:function(e,t,o){"use strict";function r(e){e.languages.mel={comment:/\/\/.*/,code:{pattern:/`(?:\\.|[^\\`\r\n])*`/,greedy:!0,alias:"italic",inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy... |
import { createBrowserHistory } from 'history';
import routeConstants from '@utils/routeConstants';
export const setbaseUrl = () => {
let baseUrl = '';
const routes = Object.keys(routeConstants);
const pathname = window.location.pathname;
if (process.env.ENVIRONMENT_NAME === 'uat') {
routes.forEach((routeK... |
/*
* Copyright 2014,2015 Open Networking Laboratory
*
* 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... |
# -*- coding: utf-8 -*-
from scout.commands import cli
def test_update_diseases(mock_app):
"""Tests the CLI that updates disease terms in database"""
runner = mock_app.test_cli_runner()
assert runner
# Test CLI base, no arguments provided
result = runner.invoke(cli, ["update", "diseases"])
... |
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
... |
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["rrule"] = factory();
else
root["rrule"]... |