text stringlengths 3 1.05M |
|---|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Example demonstrating spatial filtering using spatial-filters fragment shader.
Left and Right Arrow Keys toggle through available filters.
"""
import numpy as np
from vispy.io import load_spatial_filters
from vispy import gloo
from vispy import app
from vispy.util.log... |
// pages/mine/mine.js
import { getUserInfo, makePhoneCall } from '../../utils/util'
import { logout } from '../../utils/apis'
const app = getApp()
Page({
data:{},
onLoad:function(options){
// 页面初始化 options为页面跳转所带来的参数
var that = this
getUserInfo(userInfo => {
this.setData({
userInfo
... |
define(["amaze","wx","framework/services/shoppingService"],function (amaze,wx,shopList){
var ctrl = ["$scope","$state","orderList","$q",function($scope,$state,orderList,$q){
var shopInc = new shopList($q);
// get select product start
$scope.displayOrderList = orderList.getList();
$scope.createOrderAddress = {}... |
# coding:utf-8
# 版权信息: All rights Reserved, Designed By XHal.cc
# 代码作者: Hal
# 创建时间: 2021/1/31 16:59
# 文件版本: V1.0.0
# 功能描述: 运算符的优先级
# 优先级0: () 有括号,括号内优先执行
# 优先级1: 算术运算符 ** 》 *,/,//,% 》 *,-
# 优先级2: 位运算符 <<,>> 》 & 》 |
# 优先级3: 比较运算符 >,<,>=,<=,==,!=
# 优先级4: 布尔运算符 and , or
# 优先级5: 赋值运算符 =
|
from allauth.account.adapter import DefaultAccountAdapter
class CustomAccountAdapter(DefaultAccountAdapter):
def save_user(self, request, user, form, commit=False):
user = super().save_user(request, user, form, commit)
data = form.cleaned_data
user.first_name = data.get('first_name')
... |
from math import ceil
'''
直观理解 yield
要想通俗理解 yield,可结合函数的返回值关键字 return,yield 是一种特殊的 return。
说是特殊的 return,是因为执行遇到 yield 时,立即返回,这是与 return 的相似之处。
不同之处在于:下次进入函数时直接到 yield 的下一个语句,而 return 后再进入函数,
还是从函数体的第一行代码开始执行。带 yield 的函数是生成器,通常与 next 函数结合用。
下次进入函数,意思是使用 next 函数进入到函数体内。
'''
def f():
print("enter f()...")
yield ... |
import CellState from '../src/cell_state';
describe('CellState', () => {
test('Should have a ALIVE cell state', () => {
expect(CellState.ALIVE).toBe(1);
});
test('Should have a DEAD cell state', () => {
expect(CellState.DEAD).toBe(0);
});
}); |
/** Negative Nouns */
export const negative_nouns = [
'Hell',
'Microsoft',
'bastard',
'beggar',
'blister',
'codpiece',
'coward',
'curse',
'death',
'devil',
'draught',
'famine',
'flirt-gill',
'goat',
'hate',
'hog',
'hound',
'leech',
'lie',
'pig',
'plague',
'starvation',
'toa... |
/**
* Module dependencies.
*/
var mocha = require("mocha")
, Base = mocha.reporters.Base
, Spec = mocha.reporters.Spec
, utils = mocha.utils
, escape = utils.escape
, config = {
"file": "xunit.xml",
"consoleOutput": {
"suite": false,
"test": false,
"fail": false
}
}
, fs = require("fs")
, differ = re... |
import React, { Component, PropTypes } from "react";
import { connect } from 'react-redux';
import MessageError from '../common/MessageError.js';
import MessageSuccess from '../common/MessageSuccess.js';
import { registerUser } from '../../actions/auth';
class Register extends Component {
constructor(props) {
s... |
#!/usr/bin/env python
from fontTools.ttLib import TTFont
import sys
import json
# map of characters to extract
metrics_to_extract = {
# Font name
"AMS-Regular": {
u"\u21e2": None, # \dashrightarrow
u"\u21e0": None, # \dashleftarrow
},
"Main-Regular": {
# Skew and italic metri... |
import copy
import logging
import pickle
import re
from datetime import datetime
import dask.dataframe as dd
import numpy as np
import pandas as pd
import pytest
from woodwork.logical_types import (
URL,
Boolean,
Categorical,
CountryCode,
Datetime,
Double,
EmailAddress,
Integer,
Lat... |
import React from "react";
import ReactDOM from "react-dom";
import App from './App';
import "./assets/plugins/nucleo/css/nucleo.css";
import "./assets/scss/argon-dashboard-react.scss";
import 'react-notification-alert/dist/animate.css';
import 'react-perfect-scrollbar/dist/css/styles.css';
import "@fortawesome/fontaw... |
from django.conf import settings
settings.FORMS_IMPORTED = True
|
import time
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
# Sleep times to pause the script (given in seconds)
shortInterval = 3
mediumInterval = 15
longInterval = 40
# Selenium Chrome driver location
chromeDriverPath = 'C:\\Python27\\Custom_tools\\chromedriver.exe'
# URL ... |
import 'phaser';
//import pkg from 'phaser/package.json';
import sky from './img/sky.png';
import ground from './img/platform.png';
import star from './img/star.png';
import bomb from './img/bomb.png';
import dude from './img/dude.png';
// This is the entry point of your game.
const width = 800;
const height = 600;
... |
"use strict";
exports.default = createStrip;
var _type = require("../../core/utils/type");
var _utils = require("../core/utils");
var _extend = require("../../core/utils/extend");
function createStrip(axis, options) {
var storedCoord;
var lastStoredCoordinates;
var labelOptions = options.label || {};
retur... |
'use strict';
const Gulp = require('gulp');
const Gutil = require('gulp-util');
const Webpack = require('webpack');
let executionCount = 0;
Gulp.task('webpack', (callback) => {
const plugins = [
new Webpack.optimize.CommonsChunkPlugin({
name: 'core',
filename: '../core.min.js',
... |
//init
WALLS = [];
OBJDATA = [];
ROOM = [];
HISTORY = [];
wallSize = 20;
partitionSize = 8;
var drag = 'off';
var action = 0;
var magnetic = 0;
var construc = 0;
var Rcirclebinder = 8;
var mode = 'select_mode';
var modeOption;
taille_w = $('#lin').width();
taille_h = $('#lin').height();
var offset = $('#lin').offset();... |
/**
* @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://angular.io/license
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp-tasks/cldr/extract.js
(function(global) {
glo... |
define(function (require, exports, module) {
var items = {
'0': { 1: '北京市', 22: '天津市', 44: '上海市', 66: '重庆市', 108: '河北省', 406: '山西省', 622: '内蒙古', 804: '辽宁省', 945: '吉林省', 1036: '黑龙江省', 1226: '江苏省', 1371: '浙江省', 1500: '安徽省', 1679: '福建省', 1812: '江西省', 1992: '山东省', 2197: '河南省', 2456: '湖北省', 2613: '湖南省', 2822: '... |
const Discord = require('discord.js');
module.exports = {
name: "ucreategame",
aliases: ["ucr"],
category : "Uno",
description : "create uno game",
usage: "[command]",
author: "[CuSO4-c3c,Hiyoriii,Hellsnakes]",
run: async(client, message, args) => {
await client.discordUNO.createGam... |
$(document).ready(function() {
var url =
'/idm/users/' + window.location.pathname.split('/')[3] + '/applications';
load_applications(url);
function load_applications(url, panel) {
$('#spinner_applications').show('open');
$.get(url, function(data, status) {
if (data.applications.length > 0) {
... |
const faker = require("faker");
faker.locale = "zh_CN";
const generateArticlesData = (n = 1000) => {
let articleData = [];
let i = 0;
while (i < n) {
const title = faker.lorem.sentences(1);
const postAt = faker.date.past();
const tags = [
faker.random.word(faker.random.number({ min: 2, max: 4... |
from buche import buche, H
# You don't have to set a template, but if you do, it must be the
# very first command you emit, before any printing.
# You can also give `src=<path-to-file>` instead of `content=...`
buche.command_template(content=H.div['my-template'](address="/"))
# Use this command to add styles, styles... |
# MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# 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,... |
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component, PropTypes } from 'react';
import CSSClassnames from '../utils/CSSClassnames';
const CLASS_ROOT = CSSClassnames.FORM_FIELD;
export default class FormField extends Component {
constructor(props, context) {
super(prop... |
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.lang['is'] = {
wsc :
{
btnIgnore : 'Hunsa',
btnIgnoreAll : 'Hunsa allt',
btnReplace : 'Skipta',
btnReplaceAll : 'Skipta öllu',
bt... |
# -*- coding: utf-8 -*-
_ROMAN_DIGITS = {'M': 1000, 'CM': 900, 'D': 500, 'CD': 400, 'C': 100, 'XC': 90,
'L': 50, 'XL': 40, 'X': 10, 'IX': 9, 'V': 5, 'IV': 4, 'I': 1}
class Solution:
def romanToInt(self, s: str) -> int:
n, i = 0, 0
while i < len(s):
if s[i:i + 2] in _R... |
import axios from 'axios'
import environment from '../environment'
const CancelToken = axios.CancelToken;
const source = CancelToken.source();
/* options请求 */
export const http = axios.create({
// 相对请求域名
baseURL: environment.apiUrl,
// 超时时间
timeout: 10000,
// 请求数据类型
headers: { 'Content-Type': 'application... |
/*
* helpers.js: Test helpers for winston
*
* (C) 2010 Charlie Robbins
* MIT LICENSE
*
*/
var assert = require('assert'),
fs = require('fs'),
path = require('path'),
spawn = require('child_process').spawn,
util = require('util'),
vows = require('vows'),
winston = require('../lib/winston')... |
from examples.gridworld.exceptions.IllegalGridMoveException import IllegalGridMoveException
class GridBlockedActionException(IllegalGridMoveException):
def __init__(self, *args, **kwargs):
Exception.__init__(self, *args, **kwargs)
|
import React from "react";
import { Link } from "gatsby";
import { ThemeProvider } from "styled-components";
import Theme from "../../utils/theme";
// Global Styles
import GlobalStyle from "../Styles/GlobalStyles";
// Components
import Header from "./Header";
import Footer from "./Footer";
import CookieConsent from "... |
# Copyright (c) OpenMMLab. All rights reserved.
from .deepfashion_dataset import DeepFashionDataset
__all__ = ['DeepFashionDataset']
|
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon"));
var _jsxRuntime = require("react/jsx-runtime")... |
import json
import os
import random
from random import sample
import numpy as np
import numpy.random
import re
from collections import Counter
import inspect
import pandas as pd
import matplotlib.pyplot as plt
import requests
from IPython.display import HTML
import seaborn as sns
import networkx as nx
from pylab impor... |
const getContext = require('./get-context');
const cbBuilder = require('./cb-builder');
const eventBrokenDefault = 'timeoutBroken';
const {
EVENT_TIMEOUT: eventTimeOutBrokenName = eventBrokenDefault
} = process.env;
module.exports = (self) => new Promise((resolve, reject) => {
const cb = cbBuilder(self, reject... |
import numpy as np
import pandas as pd
from tqdm import tqdm
from glob import glob
from pathlib import Path
# from copy import copy
import libs.dirs as dirs
import libs.utils as utils
import libs.data... |
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import withStyles from '../styles/withStyles';
import Paper from '../Pap... |
function insertionSort(valuesToSort) {
for (let i = 0; i < valuesToSort.length; i++) {
let temp = valuesToSort[i];
let j = i - 1;
while (j >= 0 && valuesToSort[j] > temp) {
valuesToSort[j + 1] = valuesToSort[j];
j--;
}
valuesToSort[j + 1] = temp;
}
return valuesToSort;
}
function ... |
'use strict';
angular.module('groups').controller('GroupsController', ['$scope', '$http', '$location', 'Authentication',
function ($scope, $http, $location, Authentication) {
$scope.authentication = Authentication;
$scope.getGroups = function () {
$http.get('/groups').success(function (r... |
import _ from 'lodash'
import React, { Component } from 'react'
import ReactDOM from 'react-dom'
import YTSearch from 'youtube-api-search'
import VideoList from './components/video_list'
import VideoDetail from './components/video_detail'
import SearchBar from './components/search_bar';
const API_KEY = 'AIzaSyCcv_oro... |
export const GET_ERRORS = 'GET_ERRORS';
export const SET_CURRENT_USER = 'SET_CURRENT_USER';
export const SET_RESTAURANT = 'SET_RESTAURANT'; |
export default function (config) {
const { hooks, element } = window.wp
const { Component } = element
class LaravelFilemanager extends Component {
constructor () {
super(...arguments)
this.openMediaManager = this.openMediaManager.bind(this)
this.onSelect = this.onSelect.bind(this)
thi... |
#External libs
import zipfile
import sys
import os
#This is only here for printing pretty colors
class color:
PURPLE = '\033[95m'
CYAN = '\033[96m'
DARKCYAN = '\033[36m'
BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
... |
"""Vérifier les données IRIS de l'IGN et de l'Insee.
Activer l'environnement virtualenv dédié pour bien avoir toutes les dépendances.
*Attention* : Python 3 uniquement !
Usage :
> python verification_donnees.py --ign path/to/CONTOURS-IRIS.shp --insee path/to/reference_IRIS_geo2017.xls
Testé avec les données 20... |
var Promise = require('bluebird')
, grep = require('grep1')
, journal = require('./journaler')
, config = require('./config_manager').load()
var find = module.exports
/**
* Configure grep function to use journal root as cwd
*/
grep.configure({
execOptions: {cwd: config.journal}
})
/**
* Takes in a search ... |
from rdkit import RDConfig
import unittest, os
from rdkit.SimDivFilters import rdSimDivPickers
from rdkit.DataManip.Metric import rdMetricMatrixCalc as rdmmc
from rdkit import DataStructs
import numpy
import random
class TestCase(unittest.TestCase):
def setUp(self):
self.n = 1000
self.m = 80
self.d = 2... |
import React from "react";
import { Loading } from "../Loading";
const SECURITY_CODE = "paradigma";
class ClassState extends React.Component {
constructor(props) {
super(props)
this.state= {
value: "",
error: false,
loading: false,
}
}
/* UNSAFE... |
# coding=utf-8
import pdb
import json
import datetime
import importlib
import pandas as pd
import sqlalchemy as sa
from sqlalchemy import select, and_
from ultron.factor.engine.raw_factors import RawFactors
class Polymerization(object):
def __init__(self, common_setting = None,
file_setting = Non... |
version = "1.3.0"
|
import PinValidation from './pinValidation';
class PinUtils extends PinValidation {
constructor(device, callBacks) {
super(device, callBacks);
}
decimalToBinary = num => {
let binaryNum = (num >>> 0).toString(2);
return "00000000".substr(binaryNum.length) + binaryNum;
}
st... |
import enum
import time
from .._tools import AutoNameEnum
from .._immutable import ImmutableDict
class Event:
"""
Event with payload and stop property.
"""
def __init__(self, name: str, payload: dict):
self.name = name
self.stop: bool = False
self.num = 0
self.payload... |
// (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import React, { Component, PropTypes } from 'react';
import classnames from 'classnames';
import CSSClassnames from '../../../utils/CSSClassnames';
import Intl from '../../../utils/Intl';
import Props from '../../../utils/Props';
const CLASS_ROOT = ... |
const { validationResult } = require('express-validator');
const get = require('lodash/get');
const {
validationErrors, createError,
} = require('../../lib/validation');
const buildRequestBody = require('../../lib/build-request-body');
const { accountRecoveryApi } = require('../../lib/am-api');
const { hasPrompt } =... |
var navToggle = document.getElementById("nav-toggle");
var navTarget = navToggle.nextElementSibling;
// show toggle
navToggle.classList.remove("invisible");
// hide nav
navTarget.setAttribute("data-expanded", "false");
// toggle nav
navToggle.onclick = function() {
let expanded = navToggle.getAttribute('aria-expan... |
import React, { useState } from "react";
import EntryCard from './entryCard';
import axiosWithAuth from '../utils/axiosWithAuth'
import search from '../search.svg';
export default function SearchForm({ onSearch }) {
const [text_entry, setEntry] = useState('');
const [searchPosts, setSearchPosts] = useState([]);
... |
var __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) { reject(e); } }
function rejected(value) { try { step(generator["throw"]... |
#!/usr/bin/env python
import json
import sys
from boto.exception import S3ResponseError
from boto.s3.connection import S3Connection
from boto.s3.key import Key
import config
import utils
def update_state_list(environment, state, clear=False):
c = S3Connection()
bucket = c.get_bucket(config.S3_BUCKETS[enviro... |
from torch.optim import (
SGD, Adam
)
|
const Koa = require("koa")
const app = new Koa()
app.use(async ctx => {
ctx.body = "hi"
})
app.listen(3000) |
module["exports"]=[
"Mr. aaa",
"Mr. bbb",
"Mr. ccc",
"Mr. ddd",
"Mr. eee",
"Mr. fff",
"Mr. ggg",
"Mr. hhh",
"Mr. iii",
"Mr. jjj"
]; |
/**
* Created by A on 2016/5/15.
*/
window.onload=function () {
// fottor
//找人
var box = document.getElementById("box");
var ad = box.children[0];
var ul = document.getElementById("imgs");
var lis = ul.children;
var arr = document.getElementById("arr");
var left = document.getEle... |
/**
* Copyright IBM Corp. 2016, 2020
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*
* Code generated by @carbon/icon-build-helpers. DO NOT EDIT.
*/
'use strict';
var _24 = {
"elem": "svg",
"attrs": {
"xmlns": "http:/... |
const fs = require('fs')
const path = require('path')
const pretty = require('pretty')
const src = path.join(__dirname, 'dist', 'index.html')
const out = path.join(__dirname, 'dist', 'pretty.html')
fs.writeFileSync(out, pretty(fs.readFileSync(src, 'utf8'), { ocd: true }))
|
import os
import asyncio
import json
from aiohttp import web
import settings
from game import Game
async def handle(request):
ALLOWED_FILES = ["index.html", "style.css"]
name = request.match_info.get('name', 'index.html')
if name in ALLOWED_FILES:
try:
with open(name, 'rb') as index:
... |
/*
* 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 may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
... |
import React from "react"
import {graphql, Link} from "gatsby"
import Img from "gatsby-image"
import { slugify } from "../util/utilityFunctions"
import Layout from "../pages/components/layout"
const SinglePost = ({data}) => {
const post = data.markdownRemark.frontmatter
return (
<Layout>
<div className... |
import chai, { expect } from 'chai'
import chaiAsPromised from 'chai-as-promised'
chai.use(chaiAsPromised)
chai.should()
describe('Example', function () {
it('test', function () {
expect(1).to.equal(1)
})
})
|
import PropTypes from 'prop-types';
import moment from 'moment';
import {
Box, Button, Dialog, DialogTitle, DialogContent, DialogActions, Divider, IconButton, Paper
} from '@material-ui/core';
import CloseIcon from '@material-ui/icons/Close';
import DisplayInfo from 'src/components/DisplayInfo';
import MailBox from '... |
console.log('hello node');
console.log('使用node file');
console.log('使用nodemon命令'); |
n = int(input('Digite um número: '))
print(f'O número sucessor é {n+1}')
print(f'O número anterior é {n-1}')
|
'use strict';
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var fs$1 = _interopDefault(require('fs'));
var path = _interopDefault(require('path'));
var customOpenDatabase = _interopDefault(require('websql/custom/index.js'));
function _typeof(obj) {... |
import React, { useState, useCallback } from "react";
import * as S from "./styles";
import ModalForm from "../ModalForm";
import { requestApiWithBodyWithoutToken } from "../../../../lib/REQUEST_API";
import { Register } from "../../../../lib/LOG";
const RegisterModalForm = () => {
// registerForm
const [localRegist... |
//1.0.0 components
import Flex from './flex';
import FlexItem from './flex_item';
export default {
Flex,
FlexItem
}; |
from __future__ import print_function
import numpy as np
import cv2
import os
import math
import sys
import random
from ..config import config
def brightness_aug(src, x):
alpha = 1.0 + random.uniform(-x, x)
src *= alpha
return src
def contrast_aug(src, x):
alpha = 1.0 + random.uniform(-x, x)
coe... |
import React from "react";
export default function FrontEnd() {
return (
<div style={{ textAlign: "left" }} id="frontend">
<h2>Front End</h2>
<h3>User Interface + Git</h3>
<h3>CSS</h3>
<h3>JavaScript</h3>
<h3>React</h3>
<h3>Redux</h3>
<hr />
</div>
);
}
|
export function removeTrailing0x(str) {
if (str.startsWith('0x')) return str.substring(2);else return str;
}
export function addTrailing0x(str) {
if (!str.startsWith('0x')) return '0x' + str;else return str;
} |
/*
* Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
*/
define([
"knockback",
"validation",
"layout-handler",
"core-constants",
"query-form-view",
"controller-basedir/reports/qe/ui/js/models/FlowSeriesFormModel",
"core-basedir/reports/qe/ui/js/common/qe.utils",
], function(... |
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
exports.__esModule = true;
var index = require("@syncfusion/ej2-dropdowns");
index.MultiSelect.Inject(index.CheckBoxSelection);
__export(require("@syncfusion/ej2-dropdowns"));
|
# coding=utf-8
'''
# Author: shikanon (shikanon@tensorbytes.com)
# File Created Time: 2020-03-31 11:04:51
#
# Project: settings
# File: config.py
# Description:
#
'''
import configparser
class Config:
'''配置
'''
def __init__(self):
self.config = configparser.ConfigParser()
self.mysqldb ... |
/**
* @license
* Copyright Google LLC 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://angular.io/license
*/
import { InjectFlags } from '../di/interface/injector';
import { ElementRef as ViewEngine_ElementRef } from '../linker... |
// OP_0 [signatures ...]
var Buffer = require('safe-buffer').Buffer
var bscript = require('../../script')
var p2mso = require('./output')
var typeforce = require('typeforce')
var OPS = require('@psf/bitcoincash-ops')
function partialSignature (value) {
return value === OPS.OP_0 || bscript.isCanonicalSignature(value... |
#example program on Condiion statement (IBM Digital Nation Africa)
cost = float(10.5)
money = float(20.5)
if money>cost :
print("I can afford the Apple")
print("After the if statement")
#end-of-the-program |
class Node:
def __init__(self, data) -> None:
self.data = data
self.next = None
class LinkedList:
def __init__(self) -> None:
self.head = None
def __len__(self):
return len(self.to_list())
def __str__(self):
return f'{self.to_list()}'... |
import time
import pytest
import requests
from tempfile import NamedTemporaryFile
from helpers.hdfs_api import HDFSApi
import os
from helpers.cluster import ClickHouseCluster
import subprocess
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
cluster = ClickHouseCluster(__file__)
node1 = cluster.add_instance... |
!function(e){function t(t){for(var r,o,s=t[0],d=t[1],f=t[2],u=0,p=[];u<s.length;u++)o=s[u],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&p.push(a[o][0]),a[o]=0;for(r in d)Object.prototype.hasOwnProperty.call(d,r)&&(e[r]=d[r]);for(i&&i(t);p.length;)p.shift()();return c.push.apply(c,f||[]),n()}function n(){for(var e,t... |
// http://mrl.nyu.edu/~perlin/noise/
var ImprovedNoise = function () {
var p = [ 151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,
23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,
174,20,125,136,171,168,68,175,74,165,71... |
# -*- coding: utf-8 -*-
"""Utility functions for B-splines, potentially useful for converting MATLAB codes to Python.
CAVEATS:
- Only a very minimal set of functionality is implemented here.
- Some technical details differ from the MATLAB equivalents.
Particularly, we use spline order `p` **as-is** instead of... |
import React from "react";
import PropTypes from "prop-types";
const Message = ({ msg }) => {
return (
<div
className="alert alert-warning alert-dismissible fade show"
role="alert"
>
{msg}
<button
type="button"
className="close"
data-dismiss="alert"
ari... |
const expect = require('chai').expect;
const isOddOrEven = require('../00.isOddOrEven');
describe("even or odd", () => {
it("isString", () => {
expect(isOddOrEven(3)).to.undefined;
});
it('isOdd', () => {
expect(isOddOrEven('s')).to.equal('odd');
})
it('isEven', () => {
ex... |
const Campground = require("../models/campground");
const mbxGeocoding = require("@mapbox/mapbox-sdk/services/geocoding");
const mapBoxToken = process.env.MAPBOX_TOKEN;
const geocoder = mbxGeocoding({ accessToken: mapBoxToken });
const { cloudinary } = require("../cloudinary");
module.exports.index = async (req, res) ... |
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[118],{
/***/ "./frontend/src/@core/comp-functions/forms/form-validation.js":
/*!********************************************************************!*\
!*** ./frontend/src/@core/comp-functions/forms/form-validation.js ***!
\****************************... |
/* eslint no-undef: "off"*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3')) :
typeof define === 'function' && define.amd ? define(['exports', 'd3'], factory) :
(factory((global.youdrawit = {}),global.d3));
}(this, (function (exports,d3) ... |
import { REHYDRATE } from 'redux-persist/lib/constants'
import Rate from "../services/rate"
import * as BLOCKCHAIN_INFO from "../../../env"
import constants from "../services/constants"
import * as converter from "../utils/converter"
function initTokens() {
//var network = network ? network: "ropsten"
let tokens... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[2,6],{293:function(n,i,t){},295:function(n,i,t){"use strict";var s=t(293);t.n(s).a},296:function(n,i,t){},299:function(n,i,t){"use strict";t.r(i);var s={data:function(){return{}},components:{},mounted:function(){}},a=(t(295),t(1)),e=Object(a.a)(s,function(){var n=thi... |
// moment.js language configuration
// language : euskara (eu)
// author : Eneko Illarramendi : https://github.com/eillarra
require('../moment').lang('eu', {
months : "urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),
monthsShort : "urt._ots._mar._a... |
/**
* @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... |
# pylint:disable=line-too-long
import logging
from ...sim_type import SimTypeFunction, SimTypeShort, SimTypeInt, SimTypeLong, SimTypeLongLong, SimTypeDouble, SimTypeFloat, SimTypePointer, SimTypeChar, SimStruct, SimTypeFixedSizeArray, SimTypeBottom, SimUnion, SimTypeBool
from ...calling... |
import { getFragmentByHash, toBoolean } from '../utils/utils';
export default {
props: {
type: {
type: String,
default: null,
},
expandable: {
type: Boolean,
default: true,
},
isOpen: {
type: Boolean,
default: null,
},
expanded: {
type: Boolean,
... |