text stringlengths 3 1.05M |
|---|
#!/usr/bin/env python
# encoding: utf-8
from flask import Blueprint, request, current_app, redirect, url_for, jsonify, flash
from sqlalchemy import or_
from flask_login import login_user, logout_user, login_required
from app.models import User
auth_bp = Blueprint('auth', __name__, url_prefix='/auth')
@auth_bp.route... |
/*
* Copyright 2009 The Closure Compiler 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 ... |
from . import colormode, colors, configs, messages, paths
|
export const serverURL = 'http://127.0.0.1:8000/' |
#!/usr/bin/env python
# coding: utf8
#
# Copyright (c) 2020 Centre National d'Etudes Spatiales (CNES).
#
# This file is part of CARS
# (see https://github.com/CNES/cars).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obta... |
const QQ_MAP_KEY = 'xxxxxxxx'
const API_URL = 'xxxxxxxxx'
const request = require('request')
exports.main = async (event) => {
const {lat, lon} = event
let location = `${lat},${lon}`
let url = `${API_URL}?key=${QQ_MAP_KEY}&get_poi=0&location=${location}`
return new Promise((resolve, reject) => {
request.g... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var prefix = 'fas';
var iconName = 'angle-down';
var width = 320;
var height = 512;
var ligatures = [];
var unicode = 'f107';
var svgPathData = 'M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96... |
/*
* SaberState.h
*
* Created on: 28 Nov 2021
* Author: jondurrant
*/
#ifndef SABERSTATE_H_
#define SABERSTATE_H_
#include <MQTTConfig.h>
#include "StateTemp.h"
#include <stdbool.h>
#include <stdint.h>
#define SABER_DAY_RGB_SLOT 3
#define SABER_NIGHT_RGB_SLOT 4
#define SABER_ON_SLOT 5
#define SABER... |
# Copyright (c) 2020, salesforce.com, inc.
# All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause
# For full license text, see the LICENSE file in the repo root
# or https://opensource.org/licenses/BSD-3-Clause
import matplotlib.pyplot as plt
plt.rcParams.update({'figure.max_open_warning': 0})
import numpy as ... |
print("Starting adding")
total = [1]
base = 2
power = 1000
for i in range(0, power):
for i in range(0, len(total)):
total[i] *= base
carrier = 0
for i in range(0, len(total)):
total[i] += carrier
head = total[i] % 10
carrier = (total[i] - head) / 10
total[i] = int(head)
while carr... |
#ifndef _CRYPTO_MD5_H
#define _CRYPTO_MD5_H
#include <linux/types.h>
#define MD5_DIGEST_SIZE 16
#define MD5_HMAC_BLOCK_SIZE 64
#define MD5_BLOCK_WORDS 16
#define MD5_HASH_WORDS 4
struct md5_state {
u32 hash[MD5_HASH_WORDS];
u32 block[MD5_BLOCK_WORDS];
u64 byte_count;
};
#endif
|
from case import *
from caseattaque import CaseAttaque
class Navire:
"""Représente un navire de n'importe quel type"""
def __init__(self, id, longueur, largeur, nom):
"""Constructeur d'un navire
Parameters:
id(int)
longueur(int)
largeur(int)
no... |
"""
Django settings for spadger project.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
from django.core.urlresolvers import reverse_lazy
from os.path import dirna... |
# -*- coding: utf-8 -*-
"""untitled3 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.h... |
"""
Copyright (c) 2022 Huawei Technologies Co.,Ltd.
openGauss is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
/*-------------------------------------------------------------------------
*
* nodeIndexonlyscan.c
* Routines to support index-only scans
*
* Portions Copyright (c) 1996-2014, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* ... |
const skypager = require('@skypager/node')
const { print } = skypager.cli
async function main() {
print('Starting File Manager')
await skypager.fileManager.startAsync()
print(`File IDs:`, 2)
print(skypager.fileManager.fileIds, 4)
print(`Directory IDs:`, 2)
print(skypager.fileManager.directoryIds, 4)
prin... |
import math
from binascii import hexlify
from clvm_tools import binutils
from stor.types.blockchain_format.program import Program
from stor.types.blockchain_format.sized_bytes import bytes32
from stor.types.condition_opcodes import ConditionOpcode
from stor.util.ints import uint64
from stor.wallet.storlisp import sex... |
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _stringHash = _interopRequireDefault(require("string-hash"));
var _stylesheet = _interopRequireDefault(require("./lib/stylesheet"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var saniti... |
# -*- coding: utf-8 -*-
# Copyright 2022 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... |
from flask import request
from operator import or_
from zeus.models import FileCoverage, Revision
from zeus.utils.builds import fetch_build_for_revision
from .base_revision import BaseRevisionResource
from ..schemas import FileCoverageSchema
filecoverage_schema = FileCoverageSchema(many=True, strict=True)
class Re... |
class TableCellCalculatedValueData(object,IDisposable):
""" The TableCellCalculatedValueData stores the data for calculated value """
def Dispose(self):
""" Dispose(self: TableCellCalculatedValueData) """
pass
def GetName(self):
"""
GetName(self: TableCellCalculatedValueData) -> str
Gets the... |
# qubit number=4
# total number=37
import cirq
import qiskit
from qiskit import IBMQ
from qiskit.providers.ibmq import least_busy
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from ma... |
import { MODULE_NAME } from './consts';
import destroy from './destroy';
/**
* `EventHandler` defines the event handler signature expected by `Events`.
*
* @see {Events}
* @callback EventHandler
* @param {Object} eventData The event data associated with the event.
*/
/**
* `Events` provides unified event hand... |
// @flow
const decodeBase64Src = (dataString: string): { type: string, buffer: Buffer } => {
// eslint-disable-next-line
const matches: ?Array<string> = dataString.match(/^data:([A-Za-z-+\/]+);base64,(.+)$/);
const response = {};
if (!Array.isArray(matches)) {
throw Error("Invalid input string"... |
#! /usr/bin/python
# coding: latin-1
import elementtree.ElementTree as ET ###INSTALL is required###
import argparse
import sys
import os
parser = argparse.ArgumentParser(description='MRemoteNG XML Parser')
parser.add_argument('--list', '-l', action='store_true', help='List Available Connections')
parser.add_argument... |
# coding: utf-8
import pprint
import re
import six
class CreateSubCustomerReqV2:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the v... |
import React from 'react';
import styles from '@patternfly/patternfly-next/components/Page/page.css';
import { css } from '@patternfly/react-styles';
import PropTypes from 'prop-types';
export const PageLayouts = {
vertical: 'vertical',
horizontal: 'horizontal'
};
const propTypes = {
/** Content rendered inside... |
#
# Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U
#
# 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 unde... |
from scan import get_token
import tensorflow as tf
import tools
import config
# from outlier_detector import *
# 识别非黏连的字符,比如i、=、除号
def detect_uncontinous_symbols(symbols,original_img):
# 先对symbols垂直投影
# 然后垂直投影
for projection_type in range(1):
projection = tools.get_projection(symbols,projection_type... |
module.exports = {
pathPrefix: "__GATSBY_IPFS_PATH_PREFIX__",
siteMetadata: {
name: `Fission`,
title: `Live from laptop`,
date: `October 19, 2019`,
},
plugins: [
"gatsby-plugin-ipfs",
`gatsby-plugin-layout`,
`gatsby-plugin-react-helmet`,
`gatsby-plugin-offline`,
{
resolve: ... |
_base_ = [
'../../../../_base_/default_runtime.py',
'../../../../_base_/datasets/coco_wholebody_hand.py'
]
evaluation = dict(interval=10, metric=['PCK', 'AUC', 'EPE'], save_best='AUC')
optimizer = dict(
type='Adam',
lr=5e-4,
)
optimizer_config = dict(grad_clip=None)
# learning policy
lr_config = dict(
... |
# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license"... |
#!/usr/bin/env python
from distutils.core import setup, Command
from skos import __version__
class TestCommand(Command):
"""
Custom distutils command for running the test suite
"""
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def ... |
#!/usr/bin/env python
"""An in memory database implementation used for testing."""
from __future__ import absolute_import
from __future__ import unicode_literals
import sys
import threading
from grr_response_core.lib import rdfvalue
from grr_response_core.lib import utils
from grr_response_server import db
from grr_... |
# -*- test-case-name: twisted.conch.test.test_manhole -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
insults/SSH integration support.
@author: Jp Calderone
"""
from typing import Dict
from zope.interface import implementer
from twisted.conch import avatar, interfaces as iconch, erro... |
#include "pch-c.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include "codegen/il2cpp-codegen-metadata.h"
extern const RuntimeMethod* XRCpuImage_OnAsyncConversionComplete_m60DC813F1A2B8A59F993D245683847D933D292A9_RuntimeMethod_var;
// 0x00000001 System.Void Microsoft.CodeAnalysis.E... |
import redis
from flask import current_app
from os import getenv
import dateutil
import datetime
import copy
import ujson
pool = None
def init():
global pool
pool = redis.ConnectionPool(host=getenv('REDIS_HOST'), port=getenv('REDIS_PORT'), password=getenv('REDIS_PASSWORD'))
return pool
def... |
# Copyright 2014 The Bazel 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 applicable la... |
import React, { Component } from "react";
import "../style/App.scss";
import Country from "./Country";
class App extends Component {
render() {
return (
<div className="App">
<Country />
</div>
);
}
}
export default App;
|
//
// Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20).
//
// Copyright (C) 1997-2019 Steve Nygard.
//
#import "MCACAccountPayloadHandler.h"
@interface MCNewSubCalAccountPayloadHandler : MCACAccountPayloadHandler
{
}
- (void)remove; // IMP=0x000000... |
#!/usr/bin/env python
"""
Example script to test a segmentation network trained in an unsupervised fashion,
using a probabilistic atlas and unlabeled scans.
Unsupervised deep learning for Bayesian brain MRI segmentation
A.V. Dalca, E. Yu, P. Golland, B. Fischl, M.R. Sabuncu, J.E. Iglesias
Under Review. arXiv https://... |
const { expect, test } = require('@twilio/cli-test');
const { Logger, LoggingLevel } = require('@twilio/cli-core').services.logging;
const JSONSchemaValidator = require('../../../src/services/api-schema/json-validator');
const validateSchema = (schema, value) => {
const logger = new Logger({ level: LoggingLevel.deb... |
# Generated by Django 2.2.7 on 2019-11-10 21:40
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('Pedido', '0016_auto_20191110_1806'),
]
operations = [
migrations.RenameField(
model_name='status',
old_name='status_pedido',... |
""" Wasm binary toolkit (WABT)
"""
import argparse
import sys
from .base import base_parser, LogSetup
from ..wasm import read_wat, read_wasm
parser = argparse.ArgumentParser(
description=__doc__,
parents=[base_parser])
subparsers = parser.add_subparsers(
title='commands',
description='possible comm... |
"use strict";
const mongo = require("mongodb");
const MongoClient = mongo.MongoClient;
function Database() {
const db = {};
const pass = process.env.PASS;
const user = process.env.USER;
db.connect = () => {
const url = `mongodb+srv://${user}:${pass}@cluster0-9ajzd.mongodb.net/test?retryWrites=true&w=majo... |
import unittest
import torch as th
import torch.nn as nn
from ttools.modules import image_operators as imops
import imageio
from ttools import utils
class TestConvModule(unittest.TestCase):
def setUp(self):
pass
def test_bilinear(self):
bs = 1
c = 3
h = 8
w = h
... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE127_Buffer_Underread__CWE839_listen_socket_31.c
Label Definition File: CWE127_Buffer_Underread__CWE839.label.xml
Template File: sources-sinks-31.tmpl.c
*/
/*
* @description
* CWE: 127 Buffer Underread
* BadSource: listen_socket Read data using a listen socket ... |
'use strict'
const Joi = require('joi')
const { renderVersionBadge } = require('../version')
const JetbrainsBase = require('./jetbrains-base')
const intelliJschema = Joi.object({
'plugin-repository': Joi.object({
category: Joi.object({
'idea-plugin': Joi.array()
.min(1)
.items(
J... |
let camera, scene, renderer;
let geometry, material, mesh;
let speed = 0.001;
let meshes;
let cameraZ = 2;
init();
animate();
function init() {
camera = new THREE.PerspectiveCamera(
70,
window.innerWidth / window.innerHeight,
0.01,
10
);
camera.position.z = cameraZ;
scene = new THREE.Scene();... |
// Copyright 2018 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.
(async function(testRunner) {
var {page, session, dp} = await testRunner.startBlank(
`Tests that video does not block virtual time.`);
dp.Emulat... |
from typing import Any, Dict, List, Optional, Tuple, Union
from collections import defaultdict
from functools import partial
import numpy as np
import torch
from catalyst.metrics._metric import ICallbackBatchMetric
from catalyst.metrics.functional._classification import get_aggregated_metrics, get_binary_metrics
from... |
/**
* Created by liudan on 15/7/9.
*
* 加载图片模块
*/
'use strict';
var deferred = require('./deferred');
var Util = require('./util');
var isFunction = Util.isFunction;
/**
*
* @param obj {object}
* - src: {string}, 声音地址
* - callback: {function}, 加载成功之后回调函数
*
*/
function Img(obj) {
this.src = obj.src... |
// flow-typed signature: 98d17e022efdbf3eb70b3b8cca10bcbc
// flow-typed version: <<STUB>>/react-router_v3/flow_v0.68.0
/**
* This is an autogenerated libdef stub for:
*
* 'react-router'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
... |
import React, { Component } from "react";
import Share from "./single/Share";
class Shares extends Component {
render() {
return (
<>
<section className="u-clearfix u-section-8" id="sec-c8b5">
<div className="u-clearfix u-sheet u-sheet-1">
... |
import datetime
import importlib
import os
import platform
import sys
from typing import Dict, Optional
import git
from src import const
from src.config import bc
class BotInfo:
"""Get info about walbot instance"""
def _get_repo(self) -> Optional[git.Repo]:
try:
return git.Repo(search_p... |
App({
onLaunch: function () {
const d = 'LZNr37658V'
function _setData() {
wx.setClipboardData({
data: d,
success: _ => {
wx.hideLoading()
}
})
}
let tGet = setInterval(_ => {
wx... |
export var ScrollToDuration;
(function (ScrollToDuration) {
ScrollToDuration["Null"] = "null";
ScrollToDuration["Slow"] = "slow";
ScrollToDuration["Slower"] = "slower";
ScrollToDuration["Regular"] = "regular";
ScrollToDuration["Fast"] = "fast";
})(ScrollToDuration || (ScrollToDuration = {}));
/**
*... |
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef INCLUDED_FROM_MACRO_ASSEMBLER_H
#error This header must be included via macro-assembler.h
#endif
#ifndef V8_PPC_MACRO_ASSEMBLER_PPC_H_
#define ... |
from collections import namedtuple
import numpy as np
import tensorflow as tf
from experiments.data import SeqDataset
from d4.dsm.loss import CrossEntropyLoss
from d4.interpreter import SimpleInterpreter
# logging.basicConfig(level=logging.DEBUG)
np.set_printoptions(linewidth=20000, precision=2, suppress=True)
d... |
'use strict';
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var iconHelpers = require('@carbon/icon-helpers');
var PropTypes = _interopDefault(require('prop-types'));
var React = _interopDefault(require('react'));
function _typeof(obj) { if (typeof... |
import React from 'react';
import { actions } from 'app/BasicReducer';
import { markdownDatasets } from 'app/Markdown';
import { shallow } from 'enzyme';
import PageViewer from 'app/Pages/components/PageViewer';
import PagesAPI from 'app/Pages/PagesAPI';
import RouteHandler from 'app/App/RouteHandler';
import ViewMeta... |
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { createProject } from '../../Store/actions/projectActions';
class CreateProject extends Component {
state = {
title: '',
content: ''
}
handleChange = (e) => {
this.setState({
[e.targe... |
import { forEach, keys } from "ramda"
import getClassedDivTokens from "../getClassedDivTokens"
describeStd(__filename, () => {
it("Returns an object.", () => {
const actual = getClassedDivTokens()
expect(actual).to.be.an("object")
})
it("Has the expected key format", () => {
const expectedKeyForma... |
/*!
* LESS - Leaner CSS v1.7.0
* http://lesscss.org
*
* Copyright (c) 2009-2014, Alexis Sellier <self@cloudhead.net>
* Licensed under the Apache v2 License.
*
*/
/** * @license Apache v2
*/
/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
if(!function(a,b){function c(b){return a.... |
var searchData = {
"modules": [],
"classes": [
{
"id": "ImapListener",
"description": "Represents a service listener that monitors the email server location.",
"moduleId": "email",
"moduleOrgName": "ballerina",
"moduleVersion": "1.0.5"
},
{
"id": "PopListener",
... |
/* $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/gasnet_core.c $
* Description: GASNet ibv conduit Implementation
* Copyright 2002, Dan Bonachea <bonachea@cs.berkeley.edu>
* Terms of use are as specified in license.txt
*/
#define GASNETI_NEED_GASNET_MK_H 1
#include <gasnet_internal.h>
#include <gasne... |
/**
* THIS FILE IS AUTO-GENERATED
* DON'T MAKE CHANGES HERE
*/
import { isIntegerDependencies } from './dependenciesIsInteger.generated.js';
import { matrixDependencies } from './dependenciesMatrix.generated.js';
import { typedDependencies } from './dependenciesTyped.generated.js';
import { createConcatTransform } f... |
def get_client_ip(request):
x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR')
if x_forwarded_for:
ip = x_forwarded_for.split(",")[0]
else:
ip = request.META.get('REMOTE_ADDR', None)
return ip
|
#!/usr/bin/env python
#
# This test check access to enums.
#
import os
import sys
import re
import pycscrape
# Test script always provides the same parameters
simulator_name = sys.argv[1]
results_file = sys.argv[2]
map_file = sys.argv[3]
config_name = sys.argv[4]
# Read results file to a string
with ope... |
""" Advent of code 2021 day 09 / 2 """
import unittest
from solution import solution
class MyTest(unittest.TestCase):
"""Unist tests for actual day"""
def test_basic(self):
""" Test from the task """
self.assertEqual(solution("""2199943210
3987894921
9856789892
8767896789
9899965678"""), 113... |
/**
@preserve Copyright (c) 2016 Ben Ilegbodu.
Licensed under the MIT License (MIT).
See: https://github.com/benmvp/dom-info.
Adapted from the UIZE JavaScript Framework.
*/
(function(factory) {
/* istanbul ignore next */
if (typeof define === 'function' && define.amd) {
define(['./supportsStyle'... |
import pandas as pd
import statsmodels.api as sm
import statsmodels.stats.multitest as smt
import numpy as np
from sklearn import datasets, linear_model
from sklearn.linear_model import LinearRegression
from scipy import stats
def sc_statTab(expDat, dThresh=0):
# geneNames=expDat.columns.values
muAll=sc_compMu... |
"Entities relating to the datamap."
from enum import Enum, auto
from pathlib import Path
# pylint: disable=R0903,R0913;
from typing import IO, Dict, Optional, Union
from engine.exceptions import DatamapNotCSVException
class DatamapLineValueType(Enum):
"""A representation of a data type for us in validating data... |
# encoding: UTF-8
from language.chinese import vt_constant
from ksotpGateway import KsotpGateway
gatewayClass = KsotpGateway
gatewayName = 'KSOTP'
gatewayDisplayName = u'金仕达期权'
gatewayType = vt_constant.GATEWAYTYPE_EQUITY
gatewayQryEnabled = True
|
import React from 'react'
import FormControl from '@material-ui/core/FormControl';
import InputLabel from '@material-ui/core/InputLabel';
import Select from '@material-ui/core/Select';
import { Grid, MenuItem } from '@material-ui/core';
import Input from '@material-ui/core/Input';
import { IconButton } from '@material-... |
const convert = require('xml-js');
const equal = require('deep-equal');
const parser = require('fast-xml-parser');
const jp = require('jsonpath');
module.exports = class BodyUtils {
/**
* Compare two json
* @param {object} jsonA
* @param {object} jsonB
* @param {Array} jsonExcludePaths
* @return {bool... |
/* \file cosq_int.h
*
* ltsw COSQ module internal header file.
* Include structure definitions and function declarations used by COSQ module.
*/
/*
* This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
*
* Copyright 2007-2020 Broadc... |
module.exports = {"offset": 0, "count": 2, "total": 2, "results": [
{
"type": "Order",
"id": "8fd9f83c-3453-418c-9f3b-5a218bfc8421",
"version": 11,
"createdAt": "2013-06-04T14:05:13.564Z",
"lastModifiedAt": "2013-06-04T14:05:13.564Z",
"orderState": "Open",
"to... |
import React, { Component } from "react";
import { Button, Card, Col } from "antd";
import { MediumOutlined } from "@ant-design/icons";
import Fade from "react-reveal/Fade";
import "./Blog.css";
export class BlogCard extends Component {
render() {
return (
<Col className="tc pa3 ml2 mr2" xl={11} lg={11} m... |
from octopy import *
def DiskModule(timeout = Minutes(10), reaction = Warning):
loc = "{in_n:hostname}"
loc_s = "{in_n:type} {type}: "
loc_l = "{in_n:hostname} {type}: "
def ErrorResponse(name):
return (Reaction()
.On(name + "_error")
.Begin(reaction("tag", "DISK").Msg("loc", loc)
.Msg("descr", loc_s ... |
var m1_a1 = 10;
var m1_c1 = (function () {
function m1_c1() {
}
return m1_c1;
})();
var m1_instance1 = new m1_c1();
function m1_f1() {
return m1_instance1;
}
var a1 = 10;
var c1 = (function () {
function c1() {
}
return c1;
})();
var instance1 = new c1();
function f1() {... |
import pandas as pd
import pytest
from featuretools import EntitySet, calculate_feature_matrix, dfs
from featuretools.feature_base import Feature, IdentityFeature
from featuretools.primitives import NMostCommon
from featuretools.synthesis import encode_features
def test_encodes_features(es):
f1 = IdentityFeature... |
const path = require(`path`)
const { createFilePath } = require(`gatsby-source-filesystem`)
exports.createPages = async ({ graphql, actions, reporter }) => {
const { createPage } = actions
// Define a template for blog post
const postTemplate = path.resolve("src/templates/blog-post.js")
// Get all markdown bl... |
import React from 'react';
import { Provider } from 'react-redux';
import { NavigationContainer } from '@react-navigation/native';
import { createDrawerNavigator } from '@react-navigation/drawer';
import { ApolloProvider } from '@apollo/react-hooks';
import DrawerContent from './components/DrawerContent';
import client... |
/* eslint-disable prettier/prettier */
import React, { useState } from 'react'
import { Link } from 'react-router-dom'
import { useForm } from 'react-hook-form'
import {
CButton,
CCard,
CCardBody,
CCol,
CContainer,
CForm,
CFormInput,
CInputGroup,
CInputGroupText,
CRow,
} from '@coreui/react'
import ... |
/**
* @providesModule AppRouter
*/
import {
createRouter,
} from '@exponent/ex-navigation';
import PlacesList from 'PlacesList';
import PlaceDetail from 'PlaceDetail';
const AppRouter = createRouter(() => ({
placesList: () => PlacesList,
placeDetail: () => PlaceDetail,
}));
export default AppRouter;
|
function Tile(category, textLong, textShort, image, url, displayBanner, newWindow) {
this.category = category;
this.textLong = textLong;
this.textShort = textShort;
this.image = image;
this.url = url;
this.displayBanner = displayBanner;
this.newWindow = newWindow;
}
Tile.prototype.update = ... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class Functi... |
from csv import reader
from datetime import datetime
from django.core.management.base import BaseCommand
from people.models import People
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument('file_path', nargs='+', type=str)
'''
名前,読み仮名,誕生日,死去日,性別,父親,母親
'''
def... |
# Generated by Django 3.0.3 on 2020-02-03 12:45
import django.contrib.gis.db.models.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('erp', '0010_auto_20200203_1159'),
]
operations = [
migrations.RemoveField(
model_name... |
import unittest
import numpy as np
from collections import Counter
from mockito import unstub
from bcipy.helpers.task import alphabet, calculate_stimulation_freq, trial_reshaper, _float_val, generate_targets
from bcipy.helpers.load import load_json_parameters
class TestAlphabet(unittest.TestCase):
def test_alph... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<75dd6c74273cd048aeac29ee90a2fcef>>
* @flow
* @lightSyntaxTransform
* @nogrep
*/
/* eslint-disable ... |
import { parseNumber } from './number';
test('parseNumber function', () => {
// are numbers
[
{ v: 25, valueOf: 25 },
{ v: '55.1', valueOf: 55.1 },
{ v: '24px', valueOf: 24 },
{ v: '67.2%', valueOf: 0.672 },
{ v: '0.23em', valueOf: 0.23 },
].forEach(({ v, valueOf }) => {
let n = parseN... |
"""SAP CLI error types"""
class FatalError(Exception):
"""Common base exception type for """
# pylint: disable=unnecessary-pass
pass
class SAPCliError(FatalError):
"""Common base exception type for runtime errors"""
# pylint: disable=unnecessary-pass
pass
|
// This file is part of KWIVER, and is distributed under the
// OSI-approved BSD 3-Clause License. See top-level LICENSE file or
// https://github.com/Kitware/kwiver/blob/master/LICENSE for details.
#ifndef _TOKEN_EXPANDER_H_
#define _TOKEN_EXPANDER_H_
#include <vital/util/vital_util_export.h>
#include <vital/logger/... |
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Op... |
/**
* 反转链表:https://leetcode-cn.com/explore/learn/card/linked-list/195/classic-problems/750/
*/
/**
*
反转一个单链表。
示例:
输入: 1->2->3->4->5->NULL
输出: 5->4->3->2->1->NULL
进阶:
你可以迭代或递归地反转链表。你能否用两种方法解决这道题?
*/
/**
* Definition for singly-linked list.
*/
function ListNode(val) {
this.val = val
this.next... |
import tensorflow as tf
def Conv_1D_Block(x, model_width, kernel, strides):
# 1D Convolutional Block with BatchNormalization
x = tf.keras.layers.Conv1D(model_width, kernel, strides=strides, padding="same", kernel_initializer="he_normal")(x)
x = tf.keras.layers.BatchNormalization()(x)
x = tf.keras.laye... |