text stringlengths 3 1.05M |
|---|
var Promise = require('bluebird');
var request = require('request');
var pRequest = function (options) {
return new Promise((resolve, reject) => {
request(options, (err, response, body) => {
if (err) reject(err);
resolve({ response, body });
});
});
};
function buildOpt... |
// import formatDistance from './_lib/formatDistance/index.js'
// import formatLong from './_lib/formatLong/index.js'
// import formatRelative from './_lib/formatRelative/index.js'
// import localize from './_lib/localize/index.js'
// import match from './_lib/match/index.js'
/**
* @type {Locale}
* @category Locales... |
#!/usr/bin/env python
import getopt, re
def get_options(args):
expected_major_version = None
try:
opts, _ = getopt.getopt(args, "hnm:", ["not-installed", "major-version="])
except getopt.GetoptError:
print('check_install.py [-n] [-m <major_version>]')
sys.exit(2)
for opt, arg in opts:
if opt =... |
import React from "react";
import './Table.css';
import API from '../../utils/api';
// import Body from '../TableBody/Body';
// // import API from '../../utils/api';
// // import TableHead from "../tableHeader";
// // import TableBody from '../tableBody';
// import './Table.css';
const Table = (props) => {
return ... |
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
from .configloader import DivisionsConfiguration, DivisionRule, DivisionType
from .matchrule import MatchRule, MatchUntil, MatchOnly, Collect, Include
from .postrules import PostRules, PostRule
|
!function(a,b){"use strict";function c(a){this.callback=a,this.ticking=!1}function d(b){return b&&"undefined"!=typeof a&&(b===a||b.nodeType)}function e(a){if(arguments.length<=0)throw new Error("Missing arguments in extend function");var b,c,f=a||{};for(c=1;c<arguments.length;c++){var g=arguments[c]||{};for(b in g)f[b]... |
/**
* simple packaging O(∩_∩)O~
*/
var fs = require('fs')
let lib = 'c3'
let banner = '/*! The MIT License (MIT) https://github.com/vace/c3.js */'
var template = code => `
${banner}
(function moduledefine(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(... |
const fs = require('fs');
const archiver = require('archiver');
fs.unlinkSync('./dist/main.js');
fs.unlinkSync('./dist/main.css');
let output = fs.createWriteStream('./dist/build.zip');
let archive = archiver('zip', {
zlib: { level: 9 } // set compression to best
});
const MAX = 13 * 1024; // 13kb
output.on('cl... |
import React, { useEffect, useState } from 'react';
import { TouchableOpacity } from 'react-native';
import Icon from 'react-native-vector-icons/MaterialIcons';
import api from '~/services/api';
import Background from '~/components/Background';
import { Container, ProvidersList, Provider, Avatar, Name } from './styles... |
var IS_PURE = require('../internals/is-pure');
var store = require('../internals/shared-store');
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: '3.6.4',
mode: IS_PURE ? 'pure' : 'global',
copyright: '© 2020 Acid... |
const path = require('path');
const withCss = require('@zeit/next-css');
module.exports = {
target: 'serverless',
...withCss({
webpack(config) {
// CSS
config.module.rules.push({
test: /\.(png|svg|eot|otf|ttf|woff|woff2)$/,
use: {
loader: 'url-loader',
options: {... |
#! /usr/bin/env node
require('dotenv').config();
const puppeteer = require('puppeteer');
const args = require('yargs').argv;
const { enterGiveaways } = require('./src/giveaways');
const signIn = require('./src/signIn');
//start index code
(async () => {
const username = process.env.AMAZON_USERNAME || args.username;
... |
type = ['primary', 'info', 'success', 'warning', 'danger'];
demo = {
initPickColor: function() {
$('.pick-class-label').click(function() {
var new_class = $(this).attr('new-class');
var old_class = $('#display-buttons').attr('data-class');
var display_div = $('#display-buttons');
if (disp... |
# coding: utf-8
"""
OpsGenie REST API
OpsGenie OpenAPI Specification # noqa: E501
OpenAPI spec version: 2.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import opsgenie_swagger
from opsgenie_swagger.models.neus... |
$(document).ready(function() {
CKEDITOR.replace("customContent", {
height: 300
});
if (window.history.length > 1) {
$("#btnGoBack").show();
} else {
$("#btnGoBack").hide();
}
$("#productPriceId").on("change", function() {
let newPriceId = $(this).val();
... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["roomsession"],{"0c18":function(t,e,n){},ada6:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"room-session"},[n("v-container",[n("v-row",{attrs:{justify:"center"}},[n("v-col",{attrs... |
import numpy as np
from flarestack import ResultsHandler, MinimisationHandler
from flarestack.data.icecube import ps_v003_p02
from flarestack.shared import plot_output_dir, flux_to_k
from flarestack.utils.prepare_catalogue import ps_catalogue_name
from flarestack.icecube_utils.reference_sensitivity import (
referen... |
import re
from model.contact import Contact
def test_contacts_on_home_page(app,db):
home_page_contacts,db_contacts = sorted(app.contact.get_contact_list(),key=Contact.id_or_max),sorted(db.get_contact_list(),key=Contact.id_or_max)
assert len(home_page_contacts)==len(db_contacts)
for index in range(0,len(db... |
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
SQLALCHEMY_DATABASE_URI = 'postgresql://__DB_USER__:__DB_PASSWORD__@__DB_HOST__:__DB_PORT__/__DB_NAME__'
SQLALCHEMY_TRACK_MODIFICATIONS = False
TWITTER_CONSUMER_KEY = '__TWITTER_CONSUMER_KEY__'
TWITTER_CONSUMER_SECRET... |
import bibtexParse from 'bibtex-parse-js';
import bibString from '../static/bibliography.bib';
export function getBibtexEntries() {
let bibliography = bibtexParse.toJSON(bibString);
// filter out all bibtex entries except interactive article examples
let examples = bibliography.filter(function (bibEntry) {
... |
import React from "react";
import { Link } from "react-router-dom";
import styles from "./NavItems.module.scss";
import { navItemsList } from "../../utilities/NavItemsList";
const NavItemsUI = ({ favJobs, isInDesktopNav, handleMenuClose }) => {
return (
<ul
className={`${styles.nav_items} ${
isInDe... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{"113":function(e,t,n){"use strict";var r=n(114);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,t,n,o,c,s){if(s!==r){var i=new Error("Calling PropTypes valid... |
'use strict'
const chai = require('chai')
const dirtyChai = require('dirty-chai')
const path = require('path')
const {closeWindow} = require('./window-helpers')
const {expect} = chai
chai.use(dirtyChai)
const {remote} = require('electron')
const {ipcMain, BrowserWindow} = remote
describe('ipc main module', () => {
... |
// @flow
import {symbolLayoutAttributes,
collisionVertexAttributes,
collisionBoxLayout,
collisionCircleLayout,
dynamicLayoutAttributes
} from './symbol_attributes';
import {SymbolLayoutArray,
SymbolDynamicLayoutArray,
SymbolOpacityArray,
CollisionBoxLayoutArray,
CollisionCircleLayoutAr... |
const fs = require("fs");
const child_process = require("child_process");
let chunklostTool = require("C:\\work\\Git_work\\NodeGFS\\Master\\metadata\\tool\\chunklostTool.js");
////////////////////////////////////////////////////////////////////////////////
function reload(){
delete require.cache[require.resolve(... |
webpackJsonp([1],{"+Z9X":function(e,s){},"4ww8":function(e,s){},NHnr:function(e,s,r){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var i=r("7+uW"),t=r("woOf"),o=r.n(t),n={name:"resizer-comp",props:["splitTo","resizerColor","resizerBorderColor","resizerThickness","resizerBorderThickness"],data:function()... |
import { message } from 'antd';
import { createAction } from 'redux-actions';
import http from '../../../../http/index';
import { MENU_LIST_SEARCH, MENU_LIST_SEARCH_FAILED, MENU_LIST_SEARCH_SUCCESS, MENU_ITEM_SELECTED } from './constants';
// 查询菜单列表
const menuListSearch = createAction(MENU_LIST_SEARCH);
const menuList... |
// need express to interact with the front end
const express = require('express');
// need path for filename paths
const path = require('path');
// need fs to read and write to files
const fs = require('fs');
// creating an 'express' server
const app = express();
// Sets an Initial port for listen... |
__author__ = 'Faustin W. Carter'
from .logfile_tools import *
|
/**
* MUI CSS/JS utilities module
* @module lib/util
*/
'use strict';
var config = require('../config'),
jqLite = require('./jqLite'),
nodeInsertedCallbacks = [],
scrollLock = 0,
scrollLockCls = 'mui-body--scroll-lock',
scrollLockPos,
_supportsPointerEvents;
/**
* Logging function
*/
f... |
let [milliseconds, seconds, minutes, hours] = [0, 0, 0, 0];
let timerRef = document.querySelector('.timerDisplay');
let currentInterval = null;
document.getElementById('startTimer').addEventListener('click', () => {
if (currentInterval !== null) {
clearInterval(currentInterval);
}
currentInterval =... |
"""API endpoints for managing process resource."""
from http import HTTPStatus
from flask import g, jsonify, request
from flask_restx import Namespace, Resource, cors
from ..exceptions import BusinessException
from ..services import ProcessService
from ..utils.auth import auth
from ..utils.util import cors_preflight... |
import React from 'react';
import {Dialog} from "primereact/dialog";
import {Button} from "primereact/button";
export const Confirm = (props) => {
function click(status) {
props.click(status)
}
return (
<Dialog header={props.header} visible={true} style={{width: '50vw'}} footer={
<di... |
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './src/js/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
module: {
... |
import DashboardLog from './DashboardLog.vue';
export default DashboardLog;
|
# SPDX-FileCopyrightText: 2020 Melissa LeBlanc-Williams for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import threading
import time
import board
import busio
from adafruit_lsm6ds import LSM6DSOX
from adafruit_lis3mdl import LIS3MDL
SAMPLE_SIZE = 500
class KeyListener:
"""Object for listening for input... |
import Phaser from 'phaser';
export default class Asteroid extends Phaser.Physics.Arcade.Sprite {
constructor(scene, x, y) {
super(scene, x, y, 'asteroid');
this.speed = Phaser.Math.GetSpeed(150, 1);
this.orbiting = false;
this.direction = 0;
this.factor = 1;
this.startingPoint = [0, 600];
... |
'use strict'
/* global describe it beforeEach afterEach context */
const fs = require('fs')
const path = require('path')
const { PassThrough } = require('stream')
const { EventEmitter, once } = require('events')
const { constants: { signals } } = require('os')
const ChildProcess = require('child_process')
const prox... |
# -*- coding: utf-8 -*-
from ..akad.ttypes import ApplicationType
import re
class Config(object):
LINE_HOST_DOMAIN = 'https://gd2.line.naver.jp'
LINE_OBS_DOMAIN = 'https://obs-sg.line-apps.com'
LINE_TIMELINE_API = 'https://gd2.line.naver.jp/mh/api'
LINE_TIMELINE_MH ... |
from collections import defaultdict
class Status:
'''When looping through objects and doing operations to them,
this is a useful object to keep track of what happens and
summarise the numbers at the end.'''
def __init__(self, obj_type_str=None):
self.obj_type_str = obj_type_str
self.pkg... |
import { Router } from 'express';
import * as RecipeController from '../controllers/recipe.controller';
import { isAuthenticated, getUserFromToken } from '../util/authMiddleware'
import { getSession } from '../util/dbUtils';
const router = new Router();
router.route('/recipes/search/').get(getUserFromToken, RecipeCon... |
import cv2
from crust_slices import get_crust_masks
from stat_tracker import StatTracker
def process_highlights(
save_information,
start_epoxy_mask,
highlights,
tube_circle,
precision,
thickness,
thresh,
epox_thresh,
ker,
):
"""
Classifies the highlights around the tube as ... |
from transformers import pipeline
def hf_distilbert_model_question_answering():
model_name = "distilbert-base-uncased-distilled-squad"
model = pipeline('question-answering', model=model_name, tokenizer=model_name)
return model
|
/**
* Active item.
*/
AFRAME.registerComponent('active-item', {
dependencies: ['material'],
schema: {
active: {default: false},
opacity: {default: 1.0}
},
init: function () {
this.defaultOpacity = this.el.getAttribute('material').opacity;
this.materialObj = {opacity: this.data.opacity};
},... |
Ti.Media.defaultAudioSessionMode = Ti.Media.AUDIO_SESSION_MODE_PLAYBACK;
var episodioWin = Titanium.UI.createWindow({
title:titulo2[indicador],
backgroundImage:'/icons/fondodescargas.png',
barColor:'black',
width:'100%',
height:'100%'
});
var vistaCabeza2 = Ti.UI.createView({
top:0,
left:0,
... |
# Copyright 2019-2021 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0
"""
WSGI config for mysite project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
"""
import os
from django.c... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { genKey } from 'draft-js';
import escapeRegExp from 'lodash/escapeRegExp';
import Entry from './Entry/Entry';
import addMention from '../modifiers/addMention';
import decodeOffsetKey from '../utils/decodeOffsetKey';
import getSearchTe... |
var searchData=
[
['ambient_5fintensity',['ambient_intensity',['../classmingfx_1_1_default_shader_1_1_light_properties.html#a226c173b193459af291687dd45280fbb',1,'mingfx::DefaultShader::LightProperties']]],
['ambient_5freflectance',['ambient_reflectance',['../classmingfx_1_1_default_shader_1_1_material_properties.ht... |
class NotificationsFeature extends Feature {
init() {
Notification.requestPermission().then(function(result) {
Vowsh.onReady(function() {
if(result !== 'granted') {
$('.chat-lines').append('<div class="msg-chat msg-info"><span class="text" style="color: crimso... |
import request from '@/utils/request'
// 登录
export function login(param) {
return request({
url: 'api/manage/valid/login',
method: 'post',
data: param
})
}
//登出
export function logout(param) {
return request({
url: 'api/manage/valid/logout',
method: 'post',
data: param
})
}
//获取用户信息
exp... |
# coding: utf-8
from __future__ import absolute_import, unicode_literals
from django.utils.safestring import mark_safe
from django_tables2.utils import AttributeDict
import warnings
from .base import Column, library
@library.register
class CheckBoxColumn(Column):
"""
A subclass of `.Column` that renders as a ... |
//@flow
import React, { Component } from 'react'
import styled from 'styled-components/native'
import { Text, Tooltip } from '@morpheus-ui/core'
import bgGraphic from '../../../assets/images/onboard-background.png'
import bgIDGraphic from '../../../assets/images/identity-onboard-background.png'
import bgWalletGraphi... |
!function(e){"use strict";var t=function(){};t.prototype.init=function(){e('input[name="dates"]').daterangepicker({alwaysShowCalendars:!0}),e(".open_picker").show(),e('input[name="daterange"]').daterangepicker({opens:"left"},function(t,a,e){console.log("A new date selection was made: "+t.format("YYYY-MM-DD")+" to "+a.f... |
"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... |
'use strict';
function readAll(obj) {
if(Array.isArray(obj)) { return obj; }
if(typeof(obj) === 'object') {
return Object.fromEntries([...Object.entries(obj)].map(([k, v])=> [k, readAll(v)]));
}
return obj;
}
const {defineRegisters} = require('./defineRegisters');
module.exports.NVMe = class NVMe {
con... |
#!/usr/bin/env python
import rospy
import os
import scipy.misc
import numpy as np
os.environ["CUDA_VISIBLE_DEVICES"]="2"
from model_training import WGAN
from yaml import load, Loader
import tensorflow as tf
flags = None
def init():
global flags
rospy.init_node('train_underwater_camera_model', anonymous=Tru... |
/*
Copyright (c) 2018 Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
// @flow
import {thumbWidth} from './constants';
export function startThumbIcon(backgroundColor: string, thumbColor: string) {
return `<svg width="2... |
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
requir... |
import random
from math import *
import time
import sympy as sym
from PIL import Image
import pyttsx3 # have to install this and pypiwin32
import matplotlib.pyplot as plt
import matplotlib
import numpy as np
from sympy import *
from IPython.display import display, Math, Latex
from threading import Timer
fro... |
// Compiled by ClojureScript 1.8.51 {}
goog.provide('cljs.tools.reader');
goog.require('cljs.core');
goog.require('cljs.tools.reader.impl.commons');
goog.require('goog.string');
goog.require('goog.array');
goog.require('cljs.tools.reader.reader_types');
goog.require('goog.string.StringBuffer');
goog.require('cljs.tools... |
from trafpy.benchmarker.versions.benchmark_v001.distribution_generator import DistributionGenerator
if __name__ == '__main__':
distgen = DistributionGenerator(load_prev_dists=True)
plots, dists, rand_vars = distgen.plot_benchmark_dists(benchmarks=['uniform', 'university'])
|
'use strict'
var StaticAnalysisRunner = require('remix-analyzer').CodeAnalysis
var yo = require('yo-yo')
var $ = require('jquery')
var remixLib = require('remix-lib')
var utils = remixLib.util
var css = require('./styles/staticAnalysisView-styles')
var globlalRegistry = require('../../global/registry')
var EventManage... |
// lightweight is an optional argument that will try to draw the graph as fast as possible
var resetSize = {
x:0,
y:0,
s:1
};
function XTraceDAG(attachPoint, reports, /*optional*/ params) {
var cancerType = attachPoint.id.substr(8); //GETS CANCER TYPE
var dag = this;
// Get the necessary p... |
let hasLoaded=false;let initTemplate="";let mainUrl="https://latex.ppizarror.com/stats/";$(function(){printAboutInfo();generateFooter();writeTableHeader();initializeChartjsPlugins();try{let $mainsection=$("#mainSelector");for(let $i=0;$i<Object.keys(stat).length;$i+=1){if(stat[Object.keys(stat)[$i]].available){$mainsec... |
const User = require("../models/user.model");
const jwt = require("jsonwebtoken");
const bcrypt = require("bcrypt");
exports.signIn = async (req, res) => {
const { email, password } = req.body;
const userWithEmail = await User.findOne({ where: { email } }).catch(
(err) => {
console.log("Error: ... |
import { post } from "highline/api/v2_client"
export const save = (email, leadSource) => {
return post("/user_leads", {
email,
lead_source: leadSource,
})
}
|
// @include org.kohsuke.stapler.codemirror.lib.codemirror
// @include org.kohsuke.stapler.codemirror.mode.xml.xml
// @include org.kohsuke.stapler.codemirror.mode.javascript.javascript
// @include org.kohsuke.stapler.codemirror.mode.css.css
CodeMirror.defineMode("htmlmixed", function(config) {
var htmlMode = CodeMirro... |
"""
Django settings for DjangoWebProject1 project.
Based on 'django-admin startproject' using Django 2.1.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import... |
define(['knockout', 'text!./exhibition-view.html', 'app', 'magnific-popup', 'slick'], function (ko, template, app, magnificPopup, slick) {
ko.bindingHandlers.backgroundImage = {
update: function (element, valueAccessor, allBindingsAccessor, viewModel, context) {
ko.bindingHandlers.style.update(element,
funct... |
var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index', { title: 'Express' });
});
router.post('/api/open', function(req, res, next){
console.log(req.body)
res.json({'drawer': req.body.drawer})
})
router.get('/api/... |
//>>built
require({cache:{"url:dojox/grid/resources/Expando.html":'\x3cdiv class\x3d"dojoxGridExpando"\n\t\x3e\x3cdiv class\x3d"dojoxGridExpandoNode" dojoAttachEvent\x3d"onclick:onToggle"\n\t\t\x3e\x3cdiv class\x3d"dojoxGridExpandoNodeInner" dojoAttachPoint\x3d"expandoInner"\x3e\x3c/div\n\t\x3e\x3c/div\n\x3e\x3c/div\x3... |
# -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html
class BttSpiderPipeline(object):
def process_item(self, item, spider):
return item
|
# Copyright (c) 2020 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 appli... |
from django import template
from math import log10, floor
register = template.Library()
@register.filter
def sigfigs(value, count):
'''
Returns the passed value as a float with <count> sigfigs.
'''
# round_to_n = lambda x, n:
# round(x, -int(floor(log10(x))) + (n - 1))
if value == 0:
... |
# coding: utf-8
# Copyright © 2014-2020 VMware, Inc. All Rights Reserved.
################################################################################
import ipaddress
import itertools
from datetime import datetime
from urllib.parse import urlparse, urljoin
from stix2patterns.v21.grammars.STIXPatternListener impo... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[59],{73:function(e,t,r){e.exports=function(){"use strict";return[{locale:"dua",pluralRuleFunction:function(e,t){return"other"},fields:{year:{displayName:"mbú",relative:{0:"this year",1:"next year","-1":"last year"},relativeTime:{future:{other:"+{0} y"},past:{other:"-... |
import time
from abc import ABCMeta, abstractmethod
from typing import List, Union
from bxcommon.connections.connection_state import ConnectionState
from bxcommon.connections.connection_type import ConnectionType
from bxcommon.messages.abstract_block_message import AbstractBlockMessage
from bxcommon.messages.abstract_... |
var prob__EMC__e__pi__plotMacro_8C =
[
[ "fillHist", "da/dcb/prob__EMC__e__pi__plotMacro_8C.html#a2b62a1f11a78e48c8a5351c53b91668d", null ],
[ "histToPNG", "da/dcb/prob__EMC__e__pi__plotMacro_8C.html#a5e71560188a1e4fbca63bb75ffaad2bc", null ],
[ "loadTree", "da/dcb/prob__EMC__e__pi__plotMacro_8C.html#a1b9fe... |
(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["WSH"] = factory();
else
root["WSH"] = f... |
'use strict';
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.createTable('todos', {
id: {
allowNull: false,
primaryKey: true,
type: Sequelize.UUID,
defaultValue: Sequelize.UUIDV4,
},
// MAIN COLUMN
title: {
allowN... |
from utils import default_args, name_from_file
from datetime import timedelta
from airflow import DAG
from airflow_kubernetes_job_operator.kubernetes_job_operator import KubernetesJobOperator
dag = DAG(
name_from_file(__file__),
default_args=default_args,
description="Test base job operator",
schedule_... |
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// RUN: (! %hermesc -dump-ast -pretty-json %s 2>&1 ) | %FileCheck --match-full-lines %s
for (;false;) function foo() {}
// CHEC... |
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return t... |
const createError = require("http-errors");
const OktaJwtVerifier = require("@okta/jwt-verifier");
const oktaVerifierConfig = require("../../config/okta");
const Profiles = require("../profile/profileModel");
const oktaJwtVerifier = new OktaJwtVerifier(oktaVerifierConfig.config);
const makeProfileObj = (claims) => {
... |
const Promise = require('bluebird'),
_ = require('lodash'),
uuid = require('uuid'),
crypto = require('crypto'),
keypair = require('keypair'),
ghostBookshelf = require('./base'),
common = require('../lib/common'),
validation = require('../data/validation'),
settingsCache = require('../ser... |
const { promisify } = require('util');
const build = promisify(require('electron-build-env'));
build(['yarn', 'build:neon'], { electron: process.env.CURRENT_ELECTRON_VERSION }).then(() => process.exit(0));
|
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var AccountSchema = new Schema({
customerId: String,
accountId: String,
uci: String,
riskScore: String,
currencyCode: String,
productType: String,
loanAmount: Number,
loanPurpose: String
}, {collection: 'account... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import time
import matplotlib.pyplot as plt
import os
import sys
path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
if not path in sys.path:
sys.path.insert(1, path)
import nussl
def speed_test():
freq = 3000
sr = nussl.... |
import os
MILVUS_HOST = os.getenv("MILVUS_HOST", "127.0.0.1")
MILVUS_PORT = os.getenv("MILVUS_PORT", 19530)
VECTOR_DIMENSION = os.getenv("VECTOR_DIMENSION", 512)
DATA_PATH = os.getenv("DATA_PATH", "/data/jpegimages")
DEFAULT_TABLE = os.getenv("DEFAULT_TABLE", "milvus")
UPLOAD_PATH = "/tmp/search-images"
|
var data=[['20160812',4.839],
['20160815',5.335],
['20160816',5.879],
['20160817',6.478],
['20160818',7.138],
['20160819',7.866],
['20160822',8.665],
['20160823',9.545],
['20160824',10.509],
['20160825',11.571],
['20160826',12.741],
['20160829',14.027],
['20160830',15.442],
['20160831',17.000],
['20160901',18.710],
['2... |
"use strict";
// html demo
$('#html').jstree();
// inline data demo
$('#data').jstree({
'core': {
'data': [
{
"text": "Root node", "children": [
{ "text": "Child node 1" },
{ "text": "Child node 2" }
... |
// D3 experiments for building Risk Battle probability charts
// d3x02.html d3x02.js
// Drawing the charts from pre-configured data
// Compute graph specs
var dx = Math.floor(500 / dataSpecs.graphDepth);
var x0 = Math.floor(dx / 2);
var dy = Math.floor(300 / dataSpecs.graphHeight);
// SVG
var svg = d3.select('#char... |
/**
* Name: Paridhi Khaitan
* School: University of California, San Diego
* Position: FullStack Internship
* Description: A program that randomly sends users to one of two websites
* Notes: It was really interesting to use Cloudflare's APIs. They are super powerful
* specially the HTML Rewriter one, and I'll cont... |
# obsutil.py - utility functions for obsolescence
#
# Copyright 2017 Boris Feld <boris.feld@octobus.net>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from . import (
phases,
util
)
class marker(object):
"""Wrap o... |
jQuery(function($){
var $search_results,
$folders_center,
$item_details;
// end function global vars
pyro.files.cache = {};
pyro.files.history = {};
pyro.files.timeout = {};
pyro.files.current_level = 0;
// custom tooltips
$('.files-tooltip').tipsy({
gravity: 'n',
fade: true,
html: true,
live: tr... |
//document.getElementById("datetime").innerHTML = "WebSocket is not connected";
var websocket = new WebSocket('ws://'+location.hostname+'/');
var maxRow = 10;
function changeRow() {
console.log('changeRow');
var text = document.getElementById("maxrow");
console.log('text.value=', text.value);
console.log('typeof(... |
export const addNote = (payload) => {
return {
type: "ADD_NOTE",
payload,
};
};
export const addContent = (payload) => {
return {
type: "ADD_CONTENT",
payload,
};
};
export const permanentDeleteNote = (payload) => {
return {
type: "PERMANENT_DELETE",
payload,
};
};
export const de... |
function initializevbox1288931495311() {
vbox1288931495311 = new kony.ui.Box({
"id": "vbox1288931495311",
"isVisible": true,
"orientation": constants.BOX_LAYOUT_VERTICAL,
"position": constants.BOX_POSITION_AS_NORMAL
}, {
"containerWeight": 100,
"layoutType": const... |
import React from 'react';
import 'jest-styled-components';
import { mount } from 'enzyme';
import { Provider } from 'react-redux';
import configureMockStore from 'redux-mock-store';
import { ThemeProvider } from 'styled-components';
import { themeLight } from '../src/styles/themes/theme.light';
import { themeDark } fr... |