text
stringlengths
3
1.05M
# # Copyright 2018 Analytics Zoo 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...
try: #优先使用httpx,在httpx无法使用的环境下使用requests import httpx http = httpx #当openssl版本小于1.0.2的时候直接进行一个空请求让httpx报错 import tools if tools.Get_openssl_Version() <= 102: httpx.get() except: import requests http = requests #这里实际上应该加个"-> dict"但是考虑到请求可能失败的关系,所以直接不声明返回变量 def get(url:str, **head...
/** * @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...
var _curry2 = require('./util/_curry2'); var _map = require('./_map'); var _flattenOnce = require('./_flattenOnce'); var _pipe = require('./_pipe'); /** * Returns the recursively flattened result of applying a function to a list. * Allows to return multiple values from a function `fn`. * * @example C.flatMap(x => ...
import controller from './controller'; import template from './template.html'; export default { bindings: { accessPath: '<', currentActiveLink: '<', volumeDashboardLink: '<', volumeDashboardAclLink: '<', volumeDashboardSnapshotsLink: '<', volume: '<', updateVolume: '<', goToVolumeDash...
class ModelConfig: # Class that defines model structure def __init__(self, feature_inputs, arg_outputs, size, num_functions, model_format, scope, use_biases): self.feature_inputs = feature_inputs # string of feature input names self.arg_outputs = arg_outputs self.size = size ...
// @flow export default function( h: number, s: number, v: number ): { h: number, s: number, l: number } { const hh = ((200 - s) * v) / 100; return { h: h, s: (s * v) / (hh < 100 ? hh : 200 - hh), l: hh / 2 }; }
export const ADDON_ID = "storybook/stylesheet-toggle"; export const TOOL_ID = `${ADDON_ID}/tool`; export const PARAM_KEY = `stylesheetToggle`;
// Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. const EXTENSION_ID = 'pkplfbidichfdicaijlchgnapepdginl'; chrome.test.runTests([ function testId() { chrome.test.assertEq(EXTENSION_ID, chrome.runti...
from typing import ( Any, Callable, List, ) from eth_utils.curried import ( apply_formatter_to_array, apply_formatters_to_dict, apply_formatters_to_sequence, encode_hex, to_checksum_address, to_hex, ) from eth_utils.toolz import curried environment_formatter = apply_formatters_to...
import pandas as pd def encode_labels(labels: pd.Series) -> pd.Series: if pd.api.types.is_numeric_dtype(labels): return labels return labels.astype("category").cat.codes
/** * Layout component that queries for data * with Gatsby's useStaticQuery component * * See: https://www.gatsbyjs.org/docs/use-static-query/ */ import React from "react" import PropTypes from "prop-types" import { useStaticQuery, graphql } from "gatsby" import Header from "./header" import "./layout.css" cons...
import Input from './Input.svelte'; export default { title: 'Example/Input', component: Input, argTypes: { disabled: { control: 'boolean' }, icon: { control: { type: 'select', options: ['none', 'search'], }, }, label: {...
import Vue from 'vue'; import c404 from '@/components/404.vue'; describe('404.vue', () => { it('should render correct contents', () => { const Constructor = Vue.extend(c404); const vm = new Constructor().$mount(); expect(vm.$el.querySelector('h1').textContent).to.equal('You are lost.'); }); });
var transparent = true; var transparentDemo = true; var fixedTop = false; var navbar_initialized = false; var backgroundOrange = false; var sidebar_mini_active = false; var toggle_initialized = false; var $html = $('html'); var $body = $('body'); var $navbar_minimize_fixed = $('.navbar-minimize-fixed'); var $collapse...
const assert = require('assert'); const proxyquire = require('proxyquire'); const { shipmentItemsMock, ShipmentItemsServiceMock } = require('../utils/mocks/shipmentItems'); const testServer = require('../utils/testServer'); describe('routes - shipment items', function() { const route = proxyquire('../routes/shipmen...
import React, { Component } from 'react' class SearchGithub extends Component { handleSubmit () { let router = this.context.router let username = this.refs.usernameRef.value router.transitionTo('profile', {username: username}) } render () { return ( <div className="col-sm-12"> <form ...
import matplotlib.gridspec as gridspec from nose.tools import assert_equal def test_equal(): gs = gridspec.GridSpec(2, 1) assert_equal(gs[0, 0], gs[0, 0]) assert_equal(gs[:, 0], gs[:, 0])
from django.contrib import admin from django.utils.safestring import mark_safe from .models import Choice, Question from polls.forms import QuestionForm, ChoiceForm from core.utils import SemanticIcons from django.utils.translation import ugettext_lazy as _ class ChoiceAdmin(admin.ModelAdmin): model = Choice ...
require('normalize.css/normalize.css') require('tufte-css/tufte.css') require('prismjs/themes/prism.css')
import variable from "./../variables/platform"; export default (variables = variable) => { const pickerTheme = { ".note": { color: "#8F8E95" }, width: 90, marginRight: -4 }; return pickerTheme; };
from __future__ import print_function import json import os import sys import tempfile if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest from . import session from .. import lib from .. import paths from .. import test from ..test.command import assert_command rodsadmins = [('o...
"""Генерация координатных групп для отключения аэродромов""" from __future__ import annotations import sys import pathlib import os AIRFIELD_DEACTIVATOR_GROUP_FORMAT = """MCU_H_ReferencePoint {{ Index = 7; Name = "Helper Reference Point"; Desc = ""; Targets = []; Objects = []; XPos = 0.000; YPos = 0.000...
# pylint: disable=C,R,W from datetime import datetime, timedelta import inspect import logging import os import re import time import traceback from urllib import parse from flask import ( flash, g, Markup, redirect, render_template, request, Response, url_for, ) from flask_appbuilder import expose, SimpleFormView...
import parseDuration from 'parse-duration' import { coerceCIDs } from '../../utils.js' export default { command: 'rm <hash...>', describe: 'Remove IPFS block(s)', builder: { hash: { type: 'array', coerce: coerceCIDs }, force: { alias: 'f', describe: 'Ignore nonexistent block...
const mongoose = require("mongoose"); const Schema = mongoose.Schema; const packageSchema = new Schema({ month: {type: String, required: true}, year: {type: Number, required: true}, bottle: { manufacturer: {type: String, required: true}, flavor: {type: String, required: true}, size: {type: String, re...
const express = require("express"); const { uuid, isUuid } = require("uuidv4"); const app = express(); app.use(express.json()); const projects = []; function logRequests(request, response, next) { const { method, url } = request; const logLabel = `[${method.toUpperCase()}] ${url}`; console.log(logLabel); ...
/** * Primitives to be used cross-platform. * * @see https://github.com/WordPress/gutenberg/blob/trunk/packages/primitives/README.md */ import { SVG, Path } from '@wordpress/primitives'; const triangleDown = ( <SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <Path fillRule="evenodd" clipRule="...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@6thquake/react-material/styles'; import SvgIcon from '@6thquake/react-material/SvgIcon'; const style = theme => ({ root: { width: '100%', height: '100%', }, }); class Avatar extends Component { ren...
/*! * Bootstrap v4.3.1 (https://getbootstrap.com/) * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ ! function(t, e) { "object" == typeof exports && "undefined" != typeof module ? e(exp...
'use strict'; var fs = require('fs'); var path = require('path'); var exec = require('child_process').exec; var md5 = require('md5'); var avatar = function(options) { var convertCommand = options.convertCommand || 'convert'; var imageDir = options.imageDir; var cacheDir = options.cacheDir; var avatarGenerator...
'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; $provide.value("$locale", { "DATETIME_FORMATS": { "AMPMS": [ "\u043f\u0440.\u043e\u0431.", "\u0441\u043b.\u043e\...
from flask.ext.wtf import Form from wtforms import StringField, PasswordField, BooleanField, SubmitField, ValidationError from wtforms.validators import Required, Length, Email, Regexp, EqualTo from ..models import User class LoginForm(Form): email = StringField('email', validators=[Required(),Length(1,64), Email()]...
import doctest if __name__ == '__main__': doctest.testfile('doctest_in_help.txt')
/* @flow */ import { parse } from './parser/index' import { optimize } from './optimizer' import { generate } from './codegen/index' import { createCompilerCreator } from './create-compiler' // `createCompilerCreator` allows creating compilers that use alternative // parser/optimizer/codegen, e.g the SSR optimizing c...
import React from "react"; const IcFirstPage = props => <svg width="1em" height="1em" viewBox="0 0 24 24" {...props}><path d="M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z" /></svg>; export default IcFirstPage;
"use strict"; import { NativeModules } from "react-native"; import RNFS from "react-native-fs"; const RNAppUpdate = NativeModules.RNAppUpdate; let jobId = -1; class AppUpdate { constructor(options) { this.options = options; } GET(url, success, error) { fetch(url, { cache: "no-cache" }) .then(re...
"use strict"; // automatically generated code, please do not change Object.defineProperty(exports, "__esModule", { value: true }); const famix_mse_exporter_1 = require("../../famix_mse_exporter"); const type_1 = require("./type"); class ParameterizedType extends type_1.Type { constructor() { super(...argume...
var book = { "name": "Ai Ca", "numChapters": 5, "chapters": { "1": { "1": "<sup>1</sup> Giê-ru-sa-lem trước đây đông đảo dân cư,\nnhưng nay trở thành hoang vắng.\nGiê-ru-sa-lem xưa kia là một trong những thành phố lớn trên thế giới,\nnhưng nay nó chẳng khác nào đàn bà góa.\nXưa kia nó là công chúa của các thành...
'use strict'; var entry = require('./webpack/entry'); var externals = require('./webpack/externals'); var modules = require('./webpack/module'); var output = require('./webpack/output'); var plugins = require('./webpack/plugins'); var extensions = require('./webpack/extensions'); var target = require('./webpack/target...
# -*- coding: utf-8 -*- # Copyright 2017-2019 ControlScan, Inc. # # This file is part of Cyphon Engine. # # Cyphon Engine is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3 of the License. # # Cyphon En...
var ids = { TIRISFAL_SET: 649, TEMPEST_SET: 671, SPELLFIRE_SET: 552, SPELLSTRIKE_SET: 559, MANA_ETCHED_SET: 658, SERPENT_COIL: 30720, SILVER_CRESCENT: 29370, EYE_OF_MAGTHERIDON: 28789, RESTRAINED_ESSENCE: 23046, QUAGMIRRANS_EYE: 27683, XIRIS_GIFT: 29179, UNSTA...
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
import React, { memo } from 'react'; import { useTranslation } from 'react-i18next'; import { makeStyles } from '@material-ui/core/styles'; import styles from './styles'; const useStyles = makeStyles(styles); const Footer = () => { const classes = useStyles(); const { t } = useTranslation(); return ( <div...
# coding: utf-8 # ----------------------------------------------------------------------------------- # <copyright company="Aspose" file="delete_border_request.py"> # Copyright (c) 2020 Aspose.Words for Cloud # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtaining a copy #...
Clazz.declarePackage ("J.g3d"); Clazz.load (["java.util.Hashtable"], "J.g3d.TextRenderer", ["JU.CU"], function () { c$ = Clazz.decorateAsClass (function () { this.height = 0; this.ascent = 0; this.width = 0; this.mapWidth = 0; this.size = 0; this.tmap = null; this.isInvalid = false; Clazz.instantialize (this, arguments...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (ruleName, messages) { return Object.keys(messages).reduce(function (newMessages, messageId) { var messageText = messages[messageId]; newMessages[messageId] = typeof messageText === "string" ? messageTe...
/** * 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...
Events = new Mongo.Collection('events'); Events.schema = new SimpleSchema({ createdAt: { type: Date }, name: { type: String }, description: { type: String, optional: true }, unique: { type: Boolean, optional: true }, important: { // marking an event as important means it shoul...
webpackJsonp([6],{"G/Ae":function(e,t,r){"use strict";function a(e){r("ekt6")}Object.defineProperty(t,"__esModule",{value:!0});var n=r("teIl"),o=r("wG0d"),c={components:{"demo-example":o.a,"demo-header":n.default},mounted:function(){this.$$showPage()},data:function(){return{}},methods:{}},s=function(){var e=this,t=e.$c...
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define("nd-ez-signiture",["exports","@angular/core","@angular/common"],e):e(t["nd-ez-signiture"]={},t.ng.core,t.ng.common)}(this,function(t,e,n){"use s...
from dotenv import load_dotenv import os from array import array from PIL import Image, ImageDraw import sys import time from matplotlib import pyplot as plt import numpy as np # Import namespaces def main(): global cv_client try: # Get Configuration Settings load_dotenv() cog_endpoi...
/** * Copyright (c) 2006-2018, JGraph Ltd * Copyright (c) 2006-2018, Gaudenz Alder */ var StorageDialog = function(editorUi, fn, rowLimit) { rowLimit = (rowLimit != null) ? rowLimit : 2; var div = document.createElement('div'); div.style.textAlign = 'center'; div.style.whiteSpace = 'nowrap'; div.style.padding...
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M17 3H7c-1.1 0-2 .9-2 2v16l7-3 7 3V5c0-1.1-.9-2-2-2z" /> , 'BookmarkOutlined');
import createSvgIcon from './utils/createSvgIcon.js'; import { jsx as _jsx } from "react/jsx-runtime"; export default createSvgIcon( /*#__PURE__*/_jsx("path", { d: "M13.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM18.25 9c-.41 0-.75.34-.75.75v1.03c-1.23-.37-2.22-1.17-2.8-2.18l-1-1.6c-.41-.65-1.11-1-1.84-1-.78 0-...
// Discourse forum popup and the live support feature goes here var discourse_msg_active = false; $(document).ready(function () { $('#Discourse_button').click(function () { if (discourse_msg_active == false) { $('#Discourse_Forum').slideDown(300); discourse_msg_active = true; } else { ...
const axios = require("axios") module.exports = { name: "guildCreate", once: false, async execute(guild) { await guild.client.openAccount(guild) const rawAuditlogData = await guild.fetchAuditLogs({ limit: 1, type: "BOT_ADD" }) const auditlogD...
import api from '../utils/api'; import { setAlert } from './alert'; import { GET_PROFILE, GET_PROFILES, PROFILE_ERROR, UPDATE_PROFILE, CLEAR_PROFILE, ACCOUNT_DELETED, GET_REPOS, NO_REPOS } from './types'; // Get current users profile export const getCurrentProfile = () => async (dispatch) => { try {...
// @import plugins import React, { useEffect, useState } from "react" import { graphql } from "gatsby" import BackgroundImage from "gatsby-background-image" // @import components import Layout from "../components/layout" import Seo from "../components/seo" import Content from "../components/content" import Navtabs fro...
/** * A less plugin that extracts variables computed during the compilation of a less file. * This is a modified version of the plugin available at [1]. * * [1]: https://github.com/Craga89/less-plugin-variables-output */ // eslint-disable-next-line max-classes-per-file const SELECTOR = '__VARIABLES__'; class Post...
from rest_framework import generics from rest_framework.permissions import AllowAny from rest_framework.response import Response from django.shortcuts import render from Offers.serializer import SerializeOffers from Lib.Offers import OffersComponent # Create your views here. class ListOffers(generics.CreateAPIView)...
jQuery.noConflict(); jQuery( function( $ ) { var add_events; (add_events = function( object ) { // Datepicker $('.js-cuztom-datepicker', object).map(function(){ return $(this).datepicker({ dateFormat: $(this).data('date-format') }); }); // Timepicker $('.js-cuztom-timepicker', object).map(function(...
'use strict'; /************************************************************************************************** * * * Plese read the following tutorial before implementing tasks: * * ht...
/* @flow */ import type {CustomField, CustomFieldBase, CustomFieldText, ProjectCustomField} from '../../flow/CustomFields'; const isProjectCustomField = (customField: ProjectCustomField): boolean => { return customField?.$type ? customField.$type.indexOf('ProjectCustomField') !== -1 : false; }; const getSimpleCust...
import re from typing import List import parse from behave import * from cu_pass.dpa_calculator.helpers.parsers import INTEGER_REGEX, NUMBER_REGEX, parse_number from cu_pass.dpa_calculator.utilities import Point def get_list_regex(item_regex: str) -> str: return rf'\[({item_regex},? ?)*\]' NUMBER_LIST_REGEX =...
"use strict"; exports.__esModule = true; var _createThemedIcon = require("./utils/createThemedIcon"); var _FilledTextRotateUp = require("./FilledTextRotateUp"); var _OutlineTextRotateUp = require("./OutlineTextRotateUp"); var _RoundTextRotateUp = require("./RoundTextRotateUp"); var _SharpTextRotateUp = require("....
import mongoose from 'mongoose'; import userSchema from '../models/userModel'; const User = mongoose.model('User', userSchema); export const getAll = async (req, res) => { const users = await User.find().populate('messages'); res.send(users); };
"use strict"; var _mockWs = require("../../test/mockWs"); var _ = require("./"); // Copyright 2017-2020 @polkadot/rpc-provider authors & contributors // SPDX-License-Identifier: Apache-2.0 let ws; let mock; function createMock(requests) { mock = (0, _mockWs.mockWs)(requests); } function createWs(autoConnect = 10...
import { ViewMemberProfile } from "../index"; const fetchMember = jest.fn(); const fetchMemberEvents = jest.fn(); const hideServerMessage = jest.fn(); const fetchScheduleEvents = jest.fn(); const fetchMemberAvailability = jest.fn(); const goBack = jest.fn(); const resetMembers = jest.fn(); const updateMemberStatus = j...
const server = require('./api/server') const port = process.env.PORT || 9000 server.listen(port, () => console.log(`Listening on port ${port}`))
module.exports = { preset: 'ts-jest', testEnvironment: 'node', collectCoverage: true, roots: ['<rootDir>/src/'] };
# coding: utf-8 # flake8: noqa from __future__ import absolute_import # import models into model package from openapi_server.models.credentials import Credentials from openapi_server.models.edge import Edge from openapi_server.models.edge_attribute import EdgeAttribute from openapi_server.models.expertise_level import...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'CheckBoxForm.ui' # # Created by: PyQt5 UI code generator 5.13.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindo...
""" command: .movie torrentz2.eu|idop.se """ import cfscrape # https://github.com/Anorov/cloudflare-scrape import requests from datetime import datetime from bs4 import BeautifulSoup from uniborg.util import admin_cmd, humanbytes @borg.on(admin_cmd( # pylint:disable=E0602 pattern="movie (torrentz2\.eu|idop\.se...
import { connect } from 'react-redux' import Keyboard from '../components/Keyboard' const mapStateToProps = ({ keys }) => (keys.playing) export default connect(mapStateToProps)(Keyboard)
const path = require('path'); const fstatic = require('fastify-static'); async function oasRoutes(fastify, options) { if (options.options.ui !== false) { fastify.route({ url: '/', method: 'GET', schema: { hide: true }, handler: function (req, reply) { const redirectUrl = req.raw.u...
#!/usr/bin/env python import os,sys,inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys.path.insert(0,parentdir) from math import ceil from time import time import numpy as np import cupy as cp import fire import h5py from numba ...
begin_unit comment|'# Copyright 2014 IBM Corp.' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl|'\n' comment|'# not use this file except in compliance with the License. You may obtain' nl|'\n' comment|'# a copy of the License at' nl|'\n' com...
/* ***** BEGIN LICENSE BLOCK ***** * Distributed under the BSD license: * * Copyright (c) 2012, Ajax.org B.V. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of so...
const Bouyomi = (() => { class Bouyomi { static get ClientType () { return { Bouyomi: "BOUYOMI", Native: "NATIVE" }; } get client () { switch (this.clientType) { case Bouyomi.ClientType.Bouyomi: return this._client; case Bouyomi.ClientType.Native: return this._nativeClient; default:...
# -*- coding: utf-8 -*- # Copyright 2018 IBM. # # 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 agre...
import { action } from '@storybook/addon-actions'; import BaseForm from './BaseForm.vue'; import BlockCheckGroup from '../BlockCheckGroup'; import InputMasks from '../../constants/InputMasks'; export default { title: 'BaseForm', component: BaseForm, }; export const LogInForm = () => ({ components: { BaseForm },...
"""Tests for the WLED integration.""" import aiohttp from homeassistant.components.wled.const import DOMAIN from homeassistant.config_entries import ENTRY_STATE_SETUP_RETRY from homeassistant.core import HomeAssistant from tests.components.wled import init_integration from tests.test_util.aiohttp import AiohttpClient...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.DomTools = void 0; var _xeUtils = _interopRequireDefault(require("xe-utils/methods/xe-utils")); var _utils = _interopRequireDefault(require("./utils")); function _interopRequireDefault(obj) { return obj && obj._...
from django import forms class AddForm(forms.ModelForm): """ Primiarly used as a fallback in the insert, safe to ignore. """ pass
const PLAYER = { user: "x", computer: "o" }; const RESULT = { computer: 0, user: 1, tie: 2, running: 3 }; let REWARD = { learnrate: 0.05, default: 50, won: 100, tie: 50, lost: -100, decrease_rate: 0.1 } let COUNTER = { total: 0, wins: 0, ties: 0, losses: 0 } let GAME = { state: Array(10).join(" "),...
const lib = require('./index'); const expect = require('chai').expect; describe('MathEnforcerTests', function() { describe('AddFiveMethodTests', function() { it('should return undefined with non-number argument ', function() { const nonNumberArgument = 'str'; const result = lib.math...
// 请求主机url [http|https]://ip:port/url var host = ''; // var assets = '/assets'; var assets = ''; var default_image_url = '/image/default.jpg'; /** * 发送get请求 * @param url 请求路径 * @param fun 回调函数 */ function $_get(url, fun) { var requestUrl = host + url; $.get(requestUrl, fun) } /** * 发送post请求 * @param url...
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ import expect from '@kbn/expect'; import sinon from 'sinon'; import { getClus...
'use strict'; var app = function (options) { var express = require('express'), app = express(), logger = require('./logger')(options.silent), Controllers = require('./controllers'), controllers = new Controllers(options.directory, logger, options.indexDocument, options.errorDocument,options.fs...
import methods import os # To match other platforms STACK_SIZE = 8388608 def is_active(): return True def get_name(): return "Windows" def can_build(): if os.name == "nt": # Building natively on Windows # If VCINSTALLDIR is set in the OS environ, use traditional Godot logic to set up ...
import React, { Component } from 'react'; import { Dimensions, Image, Text, TouchableOpacity, StyleSheet, View, } from 'react-native'; const { width } = Dimensions.get('window'); export default class PostContainer extends Component { static defaultProps = { onPress: () => {}, }; onPressImage = ...
# 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 may ...
import curry3 from '../_internal/_curry3' export default curry3(function insert(idx, val, list) { var a = list.slice() a.splice(idx, 0, val) return a })
/// Copyright (c) 2009 Microsoft Corporation /// /// Redistribution and use in source and binary forms, with or without modification, are permitted provided /// that the following conditions are met: /// * Redistributions of source code must retain the above copyright notice, this list of conditions and /// ...
import os # relative paths CORE_PATH = os.path.dirname(os.path.abspath(__file__)) CHECKPOINT = CORE_PATH + '/models/checkpoint_ssd300_complete(E3000).pth.tar' CHECKPOINT_NEW = CORE_PATH + '/models/checkpoint_ssd300_complete(E3000).pth.tar' TEST_DATA_PATH = CORE_PATH + '/data/test_data/' COLAB_REPO = '/content/drive/My...
// wrapped by build app define("d3/src/geo/projection", ["dojo","dijit","dojox"], function(dojo,dijit,dojox){ import "../core/identity"; import "../core/rebind"; import "../math/trigonometry"; import "clip-antimeridian"; import "clip-circle"; import "clip-extent"; import "compose"; import "geo"; import "path"; import "...
import copy import itertools import string import warnings import cupy from cupy.core import _accelerator from cupy import util from cupy.linalg.einsum_opt import _greedy_path from cupy.linalg.einsum_opt import _optimal_path if cupy.cuda.cutensor_enabled: from cupy import cutensor options = { 'sum_ellipsis':...
import React from 'react' const Rocket = () => { return <h1 className="icon">🚀</h1> } function App() { return ( <div className="App"> <div className="box"> <Rocket /> </div> <h1 className="title">Parcel</h1> <h1 className="sub-title"> ...
(function(){ if($.IGRP && !$.IGRP.components.tree){ $.IGRP.components.tree = function (menu,o) { var _this = this; var options = $.extend(true, { animationSpeed: 600 }, o); $(document).on('click', menu + ' li a', function (e) { //Get the clicked link and the next element ...