text
stringlengths
3
1.05M
// Copyright 2020 the deepx authors. // Author: Yafei Zhang (kimmyzhang@tencent.com) // Author: Chunchen Su (hillsu@tencent.com) // Author: Shuting Guo (tinkleguo@tencent.com) // #pragma once #include <deepx_core/graph/graph.h> #include <deepx_core/graph/tensor_map.h> #include <deepx_core/tensor/data_type.h> #include ...
import React from "react"; import { TouchableOpacity, Image } from "react-native"; import { Images } from "../../assets"; const NavDrawerButton = ({ onPress }) => ( <TouchableOpacity onPress={onPress}> <Image style={styles.imageStyle} source={Images.navDrawerIcon} /> </TouchableOpacity> ); con...
/* Copyright 2013 Roy Russo 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 di...
#ifndef INCLUDE_FLAMEGPU_RUNTIME_MESSAGING_MESSAGESPECIALISATIONHANDLER_H_ #define INCLUDE_FLAMEGPU_RUNTIME_MESSAGING_MESSAGESPECIALISATIONHANDLER_H_ namespace flamegpu { class CUDAScatter; /** * Interface for message specialisation * A derived implementation of this is required for each combination of message type...
const sendMail = require("./email"); const dotenv = require("dotenv"); dotenv.config(); function sendContactForm(name, email, message) { const data = { to: email, cc: process.env.GOOGLE_EMAIL_ADDRESS, subject: `[Form submit] ${name}`, text: `New form submit: \nName: ${name} \nEmail: ${email} \nMessag...
from hypergan.gans.base_gan import BaseGAN from examples.common import * from hyperchamber import Config from hypergan.discriminators import * from hypergan.distributions import * from hypergan.gan_component import ValidationException, GANComponent from hypergan.generators import * from hypergan.inputs import * from hy...
(function(d){d['zh']=Object.assign(d['zh']||{},{a:"塊引用",b:"插入圖片或檔案",c:"選取標題",d:"標題",e:"增加縮排",f:"減少縮排",g:"連結",h:"有編號的清單",i:"項目符號清單",j:"黃色標記",k:"綠色標記",l:"粉色標記",m:"藍色標記",n:"紅色筆",o:"綠色筆",p:"清除高亮",q:"高亮",r:"Text highlight toolbar",s:"Horizontal line",t:"粗體",u:"斜體",v:"前景顏色",w:"字體顏色",x:"字體大小",y:"預設",z:"特小",aa:"小",ab:"大",ac:"特...
''' This is the default app controller for portality. For inclusion in your own project you should make your own version of this controller and include the views you require, as well as writing new ones. Of course, views must also be backed up by models, so have a look at the example models and use them / write new o...
/* * Copyright (C) 2014 Ho Chi Minh city University of Technology (HCMUT) * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @ingroup examples * @{ * * @file * @brief Som...
""" Arithmetic operations for PandasObjects This is not a public API. """ # necessary to enforce truediv in Python 2.X from __future__ import division import datetime import operator import textwrap import warnings import numpy as np from pandas._libs import algos as libalgos, lib, ops as libops import pandas.compa...
"use strict"; exports.default = void 0; var _init_mobile_viewport = require("./init_mobile_viewport/init_mobile_viewport"); var _default = _init_mobile_viewport.initMobileViewport; exports.default = _default; module.exports = exports.default; module.exports.default = exports.default;
import json from flask import Flask,render_template import time import tweepy from textblob import TextBlob import pandas as pd import numpy as np import sys ###API AUTHORIZATION### consumer_key="Ee0lw604kCAuzTbFp3pcn5lck" consumer_secret="uuedTNbrDhmhsI8QBeOeCcEaOxtoe4nXDPDcRd8XkLF67yzjQ1" access_token="857652506079...
#!/usr/bin/env python2 """ Upload dependency track xml report to dependency track """ from __future__ import print_function from ddtrack_api import ddtrack import argparse import base64 import time def ddtrack_connection(host, api_key, proxy, debug=False): #Optionally, specify a proxy proxies = None if ...
'use strict'; const Fabric = require('@fabric/core'); /** * Generic interface for collections of digital objects. * @param {Object} definition Initial parameters * @constructor */ class Resource extends Fabric.Resource { constructor (definition = {}) { super(definition); this.components = {}; ...
from src.controllers.general_case_controllers.daily_record_controller import DailyRecordById, DailyRecordByUserId def add_daily_record_resource(api): api.add_resource(DailyRecordByUserId, "/user/<userId>/daily_record") api.add_resource(DailyRecordById, "/user/<userId>/daily_record/<_id>")
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'MainWindow.ui' # # Created by: PyQt5 UI code generator 5.12.3 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_mainWindow(object): def setupUi(self, mainWindow): mai...
$('div.col-content').filter(function() { return $.trim($(this).html()) === '' }).remove() //Add custom colours tp columns $('div').each(function(){ if($(this).hasClass('white')) { $(this).parent('div').addClass("col-white"); } }); $('div').each(function(){ if($(this).hasClass('light-g...
'use strict'; var _gulp = require('gulp'); var _gulp2 = _interopRequireDefault(_gulp); var _ = require('./../'); var _2 = _interopRequireDefault(_); var _runSequence = require('run-sequence'); var _runSequence2 = _interopRequireDefault(_runSequence); function _interopRequireDefault(obj) { return obj && obj.__esM...
#!/usr/bin/env python import evdev import evdev.ecodes as ec import itertools import collections import logging import os import threading import time class PS3Controller(threading.Thread): PS3_VENDOR = 0x054c PS3_PRODUCT = 0x0268 class c(object): ANALOG_LEFT_X = ec.ABS_X ANALOG_LEFT_Y =...
(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{364:function(A,s){A.exports="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj...
module.exports = function( grunt ) { grunt.initConfig({ component_build: { build: { output: './dist/', name: 'bside', styles: false, scripts: true, verbose: true } }, jshint: { ...
#!/usr/bin/python3.7 """ ** Copyright 2020 Centreon ** ** This file is part of Centreon Engine. ** ** Centreon Engine is free software: you can redistribute it and/or ** modify it under the terms of the GNU General Public License version 2 ** as published by the Free Software Foundation. ** ** Centreon Engine is distri...
import asyncio import discord from discord import NotFound from discord.ext import commands from Util import Emoji, MessageUtils yesID = 465582004260569088 noID = 465582003874693130 yes = None no = None async def confirm(ctx: commands.Context, text, timeout=30, on_yes=None, on_no=None, delete=True, confirm_cance...
from django.shortcuts import render, redirect from django.contrib.auth.decorators import * from django.http import HttpResponseBadRequest from django.contrib.auth.models import User from .models import * from django.db.models import Q from django.core.paginator import Paginator # Create your views here. @login_require...
import json import logging import os from contextlib import contextmanager import backoff from botocore.exceptions import ClientError from boto3_fixtures.contrib import mindictive def batch(iterable, n=1): """Batch iterator. https://stackoverflow.com/a/8290508 """ iter_len = len(iterable) for ...
import dash from dash import dcc, html from dash.dependencies import Input, Output import dash_bootstrap_components as dbc import flask server = flask.Flask(__name__) app = dash.Dash(__name__, server=server, external_stylesheets=[dbc.themes.BOOTSTRAP]) app.config.suppress_callback_exceptions = True app.layout = html...
#!/usr/bin/env python """A module with the implementation of the flow listing named pipes.""" import logging import re from typing import Dict from typing import Optional from grr_response_core.lib.rdfvalues import client as rdf_client from grr_response_core.lib.rdfvalues import structs as rdf_structs from grr_respons...
$Page.define('codes.xfly.examples.page.with.args', { onCreateView: function() { /* Tip: Easy way to get the query string */ var args = this.getArgs(); this.render( { html: template( 'codes/xfly/examples/header.tpl' )() } ); $('.xfly-example-inner').html( '<h1>Got t...
""" show_boot.py AireOS parser for the following command: * 'show boot' """ # Python import re import logging # Metaparser from genie.metaparser import MetaParser from genie.metaparser.util.schemaengine import (Any, Optional, Use, SchemaTypeError, Schema) log = logging.getLogger(__name__) class ShowBo...
import display import controls import time import logging logging.basicConfig(level=logging.INFO) is_init = False def init(): display.init() controls.io_code.subscribe( on_next=lambda i: display.write(i[0].name), ) # Loop to keep script running global is_init is_init = True whi...
#ifndef __HAL_LMAC_PS_COMMON_H__ #define __HAL_LMAC_PS_COMMON_H__ #include "nrc_ps_api.h" #define SET_PS_SLEEP_MODE(variable, value) \ do { \ variable &= ~(0x03); \ variable |= value & 0x03; \ } while(0); #define GET_PS_SLEEP_MODE(variable) \ (variable & 0x03) #define SET_PS_TIM_MODE(variable,...
/* * This header is generated by classdump-dyld 1.0 * on Saturday, June 1, 2019 at 6:46:38 PM Mountain Standard Time * Operating System: Version 12.1.1 (Build 16C5050a) * Image Source: /System/Library/PrivateFrameworks/AppPredictionInternal.framework/AppPredictionInternal * classdump-dyld is licensed under GPLv3, Copyr...
# Made by Emperorc import sys from com.l2jserver.gameserver.model.quest import State from com.l2jserver.gameserver.model.quest import QuestState from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest qn = "66_CertifiedArbalester" #NPCs Rindy = 32201 Clayton = 30464 Poitan = 30458 Holvas = 30058...
import { getFunctionCallRoute } from "../../internal/net/StitchRoutes"; var StitchServiceRoutes = (function () { function StitchServiceRoutes(clientAppId) { this.clientAppId = clientAppId; this.functionCallRoute = getFunctionCallRoute(clientAppId); } return StitchServiceRoutes; }()); export ...
with open("main.py", "r") as file: data = file.readlines() f = open("temp.temp") mainServerAddr = f.read() f.close() os.remove("temp.temp") data[57] = 'mainServerAddr = ("' + mainServerAddr + ')' with open("main.py", "r") as file: file.writelines(data)
import argparse import datetime import json import logging import re from pathlib import Path from tqdm import tqdm # Estimated from 2010-2020: # Of the 100 most commonly appearing "titles" in the data, we collect speeches given by # members of congress (i.e., that have a bioguide_id). We manually inspect the 50 with...
# Copyright 2020 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...
# -*- coding: utf8 -*- # Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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...
// // TNLHTTPHeaderProvider.h // TwitterNetworkLayer // // Created on 4/13/15. // Copyright © 2020 Twitter. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @protocol TNLRequest; /** Use this protocol to provide accessors to default and/or override HTTP header fields applied to...
#!/usr/bin/env python # -*- encoding: utf-8 -*- """ @File : 31_text_txt.py @Time : 2019/12/2217:20 @Author : Crisimple @Github : https://crisimple.github.io/ @Contact : Crisimple@foxmail.com @License : (C)Copyright 2017-2019, Micro-Circle @Desc : None """ import os import sys BASE_DIR = os.pa...
__author__ = 'davigar' from DevIoTGateway.sensor import * from DevIoTGateway.config import config from DevIoTGatewayPi.sensorlogic import SensorLogic from logic.grovepioperator import GrovePiOperator rotary = Sensor('rotary', 'rotary_1', 'RRotary') value_property = SProperty('angle', 0, [0, 100], 0) rotary.add_pro...
/** * @file mac_msg_types.h * * @brief This file defines all message structures for the MAC. * * * Copyright (c) 2013-2015 Atmel Corporation. All rights reserved. * * \asf_license_start * * \page License * * Redistribution and use in source and binary forms, with or without * modification, are permitted pr...
# coding: utf-8 """ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ ...
from bs4 import BeautifulSoup from django.test import TestCase, override_settings from wagtail import VERSION as WAGTAIL_VERSION if WAGTAIL_VERSION >= (2, 0): from wagtail.core.models import Site else: from wagtail.wagtailcore.models import Site from wagtailmenus.errors import SubMenuUsageError from wagtailmenu...
import React from 'react' export default ({ className }) => { return ( <svg className={className.concat(' logo')} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 231.8 250" > <path d="M128.3,208c-45.8,0-83.1-37.3-83.1-83.1s37.3-83.1,83.1-83.1c33.7,0,52.8,16.4,65.7,37.9l16.7-46...
import mockRNCNetInfo from '@react-native-community/netinfo/jest/netinfo-mock.js'; import mockAsyncStorage from '@react-native-async-storage/async-storage/jest/async-storage-mock'; jest.mock('@react-native-community/netinfo', () => mockRNCNetInfo); jest.mock('@react-native-async-storage/async-storage', () => mockAsync...
import React from 'react'; import FunctionalComponent from './FunctionalComponent'; import ClassComponent from './ClassComponent'; export default function V120() { return ( <div style={{ display: 'flex' }}> <FunctionalComponent /> <ClassComponent /> </div> ); }
var keystone = require('../../../'); var Types = keystone.Field.Types; module.exports = { upload: function (req, res) { var knox = require('knox'); if (!keystone.security.csrf.validate(req, req.body.authenticity_token)) { return res.status(403).send({ error: { message: 'invalid csrf' } }); } if (req.fil...
#pragma once #include <duktape.h> duk_ret_t js_GetDisplayWidth(duk_context *ctx); duk_ret_t js_GetDisplayHeight(duk_context *ctx); duk_ret_t js_SetPixel(duk_context *ctx); duk_ret_t js_GetPixel(duk_context *ctx); duk_ret_t js_DrawClearScreen(duk_context *ctx); duk_ret_t js_DrawLine(duk_context *ctx); duk_ret_t js_Dra...
//distance.c #include <stdio.h> #include "agents.h" #include <math.h> double distance (struct agent a1, struct agent a2) { return sqrt(pow((a1.positionX)-(a2.positionX),2) + pow( (a1.positionY)-(a2.positionY) ,2)); }
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import * import math from snorkel.learning.pytorch import LSTM from pytorch_test_base import PyTorchTestBase import unittest class TestLSTM(PyTorchTestBas...
from .loader import load_files from .types import Layer __all__ = ( 'Layer', 'load_files', )
# SPDX-License-Identifier: Apache-2.0 """ tf2onnx.tflite_utils - utilities for parsing tflite files into onnx graph """ import collections import importlib from onnx import helper, onnx_pb, numpy_helper from tensorflow.core.framework import types_pb2, tensor_pb2 from tensorflow.python.framework import tensor_util f...
import test from 'ava' import BigView from '../../src' import Biglet from 'biglet' import ctx from './fixtures/context' test('test BigView', async t => { const bigView = new BigView(ctx) t.is(bigView.debug, false) const mainBiglet = new Biglet(bigView) mainBiglet.domid = 'main' bigView.main = mainBiglet ...
#! /usr/bin/python3 # http://rosalind.info/problems/mrna/ mrna_file = open("/home/steve/Dropbox/Rosalind/rosalind_mrna.txt") protein_string = mrna_file.read().strip() rna_possibilities_dict = {'A': 4, 'R': 6, 'N': 2, 'D': 2, 'C': 2, 'Q': 2, 'E': 2, 'G': 4, 'H': 2, 'I': 3, 'L': 6, 'K': 2, 'M...
'use strict'; var src = './src/', dist = './dist/', assets = 'assets', stage = 'kiriaze-stage', prod = 'kiriaze'; var cdn; // var cdn = '//cdn.com'; const baseConfig = { root: '/', src, dist, assets, data: `${src}${assets}/data/**/*.json`, html: `${src}/**/*.html`, // 'localhost' || '0.0.0...
/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolar...
import { UniCloudError, camel2snakeJson, snake2camelJson } from '../../share/index' function generateApiResult (apiName, data) { if (data.errcode) { throw new UniCloudError({ code: data.errcode || -2, message: data.errmsg || `${apiName} fail` }) } else { delete data.errcode delete data....
const baseUrl = 'https://us-central1-uccsc-ac393.cloudfunctions.net'; export async function getActivities() { const url = `${baseUrl}/getAllActivities`; const response = await fetch(url); return await response.json(); } export async function getTalks() { const url = `${baseUrl}/getAllSessions`; const respo...
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
/** * ---------------------------------------------------------------------------------------------------- * Mark a Thread as Read [Run] * * @description - Mark a thread as read using the Github API * * @author Buildable Technologies Inc. * @access open * @license MIT * @docs https://docs.github.c...
import requests from requests import Session from requests.exceptions import HTTPError try: from urllib.parse import urlencode, quote except: from urllib import urlencode, quote import json import math from random import uniform import time from collections import OrderedDict from sseclient import SSEClient im...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.9.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
# Copyright 2016 Splunk, Inc. # # Licensed under the Apache License, Version 2.0 (the 'License'): you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
/* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ #ifndef _NGX_STREAM_SSL_H_INCLUDED_ #define _NGX_STREAM_SSL_H_INCLUDED_ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_stream.h> typedef struct { ngx_msec_t handshake_timeout; ngx_flag_t prefer_server_ciphers; ...
/*! jQuery UI - v1.12.1 - 2016-09-14 * http://jqueryui.com * Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/e...
#!/usr/bin/env python3 # 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. """ Run the python or pytorch profiler and prints the results. Examples -------- To make sure that bAbI task 1 (1k exs)...
export { REGISTER_USER_START, REGISTER_USER_SUCCESS, REGISTER_USER_FAIL, LOGIN_USER_START, LOGIN_USER_SUCCESS, LOGIN_USER_FAIL, registerUser, loginUser, logoutUser, } from './onboardingActions' export { GET_LIST_START, GET_LIST_SUCCESS, GET_LIST_FAIL, GET_ITEM_START,...
''' MMU Simulator in python Assignment 3, Computer Architecture Authors: Akilesh K, Arjun Menon V Sept 2021 Main Module: - Create kernel memory, user memory and process objects - Call functions for pagewalk, page eviction (LRU policy) and writing evicted PageTable back to Disk (WriteBack pol...
// Copyright (c) 2018-2019, The TurtleCoin Developers // // Please see the included LICENSE file for more information. 'use strict' const assert = require('assert') const describe = require('mocha').describe const it = require('mocha').it const Crypto = require('../').Crypto const TurtleCoinCrypto = new Crypto() if ...
/*------------------------------------------------------------------------- eeprom8_gptrput1.c - write 1 byte value to EEPROM via a generic pointer Copyright (C) 2012 Raphael Neider <rneider AT web.de> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
# --------------------------------------------------------------------- # Copyright (C) 2007-2015 The NOC Project # See LICENSE for details # --------------------------------------------------------------------- # NOC Modules from noc.core.interface.base import BaseInterface from .base import ( IPParameter, Di...
//@ts-check /** * * Upload Synthetics Monitor Scripts * */ const inquirer = require("inquirer"); const chalk = require ('chalk'); const colorize={ red:chalk.bold.red, orange: chalk.keyword('orange'), green: chalk.keyword('green'), grey: chalk.keyword('grey') }; const synthClient = require("../l...
import sys import os import re import json import click import logging import anchorecli.clients.apiexternal import anchorecli.cli.utils config = {} _logger = logging.getLogger(__name__) @click.group(name='repo', short_help='Repository operations') @click.pass_obj def repo(ctx_config): global config config =...
/*- * Copyright(c) 2002-2011 Exar Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification are permitted provided the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of cond...
// // This script bakes and copies themes, then generates a corresponding Lit stylesheet in dist/themes // import chalk from 'chalk'; import commandLineArgs from 'command-line-args'; import fs from 'fs'; import { mkdirSync } from 'fs'; import { globbySync } from 'globby'; import path from 'path'; import prettier from '...
# See PyCharm help at https://www.jetbrains.com/help/pycharm/ import matplotlib.pyplot as plt import requests from bs4 import BeautifulSoup import pandas as pd from tqdm import tqdm from ratelimit import limits, sleep_and_retry class EdgarAccess(object): @staticmethod @sleep_and_retry # Dividing the cal...
from datetime import datetime from pathlib import Path import anyio import httpx import pytest import respx from scalpel.any_io.files import read_mp from scalpel.any_io.queue import Queue from scalpel.any_io.response import StaticResponse from scalpel.any_io.robots import RobotsAnalyzer from scalpel.any_io.static_spi...
var agora = new Date() var hora = agora.getHours() console.log(`Agora são exatamente ${hora} horas.`) if (hora < 12){ console.log('Bom dia!!') }else if (hora <= 18){ console.log('Boa tarde') } else { console.log('Boa noite') }
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance w...
// Copyright (C) 2015-2021 Virgil Security, 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 // ...
/* $NetBSD: if_admsw.c,v 1.3 2007/04/22 19:26:25 dyoung Exp $ */ /*- * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko. * 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. Redistri...
// function to generate markdown for README function generateMarkdown(data) { return `# ${data.title} [![${data.license}](https://img.shields.io/badge/license-${data.license}-blue)](https://opensource.org/licenses/${data.license}) ## Description ${data.description} ## Table of Contents * [Installation](#installa...
// // LWZCollectionRegister.h // LWZCollectionViewComponents_Example // // Created by BlueDancer on 2020/12/7. // Copyright © 2020 changsanjiang@gmail.com. All rights reserved. // #import <UIKit/UIKit.h> @class LWZCollectionProvider, LWZCollectionViewLayout; NS_ASSUME_NONNULL_BEGIN @interface LWZCollectionRegiste...
# Skip test if cuda_ndarray is not available. import itertools from nose.plugins.skip import SkipTest import numpy as np from six.moves import xrange import theano.sandbox.cuda as cuda_ndarray if cuda_ndarray.cuda_available is False: raise SkipTest('Optional package cuda disabled') import theano.tensor.tests.tes...
import styled from "styled-components"; const social = null;
"use strict"; module.exports = function (h) { if (this.count === 0) { var colspan = this.allColumns.length; if (this.hasChildRow) colspan++; return h( "tr", { "class": "VueTables__no-results" }, [h( "td", { "class": "text-center", attrs: { colspan: colspan } ...
# Goal: Queues and Stacks import sys from collections import deque class Solution: # Write your code here # create the two data structures def __init__(self): self.stack = deque() self.queue = deque() def pushCharacter(self, val): self.stack.append(val) def enqueueChara...
from typing import Iterable, List, Optional import cv2 import numpy as np import torch import torch.nn.functional as F from torchvision.models.feature_extraction import get_graph_node_names import captum.attr class GradCam(torch.nn.Module): def __init__(self, model: torch.nn.Module, name_layer: str) -> None: ...
import axios from 'axios'; import React, { Component } from 'react'; import { Link } from 'react-router-dom'; class TodoListList extends Component { constructor () { super() this.state = { projects: [] } } componentDidMount () { axios.get('/api/projects').then ...
import { Meteor } from 'meteor/meteor'; import { Rooms } from '../rooms.js'; Meteor.publish('rooms.public', function roomsPublic() { return Rooms.find({ isPrivate: false }, { fields: Rooms.publicFields }); }); Meteor.publish('rooms.private', function roomsPrivate() { return Rooms.find...
from rest_framework.serializers import ModelSerializer from rest_framework.viewsets import ModelViewSet from .models import Foo class FooSerializer(ModelSerializer): class Meta: model = Foo fields = '__all__' class FooViewSet(ModelViewSet): serializer_class = FooSerializer queryset = Fo...
/** * @license Apache-2.0 * * Copyright (c) 2020 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...
const glob = require('glob-all'); describe('Checking generated css js files', () => { it('should generate css js files', (done) => { const files = glob.sync([ './dist/index_*.js', './dist/index_*.css', './dist/search_*.js', './dist/search_*.css', ]); if (files.length > 0) { ...
Meteor.http = Meteor.http || {}; Meteor.http._makeErrorByStatus = function(statusCode, content) { var MAX_LENGTH = 160; // if you change this, also change the appropriate test var truncate = function(str, length) { return str.length > length ? str.slice(0, length) + '...' : str; }; var message = "failed...
########################################## Eval Models ######################### # # A tool for iteratively qualifying the capabilities of a 3D printing platform. # # (c) 2016 Ben Weiss, University of Washington # Not currently licensed. Internal use/development only. # #################################################...
# -*- coding: utf-8 -*- """ @Time : 2021/11/25 8:48 @Author : 物述有栖 @File : __init__.py.py @DES : """
import unittest from streamlink.plugins.wwenetwork import WWENetwork class TestPluginWWENetwork(unittest.TestCase): def test_can_handle_url(self): should_match = [ 'http://network.wwe.com/shows/collections/267406022', ] for url in should_match: self.assertTrue(WWEN...
import argparse import asyncio from typing import List, Any, Dict, Tuple import dataclasses import pprint import json parser = argparse.ArgumentParser(description="Process some nodes.") parser.add_argument("--ips", nargs="+") args = parser.parse_args() @dataclasses.dataclass class Node: id_mac: str radio_ma...
import logging import signal import threading import time import pika from pika import exceptions import gromozeka.app from gromozeka.brokers.base import BrokerInterface from gromozeka.primitives import Task APP_ID = 'gromozeka' CONSUMER_ID_FORMAT = "{exchange}.{exchange_type}.{queue}.{routing_key}" PIKA_CONNECTION_...