text stringlengths 3 1.05M |
|---|
function fruitOrVegetable(input) {
let fruits = "banana kiwi apple lemon grapes peach cherry";
let vegetables = "tomato cucumber pepper onion garlic parsley";
if (fruits.includes(input)){
console.log("fruit");
}else if (vegetables.includes(input)){
console.log("vegetable")
}else{
... |
/**
* Check out https://googlechrome.github.io/sw-toolbox/ for
* more info on how to use sw-toolbox to custom configure your service worker.
*/
'use strict';
importScripts('./build/sw-toolbox.js');
self.toolbox.options.cache = {
name: 'ionic-cache'
};
// // pre-cache our key assets
// self.toolbox.precache(
//... |
/**
* @fileoverview gRPC-Web generated client stub for smpl.time.api.v1
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
const grpc = {};
grpc.web = require('grpc-web');
const proto = {};
proto.smpl = {};
proto.smpl.time = {};
proto.smpl.time.api = {};
proto.s... |
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[2],{
/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vuetify-loader/lib/loader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/Pages/Home.vue?vue&type=script&lang=js&":
/*!*********************************************************... |
define({
_widgetLabel: "쿼리",
executeQueryTip: "쿼리를 실행하려면 다음 작업 항목 중 하나를 클릭하세요.",
invalidConfig: "잘못된 구성입니다. 쿼리 설정 페이지를 사용하여 올바른 구성을 가져오세요.",
queryParams: "옵션",
parameters: "옵션",
queries: "쿼리",
apply: "적용",
queryResults: "결과",
clear: "지우기",
noResults: "피처를 찾을 수 없습니다.",
queryE... |
var depRelation = [{
key: "index.js",
deps: ["a.js","b.js","style.css"],
code: function(require, module, exports){
"use strict";
var _a = _interopRequireDefault(require("./a.js"));
var _b = _interopRequireDefault(require("./b.js"));
require("./style.css");
function _interopRequireDefault(... |
const Joi = require('joi');
const dateFilterSchema = Joi.object({
since: Joi.date().iso(),
until: Joi.date().iso(),
});
module.exports = dateFilterSchema;
|
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... |
__author__ = 'naiser'
from PyQt4 import QtGui
from gui.settings import Settings as S_
class VisualisationTab(QtGui.QWidget):
def __init__(self):
super(VisualisationTab, self).__init__()
self.fbox = QtGui.QFormLayout()
self.setLayout(self.fbox)
self.default_color_ = None
... |
# ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
"""
BitBake 'Fetch' implementation for mercurial DRCS (hg).
"""
# Copyright (C) 2003, 2004 Chris Larson
# Copyright (C) 2004 Marcin Juszkiewicz
# Copyright (C) 2007 Robert Schuster
#
# This program is free software... |
var fs = require('fs'),
npm = require('npm'),
path = require('path'),
request = require('request'),
shell = require('shelljs');
function getPackage(name, callback) {
var options = {
uri: 'https://network.mean.io/api/v0.1/packages/' + name,
method: 'GET'
};
request(options, function(er... |
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];
}
r... |
(function(a){
var scriptElem=document.createElement('script'); //add script tag so we can async load our main code
scriptElem.async=1;
scriptElem.src=a; //a is the location of our script
scriptElem.contentType="application/javascript";
var firstScriptTag=document.getElementsByTagName('script')[0];
firstScriptTag.... |
module.exports = {
terms: ['star wars episode i the phantom menace', 'star wars'],
genres: [
{
id: 160,
name: 'Star Wars',
parent_id: 68
}
],
podcasts: [
{
title_highlighted:
'Rebel Force Radio: <span class="ln-search-highlight">Star</span> <span class="ln-search-high... |
import React from "react"
import { StyleSheet, css } from "aphrodite"
import Navigation from "../components/navigation"
import CodeDemo from "../components/code-demo"
export default function Home() {
return (
<>
<Navigation />
<div className="container">
<br />
<div>
<div cl... |
# Copyright (c) 2013 Mirantis 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 agreed to in writ... |
import qs from 'qs'
import router from '@/router'
import store from '@/store'
import wechatAuth from '@/plugins/wechatAuth'
// 设置APPID
wechatAuth.setAppId(process.env.VUE_APP_WECHAT_APPID)
const whiteList = ['/404']
router.beforeEach(async (to, from, next) => {
// 在白名单,直接进入
if (whiteList.indexOf(to.path) !== -1) {
... |
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
// MIT License. See license.txt
import DataTable from 'frappe-datatable';
import { build_summary_item } from "../../widgets/utils";
frappe.provide('frappe.views');
frappe.provide('frappe.query_reports');
frappe.standard_pages['query-report'] = func... |
/*
* Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditio... |
//>>built
define("dijit/_Widget",["dojo/aspect","dojo/_base/config","dojo/_base/connect","dojo/_base/declare","dojo/_base/kernel","dojo/_base/lang","dojo/query","dojo/ready","./registry","./_WidgetBase","./_OnDijitClickMixin","./_FocusMixin","dojo/uacss","./hccss"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b,_c){function... |
import React from "react"
import {CardItem} from "./Card.styled"
import Button from "../Button/Button";
import {Link} from "react-router-dom";
function Card(props) {
return (
<CardItem>
<img src={props.sportBuild.img} alt="Sport"/>
<h3>
{props.sportBuil... |
#### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Creature()
result.template = "object/mobile/shared_gurnaset.iff"
result.attribute_template_id = 9
result.stfName... |
import { readFile } from 'fs'
const Point = (x, y, steps = 0) => ({ x, y, key: `${x},${y}`, steps })
const newPoint = (basePoint, direction) => {
const steps = basePoint.steps + 1
switch (direction) {
case 'R':
return Point(basePoint.x + 1, basePoint.y, steps)
case 'L':
return Point(basePoint.... |
window.$Qmatic.components = {} |
"""
Collection of forms for the board application
i have created this module quite late, so most forms are still
in views.py
"""
from django import forms
from django.utils.translation import string_concat
from django.utils.translation import ugettext_lazy as _
from sphene.community import sphutils
from sphene.commu... |
"use strict";
exports.__esModule = true;
exports.c_label_m_compact_PaddingTop = {
"name": "--pf-c-label--m-compact--PaddingTop",
"value": "0",
"var": "var(--pf-c-label--m-compact--PaddingTop)"
};
exports["default"] = exports.c_label_m_compact_PaddingTop; |
import React from "react";
import CardItem from "./CardItem";
import "./Cards.css";
function Cards() {
return (
<div className="cards">
<h1>Check out these spots</h1>
<div className="cards__container">
<div className="cards__wrapper">
<ul className="cards__items">
<CardI... |
const express = require('express');
const app = express();
const morgan = require('morgan');
app.use(morgan('dev'));
require('dotenv').config();
app.use(express.json());
const routes = require('./routes/router');
app.use('/', routes);
const mongoDB = require('./database/dbConnection');
mongoDB();
app.listen(pro... |
$(function(){
myhover('.jx_list ul li');
})
function rollText(num){
$('.jx_list ul').hide().eq(num).show();
}
function do_totals1()
{
document.all.clti.style.pixelBottom = (document.body.scrollBottom + 50);
document.all.clti.style.display = "block";
window.setTimeout('do_totals2()', 500);
}
function do_... |
const fs = require('fs/promises')
const path = require('path')
const firstSentences = require('./firstSentences')
// console.log('fi', firstSentences)
const colors = [
'alice blue',
'antique white',
'aqua',
'aquamarine',
'azure',
'beige',
'bisque',
'black',
'blanched almond',
'blue',
'blue viol... |
// see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')
module.exports = {
build: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../../www/index.html'),
assetsRoot: path.resolve(__dirname, '../../www'),
assetsSubDirectory: 'static',
assetsPubli... |
(function(global, undefined) { var kafe = global.kafe, $ = kafe.dependencies.jQuery; kafe.bonify({name:'ext.facebook', version:'1.4.0', obj:(function(){
var
// dictionary
_locale = {
fr: 'fr_FR',
en: 'en_US'
},
// default params
_params = {
app_id: '',
status: true,
c... |
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// |testTitle| needs to be the same as |kTestTitle| in declarative_apitest.cc.
var testTitle = ':TEST:';
var redirectDataURI = 'data:text/html;charset=utf... |
Prism.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:/<!DOCTYPE[\s\S]+?>/i,cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuati... |
from __future__ import print_function
import numpy as np
from sklearn.utils.linear_assignment_ import linear_assignment
class ObjectDetectionMetric():
def __init__(self,
names_class,
check_class_first=True):
self.check_class_first = check_class_first
self.names_c... |
/*! jQuery UI - v1.10.3 - 2014-01-05
* http://jqueryui.com
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
jQuery(function(t){t.datepicker.regional.fr={closeText:"Fermer",prevText:"Précédent",nextText:"Suivant",currentText:"Aujourd'hui",monthNames:["Janvier","Février","Mars","Avril","Mai","J... |
var searchData=
[
['tiglalgorithmcode',['TiglAlgorithmCode',['../group__Enums.html#gacd58a73111dd44bdfd4e3aa71f2f2bd0',1,'tigl.h']]],
['tiglboolean',['TiglBoolean',['../group__Enums.html#gad711db1d9358be3de9da135fbcb4ad34',1,'tigl.h']]],
['tiglcontinuity',['TiglContinuity',['../tigl_8h.html#ad569158eaac6909a55f68... |
'use strict';
var Assert = require('assert');
var Trooba = require('trooba');
var transport = require('..');
var routes = require('./fixtures/server/routes');
describe(__filename, () => {
var svr;
afterEach(function (next) {
svr.close(next);
svr = undefined;
});
it('should start the... |
$('[data-toggle="counter-up"]').counterUp({
delay: 1,
time: 100
}); |
import json
import os
from os import path, makedirs
Nnodes = 5
ppn = 24
Ncores = Nnodes * ppn
system_name = 'lr1'
cell_db_path = '/allen/aibs/mat/antona/network/14-simulations/9-network/build/%s.csv' % (system_name)
con_path = '/allen/aibs/mat/antona/network/14-simulations/9-network/build/%s_connections' % (system_na... |
'use strict';
class ThingerUser {
#_url = "users/user";
constructor() {
var self = this;
$.ajax({
url: this.#_url,
async: false, // TODO: make async
dataType: 'json',
success: function(data) {
self.role = data.role;
... |
from matplotlib import pyplot as plt
import numpy as np
from matplotlib.ticker import MaxNLocator
def plot_timeseries(*, recording, sorting=None, channels=None, trange=None, width=None, height=None):
W = TimeseriesWidget(
recording=recording,
sorting=sorting,
channels=channels,
tran... |
#
# Gunicorn (https://docs.gunicorn.org/en/stable/configure.html)
#
# Metamapper uses Gunicorn to handle web requests by default. We recommend
# spinning up a few of these and putting them behind a reverse proxy like nginx.
#
# You can override these default settings by creating your own file and referencing the
# path... |
"""mysite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... |
# Generated by Django 3.1.6 on 2021-03-19 22:55
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='DuocLieu',
fields=[
... |
# -*- coding: utf-8 -*-
#
# Copyright 2017 Mycroft AI 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 ... |
define(["leaflet"], function(leaflet) {
return {
blueIcon: new leaflet.Icon.Default({}),
redIcon: new leaflet.Icon({
iconUrl:
"https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-red.png",
shadowUrl:
"https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/i... |
$(window).on("load",function(){function t(t){return t.date=i.parse(t.date),t.close=+t.close,t}function e(){l=a.node().getBoundingClientRect().width-n.left-n.right,g.attr("width",l+n.left+n.right),p.attr("width",l+n.left+n.right),d.range([0,l]),p.selectAll(".d3-xaxis").call(s),p.selectAll(".d3-line").attr("d",f)}var a=d... |
import numpy as np
def InverseLombScargle(t,f,A,phi):
'''
A highly experimental way of reversing the L-S periodogram to
reproduce the data. It does not work.
Inputs
======
t : float
Times at which to reproduce the time series
f : float
Frequencies at which the periodogram was created
A : float
Ampl... |
//delete//
const baseInfo = require('./baseInfo');
const getTableProperty = require('../schema_con/HttpLogReqInfo')
//delete//
const HttpLogInfo = function (sequelize, DataTypes) {
const { fieldIndex, fields } = getTableProperty(DataTypes)
return sequelize.define('id-head' + 'HttpLogReqInfo' + 'date-tail', {
..... |
from scipy import linalg
import numpy as np
from manimlib.utils.simple_functions import choose
from manimlib.utils.space_ops import find_intersection
from manimlib.utils.space_ops import cross2d
CLOSED_THRESHOLD = 0.001
def bezier(points):
n = len(points) - 1
def result(t):
return sum([
... |
import argparse
import time
import logging
import os
import warnings
import random
import numpy as np
import torch.nn as nn
import torch.backends.cudnn as cudnn
import torch.utils.data
from common.logger_utils import initialize_logging
from common.train_log_param_saver import TrainLogParamSaver
from pyt... |
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[206],{
/***/ "./frontend/src/@core/comp-functions/forms/form-validation.js":
/*!********************************************************************!*\
!*** ./frontend/src/@core/comp-functions/forms/form-validation.js ***!
\****************************... |
import { mkSearch } from 'utils/NamedRoutes'
import { encode } from 'utils/s3paths'
const PACKAGE_PATTERN = '[^/]+/[^/]+'
export const home = {
path: '/',
url: ({ q } = {}) => `/${mkSearch({ q })}`,
}
export const install = {
path: '/install',
url: () => '/install',
}
// marketing
export const about = {
p... |
import PropTypes from 'prop-types';
import React from 'react';
import { css, StyleSheet } from 'aphrodite/no-important';
import defaults from '../theme';
import { deepMerge } from '../utils';
import Icon from './Icon';
function Arrow ({
direction,
icon,
onClick,
size,
...props,
},
{
theme,
}) {
const classes =... |
var vel = 1000;
console.log(`a velocidade do seu carro é ${vel}km/h`);
if(vel > 100){
console.log("Limite de velocidade atingindo!");
}
|
from django.shortcuts import render
# Create your views here.
def home(request):
return render(request, 'ingredients/home.html')
|
import React from 'react';
import AccountCircleIcon from '@material-ui/icons/AccountCircle';
import IconButton from '@material-ui/core/IconButton';
import Link from './Link';
export default function Profile() {
return (
<IconButton component={Link} href="/ich" underline="none">
<AccountCircleIcon fontSize=... |
#!/usr/bin/python
"""
In this example we evolve running soft robots in a terrestrial environment using a standard version of the physics
engine (_voxcad). After running this program for some time, you can start having a look at some of the evolved
morphologies and behaviors by opening up some of the generated .vxa (e.... |
# Importing the Kratos Library
import KratosMultiphysics as KM
# Importing the base class
from KratosMultiphysics.CoSimulationApplication.base_classes.co_simulation_solver_wrapper import CoSimulationSolverWrapper
# CoSimulation imports
import KratosMultiphysics.CoSimulationApplication.factories.solver_wrapper_factory... |
var Cartesian3=require('./Cartesian3');
var Cartographic=require('./Cartographic');
var defaultValue=require('./defaultValue');
var defined=require('./defined');
var DeveloperError=require('./DeveloperError');
var Interval=require('./Interval');
var CesiumMath=require('./Math');
var Matrix3=require('./Matrix3');... |
/**
* The examples provided by Facebook are for non-commercial testing and
* evaluation purposes only.
*
* Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
... |
/**
* Created by AncientMachine on 26.03.2016.
*/
(function () {
'use strict';
angular
.module('acrawlerApp')
.controller('AdvanceFilterController', AdvanceFilterController);
AdvanceFilterController.$inject = ['$scope', '$uibModalInstance'];
/* @ngInject */
function AdvanceFilterController($scope... |
import {
signatureError,
SIGNATURE_ERROR,
SIGN_DATA,
signData,
signedData,
SIGNED_DATA,
} from '../../actions/signature'
describe('signature actions', () => {
it('should have an action for signature errors', () => {
expect.assertions(1)
const error = new Error('An error')
const expectation = ... |
// BEGIN LICENSE
// Perspectives Distributed Runtime
// Copyright (C) 2019 Joop Ringelberg (joopringelberg@perspect.it), Cor Baars
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either ve... |
from haystack import indexes
from haystack_rq_test.models import Dog
# More typical usage involves creating a subclassed `SearchIndex`. This will
# provide more control over how data is indexed, generally resulting in better
# search.
class DogIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.CharFiel... |
var KeywordExtractor = (function(){
var _this,
s = {},
stemmer, tokenizer, nounInflector, tfidf, stopWords, pos, lexer, tagger,
POS = {
NN: 'NN', // singular noun
NNS: 'NNS', // plural noun
NNP: 'NNP', // proper noun
... |
// Generated by CoffeeScript 1.8.0
var abs, calc_crosstab, chrscales, ci_by_group, colSums, count_groups, displayError, expand2vector, forceAsArray, formatAxis, getLeftRight, log10, log2, matrixExtent, matrixMax, matrixMaxAbs, matrixMin, maxdiff, mean_by_group, median, missing2null, pullVarAsArray, reorgLodData, rowSum... |
const
colors = require('colors'),
EventEmitter = require('events'),
dateFormat = require('dateformat'),
snoowrap = require('../config/snoo-config').streamRequester,
actionRequester = require('../config/snoo-config').actionRequester,
BotService = require('../service/BotService'),
timeout = 20... |
const runner = require('./lib/runner')
runner().catch((e) => console.log(e))
|
'use strict';
var gulp = require('gulp'),
eslint = require('gulp-eslint'),
<% if(testing === 'node_unit'){ %>
nodeunit = require('gulp-nodeunit');
<% } else if (testing === 'mocha'){ %>
mocha = require('gulp-mocha');
<% } else if(testing === 'jasmine'){ %>
jasmine = require('gulp-jasmine');
<%}%>
<% if (testing ==... |
# Tweepy
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
from urllib2 import Request, urlopen
import base64
from tweepy2 import oauth
from tweepy2.error import TweepError
from tweepy2.api import API
class AuthHandler(object):
def apply_auth(self, url, method, headers, parameters):
"""... |
import "../src/styles/globals.css"
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
}
import * as nextImage from "next/image"
Object.defineProperty(nextImage, "default", {
configurable: true,
... |
"""
Created on 18 Sep 2016
@author: Bruno Beloff (bruno.beloff@southcoastscience.com)
"""
import sys
from collections import OrderedDict
from scs_core.data.datetime import LocalizedDatetime
from scs_core.data.datum import Datum
from scs_core.climate.sht_datum import SHTDatum
from scs_core.particulate.pmx_datum imp... |
addEventListener('fetch', event => {
event.respondWith(handleRequest(event))
})
const BUCKET_NAME = 'schau-wien-images/media'
const BUCKET_URL = `http://storage.googleapis.com/${BUCKET_NAME}`
async function fetchAsset(event) {
let response = await fetch(`${BUCKET_URL}${url.pathname}`)
const headers = { 'cache-c... |
import React, { useContext, useState } from "react";
import { Popover, notification, Button, Input, Col, Form, Space } from "antd";
import { useQueryClient } from "react-query";
import "./index.css";
import { AuthContext } from "../Auth/Auth";
import { Api } from "../../Api";
const layout = {
labelCol: { span: 8 },... |
export const StylesEditContact = (theme) => ({
root: {
height: '100vh',
},
grid: {
margin: '0 auto',
},
title: {
color: theme.palette.primary.main,
marginBottom: 0,
fontWeight: 500,
},
description: {
fontWeight: 500,
marginTop: 0,
marginBottom: 5,
},
quote: {
margin... |
import os
from datetime import date
from django.conf import settings
from django_webtest import WebTest
from django.contrib.auth import get_user_model
User = get_user_model()
class ProfileTestCase(WebTest):
def setUp(self):
self.user = User.objects.create_user(
username='larrypage', first_na... |
import unittest
class Test(unittest.TestCase):
def test_equivalence_fort_py(self):
from datetime import datetime
import itertools
import numpy as np
from pymatgen.core.structure import Structure
from pymatgen.core.lattice import Lattice
from pymatgen.core.sites imp... |
// Regular expression that matches all symbols in the Oriya block as per Unicode v6.3.0:
/[\u0B00-\u0B7F]/; |
var gulp = require('gulp');
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var source = require('vinyl-source-stream');
var babelify = require('babelify');
var browserify = require('browserify');
var browserSync = require('browser-sync').create();
// Static Server + ... |
import stringArgAndReturn
stringArgAndReturn.chpl_setup()
x = stringArgAndReturn.noArgsRetString()
stringArgAndReturn.stringArgsRetVoid(x)
y = "eek!"
stringArgAndReturn.stringArgsRetVoid(y)
a = "*slams "
b = "door*"
c = stringArgAndReturn.stringArgsRetString(a, b)
stringArgAndReturn.stringArgsRetVoid(c)
stringArgAnd... |
const express = require('express');
const app = new express();
/*This tells the server to use the client
folder for all static resources*/
app.use(express.static('client'));
/*This tells the server to allow cross origin references*/
const cors_app = require('cors');
app.use(cors_app());
/*Uncomment the following li... |
const { Schema } = require("mongoose");
// Feedback Schema
const feedbackSchema = new Schema(
{
age: {
get: (v) => Math.round(v),
set: (v) => Math.round(v),
type: Number,
},
covidImpact: String,
generalFeedback: String,
ipAddress: {
required: true,
type: String,
... |
# Copyright 2019 The TensorFlow 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 applica... |
/*!
* Razor
* Copyright(c) 2012 David Murdoch <david@davidmurdoch.com>
* MIT Licensed
*/
module.exports = require('./lib/razor'); |
/**
* SoundManager 2: MPC (Drum Machine) demo
*/
var MPC = function() {
var self = this;
this.idPrefix = 'btn-'; // HTML ID prefix
this.statusWidth = 6;
this.progressWidth = 256;
this.keys = {'1':0,'2':1,'3':2,'4':3,'q':4,'w':5,'e':6,'r':7,'a':8,'s':9,'d':10,'f':11,'z':12,'x':13,'c':14,'v':15}
// scope ... |
import { useContext } from "react";
import ThemeContext from "../contexts/ThemeContext";
import Weather from './Weather'
function WeatherData() {
const { weatherData,setWeatherData } = useContext(ThemeContext);
return (
<div>
{weatherData.map(item=>(<Weather key={item.date} date={item.date... |
/* eslint-disable no-undef,no-unreachable,no-unused-vars */
import * as asn1js from "asn1js";
import { bufferToHexCodes, stringToArrayBuffer, arrayBufferToString, toBase64 } from "pvutils";
import { getCrypto, getAlgorithmParameters, setEngine } from "../../src/common";
import { formatPEM } from "../../examples/example... |
api_url = "https://api.robinhood.com"
def login():
return api_url + "/oauth2/token/"
def logout():
return api_url + "/oauth2/revoke_token/"
def investment_profile():
return api_url + "/user/investment_profile/"
def accounts():
return api_url + "/accounts/"
def ach(option):
'''
Combination o... |
var AboutLayer = cc.Layer.extend({
init:function () {
var bRet = false;
if (this._super()) {
var sp = cc.Sprite.create(s_loading);
sp.setAnchorPoint(cc.p(0,0));
this.addChild(sp, 0, 1);
var cacheImage = cc.TextureCache.getInstance().addImage(s... |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.13.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... |
import paramiko #SSH
import time #Second func
import sys #2 arg from OS
import re #check for string
from threading import Thread as TH #openmp
def open_ssh_connection(ip):
try:
user_file = sys.argv[1]
cmd_file = sys.argv[2]
selected_user_file = open(user_file, 'r')
selected_user_f... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{453:function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return f}));var i=n(0),r=n.n(i);function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){var n... |
import React from "react"
import Layout from "../components/layout"
import HeaderEN from "../components/index_header"
import Hero from "../components/hero"
import Footer from "../components/footer"
import SEO from "../components/seo"
import "../components/styles.css"
const IndexPage = ({ data }) => (
<div>
<... |
const generation = {
genOne: 1,
genTwo: 2,
genThreeAndUp: 3
}
function splash(gen) {
switch(gen){
case generation.genOne:
console.log("No effect!");
break;
case generation.genTwo:
console.log("But nothing happened.");
break;
case generation.genThreeAndUp:
console.log("But nothing happ... |
from __future__ import absolute_import
from django.test import TestCase
from .models import Tournament, Organiser, Pool, PoolStyle
class ExistingRelatedInstancesTests(TestCase):
fixtures = ['tournament.json']
def test_foreign_key(self):
with self.assertNumQueries(2):
tournament = Tournam... |
import bannerHtml from './banner.html';
import bannerCss from './style.scss';
function hideCookieBanner() {
document.getElementById('cookiebanner').style.display = 'none';
}
function showCookieConfirmation() {
document.getElementById('nhsuk-cookie-confirmation-banner').style.display = 'block';
}
function addFocu... |
var express = require('express');
var router = express.Router();
var PaymentEvent = require('../../models/paymentEvent');
var changeRecord = require('../../models/common').changeRecord;
router.get('/', function(req, res) {
console.log('request for delivery event list');
return PaymentEvent.find({}, function(err, e... |
'use strict';
/**
* A dialog for selecting users for a new Conversation.
*
* Can also be used for updating participants in an existing Conversation.
*
* Manages a Dialog and a `<layer-identities-list/>` widget
*/
var Backbone = require('backbone');
var LayerUIWidgets = window.layerUI.adapters.backbone(Backbone... |