text stringlengths 3 1.05M |
|---|
import Phaser from 'phaser';
console.log(Phaser);
var keys = JSON.parse(localStorage.getItem("capManKeys"));
if(keys === null) {
keys = {
playerOne: {
up: Phaser.Input.Keyboard.KeyCodes.W,
down: Phaser.Input.Keyboard.KeyCodes.S,
left: Phaser.Input.Keyboard.KeyCodes.A,
... |
"use strict";
/*
* Copyright (c) 2014-2020 Vanessa Freudenberg
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, c... |
"""Simple event listener for example producer app with callbacks."""
from wpwithin_python import AbstractEventListener
class EventListener(AbstractEventListener):
"""Simple event listener for example producer app with callbacks."""
def beginServiceDelivery(self, service_id, service_delivery_token, units_to_... |
// @flow
import React from 'react'
import PropTypes from 'prop-types'
import { Link as BaseLink } from 'rebass'
import styled from 'styled-components'
const StyledLink = styled(BaseLink)`
${props => props.theme.variants.link[props.variant || 'primary']};
`
export function Link({
children,
href,
...pro... |
var parseString = require('xml2js').parseString;
var Request = require("request");
var inventory = require('./inventory');
var fs = require('fs');
module.exports = {
getEvents : function(RHVserver, cb){
//Query to filter events with severity higher than normal
URI = "/ovirt-engine/api/events?search=... |
import React from "react";
import PropTypes from "prop-types";
import { useFirestore } from 'react-redux-firebase';
import { Form, Button } from 'react-bootstrap';
function NewSurveyForm(props){
const firestore = useFirestore();
function addSurveyToFirestore(event) {
event.preventDefault();
props.onNewSurv... |
# coding=utf-8
# Copyright 2020 The TF-Agents Authors.
#
# 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 la... |
/* jshint node: true */
'use strict';
function getTask(name) {
return require('./src/tasks/' + name + '.js');
}
module.exports = function (grunt) {
require('time-grunt')(grunt);
require('load-grunt-tasks')(grunt, {
pattern: [
'grunt-*',
'assemble*'
]
});
// ... |
import { combineReducers } from '@reduxjs/toolkit';
import { artworksReducer, artworkDeleteReducer } from './artworksReducer.js';
import {
artworkReducer,
artworkUpdateReducer,
artworkCreateReducer,
} from './artworkReducer.js';
import { artistDetailsReducer, artistsReducer } from './artistReducer';
import cartRe... |
var chart = c3.generate({
data: {
columns: [
['data1', 30, -200, -100, 400, 150, 250],
['data2', -50, 150, -150, 150, -50, -150],
['data3', -100, 100, -40, 100, -150, -50]
],
groups: [
['data1', 'data2']
],
type: 'bar',
... |
import unittest
from tjauto import json_util
class TestJSON(unittest.TestCase):
def test_read_json_file_has_array(self):
json_data = json_util.read_json_file("./tests/assets/json/string_array.json")
self.assertEqual(json_data, ['a','b'])
def test_read_json_file_has_object(self):
json_da... |
// Encoding documentation:
// https://en.wikipedia.org/wiki/Code_39#Encoding
import Barcode from "../Barcode.js";
class CODE39 extends Barcode {
constructor(data, options){
data = data.toUpperCase();
// Calculate mod43 checksum if enabled
if(options.mod43){
data += getCharacter(mod43checksum(data));
}
... |
import React from 'react';
export const themes = {
light: {
background: '#eeeeee'
},
dark: {
background: '#222222'
}
}
export const ThemeContext = React.createContext({
theme: themes.light
}); |
#!/home/austin/Awwards/virtual/bin/python3
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
|
# -*- coding: utf-8 -*-
import grpc
import routeguide_pb2
import routeguide_pb2_grpc
import routeguide_db
import random
def get_feature(feature):
if not feature.location:
print("Server returned incomplete feature")
return
if feature.name:
print("Feature called {name} at {l... |
/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2016 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
// Provides control sap.m.DateRangeSelection.
sap.ui.define(['jquery.sap.global', './DatePicker', './library'],
function(jQuery, Dat... |
import React from 'react'
import Layout from '../components/layout'
import Banner from '../components/banner'
import { useStaticQuery, graphql } from "gatsby"
import Parser from 'html-react-parser';
const TaC = (props) =>{
const bannerText = (
<>
<span className="banr-tagline-fx">Valentine Cardinale</span>
... |
/*
* This file is part of Adblock Plus <https://adblockplus.org/>,
* Copyright (C) 2006-present eyeo GmbH
*
* Adblock Plus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundation.
*
* Adblock Plus is ... |
var path = require('path');
module.exports = {
entry: path.resolve(__dirname, 'src') + '/app/index.js',
output: {
path: path.resolve(__dirname, 'dist') + '/app',
filename: 'bundle.js',
publicPath: '/app/'
},
module: {
loaders: [
{
test: /\.js$/,
include: path.resolve(__di... |
// export { default as example } from './example';
export { default as member } from './member';
export { default as recipes } from './recipes';
|
/*
添加按钮操作
*/
$('#button-add').click(function() {
var url = SCOPE.add_url;
window.location.href = url;
});
/*
提交
*/
$('#singcms-button-submit').click(function(){
var data = $('#singcms-form').serializeArray();
postData = {};
$(data).each(function(i){
postData[this.name] = this.value;
});
console.log(postDa... |
import { EngineContext } from 'Components/utils/EngineContext'
import { ScrollToTop } from 'Components/utils/Scroll'
import { utils } from 'publicodes'
import { useContext } from 'react'
import emoji from 'react-easy-emoji'
import { useSelector } from 'react-redux'
import { Link } from 'react-router-dom'
import styled ... |
import { storiesOf } from '@storybook/react'
import React from 'react'
import Box from 'ui-box'
import { TickCircleIcon, BanCircleIcon, TickIcon } from '../../icons'
import {
Text,
Paragraph,
Heading,
Link,
Code,
Pre,
Label,
Small,
Strong,
UnorderedList,
OrderedList,
ListItem
} from '..'
const ... |
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..confounds import ACompCor
def test_ACompCor_inputs():
input_map = dict(components_file=dict(usedefault=True,
),
header=dict(),
ignore_exception=dict(nohash=True,
usedefault=True,
),
mask_fi... |
/**
* Converts a string user input to a number
* @param {string} input - User input to transform into a number
* @returns {?Number} - Returns the value as a Number if possible or null if not unsafe or not a number
*/
export function getInputAsNumber(input) {
const value = parseInt(input, 10);
if (Number.isNaN(... |
'use strict'
module.exports = function(app, middlewares, routeMiddlewares) {
return middlewares.validToken
}
|
const greeting = (name) => {
const element = document.querySelector('.js-greeting');
if (element) {
element.innerHTML = name;
}
};
export default greeting;
|
import axios from 'axios';
const user = async () => {
const res = await axios.get('https://randomuser.me/api');
//res vraća array od usera imena "results" mi uzimamo samo prvog [0]
const user = res.data.results[0];
const template = `
<div class="card">
<img src="${user.picture.la... |
var searchData=
[
['vector2_18535',['Vector2',['../struct_brawl_lib_1_1_internal_1_1_vector2.html',1,'BrawlLib::Internal']]],
['vector2stringconverter_18536',['Vector2StringConverter',['../class_brawl_lib_1_1_internal_1_1_vector2_string_converter.html',1,'BrawlLib::Internal']]],
['vector3_18537',['Vector3',['../s... |
#!/usr/bin/env python
# Author: Felix Wiemann
# Contact: Felix_Wiemann@ososo.de
# Revision: $Revision: 3646 $
# Date: $Date: 2005-07-03 01:08:53 +0200 (Sun, 03 Jul 2005) $
# Copyright: This module has been placed in the public domain.
"""
Test for Null writer.
"""
from __init__ import DocutilsTestSupport
def suite(... |
from datetime import datetime
from django.db import models
from django.utils.timezone import utc
class Character(models.Model):
""" character within eve """
lastrefresh = models.DateTimeField(null=True)
characterid = models.BigIntegerField(unique=True)
charactername = models.CharField(max_length=254... |
# Copyright 2018 The Cirq Developers
#
# 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 ... |
import React from 'react'
import {
CHeader,
CSubheader,
CBreadcrumbRouter,
} from '@coreui/react'
// routes config
import routes from '../routes'
const TheHeader = () => {
return (
<CHeader withSubheader>
<CSubheader className="px-3 justify-content-between">
<CBreadcrumbRouter
clas... |
__all__ = [
'fixed_value',
'coalesce',
]
try:
from itertools import ifilter as filter
except ImportError:
pass
class _FixedValue(object):
def __init__(self, value):
self._value = value
def __call__(self, *args, **kwargs):
return self._value
def fixed_value(value):
re... |
/*
* LiskHQ/lisk-service
* Copyright © 2020 Lisk Foundation
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
* no part of this software, including this file, may be copied, ... |
import React, { Component } from 'react';
import store from 'store';
import { connect } from 'react-redux';
import * as actions from 'actions';
import { searchArtistInfo } from 'helperFunctions';
import fetchJsonp from 'fetch-jsonp'
import './style.css'
const { DZ } = window;
const promise = new Promise((resolve, rej... |
'use strict';
describe('Service: apiService', function () {
// load the service's module
beforeEach(module('foodReportsApp'));
// instantiate service
var apiService;
beforeEach(inject(function (_apiService_) {
apiService = _apiService_;
}));
it('should do something', function () {
expect(!!api... |
# Copyright 2018/2019 The RLgraph 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... |
const reverseString = require("../../problems/daily-byte/reverse-string");
test("reverses all the characters of a string", () => {
expect(reverseString("Cat")).toMatch("taC");
expect(reverseString("The Daily Byte")).toMatch("etyB yliaD ehT");
expect(reverseString("Madam")).toMatch("madaM");
});
|
/**
* Created by zhouchaoyi on 2016/10/10.
*/
import React, {PropTypes} from 'react'
import {Link} from 'react-router'
import {connect} from 'react-redux'
import {bindActionCreators} from 'redux'
import {Icon, Button, Tree,Modal,Input} from 'antd';
import {listItems,onCheck,reset,onExpand,addItem,isShowInfo,onSelect,... |
var gulp = require('gulp')
var pug = require('gulp-pug')
var stylus = require('gulp-stylus')
var browserSync = require('browser-sync').create()
// Pug
gulp.task('pug', function(){
return gulp.src('src/*.pug')
.pipe(pug())
.pipe(gulp.dest('./output'))
})
// Stylus
gulp.task('sty... |
var tabla;
var gateSe="";
var bandera=true;
init();
var now = new Date();
var day = ("0" + now.getDate()).slice(-2);
var month = ("0" + (now.getMonth() + 1)).slice(-2);
var today = now.getFullYear()+"-"+(month)+"-"+(day) ;
function selectGate (id,gate){
console.log(gate);
gateSe=id;
$('input.gate').prop('che... |
#
# The Python Imaging Library.
# $Id$
#
# JPEG (JFIF) file handling
#
# See "Digital Compression and Coding of Continuous-Tone Still Images,
# Part 1, Requirements and Guidelines" (CCITT T.81 / ISO 10918-1)
#
# History:
# 1995-09-09 fl Created
# 1995-09-13 fl Added full parser
# 1996-03-25 fl Added hack to use t... |
var fileHandler = require('./fileHandler.js')
var Parser = require('./parser.js')
module.exports = function main (jsheetsFilePath) {
var parser
if(!jsheetsFilePath) return 1
parser = new Parser
return fileHandler.write(fileHandler.cssFilePath(jsheetsFilePath), parser.parse(fileHandler.read(jsheetsFilePath))) ?... |
var mocks = require("mock-firmata"),
MockFirmata = mocks.Firmata,
five = require("../lib/johnny-five.js"),
sinon = require("sinon"),
Board = five.Board;
function newBoard() {
var io = new MockFirmata();
var board = new Board({
io: io,
debug: false,
repl: false
});
io.emit("connect");
io.... |
//utd = []; // ustodo utilities
//utd[Date] = require('C:/utd/141213UtdV6/public/util/UtilDate.js');
//utd[Class] = require('C:/utd/141213UtdV6/public/util/UtilClass.js');
//utd[HtmlHref] = require('C:/utd/141213UtdV6/public/util/UtilHtmlHref.js');
// 1107
UtilDate = require('C:/utd/141213UtdV6/public/util/UtilDate.... |
import React from "react";
import * as landingMBStyles from "./landingMB.module.css";
import ex21 from "../../images/mb/ex21.svg";
import excelsior21 from "../../images/excelsior21-front-dt.svg";
import exBack from "../../images/mb/ex-back-mb.svg";
import cube from "../../images/Point-line triangle cube.svg";
const ... |
define({
"instruction": "หน้าจอจะปรากฏขึ้นก่อนที่เข้าถึงโปรแกรมประยุกต์",
"defaultContent": "เพิ่มข้อความ, ลิงค์, และกราฟฟิคเล็กๆ ที่นี่",
"requireConfirm": "ต้องการการยืนยันเพื่อดำเนินการต่อ",
"noRequireConfirm": "ไม่จำเป็นต้องยืนยันที่จะดำเนินการ",
"optionText": "การตั้งค่าสำหรับผู้ใช้งานในการปิดการแสด... |
import urllib2
import json
data = json.load(urllib2.urlopen(
'https://api.github.com/repos/GBA-Dev/BinaryGames/git/trees/master?recursive=1'
))
roms = [];
dl_url = 'https://raw.githubusercontent.com/GBA-Dev/BinaryGames/master/'
for file in data['tree']:
fpath = file['path']
if ('.zip' not in fpath[-4:]):
i... |
import React, { Component } from 'react';
import { Container } from 'reactstrap';
import { bindActionCreators } from 'redux';
import { withRouter } from 'react-router-dom';
import connect from 'react-redux/es/connect/connect';
import { withStyles, Typography } from '@material-ui/core';
import HomeNav from '../../compon... |
# coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# 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 applicab... |
const Browser = require('../Browser')
const Util = require('../utils/utils')
const Handler = require('../exceptions/Handler')
const { moenime_url } = require('../config.json')
class Moenime {
/**
* Get anime list from anime list page.
*
* @param {String} show Show type, could be: movie, ongoing or,... |
const {db} = require('./server/db')
const app = require('./server')
const PORT = process.env.PORT || 8080 // this can be very useful if you deploy to Heroku!
db
.sync() // if you update your db schemas, make sure you drop the tables first and then recreate them
.then(() => {
console.log('DB has been synced')
... |
const fs = require("fs");
function list_ids_in_directory(directory, hardcoded_labels) {
if (hardcoded_labels === undefined) {
hardcoded_labels = {};
}
const files = fs.readdirSync(`../${directory}`).sort();
let ids = [];
for (const name of files) {
if (fs.lstatSync(`../${directory}/${name}`).isDirec... |
const cardPayment = document.querySelector('.checkoutCard');
const pixPayment = document.querySelector('.checkoutPix');
const divCard = document.querySelector('.checkoutDivCard');
const divPix = document.querySelector('.checkoutDivPix');
cardPayment.addEventListener('click', () => {
divCard.style.display = 'flex';
... |
function getNumbersDivisibleByThree() {
return Array.from({ length: 100 }, (_, index) => index + 1)
.filter((number) => number % 3 === 0)
.join('\n')
}
console.log(getNumbersDivisibleByThree())
|
# Copyright 2010 New Relic, 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 six
import chainer
from chainer.backends import cuda
from chainer import function_node
from chainer.utils import type_check
class Broadcast(function_node.FunctionNode):
"""Function that broadcasts given arrays."""
def check_type_forward(self, in_types):
type_check.expect(in_types.size() > 0)... |
(function () {
/* Imports */
var Meteor = Package.meteor.Meteor;
var global = Package.meteor.global;
var meteorEnv = Package.meteor.meteorEnv;
var WebApp = Package.webapp.WebApp;
var WebAppInternals = Package.webapp.WebAppInternals;
var main = Package.webapp.main;
var check = Package.check.check;
var Match = Package.c... |
import React, { useState } from 'react';
import _ from 'lodash';
import { Input, InputGroup, Icon, Modal, Table } from 'rsuite';
import * as Constants from '../data/constants';
import { itemEp } from '../ep/ep_stats';
import ItemTooltip from './item_tooltip';
import * as tbcsim from 'tbcsim';
const { Column, HeaderC... |
def lambda_handler(event, context):
"""
Expects a two element list: [ Input, [...] ]
Returns the second element
"""
return event[1]
|
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.15/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.
//>>built
define({"widgets/Infographic/setting/nls/strings":{settings:"Parametrai",titleSettings:"Teksto paramet... |
import {
REQUEST_COMMENT_INFO,
RESPONSE_COMMENT_INFO,
FAILURE_REQUEST_COMMENT,
} from '../actions/comment';
const initalState = {
isFetchingComment: false,
isCommentFetchDone: false,
CommentData: [],
photoURL: '',
likesCount: 0,
createTime: 0,
text: '',
errorMessage: '',
};
export default functi... |
import numpy as np
import tensorflow as tf
import time
import datetime
import os
import sys
import h5py
from pathlib import Path
import pandas as pd
import matplotlib.pyplot as plt
import evidential_deep_learning as edl
from .util import normalize, gallery
class Gaussian:
def __init__(self, model, opts, dataset="... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<263690bc960e4163e7ead314aa9a9fcc>>
* @flow
* @lightSyntaxTransform
* @nogrep
*/
/* eslint-disable ... |
# coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class EipResult:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attri... |
# -*- coding: utf-8 -*-
import os
import subprocess
from datetime import datetime
from typing import Dict
import discord
from . import config as C
from .config import logger
from .message_handler import MessageHandler
def get_bot_version():
try:
result = subprocess.check_output(['git', 'rev-list', '--co... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var react_1 = tslib_1.__importDefault(require("react"));
var styled_components_1 = tslib_1.__importDefault(require("styled-components"));
var StyledArrowLongUp = styled_components_1.default.i(templateObject_1 ||... |
# -*- encoding: utf-8 -*-
from . import db
class Activity(db.Model):
item_id = db.Column(db.Integer, db.ForeignKey('item.id'), primary_key=True)
time = db.Column(db.Integer, nullable=True)
activity = db.Column(db.Integer, primary_key=True, autoincrement=False)
|
module.exports = function createDreamTeam(members) {
if (!Array.isArray(members)) return false;
const res = members.filter(word => typeof word === 'string').map(element => { return element.trim().split('')[0].toUpperCase()}).sort(function (a, b) {
if (a < b) {
return -1;
}
if (b < a) {
r... |
#!/usr/bin/env python3
import testUtils
import argparse
import signal
from collections import namedtuple
import os
import shutil
###############################################################
# Test for validating consensus based block production. We introduce malicious producers which
# reject all transactions.
#... |
from util import *
class Console:
OPCODES = {
"nop": 0,
"acc": 1,
"jmp": 2,
}
def __init__(
self,
program_source,
*,
name="",
debug=False,
):
"""Create a console that can run given program with input and output represented as asy... |
let nock = require('nock');
module.exports.hash = "2e82caedae6eb6c5cb61d53e57d2bdcb";
module.exports.testInfo = {"uniqueName":{"js-test-emailHook-":"js-test-emailHook-160530501380902015","js-test-webHook-":"js-test-webHook-160530501380909561"},"newDate":{}}
nock('https://endpoint:443', {"encodedQueryParams":true})
... |
/*global define*/
///////////////////////////////////////////////////////////////////////////
// Copyright © Esri. 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
//
/... |
import BinaryTreeNode from './BinaryTreeNode';
class BinaryTree {
/**
* Initialize the Binary Tree
* @param {*} value The value
* @return {undefined}
*/
constructor(value) {
if (value) {
this.root = new BinaryTreeNode(value);
}
}
/**
* Return the root node of the tree.
* @retur... |
import pickle
from csgodataclasses.csgodataclasses import *
def calculate_total_time(matches: list, match_type: str) -> int:
total_time = 0
for match in matches:
total_time += match.duration
minutes, seconds = divmod(total_time, 60)
hours, minutes = divmod(minutes, 60)
print(f"Total time ... |
'use strict';
/** @namespace DevKit */
var DevKit;
(function (DevKit) {
'use strict';
DevKit.Formmsdyn_resourcecategorypricelevel_Information = function(executionContext, defaultWebResourceName) {
var formContext = null;
if (executionContext !== undefined) {
if (executionContext.getFormContext === undefined) ... |
import React from 'react'
import { Route } from 'react-router-dom'
import { useDispatch, useSelector } from 'react-redux'
import { LinkContainer } from 'react-router-bootstrap'
import { Navbar, Nav, Container, NavDropdown } from 'react-bootstrap';
import SearchBox from './SearchBox'
import { logout } from '../actions/u... |
"use strict";
module.exports = {
site: {
siteMetadata: {
url: "http://localhost",
title: "Test title",
subtitle: "Test subtitle",
copyright: "Test copyright",
disqusShortname: "",
postsPerPage: 4,
menu: [
{
label: "Test label 1",
path: "/test/... |
// Originally found in Fantasia by spr33.
// Description:
// Reduces font size to bitmap-size, close to 8px in size. (created by Blade3575)
var bm1 = scan('80 BF 88 00 00 00 00 57 74 0D');
var bm2 = scan('80 BE 88 00 00 00 00 74 ?? B9 ?? ?? ?? ?? E8 ?? ?? ?? ?? 83 F8 01 75');
var bm3 = scan('EB ?? 33 FF 8B 5D F8 83 B... |
const fs = require("fs");
const os = require("os");
const path = require("path");
const child_process = require("child_process");
function ensureDirSync(dir) {
const parent = path.normalize(path.join(dir, '..'));
if (!(0, fs.existsSync)(parent)) {
ensureDirSync(parent);
}
if (!(0, fs.existsSync)(dir)) {
(0, fs... |
"""
Copyright 2019 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software di... |
/**
* Write-only the password as cookie
*/
import React, { useState } from 'react'
import { setSessionPassword } from '../utils/utils'
import Layout from '../../../components/layout'
import style from './PasswordProtect.module.css'
console.log(style)
const PasswordProtect = () => {
const [password, setPassword] =... |
webpackJsonp([4],{265:function(t,e,o){function a(t){o(345)}var i=o(7)(o(318),o(384),a,"data-v-00197eb2",null);t.exports=i.exports},268:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={data:function(){return{open:!0}},computed:{},methods:{}}},269:function(t,e,o){e=t.exports=o(257)... |
from IGParameter import *
from IGNode import *
from PIL import ImageOps
from IGParameterRectangle import *
from IGParameterCoords import *
from IGParameterInteger import *
class IGAddNumbers(IGNode):
def __init__(self):
super().__init__("Add Numbers")
self.add_input_parameter("a", IGParameterIntege... |
define(["imagediff"], function(imagediff) {
function toCanvas (object) {
var
data = imagediff.toImageData(object),
canvas = imagediff.createCanvas(data.width, data.height),
context = canvas.getContext('2d');
context.putImageData(data, 0, 0);
return canvas;
}
function imageDiffEqua... |
/*
This script will be run within the webview itself.
It cannot access the main VS Code APIs directly.
*/
(function() {
const vscode = acquireVsCodeApi();
// Handle messages sent from the extension to the webview
window.addEventListener('message', event => {
const message = event.data; // The json data that... |
import pytest
from tests import config as conf
from tests import experiment as exp
@pytest.mark.distributed # type: ignore
def test_mnist_pytorch_distributed() -> None:
config = conf.load_config(conf.tutorials_path("mnist_pytorch/distributed.yaml"))
config = conf.set_max_length(config, {"batches": 200})
... |
import React from "react";
import Button from "./Button";
import PropTypes from "prop-types";
import "../css/ButtonPanel.css";
class ButtonPanel extends React.Component {
static propTypes = {
clickHandler: PropTypes.func,
}
handleClick = buttonName => {
this.props.clickHandler(buttonName);
};
rende... |
console.log('load _drum_57_11_JCLive_sf2_file');
var _drum_57_11_JCLive_sf2_file={
zones:[
{
midi:128
,loopStart:0
,loopEnd:0
,keyRangeLow:57
,keyRangeHigh:57
,sampleRate:44100
,coarseTune:6
,fineTune:35
,originalPitch:6000
,file:'SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU2LjQwLjEwMQAAAAAAAAAA... |
/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined... |
let fetch = require('node-fetch')
let handler = async (m, { conn, usedPrefix, command }) => {
try {
let res = await fetch('https://api.waifu.pics/sfw/shinobu')
let json = await res.json()
conn.sendButtonImg(m.chat, json.url, 'Nihh shinobunya', wm, `Next`, `${usedPrefix}${command}` , m)
} catch {
throw ero... |
var columnPopup = (function() {
return {
onDeleteCopy: function() {
$.ajax({
url: "OnDeleteFieldCopy",
dataType: 'json',
type: 'POST',
success: function(data) {
if (data.result == 'ask') {
... |
"""
Utility to write Open Api Specifications using the Python language.
"""
from typing import Union
class Info:
def __init__(self, spec: dict):
self._spec = spec.setdefault("info", {})
@property
def title(self):
return self._spec.get("title")
@title.setter
def title(self, title... |
require('dotenv').config({
path: `.env.${process.env.NODE_ENV}`,
});
module.exports = {
siteMetadata: {
title: 'Gatsby Default Starter',
description:
'Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might ne... |
import React from "react"
import AniLink from "gatsby-plugin-transition-link/AniLink"
import Image from "../components/image"
import SEO from "../components/seo"
import "../components/styles/style.css"
import Footer from "../components/footer"
import Header from "../components/header"
const IndexPage = () => (
<div>
... |
'''
# Dependencies
sudo aptitude install python3-osmnx
sudo aptitude install python3-rtree
sudo aptitude install python3-numpy
sudo aptitude install python3-pandas
sudo aptitude install python3-geopandas
sudo aptitude install python3-tornado
# NetworkX
https://networkx.github.io/documentation/stable/reference/algorit... |
# -*- coding: utf-8 -*-
import decimal
import os
import imghdr
import re
import struct
import posixpath
import warnings
from datetime import datetime
from enum import IntEnum
from xml.etree import ElementTree as etree
import exifread
from lektor.utils import get_dependent_url, portable_popen, locate_executable
from le... |
from pysapets.animal import Animal
import pysapets.constants as constants
import random
import logging
class Hatching_chick(Animal):
# base health and attack values
BASE_ATTACK = 1
BASE_HEALTH = 1
def __init__(self, addAttack = 0, addHealth = 0):
# lvl 1: End turn: Give +5/+5 to friend ahead until en... |
exports.UPDATE_SEQUENCE = 'UPDATE_SEQUENCE'
exports.UPDATE_SYNTH = 'UPDATE_SYNTH'
exports.CHANGE_MODE = 'CHANGE_MODE'
exports.ADD_LAYER = 'ADD_LAYER'
exports.ACTIVATE_LAYER = 'ACTIVATE_LAYER'
exports.MUTE_LAYER = 'MUTE_LAYER'
exports.TOGGLE_LAYERS = 'TOGGLE_LAYERS'
exports.SEQ_ACTIVE_UPDATE = 'SEQ_ACTIVE_UPDATE'
export... |