text
stringlengths
3
1.05M
var chapters = 0; function loadChapters(){ console.log('chapters'); $(document).ready(function (){ loadGif("Chapters"); var urlPage = "/loadChapters?page="+ chapters; ajax(urlPage, "Chapters"); unloadGif("Chapters"); chapters++; }); }
load("8e10ed2ef8d5793457c2d22533e5ff15.js"); // Copyright 2016 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. // Flags: --validate-asm function testFunction() { function generateAsmJs(stdlib, foreign, heap) { '...
from django.shortcuts import render, get_object_or_404, redirect from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect, HttpResponse from .forms import PostForm, CommentForm from .models import Post, Comment, PostVote @login_required def create_post(request): if r...
# Copyright 2011 Google 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 writing,...
module.exports = `"I have a kind of weird story related to death. Something my father told me. He said it was an actual experience he had when he was in his early twenties. Just the age I am now. I’ve heard the story so many times I can remember every detail. It’s a really strange story—it’s hard even now for me to bel...
Ext.override(Ext.ux.StatusBar, { hideBusy() { return this.setStatus({ text: this.defaultText, icon_cls: this.defaultIconCls }); } });
/* ********************************************************************************************* * * * Plese read the following tutorial before implementing tasks: * * https://developer.mozilla....
from django import template register = template.Library() class PostCategoryIsNotSubcategory(Exception): pass @register.assignment_tag def unfeatured_posts_categories(posts): """Return a list of Categories, in alphabetical order, representing the Categories attached to the unfeatured posts in `posts` ...
goog.provide('indeed.proctor.app.editor'); goog.require('goog.array'); goog.require('goog.dom'); goog.require('goog.events'); goog.require('goog.events.EventHandler'); goog.require('goog.events.EventTarget'); goog.require('goog.json'); goog.require('goog.net.XhrLite'); goog.require('goog.style'); goog.require('goog.ur...
var demand = require('must'); var CodeType = require('../CodeType'); exports.initList = function(List) { List.add({ code: { type: CodeType }, nested: { code: { type: CodeType }, }, lang: { type: CodeType, lang: 'c', }, language: { type: CodeType, lang: 'js', ...
import React from "react"; import Directory from "./components/directory/directory"; import './App.css'; const App = () => { return ( <div className="App"> <Directory /> </div> ) } export default App;
import {get_creds, get_route} from './API' export function get_logs () { let route = get_route() let creds = get_creds() console.log(route + '/logs') return fetch(route + '/logs', { method: 'get', headers: new Headers({ 'Authorization': creds}) }).then(function (response) { con...
// import axios from "axios" // Use the same axios instance as redux-token-auth import { axios } from "redux-token-auth" import { authHeaderKeys } from "../config/redux-token-auth" const getStorage = () => { return window.localStorage } // see: https://github.com/kylecorbelli/redux-token-auth/blob/master/src/action...
const webpack = require('webpack'); const merge = require('webpack-merge'); const common = require('./webpack.common.js'); module.exports = merge(common, { plugins: [ new webpack.DefinePlugin({ 'process.env': { 'NODE_ENV': JSON.stringify('production'), 'API_URI'...
/** * @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...
"0" == null; // false "0" == undefined; // false "0" == false; // true -- UH OH! "0" == NaN; // false "0" == 0; // true "0" == ""; // false false == null; // false false == undefined; // false false == NaN; // false false == 0; // true -- UH OH! false == ""; // true -- UH OH! false == []; // true -- UH OH! false == {}...
let allLikeBtns = document.querySelectorAll('.like'); allLikeBtns.forEach(btn => { btn.addEventListener('click', () => { let amountOfLikes = btn.querySelector('.amout-of-likes'); if (btn.classList.contains('liked')) { amountOfLikes.innerHTML = +amountOfLikes.innerHTML - 1; }else{ amountOfLike...
export default `<template> <div> <d2-crud-x :columns="columns" :data="data" :options="options"/> </div> </template> <script> export default { data () { return { columns: [ { title: '日期', key: 'date', sortable: true },...
from sklearn.linear_model import LinearRegression def linear_regression(df_train, df_test): feature_cols = ['CloseA', 'CloseB', 'CloseC', 'CloseD', 'Close'] X = df_train[feature_cols] y = df_train.Next_Day # Linear regression using scikit-learn lm = LinearRegression() lm.fit(X, y) # prin...
const Discord = require("discord.js"); const fs = require("fs"); const mongoose = require("mongoose"); const dayjs = require("dayjs"); require('dotenv').config(); const onmsg = require("./utils/onmsg"); const color = require("./utils/color.json"); const config = require("./utils/config.json"); const Snipe = require(...
"""A setuptools based setup module. """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here...
'use strict' const t = require('tap') const test = t.test const brotli = require('iltorb') const zlib = require('zlib') const fs = require('fs') const JSONStream = require('jsonstream') const createReadStream = fs.createReadStream const readFileSync = fs.readFileSync const Fastify = require('fastify') const compressPl...
const getDataDependency = (component = {}) => { return component.WrappedComponent ? getDataDependency(component.WrappedComponent) : component.fetchData; }; export default (components, getState, dispatch, location, params) => { return components .filter((component) => getDataDependency(component)) // on...
app.factory('Producto', function($http, $q , $filter) { var factory = {}; factory.get = function(categoria,marca,modelo) { var deferred = $q.defer(); $http.get(Base+'/productos', { params: { categoria: categoria, marca: marca...
#Write a program to predict total payment for given number of claims on Swedish auto insurance dataset using linear regression. #Code: from statistics import mean import numpy as np import pandas as pd import matplotlib.pyplot as plt %matplotlib inline def best_fit_slope(X,y): slope_m = ((mean(X)*mean(y)) - mean(...
Ext.define('Ext.locale.pt.ux.colorpick.Selector',{override:'Ext.ux.colorpick.Selector',okButtonText:'OK',cancelButtonText:'Cancelar'});Ext.define("Ext.locale.pt_BR.Component",{override:"Ext.Component"});Ext.define('Ext.locale.pt_BR.Dialog',{override:'Ext.Dialog',config:{maximizeTool:{tooltip:"Maximizar para tela cheia"...
export default (() => { let o; return Jymfony.Component.VarExporter.Internal.Hydrator.hydrate( o = [ (new ReflectionClass('Jymfony.Component.DateTime.Internal.RuleSet')).newInstanceWithoutConstructor(), (new ReflectionClass('Jymfony.Component.DateTime.Internal.Rule')).newInstance...
"""Eager mode TF policy built using build_tf_policy(). It supports both traced and non-traced eager execution modes.""" import functools import logging import numpy as np from ray.util.debug import log_once from ray.rllib.models.catalog import ModelCatalog from ray.rllib.policy.policy import Policy, LEARNER_STATS_KE...
import React from "react" import { Link } from "gatsby" import Layout from "../components/layout" import Head from "../components/head" const AboutPage = () => { return ( <Layout> <Head title="About" /> <h1>About me</h1> <p>Saya tampan</p> <p> <Link to="/contact">Sini sini</Link>...
"use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj ...
'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); var forcedStringHTMLMethod = require('../internals/string-html-forced'); // `String.prototype.blink` method // https://tc39.github.io/ecma262/#sec-string.prototype.blink $({ target: 'String', proto: true, forced...
module.exports = { name: "pause", aliases: ["pause", "hold"], inVoiceChannel: true, run: async (client, message, args) => { const queue = client.distube.getQueue(message) if (!queue) return message.channel.send(`${client.emotes.error} | There is nothing in the queue right now!`) ...
const jsondiffpatch = require('../../dist/jsondiffpatch.cjs.js'); const instance = jsondiffpatch.create({ objectHash: function(obj) { return obj._id || obj.id || obj.name || JSON.stringify(obj); }, }); const data = { name: 'South America', summary: 'South America (Spanish: América del Sur, Sudamérica ...
const Pool = require("pg").Pool; const pool = new Pool({ user: "postgres", password: "postgres", host: "localhost", port: 5432, database: "todo_database" }); module.exports = pool;
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow */ 'use strict'; const Map = require('react-native/Libraries/vendor/core/Map'); const NativeEventEmitter = require(...
import React, { useState } from 'react'; import './Login.css'; import { Link, useHistory } from 'react-router-dom'; import { auth } from '../firebase'; function Login() { const history = useHistory(); const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const login = (even...
const {schema, doc, blockquote, pre, h1, h2, p, li, ol, ul, em, strong, code, a, img, br, hr, eq, builders} = require("prosemirror-test-builder") const {testTransform} = require("./trans") const {Transform, liftTarget, findWrapping} = require("..") const {Slice, Fragment, Schema} = require("prosemirror-model") c...
import { ApolloLink, Observable } from 'apollo-link'; import { print } from 'graphql/language/printer'; import has from 'lodash/has'; const throwServerError = (response, result, message) => { const error = new Error(message); error.response = response; error.statusCode = response.status; error.result = result...
let ws = new WebSocket("ws://82.35.235.223:4097"); function delete_class(id) { var paras = document.getElementsByClassName(id); while(paras[0]) { paras[0].parentNode.removeChild(paras[0]); } } function gen_element(tag) { let element = document.createElement(tag); document.body.appendChild(e...
/* eslint-disable react/jsx-props-no-spreading */ /* eslint-disable react/jsx-filename-extension */ /** * SPDX-License-Identifier: Apache-2.0 * SPDXVersion: SPDX-2.2 * SPDX-FileCopyrightText: Copyright 2020 FreightTrust and Clearing Corporation * * Licensed under the Apache License, Version 2.0 (the "Licens...
export const ICON = { BOFANG: '#icon-bofanganniu', // 播放 ZANTING: '#icon-zanting' // 暂停 }
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def SessionManagerServiceRequestSpec(vim, *args, **kwargs): '''This data object type desc...
from django import forms from contacts.models import Contact from common.models import User, Attachments, Comment from django.db.models import Q from events.models import Event class EventForm(forms.ModelForm): WEEKDAYS = (('Monday', 'Monday'), ('Tuesday', 'Tuesday'), ('Wednesday'...
import moment from 'moment'; function convertTimeAgo() { $('.convert-by-moment').each(function() { let lang = $(this).data('lang'); moment.locale(lang); let timeAt = moment($(this).text()); if (timeAt.isValid()) { $(this).text(timeAt.fromNow()); $(this).attr('title', timeAt.format()).data...
import { Person } from "./Person.js"; import { getNumberFromSquareArray, randomNumber } from "./util.js"; export default class Group { Board = []; children = []; States = []; constructor(size, immune, infected) { if (Math.sqrt(size) ** 2 !== size) throw Error("Size is not Square")...
/** * Copyright 2018 The AMP HTML 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 require...
// @flow import type { Action } from '../../modules/ReduxTypes' import type { Permission, PermissionStatus } from '../../modules/UI/permissions' import { UPDATE_PERMISSIONS } from './actions.js' export const initialState = { bluetooth: 'undetermined', camera: 'undetermined', contacts: 'undetermined', photos: ...
import React from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' import { color } from 'utils' import { LineChart, Line, XAxis, YAxis, CartesianGrid, Legend, ResponsiveContainer } from 'recharts' import styles from './visitTrend.less' function VisitTrend({ data }) { return ( <div ...
#Description: This program detect and classify breast cancer based off of data. #import libraries import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns #load the data from google.colab import files uploaded = files.upload() df = pd.read_csv('data.csv') df.head(7) #Count the numb...
const mix = require('laravel-mix'); /* |-------------------------------------------------------------------------- | Mix Asset Management |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel appli...
# Creating a Pose Tracking Module to call upon for other Projects # Refer to : https://google.github.io/mediapipe/solutions/pose # For more Information import cv2 import mediapipe as mp import time # Class to recognize Pose class poseDetector(): # Initializations def __init__(self, mode=False, complex=1, smo...
// Returns whether an object contains key or not. // @Return Boolean export function containsKey(keyToFind, objectArray) { for (var i = 0; i < objectArray.length; i++) { if (objectArray[i].key === keyToFind) { return true; } } return false; } // Returns value of the desire key. // @Returns value, nu...
// Онц байдал засах зориулалттай modal-ийг харуулах button click event $(document).ready(function(){ $("#btnOpenEditDangerModal").click(function(){ if(dataRow == ""){ alertify.error('Та ЗАСАХ мөрөө дарж сонгоно уу!!!'); return; } // хадгалсан сумдын мэдээллийг d_id аа...
from setuptools import setup, find_packages import sys userena = __import__('userena') readme_file = 'README.mkd' try: long_description = open(readme_file).read() except IOError, err: sys.stderr.write("[ERROR] Cannot find file specified as " "``long_description`` (%s)\n" % readme_file) sys.exit(1)...
/* Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ CKEDITOR.plugins.setLang( 'pastetext', 'mk', { button: 'Paste as plain text', // MISSING pasteNotification: 'Press %1 to paste. Your browser doesn‘t suppor...
verde = '\033[32m' vermelho = '\033[31m' amarelo = '\033[33m' azul = '\033[34m' fim = '\033[m' def leiaInt(mensagem): while True: l() n = input(amarelo + mensagem + fim) if n.isnumeric(): ninteiro = int(n) break else: print(vermelho, 'erro, valor ...
import snf import numpy as np import SIMLR_PY.SIMLR as SIMLR # Estimation of the connectional brain template def atlas(train_data, train_labels): # Disentangling the heterogeneous distribution of the input_ networks using SIMLR clustering method z = np.zeros((1,1)) k = np.zeros((len(train_labels), len(train_da...
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var visitaMedSchema = new Schema({ id_cita: Schema.Types.ObjectId, id_paciente: Schema.Types.ObjectId, id_consultorio: Schema.Types.ObjectId, id_usuario: Schema.Types.ObjectId, fecha: { type: Date }, motivo: String, anexos: [{ type : Buf...
/* * Copyright (c) Microsoft Corporation. * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. const { SqlMan...
var searchData= [ ['cyhal_5fadc_5fchannel_5fconfigure',['cyhal_adc_channel_configure',['../group__group__hal__adc.html#ga504f26400e475a67e978fb1a75b67f1c',1,'cyhal_adc.h']]], ['cyhal_5fadc_5fchannel_5ffree',['cyhal_adc_channel_free',['../group__group__hal__adc.html#ga55d144073f10cf6b6a1edcf6b9f59c78',1,'cyhal_adc.h...
let timeLeft; let ticking = false; function pauseTimer() { ticking = false; } function startTimer() { if (!ticking) { ticking = true; let countdown = setInterval(() => { if (ticking && timeLeft > 0) { timeLeft -= 1000; updateTime(); ...
import { InterfaceServices } from "./InterfaceServices.js"; import { RoomModel } from '../model/RoomModel.js'; import { RoomRepository } from '../repository/RoomRepository.js'; import { quintalServer, salaServer, esquinaServer, cozinhaServer } from "../../websocket/application/RoomServerProvisori.js"; class RoomServic...
// 发布的时候用这个文件 // 导入关于路径的模块 var path = require('path') var webpack = require('webpack') const ExtractTextPlugin = require("extract-text-webpack-plugin"); var HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { // entry:path.resolve(__dirname,'src/main.js'), entry: { app: path.resolve...
/*! ramp-theme-usability 29-05-2015 14:44:48 : v. 5.4.0-10 * * RAMP GIS viewer - Elk; Sample of an implementation of RAMP with Usability Theme **/ define(["dojo/Deferred","dojo/query","dojo/promise/first","esri/request","esri/SpatialReference","esri/layers/FeatureLayer","esri/renderers/SimpleRenderer","ramp/layer...
import bpy from mathutils import * from bpy_extras.wm_utils.progress_report import ProgressReport, ProgressReportSubstep import os from . import seanim as SEAnim # <pep8 compliant> # This is the scale multiplier for exported anims g_scale = 1 # TODO - Proper scaling # A list (in order of priority) of bon...
import {TokenizeCall} from "../src"; import RequiredParamException from "../src/exception/RequiredParamException"; import ServerSideException from "../src/exception/ServerSideException"; import {veryBasicRequestParams} from "./test_utils"; describe('testing verify request:', () => { it('missing card details', asy...
// Generated by CoffeeScript 1.7.1 (function() { var config, express, router, _; express = require('express'); _ = require('underscore'); config = require('../config'); router = express.Router(); router.get('/', function(req, res) { return res.render('login'); }); router.post('/', function(req...
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /...
// ==UserScript== // @name TFile // @trackerURL http://tfile1.cc // @icon data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAADksgYAAAD/AAAAAACkpKUA4ODgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMzMzMzMzMzMjIyMjIyMjIzMzMzMzMzMzRERERERERERBFARAQEQAB...
from django.db import models from django.contrib.auth.models import \ AbstractBaseUser, BaseUserManager, \ PermissionsMixin # Create your models here. class UserManager(BaseUserManager): def create_user(self, email, password=None, **extra_fields): """Create...
function UserReg_click(){ document.getElementById("LoginPage").style.width = "100%"; SwitchMenu('do_registr'); } function UserLogin_click(){ document.getElementById("LoginPage").style.width = "100%"; SwitchMenu('do_login'); } function SwitchMenu(temp){ var tabcontent= document.getElementsByClassName('user_ent...
const db = require('../config/database').connect(); const Kontakt = () => { }; // ::INFO: CREATE - OPRETTER EN BESKED OG INDSÆTTER I DB (BRUGES PÅ SIDEN SITE/KONTAKT) Kontakt.createOne = (navn, email, emne, besked) => { // console.log(kategoriId); return new Promise(async (resolve, reject) => { var sq...
#!/usr/bin/env python3 """ Created on 14 Mar 2019 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) source repo: scs_airnow DESCRIPTION The airnow_task_runner utility is used to SYNOPSIS airnow_task_runner.py -p [[DD-]HH:]MM -d DIR [-e END] [-c] [-v] EXAMPLES ./airnow_task_runner.py -p 1-00:00 -d data -e...
# Copyright (c) 2021 Dai HBG """ 该代码定义1_num型运算符 使用cupy """ import numpy as np import cupy as cp import numba as nb def powv(a, num): # 幂函数运算符 s = a.copy() s[cp.isnan(a)] = 0 s[(s > 0) & (~cp.isnan(a))] = a[(s > 0) & (~cp.isnan(a))] ** num s[(s < 0) & (~cp.isnan(a))] = -((-a[(s < 0) & (~cp.isnan(a...
import sqlparse from django.db import connection, transaction #970: Added transaction wrapper due to Postgres hanging query @transaction.atomic def run_sql(sql, params=None): with connection.cursor() as cursor: value = cursor.execute(sql, params) # Remember it only accepts '%s' not %d etc. rowcou...
import platform from os.path import dirname, abspath, join from environs import Env from loguru import logger from proxypool.utils.parse import parse_redis_connection_string env = Env() env.read_env() # definition of flags IS_WINDOWS = platform.system().lower() == 'windows' # definition of dirs ROOT_DIR = dirname(d...
import React from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; import { EventContent } from './Content'; const ChatListItemEvent = ({ icon, isError, message, meta, timestamp, }) => { const eventClassName = cx([ 'slds-chat-event', { 'slds-has-error': isError, } ]); ...
module.exports.PortChecker = require('./port_checker'); module.exports.RecordPositionUpdater = require('./record_position_updater'); module.exports.UriPathAnalyzer = require('./uri_path_analyzer');
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const winston_1 = __importDefault(require("winston")); const logger_1 = __importDefault(require("../conf...
import Link from 'next/link'; import { Helmet } from 'react-helmet'; import { getPostBySlug, getAllPosts, getRelatedPosts, postPathBySlug } from 'lib/posts'; import { categoryPathBySlug } from 'lib/categories'; import { formatDate } from 'lib/datetime'; import { ArticleJsonLd } from 'lib/json-ld'; import { helmetSetti...
import axios from 'axios'; import { CONVERSATIONS_URL } from "../config"; async function findAll() { return axios .get(CONVERSATIONS_URL) .then(response => { return response.data.conversations; }) ; } async function getMessagesByConversation(conversation_id) { return ax...
import React, {useState} from 'react'; //pass in books from bookshelf const BookForm = (props) => { const [enteredTitle, setEnteredTitle] = useState(''); const [enteredAuthor, setEnteredAuthor] = useState(''); const [enteredISBN, setEnteredISBN] = useState('') const [books, seBooks] = useState(allBooks); console.log(...
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/...
let yourArray = ["a", 2, true, "c", null, { name: "john" }]; ;
import os import sys import cv2 import json import numpy as np import torch from tqdm import tqdm from ..utils import Timer from ..vis_utils import draw_bboxes from ..sample.utils import crop_image from ..external.nms import soft_nms, soft_nms_merge def rescale_dets_(detections, ratios, borders, sizes): xs, ys ...
const canvasSketch = require('canvas-sketch'); const random = require('canvas-sketch-util/random'); const math = require('canvas-sketch-util/math'); const settings = { dimensions: [1080, 1080], animate: true }; const animate = () => { console.log('domestika'); requestAnimationFrame(animate); }; // ani...
from __future__ import absolute_import import ctypes from .._base import _LIB from .. import ndarray as _nd def where(cond, arr1, arr2, out_arr, stream = None): assert isinstance(cond, _nd.NDArray) assert isinstance(arr1, _nd.NDArray) assert isinstance(arr2, _nd.NDArray) assert isinstance(out_arr, _n...
/** * @file templates modules * @author mj(zoumiaojiang@gmail.com) */ /* eslint-disable fecs-prefer-async-await */ const fs = require('fs-extra'); const path = require('path'); const os = require('os'); const glob = require('glob'); const archiver = require('archiver'); const etpl = require('etpl'); const Ajv = req...
function add_to_cart(id) { var key = 'product_' + id; var x = window.localStorage.getItem(key); x = x * 1 + 1; window.localStorage.setItem(key, x); update_orders_input(); update_orders_button(); } function update_orders_input() { var orders = cart_get_orders(); $('#orders_input').val(orders); } function ...
const fs = require('fs') const JSONStream = require('JSONStream') /** * Provides a redirected consumable stream of the * inputData file's content * @param {string} inputData * @returns */ const getStream = (inputData) => { const jsonData = inputData; const stream = fs.createReadStream(jsonData, {...
import React, { Component } from "react"; import { Icon } from "@iconify/react"; //import angularIcon from "@iconify/icons-logos/angular-icon"; import gitIcon from "@iconify/icons-logos/github-icon"; import blogIcon from "@iconify/icons-logos/vimeo-icon"; import gmailIcon from "@iconify/icons-logos/google-gmail"; clas...
var dir_37f0090c4796cd8bd6850abb2bf23a9d = [ [ "net", "dir_b9e867dfa2555e1b6b2577c031f06751.html", "dir_b9e867dfa2555e1b6b2577c031f06751" ] ];
module.exports = { plugins: [ `gatsby-plugin-sass`, `gatsby-plugin-react-helmet`, `gatsby-transformer-sharp`, `gatsby-plugin-sharp`, `gatsby-plugin-offline`, { resolve: `gatsby-source-filesystem`, options: { name: `images`, path: `${__dirname}/src/images/...
# ----------------------------------------------------------------------------- # Matplotlib cheat sheet # Released under the BSD License # ----------------------------------------------------------------------------- # Scripts to generate all the basic plots import numpy as np import matplotlib as mpl import matplot...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router'; import getContextRoot from '../utils/getContextRoot'; import { brodsmule as brodsmuleProptype } from '../propTypes'; const Brodsmule = ({ sti, tittel, sisteSmule, erKlikkbar, }) => { if (sisteSmul...
const S = require('sanctuary') /* takeLast Returns the last N element(s) of an array if possible. Since there may not be last N element(s), return type is a `Maybe` which can be either a `Just` or a `Nothing`. */ const myArray = [1, 2, 3, 4, 5] // A configured `takeLast` to return last 3 elements of the given array ...
#!/usr/bin/env python # -*- coding: utf-8 # pytest unit tests for ivadomed.postprocessing import nibabel as nib import numpy as np import pytest import scipy from ivadomed import postprocessing as imed_postpro from testing.unit_tests.t_utils import create_tmp_dir, __data_testing_dir__, download_data_testing_test_fil...
# -*- coding: utf-8 -*- # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
const { JSDOM } = require('jsdom') const createAtom = require('../src') module.exports = function app({ h, Provider, Consumer, connect, createContext }) { const dom = new JSDOM('<!doctype html><div id="root"></div>') global.window = dom.window global.document = dom.window.document const root = document.getElem...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.shortcuts import render from django.http import JsonResponse from users import models from users.services import rbac from django.utils import timezone from django.db.models import Q from mmcsite import settings # TODO: 用于事务操作 from django.db i...