text stringlengths 3 1.05M |
|---|
var f = function() { return 'a' }
f()
// Trace:
// 1: before f=/
// 1: after f=<function>
// 3: before
// 1: enter
// 1: before
// 1: after
// 1: leave return='a'
// 3: after f()='a'
|
/*
* . .o8 oooo
* .o8 "888 `888
* .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo
* 888 `888""8P `888 `888 d88' `888 d88' `88b d88( "8 888 .8P'
* 888 888 888 888 8... |
window.__NUXT__=(function(a){return {staticAssetsBase:"\u002F_nuxt\u002Fstatic\u002F1650278985",layout:"default",error:a,state:{particle:{runningIds:[],terminateIds:[],shouldBeStopped:false}},serverRendered:true,routePath:"\u002Fworks",config:{_app:{basePath:"\u002F",assetsPath:"\u002F_nuxt\u002F",cdnURL:a}}}}(null)); |
(function(a){a.fn.datetimepicker.dates.th={days:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์","อาทิตย์"],daysShort:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],daysMin:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พ... |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.10.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... |
/*
* 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 ... |
import React from "react"
import { Link } from "gatsby"
import Layout from "../components/layout"
import SEO from "../components/seo"
/*import Paragraph from "../components/paragraph"*/
import Table from "../components/table/table.js"
////
// Table has an object which contains Array of rows, and array of string keys.... |
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.python.hashlib}
"""
from twisted.trial.unittest import TestCase
from twisted.trial import util
class HashObjectTests(TestCase):
"""
Tests for the hash object APIs presented by L{hashlib}, C{md5} and C{sha1}.
... |
import time
import cv2
from senseye_cameras import Stream
'''
Example pyueye stream.
'''
SLEEP_TIME = 5
CAMERA_ID = 0
FILE_PATH = './tmp/usb.mkv'
# enable live preview of pyueye
def on_frame_read(data, timestamp):
cv2.imshow('wow', data)
cv2.waitKey(1)
s = Stream(
input_type='ueye', id=CAMERA_ID, input_... |
import React from 'react';
import LayoutInfo from '../components/layoutInfo';
const CopyrightPage = () => (
<LayoutInfo title="Copyright Policy">
<p>
We believe that you should always know what kind of data we collect
from you, how we collect it, and how you can have control over y... |
'use strict';
/**
* remove_where.js
*
* Bulk inserts documents in batches of 100. Randomly selects ~1/10th of existing documents created
* by the thread and removes them. Queries by the thread that created the documents to verify
* counts.
*/
load('jstests/concurrency/fsm_libs/extend_workload.js'); ... |
"""Constant learning rate."""
from optimus.types import LRMethod
class Constant(LRMethod):
"""Used when a single learning rate will be used for all steps."""
def __init__(self, learning_rate: float):
self.learning_rate = learning_rate
def __call__(self, *args, **kwargs):
return self.lear... |
/**
* @file tab
* @module MUI
*/
/**
* @class widget
*/
/**
* @method tab
* @desc
* tab 切换
* @param {Json} options {superClass : ?, subClass : ?, currentClass : ?}
* @example
* var tab = require('./widget/tab');
* // currentClass 默认是on,也可通过配置项更改
* tab({
* superClass : 'superNav' ,
* subClass : 's... |
"""
This module contains a status which
can be encoded into a json string.
"""
from uuid import uuid4
import json
__all__ = ["FormatError", "Status"]
class FormatError(Exception):
"""
The input data is not valid encoded.
"""
class Status:
"""
Represents a status which is returned by a method.... |
import enum
class AddressSpace(enum.Enum):
"""
Defines the address space supported by a system or cache
"""
in128Bit = 0xffffffffffffffffffffffffffffffff
in112Bit = 0xffffffffffffffffffffffffffff
in96Bit = 0xffffffffffffffffffffffff
in80Bit = 0xffffffffffffffffffff
in64Bit = 0xffffffff... |
'use strict';
let container = require('./container');
let recorder = require('./recorder');
let output = require('./output');
let methodsOfObject = require('./utils').methodsOfObject;
let readline = require('readline');
let util = require('util');
let colors = require('chalk'); // npm install colors
let rl, nextStep,... |
/**
* @fileoverview Tests for eqeqeq rule.
* @author Nicholas C. Zakas
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const rule = require("../../../lib/rules/eqeqeq"... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[53],{1586:function(module,exports){module.exports=function(hljs){var BASIC_ATOM_RE="[a-z'][a-zA-Z0-9_']*",FUNCTION_NAME_RE="("+BASIC_ATOM_RE+":"+BASIC_ATOM_RE+"|"+BASIC_ATOM_RE+")",ERLANG_RESERVED={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case c... |
(function(window) {
'use strict'
var App = window.App || {};
var Server = (function() {
var verbose = true
var URL_PIF_PAF = "http://localhost:5000/process";
var post = function(url, data, callback, isJson) {
var req = new XMLHttpRequest();
req.open("POST", url);
req.addEventList... |
from itertools import combinations
def all_against_all_design(conditions):
return [(a, b) for a, b in combinations(conditions, 2)]
|
// copyright 2020 Theo Armour. MIT license.
// See pushme-pullyou/templates-01/modules/template
// 2020-02-13
/* divContent */
// jshint esversion: 6
// jshint loopfunc: true
const FO = {};
FO.init = function () {
FOdivFileOpen.innerHTML = FO.getMenu();
FO.reset();
};
FO.reset = function () {
FO.fileName... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var React = _interopRequireWildcard(r... |
var test = require('tape');
var fs = require('fs');
var path = require('path');
var mkdirp = require('mkdirp');
var spawn = require('win-spawn');
var split = require('split');
var cmd = path.resolve(__dirname, '../bin/cmd.js');
var os = require('os');
var tmpdir = path.join((os.tmpdir || os.tmpDir)(), 'watchify-' + Ma... |
import FormSerializer from '@apps/forms/serializers/form_serializer'
import Form from '@apps/forms/models/form'
const listRoute = async (req, res) => {
const forms = await Form.filterFetch({
scope: (qb) => {
qb.select('crm_forms.*','crm_form_totals.*')
qb.innerJoin('crm_form_totals','crm_form_totals... |
// Font Awesome Free 5.15.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
// Auto-generated by modulifyFontAwesomeIcons.js, please do not modify directly.
export default 'M323.1 3H49.9C12.4 3 0 31.3 0 49.1v433.8c0 20.... |
require('../ES6.js');
require('./suitest.js');
/**
* ------------------------------------------------------------
* Number
* ------------------------------------------------------------
**/
/*
Number.EPSILON
*/
new Suitest('Number.EPSILON')
.test('Number.EPSILON', function()
{
this
.exec(Nu... |
var bottleapp= angular.module("bottleapp",[]);
|
'use strict'
module.exports.setup = function () {
var builder = require('botbuilder')
var teamsBuilder = require('botbuilder-teams')
var bot = require('./bot')
bot.connector.onQuery('getRandomText', function (event, query, callback) {
var faker = require('faker')
// If the user supplied a title via t... |
const { assert } = require( "chai" );
const isEmpty = require( "../src/is-empty" );
describe( "isEmpty", () => {
it( "Identifies empty expressions.", () => {
[
null,
undefined,
NaN,
"",
[],
{},
new Map(),
new Set()
].forEach(
val => { assert.isTrue( isEmp... |
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2020 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
import {TranslateLine} from "./TranslateLine";
export function TranslateLinePoint(line, v) {
return TranslateLine(line, v.x, v.y);
}
|
import { renderSVG } from "../../utils/render";
import "./index.css";
function SVG({ width, height, children }) {
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
svg.setAttribute('class', 'plotter');
svg.setAttribute('version', '1.1');
svg.setAttribute('xmlns', 'http://www.w3.org/20... |
export default {
'component.tagSelect.expand': 'Розгорнути',
'component.tagSelect.collapse': 'Згорнути',
'component.tagSelect.all': 'Вссе',
};
|
const Joi = require('joi')
function mapToSession (data) {
if (!data) return
return {
id: data.id,
topics: data.topics,
timestamp: data.timestamp
}
}
var dataCallback = function (err, data, res) {
if (err) {
res.status(503)
res.send(err)
return
}
res.send(mapToSession(data))
}
func... |
import pyrebase
import os
import sys
from datetime import datetime
from tkinter import *
class MyEntry:
def dbentry(self):
# retrieve the values from the entry widget
str1 = self.e1.get()
str2 = self.e2.get()
str3 = self.e3.get()
if(str2!=str3):
se... |
// DATA_TEMPLATE: empty_table
oTest.fnStart("aaSorting");
$(document).ready(function () {
/* Check the default */
var oTable = $('#example').dataTable({
"sAjaxSource": "../../../examples/ajax/sources/objects.txt",
"aoColumns": [
{ "mData": "engine" },
{ "mData":... |
import React, { Component } from "react";
import ReactDOM from "react-dom";
import axios from "axios";
import Header from "./Header";
import Products from "./Products";
import Footer from "./Footer";
import QuickView from "./QuickView";
import "../scss/style.scss";
import { connect } from 'react-redux';
import... |
# DRUNKWATER TEMPLATE(add description and prototypes)
# Question Title and Description on leetcode.com
# Function Declaration and Function Prototypes on leetcode.com
#646. Maximum Length of Pair Chain
#You are given n pairs of numbers. In every pair, the first number is always smaller than the second number.
#Now, we d... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Colors = {
// Grescale colors
WHITE: '#FFFFFF',
GREY50: '#FAFAFA',
GREY100: '#F5F5F5',
GREY200: '#EEEEEE',
GREY300: '#E0E0E0',
GREY400: '#BDBDBD',
GREY500: '#9E9E9E',
GREY600: '#757575',
... |
/* eslint guard-for-in: ["error", true] */
/**
* Given array of integers, find two elements that appear once
* Time/Space complexity: O(N); Constant space requires XOR knowledge
* @param {number[]} arr
* @return {number}
*/
function findIndividualElements(arr) {
const hash = {};
const ret = [];
arr.forEac... |
import json
from openpype.modules.ftrack.lib import ServerAction
def clone_review_session(session, entity):
# Create a client review with timestamp.
name = entity["name"]
review_session = session.create(
"ReviewSession",
{
"name": f"Clone of {name}",
"project": ent... |
var Twig = (Twig || require("../twig")).factory(),
twig = twig || Twig.twig;
describe("Twig.js Namespaces ->", function() {
it("should support namespaces defined with ::", function(done) {
twig({
namespaces: { 'test': 'test/templates/namespaces/' },
path: 'test/templates/namespaces_coloncolon.twig',... |
import { Component, HostListener, HostBinding, ViewEncapsulation, EventEmitter, NgZone } from '@angular/core';
var MdlBackdropOverlayComponent = /** @class */ (function () {
function MdlBackdropOverlayComponent(ngZone) {
this.ngZone = ngZone;
this.clickEmitter = new EventEmitter();
this.visi... |
#!/usr/bin/env python
import logging
import pathlib
import pkg_resources
import random
import sys
from bs4 import BeautifulSoup
import click
import requests
@click.command()
@click.argument("src", nargs=-1)
@click.option(
"--server",
default="https://bucketeer.library.ucla.edu",
show_default=True,
h... |
export class SpeakerBadgePage {
constructor(element) {
this.imageElement = element.querySelector("img");
// TODO: Add event listeners for element "dragover" and "drop" events.
// handle with this.handleDragOver.bind(this) and this.handleDrop.bind(this)
element.addEventListene... |
'use strict';
let express = require('express');
let methods = require('methods');
let Promise = require('bluebird').getNewLibraryCopy();
require('promise-resolve-deep')(Promise);
class ExpressApiRouterError extends Error {
constructor(message) {
super(message);
this.message = message;
this.name = 'Expr... |
# https://leetcode.com/problems/linked-list-cycle-ii/
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
# O(n) time | O(1) space
def detectCycle(self, head):
"""
:type head: ... |
//const User = require('../models/userModel');
exports.login = (req, res, next) => {
const test = 'test succesfull';
console.log('hello');
res.json({
test,
});
};
|
const { ethers, upgrades } = require("hardhat");
async function main() {
const BoxV2 = await ethers.getContractFactory("BoxV2");
console.log("Upgrading Box...");
await upgrades.upgradeProxy('0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0', BoxV2);
console.log("Box upgraded!");
}
main(); |
import jwt from 'jsonwebtoken';
import dotenv from 'dotenv';
dotenv.config();
import User from '../model/users';
export default {
signup: async (req, res) => {
const userExists = await User.findOne({email: req.body.email})
if(userExists) return res.status(403).json({
error: 'Sorry, the email is alread... |
/** @component icon */
import React from 'react';
import PropTypes from 'prop-types';
import iconNames from '@momentum-ui/icons/data/iconNames.json';
import { Button } from '@momentum-ui/react';
import getColorValue from '@momentum-ui/utils/lib/getColorValue';
class Icon extends React.PureComponent {
render() {
... |
deepmacDetailCallback("0050c2819000/36",[{"a":"Roesbjergvej 9 Haarby Fyn DK 5683","o":"Cabinplant A/S","d":"2008-07-30","t":"add","s":"ieee","c":"DK"}]);
|
/* eslint-disable react/prop-types */
import Radium from 'radium';
import React from 'react';
const styles = {
root: {
position: 'absolute',
cursor: 'pointer',
width: 0,
height: 0,
borderColor: 'transparent',
borderStyle: 'solid',
borderTopWidth: 0,
transform: 'translate(50%, 50%)',
... |
function toTitle(val) {
switch (val) {
case 1:
return '未交单'
case 2:
return '已交单'
default:
return val
}
}
function toValue(val) {
switch (val) {
case '未交单':
return 1
case '已交单':
return 2
default:
return val
}
}
function toTitleFilter(val) {
return ... |
'use strict';
angular.module('jexpensesApp')
.factory('Register', function ($resource) {
return $resource('api/register', {}, {
});
});
|
'use strict'
module.exports = {
async up(queryInterface) {
await queryInterface.bulkInsert(
'auths',
[
{
id: 1,
username: 'hackchan',
password: '12345678',
role: 'ssj'
},
{
id: 2,
username: 'montano',
passwo... |
# Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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... |
""" A module for all Fetcher classes """
import logging
import socket
import pandas as pd
from google.oauth2 import service_account
from googleapiclient.discovery import build
from googleapiclient.errors import HttpError
from gsheet_bot.config import (
GSHEET_API_SERVICE_ACCOUNT_FILE,
GSHEET_SHEET_DAILY_NAME,... |
# qubit number=4
# total number=39
import cirq
import qiskit
from qiskit.providers.aer import QasmSimulator
from qiskit.test.mock import FakeVigo
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import ... |
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib 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 a... |
// Copyright 2007 The Closure Library 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
//
// Unl... |
const express = require('express');
const UserRidesService = require('../services/userRides');
function userRidesApi(app) {
const router = express.Router();
app.use('/api/user-rides', router);
const userRidesService = new UserRidesService()
router.get('/', async function(req, res, next) {
c... |
from cc3d.core.PySteppables import *
class VolumeParamSteppable(SteppableBasePy):
def __init__(self, frequency=1):
SteppableBasePy.__init__(self, frequency)
def start(self):
for cell in self.cell_list:
cell.targetVolume = 25
cell.lambdaVolume = 2.0
def step(self, ... |
var callbackArguments = [];
var argument1 = function callback(){callbackArguments.push(arguments)};
var argument2 = ["Z","]u]un#v","`&","aa","QZps","kW%","(3","]T2Qz"];
var argument3 = [49,893,100,49];
var argument4 = function callback(){callbackArguments.push(arguments)};
var argument5 = [-100,126];
var argument... |
/*!
* jquery-confirm v3.2.3 (http://craftpip.github.io/jquery-confirm/)
* Author: Boniface Pereira
* Website: www.craftpip.com
* Contact: hey@craftpip.com
*
* Copyright 2013-2017 jquery-confirm
* Licensed under MIT (https://github.com/craftpip/jquery-confirm/blob/master/LICENSE)
*/
if(typeof jQuery==="... |
import React, { Component } from "react";
import get from "lodash/get";
import moment from "moment";
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { LocalForm, Control } from 'react-redux-form';
import { connect } from 'react-redux';
import { crudUpdate, crudCrea... |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
// vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisa... |
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
/**
* 路径需配置全路径
*/
const entryConfig = {
web: {
'web/admin': './src/clients/admin/admin',
'generator/admin': './src/clients/generator/admin',
},
mobile: {
},
}
function allEntry() {
var entry = {}
for (var key in entryConfig) {
entry = Object.assign(entry, entryConfig... |
import salvattore from 'salvattore';
// ----------------------------------------------
// Infinite Scroll
// ----------------------------------------------
const InfiniteScroll = (() => {
let s;
return {
settings() {
return {
container: document.querySelector('.posts__container'),
... |
// @ts-nocheck
'use strict';
const isAutoprefixable = require('../../utils/isAutoprefixable');
const report = require('../../utils/report');
const ruleMessages = require('../../utils/ruleMessages');
const validateOptions = require('../../utils/validateOptions');
const ruleName = 'media-feature-name-no-vendor-prefix'... |
import random
from great_expectations.core import ExpectationSuite
from great_expectations.core.expectation_suite import ExpectationSuiteSchema
from great_expectations.data_context.store.database_store_backend import (
DatabaseStoreBackend,
)
from great_expectations.data_context.store.store import Store
from great... |
"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.SettingsSystemDaydream = React.forwardRef(function (props, ref) {
var attrs = {
"fi... |
import React from "react"
import { graphql, useStaticQuery } from "gatsby"
import Card from "../Cards/Card"
import GridView from "../../templates/GridView/GridView"
import "./Tips.scss"
const Porady = ({ location }) => {
const tipsQuery = useStaticQuery(graphql`
{
allTip {
totalCount
edges... |
var searchData=
[
['_5falivecount',['_aliveCount',['../classqi_1_1StrandPrivate.html#aef63ed9dae12334a8194e9d646f4c3be',1,'qi::StrandPrivate']]],
['_5fargumentstype',['_argumentsType',['../classqi_1_1CallableTypeInterface.html#ae54cbbcc296b3021d6a1f11f137aead8',1,'qi::CallableTypeInterface']]],
['_5fclosed',['_cl... |
"use strict";
let datafire = require('datafire');
let openapi = require('./openapi.json');
module.exports = datafire.Integration.fromOpenAPI(openapi, "adafruit"); |
$(document).ready(function () {
//hijack the html and make a board
var linelimit = 65;
$('body').empty();
$('body').append("<div class = 'gameBoard'></div>");
for (i = 1; i < linelimit; i++) {
$('.gameBoard').append("<div class ='tile deNada' id=" + '"' + i + '"' + '></div>');
if (i... |
/*
* Backpack - Skyscanner's Design System
*
* Copyright 2018 Skyscanner Ltd
*
* 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
*
* Un... |
const { MessageEmbed } = require('discord.js');
const { evaluate } = require('mathjs');
const { getColorFromCommand } = require('../../lib/common.js');
const TYPE = 'entreteniment';
module.exports = {
name: 'calcula',
description: 'No tens calculadora? Aquí en tens una.',
type: TYPE,
aliases: ['math', 'calc',... |
"""
This file offers the methods to automatically retrieve the graph pkustk02.
The graph is automatically retrieved from the NetworkRepository repository.
Report
---------------------
At the time of rendering these methods (please see datetime below), the graph
had the following characteristics:
Datetime: 2021-02... |
'use strict'
const xml2js = require('xml2js')
const LegacyService = require('../legacy-service')
const { makeBadgeData: getBadgeData } = require('../../lib/badge-data')
const { addv: versionText } = require('../../lib/text-formatters')
const { version: versionColor } = require('../../lib/color-formatters')
// Based o... |
export default {
Query: {
get: (parent, {key}, {client}) => {
try {
return client.getAsync(key)
} catch (e) {
console.error(e)
return null
}
},
},
Mutation: {
set: async (parent, {key, value}, {client}) => {
try {
await client.set(key, value)
... |
import { moduleForModel, test } from 'ember-qunit';
moduleForModel('fd-dpd', 'Unit | Model | fd-dpd', {
// Specify the other units that are required for this test.
needs: [
'model:fd-ad',
'model:fd-aggregation',
'model:fd-application-user',
'model:fd-association',
'model:fd-auth-type',
'mod... |
/*
This is a generated file. DO NOT EDIT.
Copyright (C) 2010-2015 KO GmbH <copyright@kogmbh.com>
@licstart
This file is the compiled version of the WebODF library.
WebODF is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License (GNU AGPL)
as publishe... |
import unittest
import utils
from tree import TreeNode
# O(n) time. O(log(n)) space. Recursive DFS.
class Solution:
def getTargetCopy(self, original: TreeNode, cloned: TreeNode, target: TreeNode) -> TreeNode:
if not original:
return None
if original is target:
return cloned... |
const User = require("../models/user.model");
module.exports = {
showCreateForm: async (req, res, next) => {
res.render("users/create")
},
showSignInForm: async (req, res, next) => {
res.render("users/signin")
},
createUser: async (req, res) => {
const { firstName, lastName,... |
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// ES6 extends the \uxxxx escape and also allows \u{xxxxx}.
// Unicode escapes in variable names.
(function TestVariableNames1() {
var foobar = 1;
... |
import os
from distutils.core import setup
from setuptools import find_packages
__version__ = open("pyranges/version.py").readline().split(" = ")[1].replace(
'"', '').strip()
install_requires = [
"cython", "pandas", "ncls>=0.0.63", "tabulate", "sorted_nearest>=0.0.33", "pyrle",
"natsort"] #,
# optional_r... |
/*
* HomePage
*
* This is the first thing users see of our App, at the '/' route
*/
import React, { useEffect, memo } from 'react';
import PropTypes from 'prop-types';
import { Helmet } from 'react-helmet';
import { FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import { compose } fro... |
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.3.0 (2020-05-21)
*/
(function () {
'use strict';
... |
"""
Copyright (c) 2019 Intel Corporation
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,... |
#!/usr/bin/env python
from sugar3.activity import bundlebuilder
bundlebuilder.start()
|
import React from 'react';
import Textarea from "../../FormComponent/Textarea";
import {useDispatch} from "react-redux";
const ArticleContentAbstract = ({data, inputChange}) => {
return (
<div className="page-wrapper card mt-3 p-3">
{
textareas.map(({label, field}) => (
... |
(function() {
var config = require('./webpack.config');
var path = require('path');
var webpack = require('webpack');
var entries = require('webpack-entries');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var PurifyCSSPlugin = require('purifycss-webpack-plugin');
var webpackEntries = e... |
from contextlib import ExitStack
from functools import partial
import math
import os
import os.path as op
import time
import click
import pickle
import tensorflow as tf
import tensorflow.keras.backend as K
from tensorflow.keras.callbacks import TensorBoard
from tensorflow.keras.mixed_precision import experimental as m... |
import _ from 'lodash';
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import YTSearch from 'youtube-api-search';
import SearchBar from './components/search_bar';
import VideoList from './components/video_list';
import VideoDetail from './components/video_detail';
const API_KEY = 'AIzaSyDejB4... |
"""Module with player's sword"""
import random
import pygame
from path_of_pain.src.framework import base, clock
from path_of_pain.src.framework import const
class SwordFactory:
"""
Creates new assosiated product and places it in according groups
"""
def __init__(self, *groups):
"""
... |
export default () => {
return {
fallbackLocale: 'en',
silentFallbackWarn: true,
pluralizationRules: {
/**
* @param choice {number} a choice index given by the input to $tc: `$tc('path.to.rule', choiceIndex)`
* @param choicesLength {number} an overall amount of available choices
... |
// import { useSelector } from 'react-redux';
// import store from '../redux/store';
// // const state = store.getState();
// // const users = useSelector(state => state.users);
// export const handleCreateUser = (formValues) => {
// console.log('input =>', formValues);
// const { firstName, lastName, emai... |
import torch
import logging
import pdb
import os
import datetime
import warnings
warnings.filterwarnings("ignore")
from config import cfg
from data import make_data_loader
from solver import build_optimizer, build_scheduler
from utils.check_point import DetectronCheckpointer
from engine import (
default_argument_... |
// Hide deprecation warnings
process.env.NODE_PENDING_DEPRECATION = 0;
// Dependencies
const {
dest,
src
} = require('gulp');
const webpack = require('webpack-stream');
const config = require('../config');
const {
handleError
} = require('../helpers/handle-errors.js');
const webpackConfigProduction = require('..... |