text stringlengths 3 1.05M |
|---|
# flake8: noqa
from .errors import *
from .parameters import add_bearer_token
from .wrappers import BearerToken
from .validator import BearerTokenValidator
|
# -*- coding: utf-8 -*-
# This file is part of beets.
# Copyright 2017, Dorian Soergel.
#
# 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 t... |
'use strict';
var util = require( './util' );
var EventEmitter = require( 'events' ).EventEmitter;
/**
* Single channel on the server.
*
* @param {Object} data - Channel data.
* @param {MumbleClient} client - Mumble client that owns the channel.
*/
var Channel = function( data, client ) {
this.client = cli... |
import "./styleC.css";
import "./styleD.css";
|
# ***********************************************************
# Software License Agreement (BSD License)
#
# Copyright (c) 2009, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are me... |
import Twilio from "twilio";
import { getFormattedPhoneNumber } from "../../../lib/phone-format";
import {
Log,
Message,
PendingMessagePart,
r,
cacheableData
} from "../../models";
import { log, getConfig } from "../../../lib";
import { saveNewIncomingMessage } from "./message-sending";
// TWILIO error_codes... |
// Schemas
const ImmunizationSchema = require('../../schemas/immunization.schema.js');
const OperationOutcome = require('../../inputs/operationoutcome.input.js');
// Inputs
const ImmunizationInput = require('../../inputs/immunization.input.js');
// Scalars
const idScalar = require('../../scalars/id.scalar.js');
// G... |
'''
Created on 2017/03/01
@author: sakurai
'''
from importlib import import_module
from io import StringIO
from subprocess import check_output
import sys
from unittest import main
from unittest import mock
from unittest import skipIf
from unittest import TestCase
from unittest import TestLoader
from python_wrap_cases... |
#!/usr/bin/env python
# Programmer: Chris Bunch (chris@appscale.com)
# Adapted from Hiranya's version
# General-purpose Python library imports
import json
import re
import socket
import signal
import ssl
import time
# Third-party imports
import SOAPpy
# AppScale-specific imports
from appscale_logger import AppSca... |
import pyautogui as pg
import time
name=input('Enter Name ')
x,y=pg.position()
print(x,y)
pg.moveTo(1224,1035)
pg.click()
pg.moveTo(274,175)
pg.click()
pg.write(name)
time.sleep(1)
pg.moveTo(280,359)
pg.click()
pg.moveTo(924,964)
pg.click()
pg.write("Hi am Bot \n")
pg.press('enter') |
#include <stdint.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <openssl/evp.h>
#include "inc.h"
#include "tcpcrypt_ctl.h"
#include "tcpcrypt.h"
#include "tcpcryptd.h"
#include "crypto.h"
#include "profile.h"
#define BLEN 16
struct a... |
// Nynorsk [nn]
import dayjs from 'dayjs';
var locale = {
name: 'nn',
weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
weekdaysShort: 'sun_mån_tys_ons_tor_fre_lau'.split('_'),
weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),
months: 'januar_februar_mars_april_mai_juni_juli_august_sept... |
/**
* RECICLA2
* Archivo .js básico para llamar a esdoc.
*
* @author Pablo Pizarro R. @ppizarror.com
* @license Copyright 2018, no copiar o distribuír sin permiso directo del autor.
*/
console.log(''); |
/**
* Shopware 5
* Copyright (c) shopware AG
*
* According to our dual licensing model, this program can be used either
* under the terms of the GNU Affero General Public License, version 3,
* or under a proprietary license.
*
* The texts of the GNU Affero General Public License with an additional
* permission... |
import copy
import json
import logging
import os
import sys
import time
from collections import defaultdict
import numpy as np
import tensorflow as tf
from sklearn import decomposition
from .. import dp_logging
from . import labeler_utils
from .base_model import AutoSubRegistrationMeta, BaseModel, BaseTrainableModel
... |
/* permutation/gsl_permute_complex_float.h
*
* Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough
*
* 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; either version 3 of the Lice... |
/**
*
* @license
*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
/**
* @fileoverview This file defines a function to return the filters
* part of the action dictionary associated with a template.
* associated with a subtemplate
*/
import getIndicesForSpan from "../../../helperFunctions/getIndicesForS... |
var searchData=
[
['links',['links',['../struct_workflow.html#a40430270efdafdef58cb5f500f713015',1,'Workflow']]]
];
|
var choose_country = (function() {
var currentCountryCode = null;
var currentCountryName = null;
var listHeaders = "abcdefghijklmnopqrstuvwxyz";
var countrySelectedRecently = false;
var allCountries = {};
$(document).on("choose-country", function(event, data) {
if (data.header == "showList") {
allCountries = dat... |
// nls expects double quotes
/*eslint quotes:[2, 'double'] */
define({
"mediaPicker": {
"browseToggle": {
"urls": "Link zu Inhalten",
"urls_short": "Link",
"contentType": {
"error": "Keine autorisierten Daten.",
"imageOnly": "In diesem Teil der Story können Sie ein Bild ... |
import torch
import torch.nn as nn
from torch.nn.modules.conv import Conv3d
class ConvModel(nn.Module):
def __init__(self, in_channels, num_classes):
super(ConvModel, self).__init__()
# conv3d (N, C, D, H, W)
self.conv1 = nn.Conv3d(in_channels=in_channels, out_channels=64, kernel_size=7, pa... |
import { benchSettings } from 'karma-webpack-bundle';
import { clone } from '../index.js';
suite('clone', () => {
let sandbox = '';
const extra = {
'foo': 'bar'
};
benchmark('main', () => {
clone({
'test1': new Date('1/2/2001'),
'test2': /asdf/,
'test3': [
new Date('1/2/2001'),
/asdf/,
3... |
/** Created by guangqiang on 2018-09-27 17:32:35 */
import { postFetch, getFetch } from '@/network/request/HttpExtension'
import { API_URL, APP_ID } from '@/constants/hostConfig'
const state = {
userInfo: {}
}
const mutations = {
changeUserInfoMut(state, info) {
getApp().globalData.userInfo = info;
state.... |
import React from 'react'
import { View, Text } from 'react-native'
const UsuarioInscricoes = () => {
return (
<View>
<Text>Inscrições</Text>
</View>
)
}
export default UsuarioInscricoes
|
/**
* Created by covaciu on 10/27/2016.
*/
var api = require('./util/api.js');
var Constants = require('./util/constants.js');
var Utils = require('./util/utils.js');
var UcmdbId = require('./ucmdbId.js');
exports.calculateImpact = function (globalId, severity, bundles, sendCallback, replyCallback) {
globalId = g... |
// Copyright (c) 2019 ml5
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
let video;
let poseNet;
let poses = [];
let people = [];
let scale = 8
let t1 = {}
let PoseNetOptions ={
architecture: 'MobileNetV1',
imageScaleFactor: 0.1,
outputStride: 16,
flipH... |
#coding=utf-8
__author__ = 'Administrator'
from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from django.forms import ModelForm
from survey.models import UserProfile
class RegistrationForm(UserCreationForm):
username = forms.CharFie... |
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# =========================================================================== #
# Project : Data Studio #
# Version : 0.1.0 #
# File : test_dispersion_tests.... |
/*eslint-disable*/
import http from "./http-common";
class FileUploadService {
upload(file, onUploadProgress) {
let formData = new FormData();
formData.append("file", file);
return http.post("/upload", formData, {
headers: {
"Content-Type": "multipart/form-data... |
import serial # pyserial moudule
import time
RED_value, GREEN_value, Blue_Value = 0, 0, 0 # default
# empty list for colors thold held
RGB_List = []
# Setting up Arduino in order to communicate with python
Arduino = serial.Serial(port="COM3", baudrate=9600)
time.sleep(1) # proivding time to arduino to setup communc... |
/*****************************************************************************/
/* HOSTCLOSE.C v2.2.1 */
/* */
/* Copyright (c) 2017-2017 Texas Instruments Incorporated */
... |
import Vue from 'vue'
import Meta from 'vue-meta'
import { createRouter } from './router.js'
import NoSsr from './components/no-ssr.js'
import NuxtChild from './components/nuxt-child.js'
import NuxtError from './components/nuxt-error.vue'
import Nuxt from './components/nuxt.js'
import App from './App.js'
import { setCo... |
const express = require("express");
const path = require("path");
// 调用函数创造服务器
const app = express();
// app.get("/", (req,res) => {
// res.sendFile(path.join(__dirname, "./index.html"));
// })
app.get("/movie", (req,res) => {
res.sendFile( "./movie.html", {root:__dirname})
})
app.listen(3000, () => {
co... |
// Automatically generated file, do not edit.
#pragma once
inline constexpr uint8_t Player_Captured_05[] = {
0x10,0x10,
0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,
0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,
0x44,0x44,0x44,0x44,0x44,0x98,0x88,0x44,
0x44,0x44,0x44,0x44,0x44,0x44,0x86,0x66,
0x44,0x44,0x44,0x98,0x86,0x46,0x66... |
const DrawCard = require('../../../drawcard.js');
class SerBarristanSelmy extends DrawCard {
setupCardAbilities(ability) {
this.interrupt({
canCancel: true,
when: {
onCharactersKilled: event => event.allowSave
},
target: {
acti... |
from datetime import datetime
from . import format, get
from .tweet import Tweet
from .user import User
from .storage import db, elasticsearch, write, panda
import logging as logme
follows_list = []
tweets_list = []
users_list = []
author_list = {''}
author_list.pop()
# used by Pandas
_follows_object = {}
def _f... |
/****************************************************************************
* arch/risc-v/include/gap8/chip.h
* Gapuino chip features
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: hhuysqt <1020988872@qq.com>
*
* Redistribution and use in source and binary forms, with or without
* mod... |
/*
* This header is generated by classdump-dyld 1.5
* on Wednesday, October 27, 2021 at 3:17:15 PM Mountain Standard Time
* Operating System: Version 13.5.1 (Build 17F80)
* Image Source: /System/Library/PrivateFrameworks/Account... |
import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { MessageDialog, Icon } from 'patternfly-react'
import style from './sharedStyle.css'
import { withMsg } from '_/intl'
import { logout } from '_/actions'
const TIME_TO_DISPLAY_MODAL = 30 // 30 seconds
class Ses... |
import numpy as np
from pytorch_classification.utils import Bar, AverageMeter
import time
#from conhex import design
#import conhex.ConHexPlayers
#import pygame
class Arena():
"""
An Arena class where any 2 agents can be pit against each other.
"""
def __init__(self, player1, player2, game, display=N... |
const { Wallets , Gateway } = require('fabric-network');
const fs = require('fs');
const path = require('path');
const callFabric = async( transaction_name , args ) => {
const gateway = new Gateway();
try{
const connectionProfileJson = (await fs.promises.readFile(path.join(__dirname,'..','credentia... |
# -*- coding: utf-8 -*-
'''
Routines to set up a minion
'''
# Import python libs
from __future__ import absolute_import, print_function, with_statement
import os
import re
import sys
import copy
import time
import types
import signal
import random
import fnmatch
import logging
import threading
import traceback
import c... |
const app = getApp();
Page({
data: {
data_bottom_line_status: false,
data_list_loding_status: 1,
data_list_loding_msg: '',
data_list: [],
data_default: null,
data_base: null,
},
onShow() {
// 数据加载
this.init();
},
// 获取数据
init() {
this.get_data_list();
},
// 获取数据
... |
import productionEnum from '../../productionEnum.macro'
export const MenuKeyDownArrowDown = productionEnum(
'__menu_keydown_arrow_down__',
)
export const MenuKeyDownArrowUp = productionEnum('__menu_keydown_arrow_up__')
export const MenuKeyDownEscape = productionEnum('__menu_keydown_escape__')
export const MenuKeyDow... |
/**
* This code is mostly from the old Etherpad. Please help us to comment this code.
* This helps other people to understand this code better and helps them to improve it.
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
*/
/**
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0... |
var bkg = chrome.extension.getBackgroundPage;
function setProxySwitch(v){
chrome.storage.sync.set({ 'switch_proxy': v });
$('#proxy-switch').attr('class', `fa fa-toggle-${v ? 'on' : 'off'}`);
}
function proxy_setup(config){
if(config['proxy_mode']){
$('#proxy_mode').val(config['proxy_mode']);
}
$('#pr... |
#!/usr/bin/env python
from regress import *
from loaddata import *
from util import *
def calc_qhl_daily(daily_df, horizon):
print "Caculating daily qhl..."
result_df = filter_expandable(daily_df)
print "Calculating qhl0..."
result_df['qhl0'] = result_df['close'] / np.sqrt(result_df['qhigh'] * resul... |
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... |
from qurro.tests.testing_utilities import run_integration_test
def test_dropping_features():
"""Tests that Qurro raises an error when > 0 feature(s) are unsupported."""
# Test that dropping 1 feature produces an error
run_integration_test(
"matching_test",
"matching_test/dropped_feature",... |
import torch.nn.functional as F
def symmetric_kl_div(logits_P, logits_Q, reduction='batchmean'):
log_P = F.log_softmax(logits_P, dim=1)
log_Q = F.log_softmax(logits_Q, dim=1)
kl_PQ = F.kl_div(log_P, log_Q, log_target=True, reduction=reduction)
kl_QP = F.kl_div(log_Q, log_P, log_target=True, reduction=r... |
/*
Name: UI Elements / Widgets - Examples
Written by: Okler Themes - (http://www.okler.net)
Theme Version: 1.0.0
*/
(function($) {
'use strict';
$(function() {
/*
Flot
*/
var plot = $.plot('#flotWidgetsSales1', flotWidgetsSales1Data, {
series: {
lines: {
show: true,
lineWidth: 2
... |
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkImage_Gpu_DEFINED
#define SkImage_Gpu_DEFINED
#include "src/core/SkImagePriv.h"
#include "src/gpu/GrGpuResourcePriv.h"
#include "src/gpu/GrSurfaceProxyPriv.h"
#incl... |
from __future__ import print_function
import glob
import os
import shutil
import sys
import time
import cv2
import numpy as np
import tensorflow as tf
from tensorflow.python.platform import gfile
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
sys.path.append(os.getcwd())
from lib.fast_rcnn.config import cfg, cfg_from_file... |
import React from 'react';
import styled from 'styled-components';
import * as Mixins from '../Mixins';
import * as t from '../Typography';
import Layout, { Content } from '../components/Layout';
import { HireMe, LinkButton } from '../components/Button.js';
import HireMePopup from '../components/HireMePopup.js';
import... |
/*!
* Benchmark.js <https://benchmarkjs.com/>
* Copyright 2010-2016 Mathias Bynens <https://mths.be/>
* Based on JSLitmus.js, copyright Robert Kieffer <http://broofa.com/>
* Modified by John-David Dalton <http://allyoucanleet.com/>
* Available under MIT license <https://mths.be/mit>
*/
;(function() {
'use stric... |
class Node(object):
def __init__(self, val, _next=None):
self.val = val
self._next = _next
def __str__(self):
return f'{self.val}'
def __repr__(self):
return f'<Node | Val: {self.val} | Next: {self._next}>'
|
#!/usr/bin/env python3
# encoding: utf-8
# Copyright 2017 Johns Hopkins University (Shinji Watanabe)
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
import configargparse
import logging
import os
import random
import sys
import numpy as np
from espnet.utils.cli_utils import strtobool
# NOTE: you need... |
try:
from cbapi.legacy.util.cli_helpers import main_helper
from cbapi.legacy.util.live_response_helpers import LiveResponseHelper
except ImportError:
from cbapi.util.cli_helpers import main_helper
from cbapi.util.live_response_helpers import LiveResponseHelper
def main(cb, args):
lfile = args.get('... |
import json
from lib import node
from lib.generator import predicate_function
from lib.generator import predicate_function_declaration
with open("json/osmanya.json", "r") as stream:
data = json.load(stream)
nd = node.RootNode()
for dat in data:
nd.extend(dat, True)
with open("dist/is_osmanya_unicos.h", "w") a... |
// Copyright 2016 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 CC_TREES_EFFECT_NODE_H_
#define CC_TREES_EFFECT_NODE_H_
#include "cc/cc_export.h"
#include "cc/paint/element_id.h"
#include "cc/paint/filter_oper... |
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtNetwork module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid comme... |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
from cryptography import utils
from cryptography.exceptions import (
... |
#!/usr/bin/python
import sys, subprocess
import cgi, cgitb
from buildLesson import buildLesson
cgitb.enable(display=True)
print 'Content-Type:text/html\n\n'
log = open('/tmp/logb','w')
form = cgi.FieldStorage()
pth = form.getfirst('activity', default="")
buildLesson(pth)
|
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-interactions-events/input.production.min.js');
} else {
module.exports = require('./cjs/react-interactions-events/input.development.js');
}
|
'use strict';
const fixer = require('../functionCommaSpaceFix');
const functionCommaSpaceChecker = require('../functionCommaSpaceChecker');
const ruleMessages = require('../../utils/ruleMessages');
const validateOptions = require('../../utils/validateOptions');
const whitespaceChecker = require('../../utils/whitespace... |
'use strict';
/* @jsig */
var builtinTypes = [
'String',
'Number',
'Object',
'void',
'Boolean',
'Array',
'Function',
'RegExp',
'Date',
'Symbol',
'Mixed',
'Never',
'%Object%%Empty',
'%InternalFunction%%FnCall',
'%InternalFunction%%FnApply',
'%InternalFunc... |
#pragma once
#include "vec3.h"
#include "meterial.h"
class Surface
{
protected:
Vec3<double> pos;
public:
int meterial;
Surface(Vec3<double> pos = Vec3<double>(0, 0, 0), int meterial = 0);
~Surface();
virtual void intersect(const Vec3<double>& start, const Vec3<double>& dir, double t0, double t1, dou... |
# See PEP 440 https://www.python.org/dev/peps/pep-0440/
__version__ = VERSION = '0.2.4' # pragma: no cover
|
import FWCore.ParameterSet.Config as cms
positiveCombinedSecondaryVertexV2BJetTags = cms.EDProducer("JetTagProducer",
jetTagComputer = cms.string('positiveCombinedSecondaryVertexV2Computer'),
tagInfos = cms.VInputTag(cms.InputTag("impactParameterTagInfos"),
cms.InputTag("secondaryVertexTagI... |
// Enables setting runtime args via the query string (as long as this is run in the main browser thread and not in a worker)
let stdinInput = false;
if (
typeof window !== "undefined" &&
window.location &&
window.location.search
) {
const urlParams = new URLSearchParams(window.location.search);
if (urlParams.... |
jQuery(document).ready(function($) {
//ha esta pagina se proviene de /ver/clientes por lo tanto se asume que
//se tiene un cookie con los perfiles a editar
//borrar el id correspondiente a esta pagina
var registros = readCookie("registros");
var actual = window.location.pathname.split("/");
ac... |
/* eslint-disable no-unused-vars */
/* eslint-disable react/jsx-no-undef */
/* eslint-disable no-undef */
class CoinWrapperOpenOrder extends React.Component {
render() {
const { symbolInfo } = this.props;
if (symbolInfo.openOrder.type === null) {
return null;
}
if (symbolInfo.openOrder.type) {... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _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]; } } }... |
def get_line_intersection( p0_x, p0_y, p1_x, p1_y,
p2_x, p2_y, p3_x, p3_y):
s1_x = p1_x - p0_x
s1_y = p1_y - p0_y
s2_x = p3_x - p2_x
s2_y = p3_y - p2_y
if((-s2_x * s1_y + s1_x * s2_y) == 0):
return 0,0
else:
s = (-s1_y * (p0_x - p2_x) + s1_x * (p0_y - p2... |
const bucket = {
initialize: function() {
ajax();
browser_alert();
checkbox();
setting();
card_wrap();
bucket.set.nav();
scroll_smooth();
filter();
columns();
title_tooltip();
bucket.set.contextmenu();
coloring();
check_setting();
bucket.set.img();
},
set: {... |
# Generated by Django 2.1.1 on 2020-01-27 20:05
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('MyProjects', '0001_initial'),
]
operations = [
migrations.RenameModel(
old_name='Project',
new_name='MyProject',
),
... |
# Class for generating random user information
# Imports
# ----------------------------------------------------------------
from urllib import request, error
from urllib.parse import urlencode
import json
import time
import re
# Global Variables
# ----------------------------------------------------------------
# Py... |
/*-------------------------------------------------------------------------
*
* pg_shdepend.c
* routines to support manipulation of the pg_shdepend relation
*
* Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* I... |
/*
* Copyright 2014-2015 Fabian Tollenaar <fabian@starting-point.nl>
*
* 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 requi... |
"""
Dynamically build the rst documentation with the script help text.
"""
import os
import time
import importlib
from pkg_resources import resource_filename
from producer.scripts import script_classes
#-----------------------------------------------------------------------------
def write_help(script_cls, opath, ... |
# coding=utf-8
"""
This class collects data on memory utilization
Note that MemFree may report no memory free. This may not actually be the case,
as memory is allocated to Buffers and Cache as well. See
[this link](http://www.linuxatemyram.com/) for more details.
#### Dependencies
* /proc/meminfo or psutil
"""
im... |
import numpy as np
import pyviz3d.visualizer as viz
def main():
# First, we set up a visualizer
v = viz.Visualizer()
# Random point clouds.
for j in range(5):
i = j + 1
name = 'Points_'+str(i)
num_points = 3
point_positions = np.random.random(size=[num_points, 3])
... |
import service from '@/utils/request'
// @Tags ExaExampleTest
// @Summary 创建ExaExampleTest
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ExaExampleTest true "创建ExaExampleTest"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Rout... |
r"""Test of the RANS solver
This module tests the two-equation :math:`k-\varepsilon` solver,
:class:`~psdns.equations.navier_stokes.KEpsilon`.
"""
import numpy
from numpy import testing as nptest
from mpi4py import MPI
from psdns import *
from psdns.equations.navier_stokes import KEpsilon
class ShearLayer(KEpsilon... |
import sys
import math
from collections import defaultdict, deque
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
INF = float('inf')
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
N, M = na()
print((100 * (N - M) + (1900 * M)) * (1 << M)) |
import React from "react"
import PropTypes from "prop-types"
const Item = ({ type, value }) => {
const socialText = {
github: "GitHub",
instagram: "Instagram",
twitter: "Twitter",
medium: "Medium",
facebook: "Facebook",
linkedin: "LinkedIn",
}
return (
value && (
<a
hre... |
import pandas as pd
from pandas import Series,DataFrame
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
iris_df=pd.read_csv('iris.csv')
print('---DataFrame---')
print(iris_df)
print('---info---')
iris_df.info()
print('---Functions---')
print(iris_df[['Species','Petal.Width']].groupby(['Species'... |
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
this file is part of rcssserver3D
Fri May 9 2003
Copyright (C) 2002,2003 Koblenz University
Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group
$Id$
This program is free software; you can redistribute it and/or modify
it und... |
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0
import ast
import importlib
import logging
import logging.config
import os
import sys
from typing import Any, Dict # noqa: F401
from flasgger import Swagger
from flask import Blueprint, Flask
from flask_cors import CORS
from flas... |
def insertionSort1(n, arr):
to_insert = arr[-1]
i = n - 2
while i >= 0:
if arr[i] <= to_insert:
arr[i+1] = to_insert
break
else:
arr[i+1] = arr[i]
i -= 1
else:
arr[i+1] = to_insert
return arr
def insertionSort2(n, arr):
if n... |
###########################################################################################
# #
# Evaluator class: Implements the most popular metrics for object detection #
# ... |
//===--- EecsEnumValueCapsCheck.h - clang-tidy-------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[80],{nGaW:function(e,t,n){"use strict";n.r(t),n.d(t,"KEYBOARD_DID_CLOSE",function(){return o}),n.d(t,"KEYBOARD_DID_OPEN",function(){return i}),n.d(t,"copyVisualViewport",function(){return l}),n.d(t,"keyboardDidClose",function(){return b}),n.d(t,"keyboardDidOpen",func... |
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... |
/*
* Copyright (C) 1998
* Chair of Process Control Engineering,
* D-52056 Aachen, Germany.
* All rights reserved.
*
*
* This file is part of the ACPLT/OV Package
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You ma... |
/* deflate.h -- internal compression state
* Copyright (C) 1995-2012 Jean-loup Gailly
* For conditions of distribution and use, see copyright notice in zlib.h
*/
#ifdef BUILDSYSTEM_ENABLE_ZLIB_SUPPORT
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression... |
# -*- coding: UTF-8 -*-
# baselineTeam.py
# ---------------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a li... |
import pytest
from vsdx import VisioFile
from datetime import datetime
import os
def test_file_closure():
filename = 'test1.vsdx'
directory = f"./{filename.rsplit('.', 1)[0]}"
with VisioFile(filename) as vis:
# confirm directory exists
assert os.path.exists(directory)
# confirm directo... |
"""
There are people sitting in a circular fashion,
print every third member while removing them,
the next counter starts immediately after the member is removed.
Print till all the members are exhausted.
For example:
Input: consider 123456789 members sitting in a circular fashion,
Output: 369485271
"""
def josephus... |
import Modal from 'react-modal';
import { useState } from 'react';
import parse from 'html-react-parser';
import { FaUserCircle, FaWindowClose } from "react-icons/fa";
Modal.setAppElement('body')
export default function MangaCard({ manga }) {
const [modalIsOpen, setIsOpen] = useState(false);
const [titleShown... |