text
stringlengths
3
1.05M
(function(global){ var insertToolbar = function(b) { angular.element(document).ready(function() { var a = window.parent.document.createElement("div"); a.setAttribute("id", "tlbstoolbar"); a.setAttribute("ng-app", "toolbarCore"); a.setAttribute("ng-controller",...
from __future__ import absolute_import from pony.py23compat import buffer, int_types import json from decimal import Decimal from datetime import datetime, date, time, timedelta from uuid import UUID NoneType = type(None) import warnings warnings.filterwarnings('ignore', '^Table.+already exists$', Warning, '^pony\\....
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
from rest_framework import serializers from core.models import Tag, Ingredient, Recipe class TagSerializer(serializers.ModelSerializer): """Serializer for tag objects""" class Meta: model = Tag fields = ('id', 'name') read_only_fields = ('id',) class IngredientSerializer(serializer...
from setuptools import setup with open("README.md", "r", encoding="utf8") as fh: long_description = fh.read() setup( name='empyrial', version='1.9.9', description='An Open Source Portfolio Management Framework for Everyone 投资组合管理', py_modules=['empyrial'], package_dir={'': 'src'}, ...
define('node_modules/lodash/clone', function(require, exports, module) { var baseClone = require('node_modules/lodash/_baseClone'); /** Used to compose bitmasks for cloning. */ var CLONE_SYMBOLS_FLAG = 4; /** * Creates a shallow clone of `value`. * * **Note:** This method is loosely based on the...
const Spotify = require('./spotify'); let express = require('express'); let app = express(); var jwt = require('jsonwebtoken'); const dotenv = require('dotenv'); var cookieParser = require('cookie-parser') dotenv.config(); const private_key = process.env.PRIVATE_KEY; const path = require('path'); const Track = require(...
/** * Auto-generated action file for "Clever-Cloud" API. * * Generated at: 2019-05-07T14:40:00.761Z * Mass generator version: 1.1.0 * * flowground :- Telekom iPaaS / clever-cloud-com-connector * Copyright © 2019, Deutsche Telekom AG * contact: flowground@telekom.de * * All files of this connector are licensed...
import numpy as np import torch import torch.optim as optim import gym from rlmodels.models.DDPG import * from rlmodels.nets import FullyConnected import logging #logger parameters FORMAT = '%(asctime)-15s: %(message)s' logging.basicConfig(level=logging.INFO,format=FORMAT,filename="model_fit.log",filemode="a") # en...
//Array für die Schritte schritte = []; //Anzahl der Schritte anzahl = 0; //Progress fortschritt = 0; // Lade Schritte für das Level aus der Datenbank function starteSeite() { $.ajax({ url: '/spiel/bekommeReihenfolge', success: function (data) { ordneReihenfolge(data); } });...
import PropTypes from "prop-types"; import React from "react"; import { View, FlatList, Text, StyleSheet } from "react-native"; import { Actions } from "react-native-router-flux"; import { ListItem } from "react-native-elements"; import { v4 as uuid } from "uuid"; const projectKeyExtractor = project => project.project...
const fs = require('fs'); const jsesc = require('jsesc'); const pkg = require('../../package.json'); const dependencies = Object.keys(pkg.devDependencies); const unicodeVersion = dependencies.find((name) => /^unicode-\d/.test(name)); // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae const highS...
"""Constant definitions for WeatherFlow Integration.""" DOMAIN = "weatherflow" ATTR_DESCRIPTION = "description" ATTR_FORECAST_FEELS_LIKE = "feels_like" ATTR_FORECAST_WIND_GUST = "wind_gust" ATTR_FORECAST_UV = "uv_index" CONDITION_CLASSES = { "clear-night": ["clear-night"], "cloudy": ["cloudy"], "exceptio...
from datetime import date from datetime import time from datetime import datetime from datetime import timedelta # construct a basic timedelta and print it print(timedelta(days=365, hours=2, minutes=12)) # print today's date today = datetime.now() print("Today is: ", today) # print today's date one year from now pr...
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f4a9a8ba"],{"143a":function(t,o,a){"use strict";a.r(o);var i=function(){var t=this,o=t.$createElement,a=t._self._c||o;return a("div",[a("video_index_tab",{attrs:{show_what:t.fid}}),a("div",{staticClass:"sub-navbar node-header node-header-with-node hide-i...
// Testing Sudoku solver with SSE 4.2 / AVX // Copyright (C) 2012-2018 Zettsu Tatsuya #include <stdint.h> #include <cstdlib> #include <string> // Define arraySizeof() #include "sudoku.h" // Returns number of bits of T template<typename T> constexpr size_t bitsOf(T) { return sizeof(T) * 8; } // Declare condition...
import React from 'react'; import { Link } from 'react-router-dom'; // Images import aboutImg from '../img/about.jpg'; import aboutImgMobile from '../img/about_mobile.jpg'; import bannerBackground from '../img/banner-full-size.jpg'; // Styled Components import styled from 'styled-components'; // Framer Motion import { ...
from rest_framework import serializers from schedule.models import ParticipantsModel, ScheduleInterviewModel class ParticipantsSerializer(serializers.ModelSerializer): class Meta: model = ParticipantsModel fields = ('id', 'name', 'email') class ScheduleInterviewSerializer(serializers.ModelSeria...
# n = -1 or any negative odd integer < 0 # research paper: Deciphering the Collatz Conjecture Through Recursion # created by Glenn Patrick King Ang 10/18/2021 # email: glenn.patrick.king.ang@outlook.com (preferred) # email: glenn.p.ang@alumni.uts.edu.au (not affiliated, only an alumni) # https://github.com/0723198...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.handleParseHeaders = handleParseHeaders; exports.allowCrossDomain = allowCrossDomain; exports.allowMethodOverride = allowMethodOverride; exports.handleParseErrors = handleParseErrors; exports.enforceMasterKeyAccess = enforceMasterKe...
function BranchData() { this.position = -1; this.nodeLength = -1; this.src = null; this.evalFalse = 0; this.evalTrue = 0; this.init = function(position, nodeLength, src) { this.position = position; this.nodeLength = nodeLength; this.src = src; return this; } ...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
const constants = require("../../constants.js"); class WokeHelper { static isWokeVariable (context, jekiName) { const wokeList = context.environment().getJeki(context.getCurrentScope(), constants.KW.WOKE); return wokeList && wokeList.includes(jekiName); } } module.exports = WokeHelper;
"""Next-gen variant detection and evaluation with GATK and SnpEff. """ import os import json import subprocess from bcbio.variation.genotype import variant_filtration, gatk_evaluate_variants from bcbio.variation.effects import snpeff_effects from bcbio.variation.annotation import annotate_effects from bcbio.variation ...
import dlib import threading import numpy as np import tensorflow as tf import time import paramiko import os,sys,cv2,random,datetime from reid_per_query import find_matching_id from scp import SCPClient, SCPException, put, get,asbytes #The deisred output width and height OUTPUT_SIZE_WIDTH = 775 OUTPUT_SIZE_HEIGHT = 60...
const chai = require('chai'); const assert = chai.assert; const secp256k1 = require('../lib'); const fixtures = require('./fixtures/rangeproof.json'); describe('range proof', () => { let sign, info, verify, rewind; before(async () => { ({ sign, info, verify, rewind } = (await secp256k1()).rangeproof); }); ...
assert 42 == 40 + 2
# # # from __future__ import absolute_import, division, print_function, \ unicode_literals from concurrent.futures import ThreadPoolExecutor from importlib import import_module from os import environ from sys import stdout import logging from .provider.base import BaseProvider from .provider.plan import Plan fro...
# Created from dockerfile: /space/git/dockerfiles_repos/Thermionix/Dockerfiles/phpmyadmin/Dockerfile from shutit_module import ShutItModule class phpmyadmin(ShutItModule): def build(self, shutit): shutit.install('nginx phpmyadmin mcrypt libmcrypt-dev') return True def module(): return phpmyadmin( 'shutit....
# -*- coding: utf-8 -*- # filename: handle.py import reply import receive import web class Handle(object): def GET(self): try: data = web.input() if len(data) == 0: return "hello, this is handle view" signature = data.signature timestamp = da...
"""Loads plugins from ``porcupine.plugins``.""" # many things are wrapped in try/except here to allow writing Porcupine # plugins using Porcupine, so Porcupine must run if the plugins are # broken from __future__ import annotations import argparse import dataclasses import enum import importlib.machinery import loggin...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
#!/usr/bin/env python # -*- coding:utf-8 -*- # Author: Donny You(youansheng@gmail.com) # Coco data loader for keypoints detection. from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import os import numpy as np import torch.utils.data as data fro...
#! /usr/bin/env python ############################################################################ # # Licensed under the MIT License (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of the License # in the LICENSE file or at # # ht...
window.addEventListener("DOMContentLoaded", function() { // get the form elements defined in your form HTML above let form = document.getElementById("my-form"); // var button = document.getElementById("my-form-button"); let status = document.getElementById("status"); // Success and Error functions...
# -*- coding: utf-8 -*- # @Time: 2020/7/16 11:36 # @Author: GraceKoo # @File: interview_7.py # @Desc: https://www.nowcoder.com/practice/c6c7742f5ba7442aada113136ddea0c3?tpId=13&rp=1&ru=%2Fta%2Fcoding-interviews&qr # u=%2Fta%2Fcoding-interviews%2Fquestion-ranking class Solution: def fib(self, N: int) -> int: ...
"""Manage trace in ZK. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import abc import io import logging import os import sqlite3 import tempfile import zlib from treadmill import zknamespace as z from treadmil...
import re code = """XabX """ p = r'a(?:b)(X)' print( # re.findall(p, code) ) m = re.match(p, code) print( # m.group ) def f(m): print(11, m.group(1)) print( re.sub(p, f, code) )
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from marionette.by import By from gaiatest.apps.base import Base class SettingsForm(Base): _loading_overlay_locat...
import glob from 'glob'; import babel from 'rollup-plugin-babel'; import resolve from '@rollup/plugin-node-resolve'; import { version } from './package.json'; const name = 'beautiful-react-hooks'; const banner = `/* ${name} version: ${version} */`; // CommonJS (for Node) and ES module (for bundlers) build. // (We cou...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy import itertools from typing import Iterator, List, Union import numpy as np import pycocotools.mask as mask_utils import torch from cvpods.layers import cat from cvpods.layers.roi_align import ROIAlign from .boxes import Boxes def...
//Written by Nathan Faubion: http://n-son.com //Use this or edit how you want, just give me //some credit! function jsScrollbar (o, s, a, ev) { var self = this; this.reset = function () { //Arguments that were passed this._parent = o; this._src = s; this.auto = a ? a : false; this.eventHandler = ev ...
#! -*- coding: utf8 -*- # This file is part of the sale_pos module for Tryton. # The COPYRIGHT file at the top level of this repository contains the full # copyright notices and license terms. # Josias import datetime from decimal import Decimal from trytond.model import ModelView, fields, ModelSQL from trytond.pool i...
#ifndef __CART_H__ #define __CART_H__ #include <stdint.h> #include <stdio.h> typedef struct { uint8_t title[15]; /* 0x134-0x142: Title */ uint8_t cgb; /* 0x143: $80 = GBC, other = not GBC */ uint8_t lcode_new_h; /* 0x144: licensee code (new) high */ uint8_t lcode_new_l; /* 0x145: license...
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations from textwrap import dedent import pytest from pants.build_graph.address import Address from pants.build_graph.build_file_aliases import BuildFileAlia...
import React, { useReducer, useState } from 'react'; import { Link, useHistory } from 'react-router-dom'; import firebase from 'firebase/app'; import 'firebase/auth'; import { loginCometChatUser } from '../cometchat'; const initialState = { email: '', password: '', }; const reducer = (state, action) => { switch...
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * class RROo(RPackage): """R Object-Oriented Programming with or without References. ...
# Copyright 2015 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...
from bot import WorkerRushBot import argparse import asyncio import logging import aiohttp import sc2 from sc2.main import run_game from sc2.data import Race, Difficulty from sc2.client import Client from sc2.player import Bot, Computer from sc2.protocol import ConnectionAlreadyClosed # Run ladder game # This lets ...
import React from 'react'; import PropTypes from 'prop-types'; import FormGroup from '../FormGroup'; import useForkRef from '../utils/useForkRef'; import RadioGroupContext from './RadioGroupContext'; const RadioGroup = React.forwardRef(function RadioGroup(props, ref) { const { actions, children, name, value: valuePr...
/* Copyright (C) 2015 Stephen Braitsch [http://braitsch.io] 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,...
(function (factory) { // Module systems magic dance. if (typeof require === "function" && typeof exports === "object" && typeof module === "object") { // CommonJS or Node: hard-coded dependency on "knockout" factory(require("knockout"), exports); } else if (typeof define === "function" && define["amd"]) { // ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
/* * Copyright (C) 2015-2018 ZhengHaiTao <ming8ren@163.com> * * 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...
# views.py from django.contrib.auth.models import User from django.shortcuts import get_object_or_404 from rest_framework import serializers, viewsets from rest_framework.views import APIView from rest_framework.permissions import ( IsAuthenticated, IsAdminUser ) from rest_framework.response import Response from ...
from lib.losses.Loss import Loss import numpy as np class MeanSquaredError(Loss): def __init__(self): super().__init__() @staticmethod def function(targets: np.array, predictions: np.array): return np.sum(np.power((targets - predictions), 2))
from flask import Flask from flask import request import json app = Flask(__name__) class State: __internal_data__ = { "AdColony": ["4PFYVQ9L8R.skadnetwork", "YCLNXRL5PM.skadnetwork"], "Google-Mobile-Ads-SDK": ["cstr6suwn9.skadnetwork"], "ChartboostSDK": ["blskdfjl2e3.skadnetwork"], ...
exports.id = 478; exports.ids = [478]; exports.modules = { /***/ 478: /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "toFormData": () => ...
import unittest # noinspection PyUnresolvedReferences from requests.utils import DEFAULT_ACCEPT_ENCODING from streamlink import Streamlink from streamlink.stream.hls import HLSStream from streamlink.stream.http import HTTPStream from streamlink.stream.rtmpdump import RTMPStream from streamlink.stream.stream import St...
""" Defines utilities to save panel objects to files as HTML or PNG. """ from __future__ import absolute_import, division, unicode_literals import io from contextlib import contextmanager from six import string_types import param from bokeh.document.document import Document from bokeh.embed import file_html from bo...
"use strict"; var yosay = require('yosay'); var fs = require('fs'); var generators = require('yeoman-generator'); var chalk = require('chalk'); var ejs = require('ejs'); /** * @module Angular 2 [FireLoop] * @author Jonathan Casarrubias <t: johncasarrubias, gh:mean-expert-official> * @description * This module gener...
#include "../src/error.h" int main(void) { ERROR("testing%s",""); WARNING("testing%s",""); SUCCESS("testing%s",""); STDERR("testing%s",""); INFO("testing%s",""); DEBUG("testing%s",""); //MALLOC_CHK(NULL); //F_CHK(NULL, __FILE__); //NULL_CHK(NULL); NEG_CHK(-10); return 0; }...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ 执行次数很早的算法 比如下载行业分类列表,下载 """ import sys from WindPy import w from kquant_data.config import __CONFIG_TDAYS_SSE_FILE__, __CONFIG_H5_STK_SECTOR_DIR__ from kquant_data.wind_resume.wset import download_sectors_list from kquant_data.wind_resume.tdays import resume_download_t...
#pragma once // Copyright (c) 2001-2019 Aspose Pty Ltd. All Rights Reserved. #include <system/string.h> #include <system/shared_ptr.h> #include <system/object.h> #include <system/collections/list.h> #include <drawing/color.h> #include "aspose_pdf_api_defs.h" namespace Aspose { namespace Pdf { namespace Annotations ...
// Copyright (c) 2012 Pieter Wuille // Copyright (c) 2012-2014 The Bitcoin developers // Copyright (c) 2017-2019 The BlockidCoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_ADDRMAN_H #define BITCOI...
#ifndef SIGMA_KERNEL_ACPI_FADT #define SIGMA_KERNEL_ACPI_FADT #include <Sigma/common.h> #include <Sigma/acpi/tables.h> namespace acpi { constexpr const char* fadt_signature = "FACP"; struct PACKED_ATTRIBUTE fadt { acpi::sdt_header header; uint32_t firmware_control; uint32_t dsdt; ...
import typescript from 'rollup-plugin-typescript2'; import commonjs from 'rollup-plugin-commonjs'; import nodeResolve from 'rollup-plugin-node-resolve'; import babel from 'rollup-plugin-babel'; import { terser } from 'rollup-plugin-terser'; import serve from 'rollup-plugin-serve'; import json from '@rollup/plugin-json'...
import argparse import sys import yt # load the command-line parameters parser = argparse.ArgumentParser( description='Plot slices of wave function for the ELBDM test' ) parser.add_argument( '-s', action='store', required=True, type=int, dest='idx_start', help='first data index' ) parser.add_arg...
############################################################################### ## ## Copyright (C) 2013 Tavendo GmbH ## ## 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:/...
import logging import time from datetime import timedelta from typing import Any, Dict from django.conf import settings from django.core.management.base import BaseCommand from django.db import transaction from django.utils.timezone import now as timezone_now from zerver.lib.actions import do_send_messages from zerve...
# MIT License # # Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2018 # # 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 # r...
import sys from subprocess import Popen, PIPE from pyrrd.backend import common from pyrrd.exceptions import ExternalCommandError from pyrrd.util import XML def _cmd(command, args=""): if sys.platform == 'win32': close_fds = False else: close_fds = True command = "rrdtool %s %s" % (command...
/** * Created by Julian on 12/30/16. */ import Meteor, { getData } from 'react-native-meteor'; import { createStore, combineReducers } from 'redux'; import AsyncStorage from '@react-native-community/async-storage'; import _ from 'lodash'; import EventEmitter from 'events'; import { persistStore, autoRehydrate, create...
import numpy as np import torch import argparse from easydict import EasyDict as edict import os from second.protos import pipeline_pb2 from google.protobuf import text_format from second.pytorch.builder import (box_coder_builder, input_reader_builder, lr_scheduler_builder, optimizer...
import calendar import regex as re from io import StringIO from collections import OrderedDict from datetime import datetime from datetime import timedelta from ..dateparser.utils import set_correct_day_from_settings, \ get_last_day_of_month, get_previous_leap_year, get_next_leap_year, \ _get_missing_parts fr...
/* FormAjaxifier @author Jeevan@blacklizard */ (function ($) { $.fn.FormAjaxifier = function (options) { var settings = $.extend({ beforeSend: function (self) {}, success: function (self, data, textStatus, jqXHR) {}, error: function (self, jqXHR, textStatus, er...
var callbackArguments = []; var argument1 = 3.249333801621164e+307; var base_0 = ["i",893,"nf","=1","2n",126] var r_0= undefined try { r_0 = base_0.some(argument1) } catch(e) { r_0= "Error" } function serialize(array){ return array.map(function(a){ if (a === null || a == undefined) return a; var name = a.construc...
const jwt = require('jsonwebtoken'); const dotenv = require('dotenv'); dotenv.config(); const secret = process.env.SECRET; //Generate a token to login function createToken(email) { const token = jwt.sign({ email: email }, secret, { expiresIn: '24h' }); return token; }; //Ckeck if the user is logged in functi...
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- # modified by syshin from .VGGnet_train_bus import VGGnet_train_bus fr...
import random import json import torch import time import pandas as pd from model import NeuralNet from fastapi import FastAPI from nltk_utils import bag_of_words, tokenize, stem app = FastAPI() device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') df = pd.read_csv('dataset/JEP.csv') with open('inten...
'use strict'; const View = require('views/view'); const template = require('ui/confirm/templates/confirm-overlay.nunj'); const BUTTON_NAMES = { yes: _t('confirm'), no: _t('cancel') }; module.exports = View.extend({ events: { 'click .js-confirm': 'onConfirmClick', 'click .js-cancel': 'onCancelClick' ...
/** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @emails react-co...
"""init_db""" from sqlalchemy.orm import Session # from ultron8.api.db.u_sqlite.base import Base from ultron8.api import crud, settings from ultron8.api.models.user import UserCreate # make sure all SQL Alchemy models are imported before initializing DB # otherwise, SQL Alchemy might fail to initialize properly relat...
import { MUTATIONS_TYPE } from "@/types"; /* eslint no-param-reassign: ["error", { "props": false }] */ export const mutations = { [MUTATIONS_TYPE.SET_ARTICLE](state, article) { state.article = article; }, [MUTATIONS_TYPE.SET_COMMENTS](state, comments) { state.comments = comments; } };
const trackPage = (routePath) => { if (window.ga) { window.ga('send', 'pageview', `/#${routePath}`); } }; const trackEvent = (type, key, data) => { if (window.ga) { window.ga('send', { hitType: 'event', eventCategory: type, eventAction: key, eventLabel: data }); } }; expor...
import time import os import numpy as np import torch import cv2 as cv from mmdet.apis import init_detector, inference_detector config_file = './configs/cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco.py' checkpoint_file = './ckpts/cascade_rcnn_r50_fpn_1x_coco_20200316-3dc56deb.pth' if __name__ == '__main__': model =...
/* Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'save', 'de-ch', { toolbar: 'Speichern' } );
""" 7) Faça um programa que receba dois números e mostre o maior. Se por acaso, os dois números forem iguais, imprima a mensagem 'Números iguais'. """ n1, n2 = float(input('Digite o primeiro número \n')), \ float(input('Digite o segundo número \n')) if n1 < n2: print(f'{n2}') elif n1 == n2: print(f'O...
# -*- coding: utf-8 -*- """Used to test the `ArrayHeapPQ`. Contains a mixture of non-randomized and randomized testing. In addition, some tests measure the performance of the data structure. """ import unittest from enum import Enum from math import floor, log2 from random import choice, random, randrange from time i...
# Copyright (c) Facebook, Inc. and its affiliates. """ Models built in MMF need to inherit ``BaseModel`` class and adhere to a fixed format. To create a model for MMF, follow this quick cheatsheet. 1. Inherit ``BaseModel`` class, make sure to call ``super().__init__()`` in your class's ``__init__`` function. 2. Im...
"""Test cases for the utility module.""" import pytest from joseki.util import to_chemical_formula from joseki.util import translate_cfc def test_translate_cfc() -> None: """Converts F13 into CClF3.""" assert translate_cfc("F13") == "CClF3" def test_translate_cfc_unknown() -> None: """Raises when the c...
import os import json import pickle import numpy as np from scipy.sparse import coo_matrix from scipy.sparse.linalg import svds from sacred import Experiment from sacred.observers import FileStorageObserver ex = Experiment('cf_with_svd') ex.observers.append(FileStorageObserver('cf_svd')) def config(): LATENT_DIM ...
/* -*- C -*- */ /* * Copyright (c) 2013-2020 Seagate Technology LLC and/or its Affiliates * * 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...
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # https://doc.scrapy.org/en/latest/topics/items.html import scrapy class CrawlLojItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() pass
# Generated by Django 2.1.7 on 2019-02-22 13:37 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('padelAPI', '0003_auto_20...
// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, // but are changed infrequently #pragma once //#define _WIN32_WINNT _WIN32_WINNT_WINXP //#define _WIN32_WINNT _WIN32_WINNT_WIN7 #define _USE_MFC #define _DETECT_MEMORY_LEAK #define _UDP_DISA...
const path = require('path'); const JSPackager = require('parcel-bundler/src/packagers/JSPackager'); const { rel } = require('./helpers'); const entryTpl = (entryName, wasmDeps) => `\ function cacheReplace(id, mod) { // replace the entry in the cache with the loaded wasm module module.bundle.cache[id] = null; ...
/* * Copyright (c) 2016 Linaro Limited. * * SPDX-License-Identifier: Apache-2.0 */ #include <kernel.h> #include <device.h> #include <init.h> #include <drivers/pinmux.h> #include <sys/sys_io.h> #include <pinmux/stm32/pinmux_stm32.h> /* pin assignments for STM32F4DISCOVERY board */ static const struct pin_config p...
import React from 'react' import { connect } from 'react-redux' import ReactModal from 'react-modal' import classNames from 'classnames/bind' import { shadowModalRoot } from '../../shadowDomHelper' import apiCall from '../../api-call' import { setPersistData } from '../../actions' import { keyPressSubmit } from '../....
""" Figure 4: Server states. Followers only respond to requests from other servers. If a follower receives no communication, it becomes a candidate and initiates an election. A candidate that receives votes from a majority of the full cluster becomes the new leader. Leaders typically operate until they fail. """ import...