text stringlengths 3 1.05M |
|---|
(window.webpackJsonp=window.webpackJsonp||[]).push([[42],{211:function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return u}));var r=n(0),o=n.n(r);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n... |
import Factory from './Factory'
import Sequence from './generators/Sequence'
import Assoc from './generators/Assoc'
import AssocAttrs from './generators/AssocAttrs'
import AssocMany from './generators/AssocMany'
import AssocAttrsMany from './generators/AssocAttrsMany'
import ChanceGenerator from './generators/ChanceGen... |
# -*- coding: utf-8 -*-
import argparse
import sys
import waitress
from conf.version import version_
from Doctopus.web.app import get_app
try:
from queue import Queue
except Exception:
from Queue import Queue
from logging import getLogger
from threading import Thread
from Doctopus.lib.logging_init import s... |
# Copyright 2015 Vinicius Chiele. 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 ... |
from django.urls import path
from . import views
app_name = 'async_media'
urlpatterns = [
path('media_ajax/', views.media_ajax,
name="media_ajax"),
path('media_poll_ajax/', views.media_poll_ajax,
name="media_poll_ajax"),
]
|
import gql from "graphql-tag";
export default gql`
mutation addBook(
$userID: ID
$imageUrl: String
$title: String
$author: String
$createdAt: String
$infoLink: String
) {
addBook(
userID: $userID
imageUrl: $imageUrl
title: $title
author: $author
createdAt: ... |
var formBarang = document.getElementById('formBarang');
formBarang.addEventListener("submit", (e) =>{
e.preventDefault();
let formData = new FormData(formBarang);
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function (){
if (xhr.readyState == 4 && xhr.status == 200) {
if (xhr.response... |
"use strict";
const http = require('http');
const connect = require('connect');
const reload = require('reload/lib/reload');
const fs = require('fs');
const clc = require('cli-color');
const serveStatic = require('serve-static');
const argv = process.argv.slice(2);
const runFile = argv.shift();
const verbose = (argv... |
{"frequencies":[261.6255653006,268.33391312882,275.39533189537,348.83408706747,373.75080757229,402.50086969323,418.60090448096,436.04260883433,523.2511306012],"description":"Schlesinger's Hypolydian Harmonia in the enharmonic genus"} |
import React from "react";
import Search from "./pages/Search";
import Saved from "./pages/Saved";
import NoMatch from "./pages/NoMatch";
import Nav from "./components/Nav";
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
// The app will not render correctly until you setup a Route component... |
const Koa = require('koa');
const app = new Koa();
const router = require('koa-router')();
const build = require('./build')
router.get('/', (ctx, next) => {
ctx.body = "ok"
});
router.get('/styles/:id', async (ctx, next) => {
ctx.body = ctx.params.id
ctx.body += build.getStyle()
});
router.get('/scripts/:id', ... |
import React from "react";
import theme from "theme";
import { Theme, Link, Strong, Box, Section } from "@quarkly/widgets";
import { Helmet } from "react-helmet";
import { GlobalQuarklyPageStyles } from "global-page-styles";
import { Override } from "@quarkly/components";
import * as Components from "components";
expor... |
import React from 'react';
import PropTypes from 'prop-types';
import {
Text,
TouchableOpacity,
} from 'react-native';
export default function Button({ style, textStyle, text, onPress }) {
return (
<TouchableOpacity style={style}>
<Text style={textStyle} onPress={onPress}>{text}</Text>
</TouchableO... |
const abbreviateNum = (number, decPlaces = 1) => {
// 2 decimal places => 100, 3 => 1000, etc
decPlaces = Math.pow(10,decPlaces);
// Enumerate number abbreviations
var abbrev = [ "k", "m", "b", "t" ];
// Go through the array backwards, so we do the largest first
for (var i=abbrev.length-1; i>=0; i--) {
... |
const barracks = require('barracks')
const store = barracks()
require('./app')(store)
require('./npc')(store)
require('./nodes')(store)
module.exports = store
|
/*jshint esnext: true */
'use strict';
const google = require('googleapis');
const OAuth2 = google.auth.OAuth2;
const jsonfile = require('jsonfile');
const path = require('path');
const config = jsonfile.readFileSync(path.join(__dirname, '..', 'config', 'credentials.json'));
const token = jsonfile.readFileSync(path.j... |
// @flow
export type MeetingStatusResponse = {
full: boolean
};
export default class MeetingStatus {
type: string;
full: boolean;
constructor({
full,
}: Object = {}) {
this.full = full;
// Useful to compare instead of instanceof with minified code
this.type = 'MeetingStatus';
}
stati... |
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*-------------------------------------------------... |
const {app, BrowserWindow} = require('electron')
const path = require('path').resolve(__dirname, './../fixtures/test.js')
const url = require('path').resolve(__dirname, './../fixtures/test.html')
app.on('ready', () => {
let win = new BrowserWindow()
win.loadURL('file://' + url)
try {
win.webContent... |
const { Song, Output } = require('chorus');
require('chorus/names').into(global);
const song = new Song({
bpm: 132,
sections: [{
parts: [{
pitches: [KICK, SNARE, RIM, CLAP, CLOSED_HIHAT, OPEN_HIHAT, CYMBAL],
}]
}]
});
Output.select().then(output => output.play(song));
|
/*
*
* ViewUsers reducer
*
*/
import produce from 'immer';
import { DEFAULT_ACTION } from './constants';
export const initialState = {};
/* eslint-disable default-case, no-param-reassign */
const viewUsersReducer = (state = initialState, action) =>
produce(state, (/* draft */) => {
switch (action.type) {
... |
const homePage = require("../../../locators/HomePage");
const reconnectDatasourceModal = require("../../../locators/ReconnectLocators");
describe("Import, Export and Fork application and validate data binding", function() {
let orgid;
let appid;
let newOrganizationName;
let appName;
it("Import application fr... |
var Util = require('../util');
module.exports = function Player() {
var _this = this;
this.shipState = null;
this.damage = function(shipClass) {
for (var i = 0; i < _this.shipState.length; i++) {
if (_this.shipState[i].type === shipClass) {
_this.shipState[i].hitCoun... |
from time import time
import logging
import numpy as np
import tensorflow.contrib.slim as slim
from data_random_short_diagonal import next_batch, visualise_mat, get_relevant_prediction_index
from md_lstm import *
logger = logging.getLogger(__name__)
class FileLogger(object):
def __init__(self, full_filename, h... |
for(var i=0;;i++) {
var tx = web3.eth.getTransactionFromBlock(i, 0);
if(tx !== null) {
console.log(tx["to"]);
console.log(i);
if(tx["to"] === null) {
console.log(tx);
break;
}
}
}
|
/****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2011 Zynga Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software an... |
# Copyright 2013-2021 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 PyGrpcio(PythonPackage):
"""HTTP/2-based RPC framework."""
homepage = "https://grpc.i... |
require("./lib/index"); |
/*!
DataTables Bootstrap 3 integration
©2011-2014 SpryMedia Ltd - datatables.net/license
*/
(function(l, q){var d = function(b, c){b.extend(!0, c.defaults, {dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>", renderer:"bootstrap"}); b.extend(c.ext.classes, {sWrapper:"data... |
import torch, os, time, sys, copy, argparse, csv
import scipy.io as scio
import numpy as np
sys.path.append('../pytorch')
from message_passing import MessagePassingModule
from MP_module import MPModule
from MP_module_manual import test_mp_module_manual
from test_compute_terms import MRFParams, compute_terms_py
sys.path... |
/// Copyright (c) 2012 Ecma International. All rights reserved.
/**
* @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-64.js
* @description Object.defineProperties - 'configurable' property of 'descObj' is own data property that overrides an inherited accessor property (8.10.5 step 4.a)
*/
function testcase() {
... |
function main() {
const v4 = [13.37,13.37,13.37,13.37,13.37];
const v6 = [1337,1337,1337,1337];
const v7 = [13.37];
const v8 = {find:v6,fill:RegExp,length:"number",acos:"number"};
const v9 = {MIN_VALUE:"number",multiline:v8};
let v10 = v6;
const v15 = [13.37,13.37,13.37,13.37,13.37];
const v17 = [1337,1337,1337,1337];
... |
let searchTerms; // array of search terms
let lastSearchIdx; // index of last term searched
let weatherReports; // array of weather reports;
// For each search term there will be a related entry in weatherReports
// at the same index.
// Compute dates for 5 day forcast
let now = Date.now();
let oneDay = 24*60*60*... |
(function () {
'use strict';
angular.module('ngTestData')
.service('testdataAlertService', function ($window) {
return {
addMessage: function (message) {
$window.alert(message);
}
};
})
.controller('testdataController', function ($scope, $http, apiBase, testdataAle... |
import Icon from '../components/Icon.vue'
Icon.register({"subway":{"width":1536,"height":1792,"paths":[{"d":"M1088 0q185 0 316.5 93.5t131.5 226.5v896q0 130-125.5 222t-305.5 97l213 202q16 15 8 35t-30 20h-1056q-22 0-30-20t8-35l213-202q-180-5-305.5-97t-125.5-222v-896q0-133 131.5-226.5t316.5-93.5h640zM288 1312q66 0 113-47... |
"""A module for testing pep8 compliance."""
import os
import textwrap
from typing import List
import pycodestyle # formerly known as pep8
__all__: List[str] = []
def test_pep8_conformance():
"""Test that we conform to PEP-8."""
check_paths = [
'sbu',
'test',
]
exclude_paths = []
... |
"""[Semantics!]
"""
def my_func(a, b):
# code |
(this["webpackJsonpesbuild-reactjs"]=this["webpackJsonpesbuild-reactjs"]||[]).push([[0],{14:function(e,t,a){e.exports=a(24)},24:function(e,t,a){"use strict";a.r(t);var n=a(0),l=a.n(n),c=a(9),s=a.n(c),r=a(10),o=a(11),m=a(13),u=a(12),i=a(2),E=function(e){var t=Object(n.useState)(""),a=Object(i.a)(t,2),c=a[0],s=a[1],r=Obj... |
var path = require('path');
var util = require('util');
var fs = require('fs');
var childProcess = require('child_process');
var ansi = require("./ansi.js");
var existsSync = fs.existsSync || path.existsSync;
var isArray = Array.isArray;
function Builder () {
this.flagGroups = {};
this.target = "native_bindings";... |
# pylint: good-names=auth, settings, db
import logging
from operator import itemgetter
from collections import OrderedDict
import urllib.parse
import six
import pandas as pd
import numpy as np
from db_dashboard import DashboardDataAnalyzer
from rs_practice import _get_practice_data
logger = logging.getLogger(settings... |
// @flow
import 'react-native'
import React from 'react'
import renderer from 'react-test-renderer'
import Loader from '../loader'
describe('<Loader />', () => {
it('should render properly and match the snapshot', () => {
const component = renderer.create(<Loader delay={0} message="test" />)
const tree = com... |
import React, {Component} from 'react';
class SearchBar extends Component {
constructor(props) {
super(props);
this.state = {term: '' };
}
render() {
return (
<div>
<input
value = {this.state.term}
onChange = {eve... |
angular.module('emerilFoods', ['foodController', 'foodService']);
|
import Flv from 'flv.js'
import Hls from 'hls.js'
import dashjs from 'dashjs'
import globals from './global'
var customKernelFun = function(video,src) {
// hls decode
let hlsDecodeAction = () => {
console.log('custom hls create...');
let hlsConfig = {
autoStartLoad:true,
... |
/**
* tiling - The TinyJS plugin
*
* Copy to https://github.com/pixijs/pixi.js/tree/v4.8.9/src/extras
* Some code (c) 2013-2017 Mathew Groves, Chad Engler and other contributors.
* See https://github.com/pixijs/pixi.js/graphs/contributors for the full list of contributors.
*
* @name tinyjs-plugin-tiling
... |
const express = require('express');
const app = express();
const bodyParser = require('body-parser');
const mongoose = require('mongoose');
const bcrypt = require('bcryptjs');
const PostRoutes = require('./routes/posts');
const commentRoutes = require('./routes/comments');
// Configuration statements
const ... |
# -*- coding: utf-8 -*-
# Copyright (c) 2014, Joshua Stone
# 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
# li... |
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... |
"""
To trace sqlalchemy queries, add instrumentation to the engine class or
instance you are using::
from ddtrace import tracer
from ddtrace.contrib.sqlalchemy import trace_engine
from sqlalchemy import create_engine
engine = create_engine('sqlite:///:memory:')
trace_engine(engine, tracer, 'my-dat... |
var searchData=
[
['taggedcommandline_20330',['TaggedCommandLine',['../class_t_r_i_m_1_1_s_d_k_1_1_external_link.html#a65a441671d5b8d5415536d69cffac7d8',1,'TRIM::SDK::ExternalLink']]],
['task_20331',['Task',['../class_t_r_i_m_1_1_s_d_k_1_1_minute_item_action_arising.html#a352a0709b8cc4cdd69ad901b3798c9b1',1,'TRIM::... |
# !/usr/bin/python
# -*- coding: latin-1 -*-
"""
A module for utility funtions
"""
import glob
import itertools
import os
import re
import requests
import shutil
import urllib
from astropy.io import fits
import bokeh.palettes as bpal
from scipy.interpolate import RegularGridInterpolator
import numpy as np
from svo_fi... |
import React, {
useState,
useContext,
useEffect,
useLayoutEffect,
useRef,
} from "react";
import { Container, Row, Col, Form, Button } from "react-bootstrap";
import { Link } from "react-router-dom";
import { DomainContext } from "../../../context";
import { useTranslation } from "react-i18next";
import { use... |
import {
getNodeId,
getNodeIcon
} from './utils.js'
export default class TreeNode {
constructor (data, options, tree) {
this.data = data
this.tree = tree
this._vNode = null
this.id = getNodeId(data, tree)
this.icon = getNodeIcon(data, tree)
this.level = opt... |
var config = require("config");
var supertest = require("supertest");
var assert = require("assert");
module.exports = function (server, product) {
return {
server: server,
product: product,
exec: function () {
test("Should insert a new blog product and return a response with status: 201 and the pr... |
// flow-typed signature: 2e23d8e8445126dc866b027087619d15
// flow-typed version: <<STUB>>/@commitlint/config-lerna-scopes_v^3.1.1/flow_v0.49.1
/**
* This is an autogenerated libdef stub for:
*
* '@commitlint/config-lerna-scopes'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we ... |
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.ex... |
"use strict";
var gulp = require('gulp'),
sass = require('gulp-sass'),
del = require('del'),
uglify = require('gulp-uglify'),
cleanCSS = require('gulp-clean-css'),
concat = require("gulp-concat"),
rename = require("gulp-rename"),
merge = require('merge-stream'),
htmlreplace = require('gulp-html-replace... |
exports.up = function (knex) {
return knex.schema.createTable('categories', tbl => {
// primary id for categories
tbl.increments();
// title
tbl.string('title')
.notNullable()
.unique()
}).createTable('recipes', tbl => {
// primary recipe id
... |
import { createGlobalStyle } from 'styled-components';
import { theme } from './Theme';
const GlobalStyle = createGlobalStyle`
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
/* background: #1b1b1b; */
background: radial-gradient(#525252,#000000);
font-family: 'Inter', sans-s... |
// @flow
/* global FormData, window */
import {fileApiRouteMap} from '../../../../../server/src/api/api-route-map';
import {fileApiConst} from '../../../../../server/src/api/part/file-api-const';
import {promiseCatch} from '../../../lib/promise';
import type {MainServerApiResponseType} from '../../../type/response';
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const world_1 = require("../../world");
const action_1 = require("./action");
const game_1 = require("../../game");
/**
* Handles the action of placing a new tile in the world.
*/
class PlaceTileAction extends action_1.Action {
construct... |
const fs = require('fs');
const path = require('path');
const paths = require('./paths');
delete require.cache[require.resolve('./paths')];
if (!process.env.NODE_ENV) {
throw new Error(
'The process.env.NODE_ENV environment variable is required but was not specified.'
);
}
// https://github.com/bkeepers/dote... |
/* @flow */
import type {Reporter} from '../../reporters/index.js';
import type {InstallCwdRequest, InstallPrepared} from './install.js';
import type {DependencyRequestPatterns} from '../../types.js';
import type Config from '../../config.js';
import Lockfile from '../../lockfile/wrapper.js';
import * as PackageRefere... |
import Cookies from 'js-cookie'
// cookie保存的天数
import config from '@/config'
import { forEach, hasOneOf, objEqual } from '@/libs/tools'
export const TOKEN_KEY = 'token'
export const setToken = (token) => {
Cookies.set(TOKEN_KEY, token, {expires: config.cookieExpires || 1})
}
export const getToken = () => {
const... |
( function ( $ ) {
"use strict";
jQuery( '#vmap' ).vectorMap( {
map: 'world_en',
backgroundColor: null,
color: '#ffffff',
hoverOpacity: 0.7,
selectedColor: '#1de9b6',
enableZoom: true,
showTooltip: true,
values: sample_data,
scaleColors: [ '#1de9b6', '#03a9f5' ],
normalizeFunction: 'polynomia... |
import jwt from 'jsonwebtoken';
import config from './config';
const getToken = (user) => {
return jwt.sign(
{
_id: user._id,
name: user.name,
email: user.email,
isAdmin: user.isAdmin
}
, config.JWT_SECRET, {
expiresIn: '48h'
});
}... |
'use strict';
if (typeof window !== 'undefined' && typeof exports === 'undefined') {
if (typeof window.utils !== 'object') {
window.utils = {};
}
}
if (typeof exports !== 'undefined') {
var _ = require('underscore');
}
(function(exports) {
//
// Message Text Formatting
//
var mark... |
import React, { Component } from 'react'
import API from './utils/api'
class PortfolioSquare extends Component {
constructor(props){
super(props)
this.state = {
isEditing: this.props.editing,
isDirty: false
}
}
componentWillMount(){
const store =... |
(function (window) {
var names = ["Yaakov", "John", "Jen", "Jason", "Paul", "Frank", "Larry", "Paula", "Laura", "Jim"];
for (var i = 0; i < names.length; i++) {
var firstLetter = names[i].charAt(0).toLowerCase();
if (firstLetter == 'j') {
byeSpeaker.speak(names[i]);
}
else {
helloSpeake... |
import React from "react";
export default function UnitPiece({image}) {
return (
<>
<div
style={{
opacity: 1,
display: "flex",
alignItems: "center",
justifyContent: "center",
width: "100%",
height: "100%",
position: "absolute"
... |
import os
import commands
import argparse
def split_loops_into_anchors(file_name):
"""
Split loops into anchors.
"""
left = []
right = []
run = file_name.split('.')[0]
i = -1
with open(file_name, 'r') as f:
for line in f:
if '#' in line:
# Skip ... |
const manifestOptions = require("./public/assets/manifest.json");
module.exports = {
chainWebpack: (config) => {
config.module
.rule("yaml")
.test(/\.ya?ml$/)
.use("raw-loader")
.loader("raw-loader")
.end();
},
publicPath: "",
pwa: {
manifestPath: "assets/manifest.json",
... |
"""
Contact package
Returns contact information for a given search.
Integrates with molly.providers.contact.*
"""
|
"""
Corrently.io
*Corrently - from italian corrente, which is energy* # Introduction The Corrently ecosystem gets maintained by [STROMDAO GmbH](https://www.stromdao.de/) to support green energy services for prosumers, grid operators, regulators, integrators or any other party with an emerging need of consensus... |
# The plot server must be running
# Go to http://localhost:5006/bokeh to view this plot
import numpy as np
from bokeh.plotting import figure, gridplot, output_server, show
N = 50
x = np.linspace(0, 4*np.pi, N)
y = np.sin(x)
output_server("grid")
TOOLS = "pan,wheel_zoom,box_zoom,reset,save"
l = figure(title="line... |
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "df03b9c077a923b6e36f0e1b411179b6",
"url": "/spinners/index.html"
},
{
"revision": "b4384fb505793f0e8c75",
"url": "/spinners/static/css/main.65a49a9b.chunk.css"
},
{
"revision": "53451aa83d87d5577005",
"ur... |
import { FastField } from 'formik';
import { i18n } from 'i18n';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import FormErrors from 'view/shared/form/formErrors';
import AsyncSelect from 'react-select/async';
import {
components as materialUiComponents,
styles as materialUiStyles,
... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import '../index.css'
class ErrorHandle extends Component {
render() {
if (this.props.jobs === 0) {
return (
<div>
<div className="Search-Directions">
<p>No results for {this.props.query}. Please try se... |
const jwt = require("jsonwebtoken");
const config = require("../config/auth.config.js");
const db = require("../models");
const User = db.user;
verifyToken = (req, res, next) => {
//let token = req.headers["x-access-token"];
let token = req.cookies.user_token;
if (!token) {
return res.status(403).send({
... |
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('requirements.txt') as f:
install_requires = f.read().strip().split('\n')
# get version from __version__ variable in argemsan/__init__.py
from argemsan import __version__ as version
setup(
name='argemsan',
version=version,
description=... |
module.exports={A:{A:{"2":"J D E F A B oB"},B:{"2":"C K L G M N O P a b c d e f S H g","450":"Q R U V W X Y Z"},C:{"2":"0 1 2 3 4 5 6 7 8 9 pB fB I h J D E F A B C K L G M N O i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB gB MB hB NB OB T PB QB RB SB TB UB VB WB XB YB ZB aB bB cB P Q R iB U V ... |
import React from "react";
import renderer from "react-test-renderer";
import AuthorImage from "../../js/templates/AuthorImage";
describe("Author image component snapshot", () => {
it("matches as author image snapshot", () => {
const tree = renderer
.create(<AuthorImage url="https://example.com/12345" />)... |
const Resource = require("../database/model/resource.model");
async function createResource(data, res) {
const newResource = await new Resource(data);
await newResource.save().then((newData) => {
res.status(201).json({ success: 1, message: "Created new resource" });
});
}
async function getResource(res) {
... |
import { playerConstants } from '../_constants';
import { playerService } from '../_services';
import { alertActions } from '.';
import { history } from '../_helpers';
export const playerActions = {
login,
logout,
getAllPlayers,
createPlayer,
updatePlayer,
deletePlayer,
};
function login(email, password) ... |
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from hashlib import sha1
from pants.base.payload_field import PayloadField
from pants.engine.fs import PathGlobs, Snapshot
from pants.source.filespec import matches_filespec
from pants.so... |
import styled from 'styled-components'
export const StyledFooter = styled.footer`
height: 80px;
width: 100%;
display: flex;
flex-direction: row;
justify-content: center;
align-content: center;
` |
const express = require('express');
const cookieParser = require('cookie-parser');
const app = express();
// set template engine: ejs
app.set('view engine', 'ejs');
// use public path
app.use('/public',express.static('public'));
app.use('/', cookieParser());
// use urlencode
app.use(express.urlencoded({
extended... |
/**
* @license
* Copyright Google LLC 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
*/
import { __extends } from 'tslib';
import { coerceBooleanProperty } from '@angular/cdk/coercion';
import { ContentChil... |
require("dotenv").config();
const mongoose = require("mongoose");
const User = require("../models/user-model.js");
const bcrypt = require("bcrypt");
mongoose
.connect(
process.env.MONGODB_URI,
{ useNewUrlParser: true }
)
.then(x => {
console.log(
`Connected to Mongo! Database name: "${x.connec... |
import Vue from 'vue'
import App from './App'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-default/index.css'
import VueRouter from 'vue-router';
import routes from './routes';
import 'font-awesome/css/font-awesome.min.css';
Vue.use(ElementUI)
Vue.use(VueRouter)
Vue.use(require('vue-moment'));
const... |
from itertools import chain
import math
import torch
import torch.nn as nn
from torch.nn.utils.rnn import pad_packed_sequence, pack_padded_sequence
from .encoder import GaussianEncoderBase
from ..utils import log_sum_exp
class GaussianLSTMEncoder(GaussianEncoderBase):
"""Gaussian LSTM Encoder with constant-lengt... |
# 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, ... |
/*##################################################|*/
/* #CMS.TOOLBAR# */
(function($) {
// CMS.$ will be passed for $
$(document).ready(function () {
/*!
* Toolbar
* @version: 2.0.0
* @description: Adds toolbar, sidebar, messages and modal
*/
CMS.Toolbar = new CMS.Class({
implement: [CMS.API.Helpers],
... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{388:function(t,e,i){var n=i(2),s=i(0),r=i(42),a=i(6),o=i(28),u=i(63),c=/MSIE .\./.test(o),d=s.Function,h=function(t){return function(e,i){var n=arguments.length>2,s=n?u(arguments,2):void 0;return t(n?function(){r(a(e)?e:d(e),this,s)}:e,i)}};n({global:!0,bind:!0,... |
import { noop, retArg0 } from "../../utils";
export let streamVal = retArg0;
export let streamOn = noop;
export let streamOff = noop;
export function streamCfg(cfg) {
streamVal = cfg.val;
streamOn = cfg.on;
streamOff = cfg.off;
} |
var should = require('should'),
testUtils = require('../../utils'),
_ = require('lodash'),
// Stuff we are testing
PostAPI = require('../../../server/api/posts'),
TagAPI = require('../../../server/api/tags'),
UserAPI = require('../../../server/api/users');
describe('Advanced Browse', function () {... |
// @ts-check
const configHelpers = require('@fluentui/eslint-plugin/src/utils/configHelpers');
/** @type {import("eslint").Linter.Config} */
module.exports = {
extends: ['plugin:@fluentui/eslint-plugin/react'],
root: true,
overrides: [
// This rule requires type info, so only enable for TS files under src
... |
importScripts("cell.js");
var a = 0;
onmessage = function(e) {
// TODO: perform bounds checking and pruning here?
var items, time;
items = e.data.items;
time = e.data.time;
//console.log("before",e.data.items[0]);
if( items ){
workOnCells(items, time);
}
}
function workOnCells(items, time) {
var i, end = ite... |
import tensorflow as tf
def create_mask(pred_mask):
'''
Get the channel with the highest probability to create the segmentation mask. Recall that the output of
our UNet has 2 channels. Thus, for each pixel, the predicition will be the channel with the highest probability.
'''
pred_mask = tf.arg... |
# -*- coding: utf-8 -*-
"""Advent of Code 2020 - Day 15 - Rambunctious Recitation."""
import argparse
import pdb
import traceback
from re import findall
def extract_ints(line):
return [int(x) for x in findall(r"-?\d+", line)]
def find_offsets(values, target):
offsets = []
for idx, value in enumerate(va... |