text stringlengths 3 1.05M |
|---|
import * as QRME from './src/CreateQR';
export default QRME; |
import React, { Component } from 'react'
import {
withRouter,
} from 'react-router-dom'
import { getBeaconBlockByIndex } from '../utils/api'
import '../index.css'
import {
Container,
Loader,
} from 'semantic-ui-react'
import BlockDetail from './BlockDetail'
class BeaconBlockDetail extends Component {
... |
import React from 'react';
import { mount } from 'enzyme';
import Transition, { ENTERED } from '../src/Transition';
import SwitchTransition, { modes } from '../src/SwitchTransition';
describe('SwitchTransition', () => {
let log, Parent;
beforeEach(() => {
log = [];
let events = {
onEnter: (m) => lo... |
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.map
es5id: 15.4.4.19-3-17
description: >
Array.prototype.map - when 'length' is a string containing a
number with leading zeros
---*/
function ... |
import abc
import builtins
import datetime
import enum
import typing
import jsii
import publication
import typing_extensions
import aws_cdk.aws_cloudwatch._jsii
import aws_cdk.aws_iam._jsii
import aws_cdk.aws_kms._jsii
import aws_cdk.aws_logs._jsii
import aws_cdk.aws_s3._jsii
import aws_cdk.aws_s3_assets._jsii
import... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.typeOf = exports.dataTypeOf = void 0;
const typeOf = thing => {
switch (thing) {
case undefined:
return 'Undefined';
case null:
return 'Null';
default:
return thing.constructor.name;
}
};
export... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{"2qSP":function(e,a,t){e.exports=t.p+"static/stephanie_bodet-b7b47713f98f7e80a899767621bb680e.jpg"},BAyY:function(e,a,t){e.exports=t.p+"static/village-5561af992dd82ab0bd53832da7abcbc9.jpg"},DFRl:function(e,a,t){e.exports=t.p+"static/cabane_alpage-bca22603e7720567... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 1 18:32:56 2021
@author: mike_ubuntu
"""
import pytest
def pytest_addoption(parser):
parser.addoption("--path", action="store")
@pytest.fixture(scope='session')
def name(request):
path_value = request.config.option.path
if path_value... |
/**
Employee Controller
@author gefunk
*/
const mongoose = require('mongoose');
const Employee = mongoose.model('Employee');
// save new employee
exports.create = function(employee_data, response){
const employee = new Employee(employee_data);
employee.save(function(err){
if(err) {console.log(err);response.json(... |
const express = require("express");
const mongoose = require("mongoose");
const compression = require("compression");
const PORT = process.env.PORT || 3000;
const app = express();
app.use(compression());
app.use(express.urlencoded({ extended: true }));
app.use(express.json());
app.use(express.static("public"));
mo... |
angular.module('cerebro').controller('RestController', ['$scope', '$http',
'$sce', 'RestDataService', 'AlertService', 'ModalService', 'AceEditorService',
'ClipboardService',
function($scope, $http, $sce, RestDataService, AlertService, ModalService,
AceEditorService, ClipboardService) {
$scope.editor = u... |
""" This module loads all the classes from the VTK Text Analysis library into
its namespace. This is an optional module."""
import os
if os.name == 'posix':
from libvtkTextAnalysisPython import *
else:
from vtkTextAnalysisPython import *
|
// Copyright (c) 2015 Uber Technologies, Inc.
// 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, copy, modify, merge, ... |
export function randomBool(weight) {
return Math.random() < weight
}
|
import { expect } from 'chai'
import { stringify } from '../src/stringify'
describe('stringify', () => {
it('works', () => {
expect(stringify('')).eql('""')
expect(stringify('1')).eql('"1"')
expect(stringify('123')).eql('"123"')
expect(stringify('"')).eql('"\\""')
expect(stringify('\\')).eql('"\\... |
Object.defineProperty(exports,"__esModule",{value:true});var _jsxFileName='src/SceneView.js';var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor... |
!function (t, e) { "object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define([], e) : "object" == typeof exports ? exports.mdc = e() : t.mdc = e() }(this, function () { return i = {}, r.m = n = [function (t, e, n) { "use strict"; Object.definePro... |
# Copyright 2019 LiveSite 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 applicable law or agreed to in writ... |
require('dotenv').config();
const express = require('express');
const app = express();
const server = require('http').createServer(app);
const { Server } = require('socket.io');
const port = process.env.PORT || 3000;
app
.use(require('cors')({ origin: 'https://react-webpack-express.herokuapp.com' }))
.use(expr... |
#!/usr/bin/env python
from __future__ import print_function
import argparse
import os
import sys
from collections import defaultdict
import json
import ssg.build_yaml
import ssg.oval
import ssg.build_remediations
import ssg.products
import ssg.rules
import ssg.yaml
SSG_ROOT = os.path.abspath(os.path.join(os.path.... |
import _async_to_generator from "@swc/helpers/lib/_async_to_generator.js";
function func() {
return _func.apply(this, arguments);
}
function _func() {
_func = _async_to_generator(function*() {
before();
var b = fn(a, a, a);
after();
});
return _func.apply(this, arguments);
}
|
function parseStateRef(ref, current) {
var preparsed = ref.match(/^\s*({[^}]*})\s*$/), parsed;
if (preparsed) ref = current + '(' + preparsed[1] + ')';
parsed = ref.replace(/\n/g, " ").match(/^([^(]+?)\s*(\((.*)\))?$/);
if (!parsed || parsed.length !== 4) throw new Error("Invalid state ref '" + ref + "'");
re... |
self.__BUILD_MANIFEST = {"/_error":["static\u002Fchunks\u002Fpages\u002F_error.js"],"/basic":["static\u002Fchunks\u002Fpages\u002Fbasic.js"]};self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB() |
import unittest
import data
from promo import address_set
class TestAddressReading(unittest.TestCase):
def test_address_reading(self):
expected = ["abc@jd.de", "123@ww.xy", "ods@sdf.com",
"bbb@ww.de", "gs@kdj.de", "sdfo@foo",
"idsjf@osefj"]
addrs = [addr f... |
let capitalizeString = (string) => {
if (typeof string !== 'string') {
throw new Error('It needs to be a string');
} else return string[0].toUpperCase() + string.slice(1);
};
module.exports = capitalizeString;
|
import passport from 'passport'
import {User} from '../models/user'
export const registerUserAPI = (req, res, next) => {
let user = new User
user.firstName = req.body.firstName
user.lastName = req.body.lastName
user.email = req.body.email
user.username = req.body.username
user.setPassword(req.body.password... |
function SvgKeyboardAltTwoTone(props) {
return (
<svg
xmlns='http://www.w3.org/2000/svg'
height='1em'
viewBox='0 0 24 24'
width='1em'
className='svg-icon'
{...props}>
<path fill='none' d='M0 0h24v24H0z' />
<path
d='M3 19h18V6H3v13zM17 8h2v2h-2V8zm0 4h2v2h-2v-2zm-4-4h2v2h-2V8zm0 4h2v2h-2v-... |
function test(value, finalSettingsLength){
if (finalSettingsLength == 1) {
return 1;
} else {
if (value == "algorithm1"){
// console.log("lol")
return 1;
}
else{
return 2;
}
}
}
function createBrushMap() {
var checkCount = JSON.... |
describe('execution environments', () => {
let num = (~~(Math.random() * 1000000)).toString();
before(() => {
cy.login();
cy.deleteRegistries();
cy.deleteContainers();
cy.addRemoteRegistry(`docker${num}`, 'https://registry.hub.docker.com/');
cy.addRemoteContainer({
name: `remotepine${nu... |
#This pre-processes Ontario libraries.
#The csv includes both street and mailing address,
#and in some instances the mailing address is just a box number (to go along with street address),
#and in other instances the mailing address is the full address and the street address is blank
#we'll just look for empty entries ... |
const path = require('path')
const exec = require('./lib/shell')
const globby = require('globby')
let rootDir = path.resolve(__dirname, '..')
let examplesDir = path.join(rootDir, 'example-projects')
let givenProjName = process.argv[2]
let runCmd = process.argv[3]
if (!givenProjName) {
console.error('Must specify an... |
"""
N.B. this is a v2 of the distortions_corrector started in Dec 2017 -MAR
This file contains the Distortions_corrector.
An object used to correct distortions using an interactive procedure
involving repeated measurements.
"""
from qcodes.instrument.base import Instrument
from qcodes.instrument.parameter import Man... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var StyledIconBase_1 = require("../../StyledIconBase");
exports.Play3 = React.forwardRef(function (props, ref) {
var attrs = {
"fill": "currentColo... |
// Copyright (c) 2020, VHRS and contributors
// For license information, please see license.txt
frappe.ui.form.on('Employee Induction', {
refresh: function(frm) {
}
});
|
module.exports = {
plugins: {
tailwindcss: {}
}
}
|
define({
init: function (global, document, notebookRoot) {
// hover display element used by the given `notebookRoot`
let hoverDiv = document.createElement('div');
hoverDiv.classList.add('rendered_html');
hoverDiv.style.backgroundColor = 'white';
hoverDiv.style.display = 'non... |
import moment from "moment";
import { log } from "./services/logger";
import { retrieveActivities } from "./services/mongo-db";
export default async (event, context, callback) => {
context.callbackWaitsForEmptyEventLoop = false;
try {
const currentYear = `${moment.utc().year()}`;
const { years = current... |
class CountDownTimer {
constructor(duration, granularity) {
this.duration = duration;
this.granularity = granularity || 1000;
this.tickFtns = [];
this.running = false;
this.reset = false;
this.resetTimeText = "";
}
start() {
if (this.running) {
return;
}
this.running = ... |
/**
* -------------------------------------------------------------------------------------------------
* Functionality specific to this theme
* Provides helper functions to enhance the theme experience.
* -------------------------------------------------------------------------------------------------
*/
( fun... |
/*
*
* Migration actions
*
*/
import { actionTypes } from "./constants";
import { compareMigrationApi } from "../../api";
const getMigrationDemo = payload => ({
type: actionTypes.GET_MIGRATION_DEMO,
payload
});
const getMigrationDemoSuccess = payload => ({
type: actionTypes.GET_MIGRATION_DEMO_SUCCESS,
pa... |
class DataProvider {
baseURL = 'https://us-central1-js-capstone-backend.cloudfunctions.net/api/games/';
initialGameKey = 'BEfD6yAIbHxFQG2vuO7V';
constructor() {
const key = window.localStorage.getItem('GameKey');
if (key) this.initialGameKey = key;
}
/*
This function return a promise
*/
asy... |
const jwt = require("jsonwebtoken");
require("dotenv").config();
const signToken = () => {
console.info("call to signToken");
const token = jwt.sign(
{ user_id: "admin", expires: Date.now() + 300000 },
process.env.JWT_SECRET
);
return token;
};
module.exports = { signToken };
|
module.exports = {
CommandManager: require('./commands'),
Logger: require('./logger'),
Stats: require('./stats')
};
|
import { J_LOCAL, J_GLOBAL, PI, TORAD } from '../constants.js';
function Joint2D( clockwise, antiClockwise, coordSystem ){
this.coordinateSystem = coordSystem || J_LOCAL;
this.min = clockwise !== undefined ? -clockwise * TORAD : -PI;
this.max = antiClockwise !== undefined ? antiClockwise * TORAD : PI;
... |
var UI = {};
UI.Element = function () {};
UI.Element.prototype = {
setId: function ( id ) {
this.dom.id = id;
return this;
},
setClass: function ( name ) {
this.dom.className = name;
return this;
},
setStyle: function ( style, array ) {
for ( var i = 0; i < array.length; i ++ ) {
this.d... |
import React from 'react'
const StickyContainer = ({ children, margin }) => (
<div
css={{
position: 'sticky',
top: 50,
}}
style={{
margin: margin || '4.5em 0 4em',
}}
>
{children}
</div>
)
export default StickyContainer
|
const { series, watch } = require('gulp');
const config = require('../gulp.config.js')();
const createSvgSprite = require('./create-svg-sprite');
const liveReload = require('./live-reload');
const watchSvg = () => watch(
config.paths.sprite.src,
series(createSvgSprite, liveReload),
);
module.exports = watch... |
const { run } = require("../src/serverreplay");
const {
createHar,
createEntry,
createRequest,
createResponse,
} = require("../src/har");
const { request } = require("./support/http");
const { AbortController } = require("abort-controller");
describe("serverreplay", () => {
it("returns a correct HAR when mak... |
#!/usr/bin/env python3
import argparse
import os
import queue
import subprocess
import sounddevice as sd
import vosk
import sys
from playsound import playsound
q = queue.Queue()
def int_or_str(text):
"""Helper function for argument parsing."""
try:
return int(text)
except ValueErro... |
import {
REGISTER_SUCCESS,
USER_LOADED,
AUTH_ERROR,
LOGIN_SUCCESS,
LOGOUT,
ACCOUNT_DELETED,
} from '../actions/types'
const initialState = {
token: localStorage.getItem('token'),
isAuth: null,
loading: true,
user: null,
}
function authReducer(state = initialState, action) {
const { type, payload... |
import{r as e,e as s,h as p,H as t}from"./p-4d70e85a.js";const i=class{constructor(p){e(this,p),this.btnLeftClick=s(this,"btnLeftClick",7),this.btnRightClick=s(this,"btnRightClick",7),this.onBtnLeftClick=()=>{this.btnLeftClick.emit()},this.onBtnRightClick=()=>{this.btnRightClick.emit()}}render(){const{header:e,btnLeft:... |
/* eslint no-unused-expressions:0 */
import React, { Component } from 'react/addons';
import Counter from '../../src/components/Counter';
import jsdom from 'mocha-jsdom';
const { TestUtils } = React.addons;
describe('Components', () => {
jsdom();
describe('Counter', () => {
// Mock minimal Home interface
... |
export function getTextWidth(text, font = '12px Open Sans') {
const canvas = getTextWidth.canvas || (getTextWidth.canvas = document.createElement('canvas'));
const context = canvas.getContext('2d');
if (context) {
context.font = font;
const metrics = context.measureText(text);
return metrics.width;
}
return ... |
export * from './MailerServerModule';
export { default } from './MailerServerModule';
|
$(document).ready(function() {
// Click nav
$('.home2_nav').click(function() {
var uri = $(this).data('uri');
location.href = baseUrl + uri;
});
}); |
import Fetch from '../internal/fetch';
export default {
GetMy,
Yes,
Maybe,
No
};
export function GetMy( event ) {
return Fetch.Get(API_ENDPOINT+'/vx/theme/list/vote/getmy/'+event, true);
}
export function Yes( theme ) {
return Fetch.Get(API_ENDPOINT+'/vx/theme/list/vote/yes/'+theme, true);
}
export functi... |
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/API/upload-file/upload-file"],{
/***/ 476:
/*!*******************************************************************************************************************!*\
!*** C:/Users/kira3/Documents/GitHub/TemporaryParking/main.js?{"page":"pages%2FAPI... |
import isArray from '../is/isArray'
import isObject from '../is/isObject'
import isString from '../is/isString'
/**
* Get value by deep key in object(array)
*
* @example
* const obj = {
key : 0,
label: 'Root',
items: {
one: {
key : 1,
label ... |
print('Digite 6 números inteiros.')
s = 0
c = 0
for n in range(1, 7):
a = int(input('Digite o {} número inteiro: '.format(n)))
if a % 2 == 0:
s += a
c += 1
print('A soma dos {} números pares é {}'.format(c, s))
|
// @link https://schemas.extratv.com/json-schema/extra/iam/request/get-all-apps-response/1-0-0.json#
import Fb from '@gdbots/pbj/FieldBuilder.js';
import GdbotsPbjxResponseV1Mixin from '@gdbots/schemas/gdbots/pbjx/mixin/response/ResponseV1Mixin.js';
import Message from '@gdbots/pbj/Message.js';
import Schema from '@gdb... |
#!/usr/bin/env python3
""" Models for fitting.
.. code-author: Raymond Ehlers <raymond.ehlers@cern.ch>, Yale University
"""
import abc
import logging
import operator
from typing import Any, Callable, Dict, Iterable, Iterator, TypeVar, Union
import iminuit
import numpy as np
import numpy.typing as npt
import scipy.i... |
/** vim: et:ts=4:sw=4:sts=4
* @license RequireJS 2.1.2 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
*/
//Not using strict: uneven strict support in browsers, #392, and causes
//problems with requi... |
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import Example from './components/Example';
class App extends Component {
render(){
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
... |
import React from "react";
import { Link } from "react-router-dom";
import { Helmet } from "react-helmet";
import Particles from "react-particles-js";
import "./style.css";
export default () => {
return (
<div className="found-container page-component">
<Helmet>
<title>Energia Power... |
const stakingRewardAddress = '0xd6b2D8f59Bf30cfE7009fB4fC00a7b13Ca836A2c';
const conStakingTokenAddress = '0x154a9f9cbd3449ad22fdae23044319d6ef2a1fab';
const mainAddress = '0x39Bea96e13453Ed52A734B6ACEeD4c41F57B2271';
const charAddress = '0xc6f252c2cdd4087e30608a35c022ce490b58179b';
const weapAddress = '0x7e091b0a22035... |
import React, { Component } from 'react';
import {
Dimensions,
Image,
StyleSheet,
Text,
TouchableHighlight,
View,
} from 'react-native';
import Slider from 'react-native-slider';
import {Audio} from 'expo-av';
//import {Font} from 'expo-font';
import { Asset } from 'expo';
import { MaterialIcons } from '@expo/vec... |
var request = require("request"),
assert = require("assert")
exports.blockrio = blockrio
function blockrio (type, wallets, opts) {
return new Blockrio (type, wallets, opts)
}
function Blockrio (type, wallets, opts) {
if (!(this instanceof Blockrio)) {
return new Blockrio(type, wallets, opts)
}
var ur... |
"""Compatibility fixes for older versions of libraries
If you add content to this file, please give the version of the package
at which the fix is no longer needed.
# originally copied from scikit-learn
"""
# Authors: Emmanuelle Gouillart <emmanuelle.gouillart@normalesup.org>
# Gael Varoquaux <gael.varoquau... |
import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import sliderReadmeText from './README';
import SliderExampleSimple from './Exam... |
import React from 'react';
import ReactDOM from 'react-dom';
import renderer from 'react-test-renderer';
import SimpleBanner from '../SimpleBanner';
import {
componentProperties,
componentAttributes,
} from '../componentProperties';
const reactProps = { ...componentAttributes, ...componentProperties };
it('render... |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4zM11 20v-5.5H9L13 7v5.5h2L11 20z" />
, 'BatteryChargingFull');
|
const checkDistance = (x1, y1, x2, y2) => {
const distance = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
return distance;
};
const checkPossibleMove = (x, y) => {
const id = "#" + y + "-" + x;
return $(id).hasClass("movePossible");
};
const meldWeaponResource = (string) => {
const number = Numbe... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Example Python node to publish on a specific topic.
"""
# Import required Python code.
from __future__ import print_function
import sys
import roslib
import rospy
import cv2
from matplotlib import pyplot as plt
from std_msgs.msg import String
from sensor_msgs.msg imp... |
"""
__version__.py
~~~~~~~~~~~~~~
Information about the current version of the py-package-template package.
"""
__title__ = 'villa-encryptor-thanakijwanavit'
__description__ = 'encrypt and decrypt data based on villa api'
__version__ = '0.0.1'
__author__ = 'Nic Wanavit'
__author_email__ = 'nwanavit@hatari.cc'
__licen... |
import React from 'react';
import StaticIcon from './StaticIcon'
import Image from './Image'
export default class SoftButtonImage extends React.Component {
constructor(props) {
super(props);
}
fillColor() {
var fillColor = null;
if (this.props.theme) {
fillColor = "#FFF... |
const {
app,
ipcMain,
BrowserWindow,
Menu,
} = require("electron")
const fs = require("fs")
const path = require("path")
function addMenu(platform) {
let menu = Menu.buildFromTemplate([
{ role: "appMenu" },
{ role: "editMenu" },
{ role: "viewMenu" },
{ role: "windowMenu" },
{
role:... |
from sciapp.action import ImageTool
class Plugin(ImageTool):
"""ColorPicker class plugin with events callbacks"""
title = "Color Picker"
para = {"front": (255, 255, 255), "back": (0, 0, 0)}
view = [("color", "front", "front", "color"), ("color", "back", "back", "color")]
def config(self):
... |
# coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from six.... |
ELECTRUM_VERSION = '2.9.3.6' # version of the client package
PROTOCOL_VERSION = '0.10' # protocol version requested
# The hash of the mnemonic seed must begin with this
SEED_PREFIX = '01' # Electrum standard wallet
SEED_PREFIX_SW = '02' # Electrum segwit wallet
SEED_PREFIX_2FA = '101' # extende... |
/*kad iOS v2.0.10 js Interface*/
window.kadiosjs = {
__callbacks: {},
invokeCallback: function(cbID, removeAfterExecute) {
var args = Array.prototype.slice.call(arguments);
args.shift();
args.shift();
for (var i = 0,
l = args.length; i < l; i++) {
args[i] = de... |
//// [aliasInaccessibleModule2.ts]
module M {
module N {
class C {
}
}
import R = N;
export import X = R;
}
//// [aliasInaccessibleModule2.js]
var M;
(function (M) {
var N;
(function (N) {
var C = /** @class */ (function () {
function C() {
... |
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: 15.9.5.13.js
ECMA Section: ... |
/*
The MIT License (MIT)
Copyright (c) 2014-2019 Nikolai Suslov and the Krestianstvo.org project contributors. (https://github.com/NikolaySuslov/livecodingspace/blob/master/LICENSE.md)
Virtual World Framework Apache 2.0 license (https://github.com/NikolaySuslov/livecodingspace/blob/master/licenses/LICENSE_VWF.md)
*/
... |
import '@babel/polyfill'
import 'whatwg-fetch'
import * as BabelStandalone from './babel-standalone'
export * from './babel-standalone'
BabelStandalone.registerPresets({
'env': require('@babel/preset-env')
})
BabelStandalone.registerPlugins({
'proposal-async-generator-functions': require('@babel/plugin-proposal-a... |
var fs = require('fs');
var async = require('async');
var mongoose = require('mongoose');
var schema = require('./schema');
mongoose.Promise = Promise;
class mongodb {
constructor() {
this._setup();
}
_setup() {
var self = this;
self._conncted = false;
mongoose.connect('mongo... |
from mantabot.apps.moderation.handlers.readonly import ReadOnly
__all__ = ('ReadOnly',)
|
#! python2
import os
import sys
sys.path.append(r'../client/build/')
sep_char = "\\"
script_path = os.path.dirname(os.path.realpath(__file__))
base_path = os.path.abspath(r"%s/../".replace('/', sep_char) % script_path)
resource_path = os.path.abspath(r"%s/resource".replace('/', sep_char) % base_path)
cur_path... |
import utils
import re
def solution(data: str) -> str:
result = re.findall(r"[^A-Z][A-Z]{3}([a-z])[A-Z]{3}[^A-Z]", data)
return "".join(result)
input_data = utils.read_level_input_from_file(level=3)
sol = solution(input_data)
utils.print_solution_def_php(sol)
|
module.exports=function(B,e){"use strict";var r={};function __webpack_require__(e){if(r[e]){return r[e].exports}var t=r[e]={i:e,l:false,exports:{}};var n=true;try{B[e].call(t.exports,t,t.exports,__webpack_require__);n=false}finally{if(n)delete r[e]}t.l=true;return t.exports}__webpack_require__.ab=__dirname+"/";function... |
import argparse
import json
import os
import shutil
import functools
import torch
from torch.optim import SGD, Adadelta, Adam
from src import CONFIG, models, train
def parse_flags():
parser = argparse.ArgumentParser()
parser.add_argument('--model', default='mnist', choices=['binary', 'mnist'], help='Name ... |
//generates a solvable maze, given a matrix of barrier blocks
function SurvivalMazeGenerator(height, width, block_width, world, paper, story_generator){
this.generate = function(){
this.start = null;
this.total_plants = 0;
this.fire = 0;
this.total_disease = 0;
this.total_fertility = 0;
thi... |
load("201224b0d1c296b45befd2285e95dd42.js");
// Resumption values from uncaughtExceptionHook from onNewGlobalObject
// handlers affect the dispatch of the event to other Debugger instances.
load("19d7bc83becec11ee32c3a85fbc4d93d.js");
var dbg1 = new Debugger;
var dbg2 = new Debugger;
var dbg3 = new Debugger;
var log;... |
const hall = require('../plugins');
const plugins = require('../plugins');
const pomelo = require('pomelo');
const redisClient = require('../../utils/import_db').redisClient;
const mysqlClient = require('../../utils/import_db').mysqlClient;
const EventEmitter = require('events').EventEmitter;
class RankMatch {
con... |
module.exports = function toReadable(number) {
const ones = new Array(
"",
" one",
" two",
" three",
" four",
" five",
" six",
" seven",
" eight",
" nine",
" ten",
" eleven",
" twelve",
" thirteen",
... |
angular.module('services').service(
'HostingStatistics',
class HostingStatistics {
/**
* Constructor
* @param $http
* @param $q
* @param OvhHttp
*/
constructor($http, $q, OvhHttp) {
this.$http = $http;
this.$q = $q;
this.OvhHttp = OvhHttp;
}
getLogs(servic... |
const mongoose = require('mongoose');
const {
Extension
} = require('../FHIRDataTypesSchemaExport/allTypeSchemaTopDef');
const id = require('../FHIRDataTypesSchema/id');
const unsignedInt = require('../FHIRDataTypesSchema/unsignedInt');
const {
Coding
} = require('../FHIRDataTypesSchemaExport/allTypeSchemaTopDe... |
function test() {
for (var i of array) {}
for (let i of array) {}
}
|
import styled from 'styled-components';
export const Container = styled.div`
display: flex;
justify-content: flex-start;
align-items: center;
`;
export const Content = styled.div`
height: 25px;
width: 100%;
background: ${props => props.background};
display: flex;
justify-content: center;
align-items... |
game.LabelEntity = me.ObjectEntity.extend({
// constructor
init: function(x, y, settings) {
// call the constructor
this.parent(x + (settings.width / 2), y, settings);
this.font = new me.Font("Courier", settings.fontSize || 18, settings.color || "white", "left");
this.formatted... |