text stringlengths 3 1.05M |
|---|
var NAVTREEINDEX7 =
{
"d1/d9d/class_x_f_1_1_cli_1_1_command_1_1_add_on_1_1_create.html#a086c114eff052caa8626f79275aeec82":[2,0,0,14,0,0,3,1],
"d1/d9d/class_x_f_1_1_cli_1_1_command_1_1_add_on_1_1_create.html#a9be5e0bdb5720efed6ddb6426c5c16ee":[2,0,0,14,0,0,3,0],
"d1/da1/class_x_f_1_1_node_type_1_1_link_forum.html":[2,0,... |
var searchData=
[
['callback',['callback',['../classnlohmann_1_1detail_1_1json__sax__dom__callback__parser.html#a46a72dffd5be4a25602af00f0033c126',1,'nlohmann::detail::json_sax_dom_callback_parser::callback()'],['../classnlohmann_1_1detail_1_1parser.html#a7600d272ec605e3ffdc8512b3585f476',1,'nlohmann::detail::parser:... |
import h5py
from tiaocan import bot_name
def print_keras_wegiths(weight_file_path):
f = h5py.File(weight_file_path) # 读取weights h5文件返回File类
try:
if len(f.attrs.items()):
print("{} contains: ".format(weight_file_path))
print("Root attributes:")
for key, value in f.attrs.... |
"""
This is the core of the vec. optimization. It combines dependency.py and schedule.py
to rewrite a loop in vectorized form.
See the rpython doc for more high level details.
"""
import py
import time
from rpython.jit.metainterp.resume import Snapshot
from rpython.jit.metainterp.jitexc import NotAVectorizeableLoop,... |
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸 (Blueking) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
You may... |
/*
* This file is part of the coreboot project.
*
* Copyright 2018 Google LLC
*
* This program 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 2 of the License.
*
* This program is distributed... |
import pytest
import json
from unittest.mock import patch
from urllib.parse import urlencode
from awx.main.models.inventory import Group, Host
from awx.main.models.ad_hoc_commands import AdHocCommand
from awx.api.pagination import Pagination
from awx.api.versioning import reverse
@pytest.fixture
def host(inventory):... |
# model settings
model = dict(
type='FastRCNN',
pretrained='open-mmlab://resnet50_caffe',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=False),
norm_eval=True,
... |
#
# Autogenerated by Thrift Compiler (0.11.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py
#
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
from thrift.protocol.TProtocol import TProtocolException
from thrift.TRecursive impo... |
"""
`dacman.core.cleanup`
====================================
.. currentmodule:: dacman.core.cleanup
:platform: Unix, Mac
:synopsis: Module to cleanup Dac-Man indexes and metadata
.. moduleauthor:: Devarshi Ghoshal <dghoshal@lbl.gov>
"""
import os
import shutil
import logging
from dacman.core.utils import get_has... |
//
// MSButtonModel.h
// MSDrawingBoard
//
// Created by mr.scorpion on 16/5/11.
// Copyright © 2016年 mr.scorpion. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef void(^buttonAction)(void);
@interface MSButtonModel : NSObject
@property (nonatomic,copy) NSString *image;
@property (nonatomic,cop... |
def length(word):
word = word.replace(' ','')
return print(f'\n Your string has {len(word)} letters')
def sum_initials(name, last_name, food, Country):
return print(f'''
Name: {name.title()}
Last_Name: {last_name.title()}
Country: {Country.title()}
You name is {name.title()} {last_name.... |
import json
from django.contrib.postgres.forms import SimpleArrayField
from django.contrib.postgres.validators import ArrayMaxLengthValidator
from django.core import checks, exceptions
from django.db.models import Field, Lookup, Transform, IntegerField
from django.utils import six
from django.utils.translation import ... |
const DatabaseInterface = require('../../base/DatabaseInterface')
class Users extends DatabaseInterface{
constructor(collection) {
this.collection = collection
}
async findByName(name) {
}
}
module.exports = Users;
|
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function get() {
return _ButtonGroup["default"];
}
});
var _ButtonGroup = _... |
import squid_py
def test_versions_():
assert squid_py.__version__
|
#! /usr/bin/env node
var es = require('event-stream')
var parse = require('parse-regexp')
var replace = module.exports = function (pattern, string) {
return es.replace(pattern, string)
}
if(!module.parent) {
var rx = parse(process.argv[2]) || process.argv[2]
process.stdin.pipe(replace(rx, process.argv[3])).pip... |
# -*- coding: utf-8 -*-
# Third Party Library Imports
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.contrib.auth.models import Group, User
from django.test import TestCase, override_settings
# First Party Library Imports
from shibauth_rit.compat import reverse
s... |
from flask import Blueprint, render_template, request
import server.db as db
import json
views = Blueprint("views", "views")
@views.route("/")
def home():
return render_template("start.html")
@views.route("/map")
def map_page():
return render_template("map.html")
@views.route("/about_us")
def about_us_page(... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.combineLatestAll = void 0;
var combineLatest_1 = require("../observable/combineLatest");
var joinAllInternals_1 = require("./joinAllInternals");
function combineLatestAll(project) {
return joinAllInternals_1.joinAllInternals(combin... |
from baremetal import *
from settings import *
from math import log, pi, ceil
from matplotlib import pyplot as plt
import numpy as np
from scipy import signal
import sys
def make_kernel(taps, kernel_bits):
kernel = signal.firwin(taps, 0.5, window="blackman")
kernel = np.round(kernel * (2.0**(kernel_bits-1.0))... |
var showRequireProfile = ('METEOR_PROFILE_REQUIRE' in process.env);
if (showRequireProfile) {
require('../tool-env/profile-require.js').start();
}
var assert = require("assert");
var _ = require('underscore');
var Fiber = require('fibers');
var Console = require('../console/console.js').Console;
var files = require(... |
# -*- coding: utf-8 -*-
"""
State to work with sysrc
"""
# Import Python libs
from __future__ import absolute_import, print_function, unicode_literals
# Import 3rd-party libs
from salt.ext import six
# define the module's virtual name
__virtualname__ = "sysrc"
def __virtual__():
"""
Only load if sysrc exe... |
// route to get logged in user's info (needs the token)
// export const getMe = (token) => {
// return fetch('/api/users/me', {
// headers: {
// 'Content-Type': 'application/json',
// authorization: `Bearer ${token}`,
// },
// });
// };
// export const createUser = (userData) => {
// return f... |
import React from 'react';
import PropTypes from 'prop-types';
import cn from 'classnames';
import styles from './ButtonRect.module.css';
/**
* If you use Link (from react-router-dom) as Tag, do not
* forget to pass 'to' props to this component.
*/
const ButtonRect = ({ Tag, className, ...restProps }) => (
<Tag c... |
/*
* Copyright (C) 2012 The Android Open Source Project
* Copyright (C) 2012 The CyanogenMod Project <http://www.cyanogenmod.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
*
* ... |
import { connect } from 'react-redux';
// Actions
import * as SellActions from '@redux/sell/actions';
// The component we're mapping to
import SellValueRender from './SellValueView';
// What data from the store shall we send to the component?
const mapStateToProps = () => ({
});
// Any actions to map to the compo... |
from users.models import GlobalInfo
from rest_framework import serializers
from easyaudit.models import CRUDEvent
class GlobalInfoSerializer(serializers.ModelSerializer):
class Meta:
model = GlobalInfo
fields = "__all__"
class CRUDEventSerializer(serializers.ModelSerializer):
event_type = se... |
import os
# import subprocess to run cli
import subprocess
# Nucleotides we want to mutate are located at positions 5,6,7 in chain D (PAM,NGG)
# and 8,7,6 in chain C (target strand, NCC).
positionIndex = { 0 : "5", 1 : "6", 2 : "7", 3 : "8"}
# Create a dictionary mapping corresponding positions to each other.
positio... |
r"""
Graded Algebra of Mixed Differential Forms
Let `M` and `N` be differentiable manifolds and `\varphi: M \to N` a
differentiable map. The space of *mixed differential forms along* `\varphi`,
denoted by `\Omega^*(M,\varphi)`, is given by the direct sum
`\bigoplus^n_{j=0} \Omega^j(M,\varphi)` of differential form mod... |
from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
# Examples:
# url(r'^$', 'ga_statistics.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
# This file defines which view will be shown when the corresponding URL is requested.
url(r'^admin/... |
/*
* Copyright (C) 2009, 2010 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of condit... |
/*
* SPDX-License-Identifier: Apache-2.0
*/
const fs = require('fs');
/**
*
*
* @class FabricConfig
*/
class FabricConfig {
/**
* Creates an instance of FabricConfig.
* @memberof FabricConfig
*/
/*eslint-disable */
constructor() {}
/* eslint-enable */
/**
*
*
* @param {*} configPath
* @memb... |
from captcha.fields import ReCaptchaField
from wagtail.core import blocks
from wagtailstreamforms.fields import BaseField, register
from django.utils.translation import gettext_lazy as _
@register('recaptcha')
class ReCaptchaField(BaseField):
field_class = ReCaptchaField
icon = 'success'
label = _("ReCaptc... |
from typing import Optional, Tuple
import torch
import torch.nn as nn
import torch.nn.functional as F
from kornia.geometry.linalg import transform_points
from kornia.testing import check_is_tensor
from kornia.utils import create_meshgrid, create_meshgrid3d
from kornia.utils.helpers import _torch_inverse_cast
__all__... |
# Author: Aniruddha Gokhale
# Created: Fall 2019
# Modified: Spring 2021 to cater to API changes and comment the code
#
# Purpose: demonstrate serialization of topic data type using flatbuffers
#
# Here our topic comprises a sequence number, a timestamp, and a data buffer
# of several uint32 numbers (whose value ... |
$("#testform").jsonForm({
"schema": {
"tabs": {
"type": "array",
"items": [{
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Tab title"
},
"thumbnail": {
"type": "array",
"title": "Tab... |
# Copyright (C) 2019 Paul King, Simon Biggs
# 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 ag... |
# model settings
temperature = 0.2
with_norm = True
query_dim = 128
model = dict(
type='SimSiamBaseTSNTracker',
backbone=dict(
type='ResNet',
pretrained=None,
depth=18,
out_indices=(3, ),
# strides=(1, 2, 1, 1),
norm_cfg=dict(type='SyncBN', requires_grad=True),
... |
"""Test module for napoleon PEP 526 compatibility with google style"""
module_level_var: int = 99
"""This is an example module level variable"""
class PEP526GoogleClass:
"""Sample class with PEP 526 annotations and google docstring
Attributes:
attr1: Attr1 description.
attr2: Attr2 descripti... |
from adapters.contact_adapter import ContactAdapter
from adapters.on_off_switch_adapter import OnOffSwitchAdapter
from adapters.generic.motion_temp_sensor import MotionAndTemperatureSensorAdapter
from adapters.samsung.sensor_arrival import SensorArrival
from adapters.samsung.sensor_door import SmartThingsDoorSensor
s... |
// src/actions/user/sign-in.js
import API from '../../middleware/api'
import loadError from '../load/error'
import loadSuccess from '../load/success'
import loading from '../loading'
import { history } from '../../store'
export const USER_SIGNED_IN = 'USER_SIGNED_IN'
const api = new API()
export default (user) => {
... |
(function () {
angular.module('accredcan.permissions.services.accredcanPermissions', [
]);
angular.module('accredcan.permissions.services.accredcanPermissions')
.service('accredcanPermissions', AccredcanPermissionsService);
AccredcanPermissionsService.$inject = ['$rootScope'];
function AccredcanPe... |
// Test "template aware" client-side components using `gpii-test-browser`.
//
/* eslint-env node */
"use strict";
var fluid = require("infusion");
var gpii = fluid.registerNamespace("gpii");
require("./includes.js");
fluid.registerNamespace("gpii.tests.handlebars.browser.templateAware");
fluid.defaults("gpii.tests.... |
/*
* FILE: main.c
* AUTH: Michael J. Radwin <michael@radwin.org>
*
* DESC: stubgen code generation routines
*
* DATE: Thu Nov 13 13:28:23 PST 1997
*
* Copyright (c) 2004 Michael J. Radwin
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided tha... |
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
import re
import logging as log
from collections import OrderedDict
from enum import Enum
from typing import Dict, List
from reggen.validate import check_keys
from reggen.i... |
#pragma once
#include "Core/Layers/Layer.h"
inline namespace MARS
{
class Overlay
{
public:
Overlay() = default;
Overlay(const String & InWindowName);
~Overlay();
virtual void OnUpdate();
virtual void OnAttach();
virtual void OnDetach();
virtual void RenderLayerUI();
virtual void OnBegin();
vi... |
import angular from 'angular';
import '@uirouter/angularjs';
import component from './projects.component';
import routing from './projects.routing';
import terminateProject from './terminate';
import status from '../components/status';
const moduleName = 'ovhManagerWebPaasProjects';
angular
.module(moduleName, ['u... |
#!/usr/bin/env python
# coding: utf-8
# Copyright (c) TileDB, Inc..
# Distributed under the terms of the Modified BSD License.
"""
Information about the frontend package of the widgets.
"""
module_name = "@tiledb-inc/pybabylonjs"
module_version = ">=0.1.7"
|
from pygments.style import Style
from pygments.token import (
Comment, Error, Keyword, Literal, Name, Number, Operator, String, Text
)
class BaseSixteenStyle(Style):
base00 = '#2b303b'
base01 = '#343d46'
base02 = '#4f5b66'
base03 = '#65737e'
base04 = '#a7adba'
base05 = '#c0c5ce'
base06... |
# 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, software
# d... |
# -*- coding: utf-8 -*-
import datetime
import pandas as pd
import numpy as np
def convert_electrode(i):
"""With 3 multiplexers, electrode numbers are running from 1 - 120, in 30
electrode increments. We need to convert those numberings back.
"""
return int(np.floor((i - 1) / 4) + 1)
def _extract_md... |
from typing import List, TypeVar
TKey = TypeVar('TKey', int, float)
def bubble(arr: List[TKey]) -> List[TKey]:
""""""
pass |
/**
* @author Richard M. / https://github.com/richardmonette
* @author WestLangley / http://github.com/WestLangley
*/
THREE.CubemapGenerator = function ( renderer ) {
this.renderer = renderer;
};
THREE.CubemapGenerator.prototype.fromEquirectangular = function ( texture, options ) {
var scene = new T... |
"""application URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-b... |
#!/usr/bin/env python
# encoding: utf-8
#| Copyright Inria May 2015
#| This project has received funding from the European Research Council (ERC) under
#| the European Union's Horizon 2020 research and innovation programme (grant
#| agreement No 637972) - see http://www.resibots.eu
#|
#| Contributor(s):
#| - Jean-Bap... |
/* ----------
* pgstat.h
*
* Definitions for the PostgreSQL statistics collector daemon.
*
* Copyright (c) 2001-2016, PostgreSQL Global Development Group
*
* src/include/pgstat.h
* ----------
*/
#ifndef PGSTAT_H
#define PGSTAT_H
#include "datatype/timestamp.h"
#include "fmgr.h"
#include "libpq/pqcomm.h"
#incl... |
from sr.robot import *
import time
SEARCHING, DRIVING = range(2)
R = Robot()
MARKER_TOKENS = (MARKER_TOKEN, MARKER_TOKEN_A, MARKER_TOKEN_B, MARKER_TOKEN_C)
token_filter = lambda m: m.info.marker_type in MARKER_TOKENS
def drive(speed, seconds):
R.motors[0].m0.power = speed
R.motors[0].m1.power = speed
... |
const Rcon = require('srcds-rcon');
exports.run = (server) => {
return new Promise((fufill, reject) => {
server.connect().then(() => {
server.command('sv_password').then((output) => {
if(output !== '') {
try {
const pass = output.slice(output.indexOf('"sv_password"'), output.l... |
export { default } from './HeroesList';
|
try:
import keyring
except:
raise NotImplemented()
from plyer.facades import Keystore
class WinKeystore(Keystore):
def _set_key(self, servicename, key, value, **kwargs):
keyring.set_password(servicename, key, value)
def _get_key(self, servicename, key, **kwargs):
return ... |
import IconButton from "./IconButton";
import {ReactComponent as InfoIcon} from "../img/info-icon.svg";
import Typography, {TypographyColor, TypographyVariant} from "./Typography";
import Button from "./Button";
import MessageCard from "./MessageCard";
import useModal from "../hooks/useModal";
import {createUseStyles} ... |
import React, { Component } from 'react';
import { TouchableOpacity } from 'react-native';
import { connect } from 'react-redux';
import { Container, Header, Title, Content, Button, Icon, List, ListItem, InputGroup, Input, Picker, Text, Thumbnail } from 'native-base';
import { openDrawer } from '../../actions/drawer'... |
import RPi.GPIO as GPIO
import time
import sys
bytes = [120, 169, 127, 141, 254, 127, 169, 255, 141, 242, 127, 169, 255, 141, 243, 127, 169, 0, 141, 240, 127, 169, 0, 141, 241, 127, 169, 127, 141, 238, 127, 169, 255, 141, 227, 127, 169, 0, 141, 225, 127, 32, 243, 136, 32, 169, 131, 169, 1, 133, 4, 169, 1, 133, 5, 165... |
var SpecReporter = require('jasmine-spec-reporter').SpecReporter;
exports.config = {
allScriptsTimeout: 30000,
multiCapabilities: [{
// Das sind die Appium Einstellungen. Wir deployen die Anwendung vorher selbst auf dem Gerät und geben hier
// den Namen des Packages und der MainActivity an. App... |
// Copyright (c) 2013 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.
#ifndef CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_
#define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_MANAGER_H_
#includ... |
/****************************************************************************
*
* afhints.c
*
* Auto-fitter hinting routines (body).
*
* Copyright 2003-2018 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
* modified, and distributed... |
# Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany
#
# 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/lice... |
# Copyright 2019 Hewlett Packard Enterprise Development LP
#
# 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 applicabl... |
'use strict';
var nconf = require('nconf');
//nconf.argv().env();
var chai = require('chai');
var expect = require('chai').expect;
var chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
var vendSdk = require('./../vend')({
debugRequests: process.env.REQUEST_LOG_LEVEL_FOR_VEND_NODEJS_SDK || fa... |
# -*- coding: utf-8 -*-
"""
Copyright ©2017. The Regents of the University of California (Regents). All Rights Reserved.
Permission to use, copy, modify, and distribute this software and its documentation for educational,
research, and not-for-profit purposes, without fee and without a signed licensing agreement, is
he... |
# -*- coding: utf-8 -*-
#!/usr/bin/python3
import crawl
import sqlhandler
from sys import exit
"""
# crawling events testing
driver_instance = crawl.crawler(False, 800, 600, 2)
driver = driver_instance.init_driver()
#page_to_fetch = "https://webscraper.io/test-sites/e-commerce/allinone"
page_to_fetch = "https://tiss... |
/////////////////////////////////////////////////////////////////////
// Copyright (c) Autodesk, Inc. All rights reserved
// Written by Forge Partner Development
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided tha... |
__author__ = 'frieder'
import utils.ClazzLoader
from logic.dimreduce import paa
from logic.dimreduce import dwt
from logic.dimreduce import sax
from logic.dimreduce import dft
class DimensionalityReduceControl(object):
_instance = None
def __init__(self, ):
#TODO: load available algorithms automatical... |
import numpy as np
import matplotlib.pyplot as plt
T = 250000
alpha = 1.0
beta = 0.5
epsilon = 0.01
h = 0.005
# v = 0.0
u = np.zeros(T)
v = np.zeros(T)
rho = np.zeros(T)
x = np.zeros(T)
time = np.zeros(T)
c1 = 0.2
c2 = 0.05
eta = lambda rho, c: np.exp(-(rho)**2/(2*c**2))
d1 = 2.5
d2 = 2.5
x1 = -1.0
x2 = 1.0
C0 = l... |
#!/usr/bin/env python3
import numpy as np
from cereal import car
from common.numpy_fast import clip, interp
from common.realtime import DT_CTRL
from selfdrive.swaglog import cloudlog
from selfdrive.config import Conversions as CV
from selfdrive.controls.lib.events import ET
from selfdrive.car.honda.values import Cruise... |
/**
* @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... |
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2015-2020 Intel, Inc. All rights reserved.
* Copyright (c) 2016 Mellanox Technologies, Inc.
* All rights reserved.
* Copyright (c) 2018 Research Organization for Information Science
* ... |
/**
* Module dependencies.
*/
var express = require('express');
var compress = require('compression');
var session = require('express-session');
var bodyParser = require('body-parser');
var logger = require('morgan');
var errorHandler = require('errorhandler');
var lusca = require('lusca');
var dotenv = require('dote... |
# -*- coding: utf-8 -*-
# Scrapy settings for Douban project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://doc.scrapy.org/en/latest/topics/settings.html
# https://doc.scrapy.org/en/latest/topics... |
import axios from 'axios'
import browser from './browser'
// import app from '../main.js'
// 创建 axios 实例
let http = axios.create({
timeout: 60000
})
// 设置 post、put 默认 Content-Type
http.defaults.headers.post['Content-Type'] = 'application/json'
http.defaults.headers.put['Content-Type'] = 'application/json'
// 添加请求拦... |
from cms.plugin_pool import plugin_pool
from cms.plugin_base import CMSPluginBase
from django.template.loader import select_template
from django.utils.translation import ugettext_lazy as _
from . import models
from .conf import settings
from filer.models.filemodels import File
from filer.models.foldermodels import Fol... |
from freesasa import *
import unittest
import math
import os
import faulthandler
# this class tests using derived classes to create custom Classifiers
class DerivedClassifier(Classifier):
purePython = True
def classify(self,residueName,atomName):
return 'bla'
def radius(self,residueName,atomName)... |
"""
Autogenerated code from xml spec Date: 2020-06-19 18:15:35.156503
"""
from opcua import ua
from opcua.common.events import Event
__all__ = ["BaseEvent", "AuditEvent", "AuditSecurityEvent", "AuditChannelEvent", "AuditOpenSecureChannelEvent", "AuditSessionEvent", "AuditCreateSessionEvent", "AuditActivateSessionEven... |
# MIT License
# Copyright (c) 2015, 2017 Marie Lemoine-Busserolle
# 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... |
import time
from conducto.shared import log
import itertools
def shrink_stdout_screen(stdout):
import tempfile
import pexpect
with tempfile.NamedTemporaryFile(mode="w") as raw:
raw.write(stdout)
raw.flush()
with tempfile.NamedTemporaryFile(mode="r") as cooked:
log.lo... |
# Copyright 2021 The TensorFlow 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 required by applica... |
import state from '../libs/state';
import mutations from '../libs/mutations';
import actions from '../libs/actions';
import getters from '../libs/getters';
export default {
namespaced: true,
state: {
// tags: [],
...state,
form: new Form({
id: '',
name: '',
tags: ''
}),
isEdit: false,
api_url:... |
"""Miscellaneous tools for operating on filesystems.
"""
from __future__ import print_function
from __future__ import unicode_literals
import typing
from . import errors
from .errors import DirectoryNotEmpty
from .errors import ResourceNotFound
from .path import abspath
from .path import dirname
from .path import no... |
/* eslint-disable */
var icon = require('vue-svgicon')
icon.register({
'repeat-off': {
width: 24,
height: 24,
viewBox: '0 0 24 24',
data: '<path pid="0" d="M2 5.27L3.28 4 20 20.72 18.73 22l-3-3H7v3l-4-4 4-4v3h6.73L7 10.27V11H5V8.27l-3-3M17 13h2v4.18l-2-2V13m0-8V2l4 4-4 4V7H8.82l-2-2H17z"/>'
}
})
|
"""
(C) Copyright 2021 IBM Corp.
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, software
d... |
# Generated by Django 3.0.4 on 2020-04-19 18:40
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... |
# Copyright 2012 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.
import json
import logging
import os
from telemetry.core import util
from telemetry.internal.backends import codepen_credentials_backend
from telemetry.inte... |
from django.templatetags.static import static
from django.utils.html import format_html
try:
# Wagtail 2.x
from wagtail.core import hooks
except ImportError:
# Wagtail 1.x
from wagtail.wagtailcore import hooks
@hooks.register('insert_editor_js')
def editor_js():
html = '<script type="text/javascr... |
if (typeof browser === 'undefined') {
if (typeof chrome !== 'undefined') {
window.browser = chrome
} else {
throw new Error('Could not find the WebExtension API')
}
}
/**
Information flows like so:
devpanel <-> background.js <-> content.js <-> target-page-colluder.js
content.js is where messages to the collu... |
module.exports = [{ "index": 1, "id": "id_0", "avartar": "https://s3.amazonaws.com/uifaces/faces/twitter/VMilescu/128.jpg", "city": "East Rosalynville", "country": "USA", "email": "Garnett97@yahoo.com", "firstName": "Leslie", "lastName": "Conn", "street": "Silas Lock", "zipCode": "27601-7334", "date": "2014-11-24T21:43... |
#include "clock.h"
time_system_t time_getSystem()
{
if(! globalTime)
{
globalTime = TRUE;
struct systemTime *sysTime;
sysTime->timeReal = esp_log_early_timestamp(void);
sysTime->timeCPU = esp_log_timestamp(void);
sysTime->timeDiff = (sysTime->timeReal) - (sysTime->timeCPU);
return GET_SYST... |
/** @file
A brief file description
@section license License
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 und... |
from .backprop import GradxInputExplainer
import types
import torch.nn.functional as F
from torch.autograd import Variable
# Based on formulation in DeepExplain, https://arxiv.org/abs/1711.06104
# https://github.com/marcoancona/DeepExplain/blob/master/deepexplain/tensorflow/methods.py#L221-L272
class DeepLIFTRescaleEx... |
import useRoom from "hooks/useRoom";
import styled from "styled-components";
const Wrapper = styled.div``;
const Time = ({ className, duration, type }) => {
const { progressBar } = useRoom();
duration = duration || 0;
const showHours = duration >= 60 * 60 * 1000;
const millisecondsAll =
type === "elapse... |