text stringlengths 3 1.05M |
|---|
from typing import Dict, List
from flask import Flask, request
from flask_restful import Api, Resource
app = Flask(__name__)
api = Api(app)
tasks = [
{
'id': 1,
'title': "Aller à l'épicerie",
'done': False
},
# {
# 'id': 2,
# 'title': "Étudier pour l'examen d'élect... |
# Copyright (c) 2018 Fujitsu Limited
# 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 requi... |
import { getSignin } from '@apps/maha/services/signins'
import { getDevice } from '@apps/maha/services/devices'
import Account from '@apps/maha/models/account'
import { decode } from '@core/services/jwt'
import Rollbar from '@core/vendor/rollbar'
import Team from '@apps/maha/models/team'
import User from '@apps/maha/mo... |
# coding: utf-8
"""Constants used by Home Assistant components."""
MAJOR_VERSION = 0
MINOR_VERSION = 67
PATCH_VERSION = '0.dev0'
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
REQUIRED_PYTHON_VER = (3, 5, 3)
# Format for platforms
PLATFOR... |
function Contact() {
return (
<>
<h1>Contact Page</h1>
</>
);
}
export default Contact;
|
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
# Game: Use cowboys to have a good time and play some music on a Piano, while brawling with enemy Cowboys.
# DO NOT MODIFY THIS FILE
# Never try to directly create an instance of this class, or modify its member variables.
# Instead, you should only be reading its variables and calling its functions.
from joueur.base... |
"""This module contains some popular sorting algorithms implemented in pure python.
"""
VERSION: tuple = (1, 0, 8)
__version__: str = ".".join(map(str, VERSION))
|
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https... |
function logger(e,t,...arguments){const i=document.createElement("div");switch(i.classList.add("alert"),t){case"log":i.classList.add("alert-primary");break;case"debug":i.classList.add("alert-secondary");break;case"info":i.classList.add("alert-info");break;case"warn":i.classList.add("alert-warning");break;case"error":i.... |
import { Directive, HostListener, Optional } from '@angular/core';
import { NavController } from '../../navigation/nav-controller';
/**
* \@name NavPop
* \@description
* Directive to declaratively pop the current page off from the
* navigation stack.
*
* \@usage
* ```html
* <ion-content>
*
* <button ion-butt... |
function initVizIndex() {
var containerDiv = document.getElementById("vizContainer"),
url = "https://public.tableau.com/shared/X22KGSTDB?:display_count=yes",
options = {
hideTabs: true,
onFirstInteractive: function () {
console.log("Run this code when the viz ... |
/* tslint:disable */
'use strict';
global.__awaiter =
(this && this.__awaiter) ||
function(thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function(resolve, reject) {
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reje... |
import os
class Config:
SECRET_KEY=os.environ.get('SECRET_KEY')
SQLALCHEMY_DATABASE_URI ='postgresql+psycopg2://moringaschool:moringa@localhost/pitches'
UPLOADED_PHOTOS_DEST ='app/static/photos'
# email configurations
MAIL_SERVER = 'smtp.googlemail.com'
MAIL_PORT = 587
MAIL_USE_TLS = T... |
def gen_mutants():
import tensorflow as tf
import pandas
import numpy as np
DATAFILE_TRAIN = 'mock_kaggle_edit_train.csv'
DATAFILE_VALIDATE = 'mock_kaggle_edit_... |
import matplotlib.pyplot as plt
from matplotlib import cm
import numpy as np
def scatter_tokamak_source(source, quantity=None, **kwargs):
"""Create a 2D scatter plot of the tokamak source.
See https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.scatter.html
for more arguments.
Args:
s... |
'use strict'
Object.defineProperty(exports, '__esModule', {
value: true
})
exports.default = max
var _index = require('../toDate/index.js')
var _index2 = _interopRequireDefault(_index)
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj }
}
/**
* @name max
* @category C... |
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... |
import { NgModule } from '@angular/core';
import { ElMessageService } from './message/message.service';
import { ElNotificationService } from './notification/notification.service';
import { ElSharedModule } from './shared/module';
import { ElButtonsModule } from './button/module';
import { ElCheckboxsModule } from './c... |
// Variables for Timer display area
const displayBox = document.querySelector(".display-box");
const displayLabel = document.querySelector("#display-label");
const timerDisplay = document.querySelector("#timer-display");
// Quiz card elements
const quizBox = document.querySelector(".quiz-box");
const answerList = docu... |
import rospy
import tf
from geometry_msgs.msg import PoseStamped, Quaternion, TwistStamped
from dbw_mkz_msgs.msg import SteeringReport, ThrottleCmd, BrakeCmd, SteeringCmd
from std_msgs.msg import Float32 as Float
from std_msgs.msg import Bool
from sensor_msgs.msg import PointCloud2
from sensor_msgs.msg import Image
i... |
/**
* Copyright 2018 The Pennsylvania State University
* @license Apache-2.0, see License.md for full text.
*/
import { LitElement, html, css } from "lit-element/lit-element.js";
// register globally so we can make sure there is only one
window.SimpleToast = window.SimpleToast || {};
// request if this exists. This... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Pagination as Paginator } from 'semantic-ui-react';
import { ShouldRender } from '@app/components/ShouldRender';
export default class Pagination extends Component {
constructor(props) {
super(props);
this.updateQueryPage ... |
/**
* Copyright 2020 The Pennsylvania State University
* @license Apache-2.0, see License.md for full text.
*/
import { html, css } from "lit-element";
import { SimpleColors } from "@lrnwebcomponents/simple-colors/simple-colors.js";
import "@lrnwebcomponents/paper-avatar/paper-avatar.js";
/**
* `lrndesign-avatar`
... |
// Requiring the module
const reader = require('xlsx')
const fs = require("fs")
// Reading our test file
const file = reader.readFile('./data.xlsx')
const op = reader.utils.sheet_to_json(file.Sheets["Drugs"])
const toCamelCase = (key)=>{
return key.split(" ").join("_").toLocaleLowerCase()
}
const final = op.ma... |
/**
* @license Angular v9.0.0-rc.9
* (c) 2010-2020 Google LLC. https://angular.io/
* License: MIT
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/compiler")):"function"==typeof define&&define.amd?define("@angular/core/testing",["exports","@... |
import seek
DOMAIN = "http://127.0.0.1:5000"
info_lat = 33.78130180915361
info_long = -118.11316083436564
bicycle_image = '/static/img/bicycle_image.JPG'
start = seek.StartModule(('<p> Somebody on the HuntMaster team has pushed the results of this abomination </p>'
'<img src="/static/img/st... |
"use strict";
var _react = _interopRequireDefault(require("react"));
var _enzyme = require("enzyme");
var _PickTimeTable = _interopRequireDefault(require("./PickTimeTable"));
var _TimeConstants = require("./TimeConstants");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": ob... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var VersionUtils = /** @class */ (function () {
function VersionUtils() {
}
VersionUtils.isGreaterOrEqual = function (version, targetVersion) {
var v1 = parseVersion(version);
var v2 = parseVersion(targetVersion);
... |
(async () => {
if (!process.env.SUBSCRIPTION_WEBHOOK_ENDPOINT_SECRET) {
const fs = require('fs')
const path = require('path')
const events = fs.readdirSync(path.join(__dirname, '/src/www/webhooks/subscriptions/stripe-webhooks'))
const eventList = []
for (const event of events) {
eventList.pu... |
mycallback( {"CONTRIBUTOR OCCUPATION": "Physician", "CONTRIBUTION AMOUNT (F3L Bundled)": "7.00", "ELECTION CODE": "P2012", "MEMO CODE": "", "CONTRIBUTOR EMPLOYER": "UC Davis", "DONOR CANDIDATE STATE": "", "CONTRIBUTOR STREET 1": "6107 Pirate Point Ct.", "CONTRIBUTOR MIDDLE NAME": "", "DONOR CANDIDATE FEC ID": "", "DONO... |
const INCREASE = 'INCREASE';
const DECREASE = 'DECREASE';
const initialState = {
number: 1,
};
export default function update(state = initialState, action) {
if (action.type === INCREASE) {
return { number: state.number + action.amount };
} else if (action.type === DECREASE) {
return { number: state.num... |
describe('virtualMachineSettings:', () => {
let rewire = require('rewire');
let virtualMachineSettings = rewire('../src/core/virtualMachineSettings.js');
let _ = require('lodash');
let testSettings = {
vmCount: 2,
namePrefix: 'test',
computerNamePrefix: 'test',
size: 'Sta... |
var auth = require('../lib/auth');
var routesUtilities = require('../utilities/routes.js');
module.exports = function(app) {
app.get('/admin/', auth.ensureAuthenticated, function(req, res) {
if (
req.session.roles === undefined ||
req.session.roles.indexOf('admin') === -1
) {
return res.sta... |
import React, { Component } from "react"
import { Helmet } from "react-helmet"
const Meta = () => (
<Helmet>
<title>Capp - Conference App</title>
</Helmet>
)
export default Meta
|
#! /usr/bin/env python2.7
# -*- coding: utf-8 -*-
## \page init.py Initialization Script
# Script to set configurations and launch Debreate
#
# Checks if the config file exists in ~/.config/debreate. If
# not, a new file will be created (~/.config/debreate/config).
# If the config file already exists but is corrup... |
#######################################################################
## SDK Example: PVWatts + Utility Rate
## Severin Ryberg
## April 27th, 2015
##
## The following is an example of accessing SAM's compute modules
## through the python SDK. This script queries Open EI for
## utility rates available in a user-defi... |
// Copyright 2021 The casbin 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 a... |
System.register(['jquery', '../utilities', '../dom/utilities'], function (_export) {
'use strict';
var $, stringOrFunction, trimFilename, toggleFileContainerErrorMode, toggleFileContainerSuccessfulFileMode, toggleFileContainerSuccessfulImageMode;
_export('onComplete', onComplete);
function onComplete(uploade... |
load("7fe0f1bf313bbf91780e927100d557ab.js");
// Copyright 2013 the V8 project authors. All rights reserved.
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following co... |
from django.utils.translation import gettext_lazy as _
from djchoices.choices import DjangoChoices, ChoiceItem
from bluebottle.fsm import ModelTransitions
class ReviewTransitions(ModelTransitions):
class values(DjangoChoices):
draft = ChoiceItem('draft', _('draft'))
submitted = ChoiceItem('submi... |
/**
* Axios boot initiation and helper functions pertaining to axios instance
* @author ren metalsadman
*/
// TODO:: Cleanup -> move the functions into other js file and import here
// import { Platform } from 'quasar'
import { Notify } from 'quasar'
import axios from 'axios'
let notif = () => void 0
/**
* Used... |
// Setup
var myStorage = {
"car": {
"inside": {
"glove box": "maps",
"passenger seat": "crumbs"
},
"outside": {
"trunk": "jack"
}
}
};
var gloveBoxContents = myStorage.car.inside['glove box']; // Change this line
|
import AnimatedValue from './AnimatedValue'
import { AnimatedArrayWithChildren } from './AnimatedWithChildren'
import AnimatedInterpolation from './AnimatedInterpolation'
export default class AnimatedArray extends AnimatedArrayWithChildren {
constructor(array) {
super()
this.payload =
array instanceof ... |
var breadcrumbs=[['-1',"",""],['2',"SOLUTION-WIDE PROPERTIES Reference","topic_0000000000000C16.html"],['2897',"Tlece.Recruitment.Models.TleceAccount Namespace","topic_00000000000009CC.html"],['2898',"JwtTokenResponseDto Class","topic_00000000000009CD.html"],['2899',"Properties","topic_00000000000009CD_props--.html"],[... |
var expect = require('expect'),
moment = require('moment');
var journeys = require('../../lib/endpoints/journeys');
describe('journeys', function () {
describe('plan', function () {
it('should be able to plan', function (done) {
/* Given */
var myTrip = {
'before... |
from authlib.consts import default_json_headers
from ..errors import InvalidRequestError
class BaseGrant(object):
#: Allowed client auth methods for token endpoint
TOKEN_ENDPOINT_AUTH_METHODS = ['client_secret_basic']
#: Designed for which "grant_type"
GRANT_TYPE = None
# NOTE: there is no chars... |
$(document).ready(function() {
var price = $("td.price").text();
var Total = 0;
$("#table tr.tbody").each(function(i, elem) {
var price = $(elem).find('.price').text();
var quantity = $(elem).find('.quantity').val();
var total = price * quantity;
Total = Total + total;
... |
from tradester.feeds.active import Price
import pandas as pd
class Asset():
"""
A tradeable asset.
...
Parameters
----------
id_type : str
type of asset
identifier : str
identifier
bar : str
time series
meta : dict
meta information
"""
def... |
jQuery(function($) {
var ww = document.body.clientWidth;
$(document).ready(function(){
/*FIT VIDEOS STARTS*/
jQuery("article").fitVids();
/*FIT VIDEOS ENDS*/
/* Small Screens Menu Slide Down/Up */
jQuery("#topmenu-button").click(function(){
jQuery("#small-screens-menu nav").slid... |
"use strict";
/*This class is supposed to turn a series of
dir.delay()
dir.transitionTo(...)
dir.delay()
dir.nextSlide();
into a sequence that only advances when the right arrow is pressed.
Any divs with the exp-slide class will also be shown and hidden one by one.
*/
/* Inteded to be used with this CSS:
.exp-arrow... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.10/esri/copyright.txt for details.
//>>built
define(["require","exports","./sources/resolver","../../../webgl/programUtils"],function(f,b,c,e){Object.defineProperty(b,"__esModule",{value:!0});var d=function(a... |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
from typing import List, Optional, TYPE_CHECKING
from collections import OrderedDict
import uuid
import dateutil.parser
from cdm.enums import CdmObjectType
from c... |
/**
* Copyright 2004-present Facebook. All Rights Reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
export const purple = {
main: '#6200ee',
};
export const black = '#000';
export const brown =... |
define({"topics" : [{"title":"Magneto Static: solved equations (introduction)","href":"UserGuide\/English\/topics\/MagnetoStatiqueEquationsResoluesIntroduction.htm","attributes": {"data-id":"topicID1",},"menu": {"hasChildren":false,},"tocID":"topicID1-d46e7027","topics":[]},{"title":"Magneto Static: solved equations (v... |
/**
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use... |
var socketio = require('socket.io');
var io;
var guestNumber = 1;
var nickNames = {};
var namesUsed = [];
var currentRoom = {};
exports.listen = function (server) {
io = socketio(server);
io.sockets.on('connection', function (socket) {
guestNumber = assignGuestName(socket, guestNumber, nickNames, namesUsed);
jo... |
/**
* @license
* Highcharts funnel module, Beta
*
* (c) 2010-2012 Torstein Hønsi
*
* License: www.highcharts.com/license
*/
/*global Highcharts */
(function (Highcharts) {
'use strict';
// create shortcuts
var defaultOptions = Highcharts.getOptions(),
defaultPlotOptions = defaultOptions.plotOptions,
serie... |
#!/usr/bin/env python
""" Script to score comments within emotional categories"""
from __future__ import print_function, division
import pandas as pd
import numpy as np
import argparse
import json
import keras
import examples.example_helper
from deepmoji.sentence_tokenizer import SentenceTokenizer
from deepmoji impo... |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '@material-next/core/SvgIcon';
const SvgIconCustom = global.__MUI_SvgIcon__ || SvgIcon;
let LocalLaundryService = props =>
<SvgIconCustom {...props}>
<path d="M9.17 16.83c1.56 1.56 4.1 1.56 5.66 0 1.56-1.56 1.56-4.1 0-5.66l-5.66 5... |
angular.module('managerApp').config(($stateProvider) => {
$stateProvider.state('iaas.pci-project.compute.infrastructure.iac-view', {
url: '/iac/view',
views: {
cloudProjectComputeInfrastructure: {
templateUrl: 'app/cloud/project/compute/infrastructure/iac/view/cloud-project-compute-infrastructur... |
var mysql = require("mysql"),
moment = require("moment"),
comun = require("../comun/comun"),
util = require("util"),
async = require("async"),
sprintf = require("sprintf-js").sprintf;
var facemitidasDb = require("../facemitidas/facemitidas.db_mysql");
var facturasEmitidasDbToJs = require("../factu... |
import React from 'react';
import MuiStoryblok from '../lib/index';
const App = () => (
<MuiStoryblok
useObjectTheme={false}
accessToken="9K1dqG8gQkc1jeVbOWRDUAtt"
version="draft"
/>
);
export default App;
|
export const resetTypes = {
RESET: 'RESET'
}
export const resetStore = () => dispatch => {
dispatch({
type: resetTypes.RESET
})
}
|
const TestController = require("../controleur/test");
const router = require("express").Router();
const authToken = require("../middleware/authToken").authToken;
const permit = require('../middleware/roleAuth').permit;
/**
* @swagger
* /tests:
* get:
* summary: Returns all the tests of class in which the us... |
from random import randint
import data
class Product(data.ParentProduct):
def __init__(self, name, amount, price):
super().__init__(name)
self.amount = amount
self.price = price
def show_price(self, currency):
print(f"{self.name} price is {self.price}")
def show_amount(se... |
import json
from django.shortcuts import redirect
from django import http
from django.views import generic
from django.template.loader import get_template
from django.template import RequestContext
import reversion
from editor.models import NewStampOfApproval, Comment, RestorePoint, EditorItem, Access
from accounts.... |
import React from 'react';
import { Classes, Popover, Tooltip, Icon } from "@blueprintjs/core";
import { Colors, Box } from '../Common'
function Help(props) {
const {
icon,
position,
disabled,
children,
} = props;
return (
<Popover
content={children}
position={position}
... |
'use strict';
require('./generator-runtime');
module.exports = require('./json-rules-engine');
var express = require('express');
var app = express();
var bodyParser = require('body-parser');
var jsonParser = bodyParser.json();
var Engine = require('.').Engine;
var MongoClient = require('mongodb').MongoClient;
var cfg ... |
'use strict';
const EventEmitter = require('events'),
keypress = require('keypress');
class UI extends EventEmitter {
constructor(config) {
super();
this.touchThreshold = config.touchThreshold || 24;
this.releaseThreshold = config.releaseThreshold || 12;
if(process.platform == 'linux' && p... |
import React from 'react';
import { Box } from '../../Box';
import ReactMarkdown from 'react-markdown';
import readme from '../README.md';
import 'github-markdown-css';
export const README = () => {
return (
<Box p="3rem" className="markdown-body">
<ReactMarkdown source={readme} />
... |
import pytest
@pytest.fixture(scope="session")
def tmpdirec(tmpdir_factory):
return tmpdir_factory.mktemp("data")
|
// Env variables
const maxImagesPermitted = 7;
const baseApiUrl = 'api'
// End Env variables
let token = getCookie('cnn-smoothie-auth');
checkTokenAndRedirectIfEmpty();
setInterval(function(){
checkTokenAndRedirectIfEmpty();
}, 5000);
function checkTokenAndRedirectIfEmpty() {
token = getCookie('cnn-smoothie-... |
'use strict';
angular.module('myApp.unit5', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/unit5', {
templateUrl: 'unit5/unit5.html',
controller: 'Unit5Ctrl'
});
}]).controller('Unit5Ctrl', ['Unit5', '$scope',
function(Unit5, $scope) {
$scope.ex = Unit5.ex;
... |
# -*- coding: utf-8 -*-
def getstate(password, salt="random", rounds=1, hash="sha256"):
from ..numpy.random import get_state
state = get_state(password, salt, rounds, hash)
state = tuple(state[1].tolist()) + (624,)
return (3, state, None)
def setstate(password, salt="random", rounds=1, hash="sha256"):
import ran... |
define(["views/dialog"], function(GitDialog) {
var commands = codebox.require("core/commands/toolbar");
var app = codebox.require("core/app");
var dialogs = codebox.require("utils/dialogs");
var menu = codebox.require("core/commands/menu");
var box = codebox.require("core/box");
var Command = co... |
import React from "react"
import { StaticQuery, graphql } from "gatsby"
import Img from "gatsby-image"
/*
* This component is built using `gatsby-image` to automatically serve optimized
* images with lazy loading and reduced file sizes. The image is loaded using a
* `StaticQuery`, which allows us to load the image ... |
import EventDispatcher from './eventDispatcher.js'
class UIActions {
constructor() {
this.emitter = EventDispatcher.getInstance();
}
} |
from .types.release import Release
from ..utils import utils
from .. import constants
class Asset:
def __init__(
self,
file_path,
asset_id,
container=None,
name=None,
position='auto',
release=Release.PRIVATE,
clips=Non... |
# TODO: Fill out this file with information about your package
# HINT: Go back to the object-oriented programming lesson "Putting Code on PyPi" and "Exercise: Upload to PyPi"
# HINT: Here is an example of a setup.py file
# https://packaging.python.org/tutorials/packaging-projects/
from setuptools import setup
setup(... |
"use strict"
function assign(...args) {
return Object.assign(...args);
}
const compress = (key) => {
return (key && key['runs'] ? key['runs'].map((v) => v.text) : []).join('');
}
const isChannelVerified = (vRender) => {
const badges = (vRender['ownerBadges'] ?
vRender['ownerBadges'].map((badge) =>... |
/*!
* Bootstrap dropdown.js v5.0.0-alpha2 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' &&... |
import _ from 'underscore';
// Create an object to store all the application mixins
OHIF.mixins = {};
// Class to manage new mixins and its dependencies
class Mixin {
// Create the mixin instance
constructor({ dependencies, composition }) {
// Store the mixin dependencies
this.dependencies =... |
//create a function that accepts data and return a list item
function createPersonEl(title,firstname,lastname,email) {
let nameEl = document.createElement('li')
nameEl.innerHTML = `${title} ${firstname} ${lastname}, ${email}`
return nameEl
}
fetch('data.json')
.then(function (response) {
return response.jso... |
var moment = require("moment");
exports.getCurrentDateTime = () => {
const format = "YYYY-MM-DD HH:mm:ss"
let date = new Date();
return moment(date).format(format);
};
exports.getTimeDifference = (startDateTime, endDateTime) => {
var momentStartDateTime = moment(startDateTime, 'YYYY-MM-DD HH:m... |
var Test = require('../config/testConfig.js');
//var BigNumber = require('bignumber.js');
// Watch contract events
const STATUS_CODE_UNKNOWN = 0;
const STATUS_CODE_ON_TIME = 10;
const STATUS_CODE_LATE_AIRLINE = 20;
const STATUS_CODE_LATE_WEATHER = 30;
const STATUS_CODE_LATE_TECHNICAL = 40;
const STATUS_CODE_LAT... |
const help = (pushname, prefix, botName, ownerName, reqXp, uangku) => {
return `
┏ *〈 ${botName} 〉*
╿
┷┯ *〈 𝐼𝑁𝐹𝑂𝑅𝑀𝐴𝐶𝐼𝑂𝑁 〉*
╽
┠≽ *Nombre* : ${pushname}
┠≽ *XP* : ${reqXp}
┠≽ *Dinero* : ${uangku}
┠≽ *Registrado : ✔️
┠≽ *REGLAS
┠≽ *No Privado Al Bot
┠≽ *No Pedir Muchos Comandos P... |
/* global describe, beforeEach, afterEach, it, expect */
var getApi = require('../../src/js/get-api-data')
var postToApi = require('../../src/js/post-api-data')
var sinon = require('sinon')
var Model = require('../../src/js/models/OfferItemsModel')
var endpoints = require('../../src/js/api')
var browser = require('..... |
import React from 'react'
import PropTypes from 'prop-types'
import { Link } from 'react-router-dom'
import { withFormik } from 'formik'
import Typography from 'material-ui/Typography'
import TextField from 'material-ui/TextField'
import Button from 'material-ui/Button'
import Grid from 'material-ui/Grid'
import { wit... |
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from future.builtins import * # NOQA
import unittest
from obspy.db.util import parse_mapping_data
class UtilTestCase(unittest.TestCase):
"""
Test suite for obspy.db.util.
... |
const fs = require('fs');
const path = './logs/';
if (!fs.existsSync(path)){
fs.mkdirSync(path);
console.log('Created log directory.');
}
function getFileName(date, msg=false){
if(msg)
return `${date.getDate()}-${date.getMonth()+1}-${date.getFullYear()}.msgs`;
return `${date.getDate()}-${date.getMonth()+1... |
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
// tslint:disable:comment-format binary-expression-operand-order max-line-length
// tslint:disable:no-bitwise prefer-template cyclomatic-complexity
// tslint:disable:no-shadowed-variable switch-default prefer-const
// tslint:disable:one-... |
import firebase from "firebase/app";
import "firebase/firestore";
export default {
async deleteUser({ rootState }, id) {
let app = firebase.app(rootState.selectedApp.projectId);
if (!app) return false;
let db = app.firestore();
let currentUser = app.auth().currentUser;
if (!... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013 Ben Kurtovic <ben.kurtovic@gmail.com>
#
# 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 ... |
import React, {useState, useEffect} from 'react';
import { View, Button, Text, ActivityIndicator, Alert, StyleSheet } from 'react-native';
import * as Location from 'expo-location';
import * as Permissions from "expo-permissions";
import Colors from "../constants/Colors";
import MapPreview from "./MapPreview";
const L... |
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... |
// ==UserScript==
// @name Data Selector
// @namespace http://anchoragepublic.org/ /selector
// @description Select Data for Scraper Training Purposes
// @include http://*/*
// @include https://*/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
// @require https://ajax.googleapis.com/aj... |
// Sorts an array of strings ignoring case (sorts in place).
const sort = (arr) => {
arr.sort((a, b) => (
a.localeCompare(b, 'en', { sensitivity: 'base' })
));
};
export default sort;
|
const test = require('tap').test;
const VirtualMachine = require('../../src/virtual-machine.js');
const Sprite = require('../../src/sprites/sprite.js');
const Variable = require('../../src/engine/variable.js');
const adapter = require('../../src/engine/adapter');
const events = require('../fixtures/events.json');
test... |
from online_monitor.receiver.receiver import Receiver
from zmq.utils import jsonapi
import numpy as np
import time
from PyQt4 import Qt
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtGui
import pyqtgraph.ptime as ptime
from pyqtgraph.dockarea import DockArea, Dock
from online_monitor.utils import utils
... |