text
stringlengths
3
1.05M
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
from unittest import TestCase from tempfile import TemporaryDirectory from pathlib import Path from unittest import mock from busy.plugins.todo import TodoQueue from busy.root import Root from busy.file import File class TestRoot(TestCase): def test_root(self): with TemporaryDirectory() as d: ...
import calendar import datetime def get_day_of_last_week(year, month, dow): '''dow: Monday(0) - Sunday(6)''' n = calendar.monthrange(year, month)[1] l = range(n - 6, n + 1) w = calendar.weekday(year, month, l[0]) w_l = [i % 7 for i in range(w, w + 7)] return l[w_l.index(dow)] print(calendar.mo...
var marvel = require('../'); describe('client', function() { it('should throw if no options are provided', function() { (function() { marvel.createClient(); }).should.throw(); }); it('should throw if missing private key', function() { (function() { marvel.createClient({ publicKey: 'key'...
!function(t){"use strict";var e=t.tablesorter,a=[],r=[],o=[],s=[],n=[],c=[],i=[],h=[],l=e.chart={nonDigit:/[^\d,.\-()]/g,init:function(t,e){t.$table.off(e.chart_event).on(e.chart_event,function(){if(this.hasInitialized){var t=this.config;l.getCols(t,t.widgetOptions),l.getData(t,t.widgetOptions)}})},getCols:function(r,o...
'''Copyright 2018 Province of British Columbia 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,...
import torch from mmdet.core import bbox2result, bbox2roi, build_assigner, build_sampler from ..builder import HEADS, build_head, build_roi_extractor from .base_roi_head import BaseRoIHead from .test_mixins import BBoxTestMixin, MaskTestMixin import torch.nn as nn import torch import clip import time from mmcv...
import torch from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors import torch.distributed as dist from torch.nn.modules import Module from torch.autograd import Variable ''' This version of DistributedDataParallel is designed to be used in conjunction with the multiproc.py launcher included with ...
""" This script performs list-wise deletion on the input file, so all rows with any missing values are removed from the output. @copyright: The Broad Institute of MIT and Harvard 2015 """ import argparse, csv """Creates a complete output file by removing any rows in the input file with at least one missing value :p...
from Backtest.main.Attributes.Attr import Attr from Backtest.main.Data.Load import Load class ResistanceLoss: """ Take loss when close < resistance10 Take profit when openT < close < MA3 """ def __init__(self, df, params, enterList, isDebug=False): self.numMAPeriods = ( ...
"""Version of the JSON-RPC library that should work as soon as full-API nodes start implementing the actual JSON-RPC specification""" import time import json from . import nodesets from io import BytesIO from twisted.web.client import Agent, readBody, FileBodyProducer from twisted.web.http_headers import Headers from t...
import tkinter as tk def make_root() -> tk.Tk: root = tk.Tk() root.title("Calculator") root.con
const bgx = [ 0, -212, -424, -636, -848, -1272, -848, -1272, -848, -1272, -636, -424, -212, 0 ] const fire = [ { slides: bgx.map((el, idx) => { const width = idx >= 4 && idx <= 9 ? 302 : 212 return ({ backgroundPositionX: el, backgroundPositionY: -470, width, height...
var script = document.createElement('script'); script.src='https://cdn.jsdelivr.net/gh/taitulism/TimeWatch-Bookmarklet/index.js'; script.type='text/javascript'; document.body.appendChild(script);
'use strict'; const Edge = require('../../../index.js').Edge; const $ = require('jquery'); class BaseEdge extends Edge { draw(obj) { let path = super.draw(obj); if (this.options.color) { $(path).addClass(this.options.color); } return path; } drawArrow(isShow) { let dom = super.drawArro...
def treeToVine(root: TreeNode) -> int: vineTail = root remainder = vineTail.right size = 0 while remainder: # If no leftward subtree, move rightward if not remainder.left: vineTail = remainder remainder = remainder.right size += 1 # ...
from flask import Blueprint, jsonify, request from app.dao.provider_details_dao import ( dao_get_provider_stats, dao_get_provider_versions, dao_update_provider_details, get_provider_details_by_id, ) from app.dao.users_dao import get_user_by_id from app.errors import InvalidRequest, register_errors from...
import { v4 as uuidV4 } from "uuid"; import { testAdmin } from "../../../test/_globals.js"; import { logout, login, ajaxDelayMillis } from "../../support/index.js"; describe("Admin - Licence Categories", function () { before(function () { logout(); login(testAdmin); }); after(logout); be...
// ==============QUESTIONS============= let start = document.getElementById("startGame"); if(start) { start.addEventListener('click', () => { startGame() console.log("eekeke") }) } let nextQ = document.getElementById("nextQ") if (nextQ) { nextQ.addEventListe...
// @flow export function searchAndFilter(items, path, tag, text) { let keys = Object.keys(items) // tag filter if (tag) { keys = keys.filter(key => { const item = items[key] return item.tags.includes(tag) }) } // text search if (text) { keys = keys...
var colors = [ [72, 133, 237, 47, 86, 154], [0, 135, 68, 0, 88, 44], [182, 72, 242, 118, 47, 157], [219, 50, 54, 142, 33, 35], [244, 194, 13, 159, 126, 8], [244, 132, 13, 159, 86, 8], [72, 230, 241, 47, 150, 157] ] module.exports = class Box{ constructor(x, y, v, col) { this.x = x this.y = y ...
from abc import ABC from aiohttp import web, ClientSession from aiohttp_swagger3 import SwaggerDocs, ReDocUiSettings from astropy.io import fits from astropy.visualization import ( AsymmetricPercentileInterval, MinMaxInterval, ZScaleInterval, LinearStretch, LogStretch, AsinhStretch, SqrtStre...
#! /usr/bin/env python3 import argparse import json import re import requests import sys CUSTOM_HEADER = {"user-agent": "oauth_cookie_client.py"} def report_error(message): sys.stderr.write("{}\n".format(message)) exit(1) def find_authenticity_token(response): """ Search the authenticity_token in t...
import numpy as np import pandas as pd import matplotlib.pyplot as plt def dist_comp(df, bins, filepath, cfg): # Define columns all_columns = list(df.index.names) columns_noname = [c for c in all_columns if c != "name"] columns_nobins = [c for c in all_columns if "bin" not in c] # Remove under and...
import asyncio from dataclasses import dataclass class CommandClass: def __init__(self): pass @dataclass class CommandResultClass: """コマンド実行時の返り値の構造""" returncode: int stdout: str stderr: str def _list_to_str_command(self, command): return " ".join(com...
import styled from 'styled-components'; import withTheme from '@material-ui-v3/core/styles/withTheme'; export const Heading = withTheme()(styled.div` font-family: "Roboto", "Helvetica", "Arial", sans-serif; margin: ${props => (props.margin ? props.margin : 0)}; font-size: ${props => (props.fontSize ? props...
#!/usr/bin/python import numpy as np from sklearn import manifold import matplotlib.pyplot as plt import sys import os import json def dimension_reduction(data_path): with open(os.path.join(data_path, "feature_labels.json")) as data_file: feature_labels_dict = json.load(data_file) labels = feature_l...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
# Copyright (C) 2020 anonymous authors (identities withheld for blind review) # License: see LICENSE.txt # Author: Tommi Gröndahl from nltk import pos_tag, sent_tokenize, word_tokenize from collections import defaultdict, Counter from nltk.stem import WordNetLemmatizer import pickle import os lemmatizer = W...
""" This is an example how to train SentenceTransformers in a multi-task setup. The system trains BERT on the AllNLI and on the STSbenchmark dataset. """ from torch.utils.data import DataLoader import math from sentence_transformers import models, losses from sentence_transformers import SentencesDataset, LoggingHandl...
import React from "react"; import Background from "../images/img.jpg" function Hero(props) { return ( <div className="hero text-right" style={{ backgroundImage: `url(${Background})` }}> {props.children} </div> ); } export default Hero;
/** * 节流 * @param func * @param time * @returns {(function(...[*]=): void)|*} */ export const throttle = (func = () => {}, time = 1000) => { let delay = 0 return (...params) => { const now = +new Date() if (now - delay > time) { func.apply(this, params) delay = now } } } /** * 分割数组 ...
/* Common subexpression elimination for GNU compiler. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public ...
# Copyright 2021 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...
# Generated by Django 2.2.1 on 2019-05-05 16:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('github_integration', '0001_initial'), ] operations = [ migrations.AlterField( model_name='commit', name='sha', ...
/** * Wraps a value in an Array if not one alread. * @param {*} value - The value to wrap. * @returns {Array} - The wrapped value. */ export const wrap = value => (Array.isArray(value) ? value : [value]);
from __future__ import absolute_import import functools import sys from django.core.urlresolvers import reverse from sentry.app import tsdb from sentry.testutils import APITestCase class OrganizationStatsTest(APITestCase): def test_simple(self): self.login_as(user=self.user) org = self.create_...
#!/usr/bin/env python3 # get-text.py: get text column from csv file # usage: get-text.py < file # 20201114 erikt(at)xs4all.nl import csv import sys TEXT = "text" csvreader = csv.DictReader(sys.stdin) for row in csvreader: print(row[TEXT])
from adminsortable.models import SortableMixin from django.db import models from django.db.models import Max from parler.models import TranslatableModel, TranslatedFields from utils.models import SerializableMixin def get_next_subscription_type_category_order(): order_max = SubscriptionTypeCategory.objects.aggre...
#ifndef MM_SLAB_H #define MM_SLAB_H /* * Internal slab definitions */ #ifdef CONFIG_SLOB /* * Common fields provided in kmem_cache by all slab allocators * This struct is either used directly by the allocator (SLOB) * or the allocator must include definitions for all fields * provided in kmem_cache_common in the...
(function (exports) { 'use strict'; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // WARNING: This file was auto-generated, any change will be overridden in next release. Please use configs/es6.conf.js then run ...
/*global d3, utils */ "use strict"; // declaration of global object (modified by browser().load()) var VIS = { last: { // which subviews last shown? bib: { } }, files: { // what data files to request info: "data/info.json", meta: "data/meta.csv.zip", // remove .zip to use uncompres...
var bboss = function () {}; bboss.pager = { /** * 定义分页插件的处理事件,导航前事件:beforeload,ajaxload后事件:afterload。 */ pagerevent:{}, /** * @param containerid * jquery容器id * @param selector * jquery内容选择器 * @param url * 页面地址 * @param pages * 当前页面总数 * ...
#!/usr/bin/env python2.7 import os from setuptools import setup from httpd import VERSION if __name__ == '__main__': # dirty hack to allow symlink targets to work delattr(os, 'link') setup( author='Max Kalika', author_email='max.kalika+projects@gmail.com', url='https://github.com...
// generated from rosidl_typesupport_microxrcedds_c/resource/idl__rosidl_typesupport_c.h.em // with input from std_msgs:msg/Float32MultiArray.idl // generated code does not contain a copyright notice #ifndef STD_MSGS__MSG__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_MICROXRCEDDS_C_H_ #define STD_MSGS__MSG__FLOAT32_MULTI_AR...
import unittest import boto3 class TestBase(unittest.TestCase): PARAM_VALUE = "abc123" ssm_client = boto3.client('ssm') def _create_params(self, names, value=PARAM_VALUE): for name in names: self.ssm_client.put_parameter( Name=name, Value=value, ...
# # MIT License # # Copyright (c) 2020 Airbyte # # 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, copy, modify, merge, pu...
export const fakeDelay = ms => new Promise(resolve => setTimeout(resolve, ms)) export const isExternalURL = url => RegExp(/^(http|https):/g).test(url) export const addOpacityToColor = (color, opacity) => { const opacityHex = Math.round(opacity * 255).toString(16) return `${color}${opacityHex}` } export const cap...
"""Component to interface with an alarm control panel.""" from __future__ import annotations from dataclasses import dataclass from datetime import timedelta import logging from typing import Any, Final, final import voluptuous as vol from homeassistant.config_entries import ConfigEntry from homeassistant.const impo...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: config.proto """Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool fro...
"""Support for LaCrosse sensor components.""" from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.sensor import ENTITY_ID_FORMAT, PLATFORM_SCHEMA from homeassistant.const import ( CONF_DEVICE, CONF_ID, CONF_NAME, CONF_SENSORS, CONF_TYPE, EVENT_HOMEASSISTANT_STO...
#!/usr/bin/python # $Id$ import glob import os from distutils.core import setup PACKAGE_NAME = "impacket" setup(name = PACKAGE_NAME, version = "1.0.1-dev", description = "Network protocols Constructors and Dissectors", url = "http://oss.coresecurity.com/projects/impacket.html", author = "COR...
import {Platform} from 'react-native'; import {Permissions, Notifications} from 'expo'; // Example server, implemented in Rails: https://git.io/vKHKv const PUSH_ENDPOINT = 'https://expo-push-server.herokuapp.com/tokens'; export default async function registerForPushNotificationsAsync() { // Android remote notificat...
class GIC: def __init__(self,netpath,base,respath,date=None,qdate=None): """ Sets basic paths for location of files and sets dates Parameters ---------- netpath : string (required) location to folder where powernetwork csv files are base : string (required) ...
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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...
import numpy as np import os import json import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt os.makedirs("data",exist_ok=True) np.random.seed(10) filename="config_base.json" o=json.load(open(filename)) print(o) for j in range(10): i=j+1 o['data_train_npy']='data/data_train.n'+str(i)+'...
import pytest import sys import time import json import requests from requests.adapters import HTTPAdapter from requests import RequestException, ReadTimeout from test_adapter import ts_call_single from test_adapter import resource_release from const import mqtt_device_info from const import mqtt_testid from com.huawei...
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-04-10 08:25 from __future__ import unicode_literals import area_riservata.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('area_riservata', '0003_auto_20170408_1901'), ] operati...
"use strict"; import React from "react"; import { shallow } from "enzyme"; import { ColumnList } from "../ColumnList"; const ListItems = () => ( <> <li>One</li> <li>Two</li> <li>Three</li> <li>Four</li> <li>Five</li> <li>Six</li> </> ); describe("ColumnList", () => { it("should render without crashing...
import autograd.numpy as np from surpyval import nonparametric as nonp from scipy.optimize import minimize from autograd import jacobian, hessian def mse_fun(params, dist, x, F, inv_trans, const): return np.sum(((dist.ff(x, *inv_trans(const(params)))) - F)**2) def mse(model): """ MSE: Mean Square Erro...
# -*- coding: utf-8 -*- """ """ import pytest from assassin.lib.helper_functions import getDnsht def test_getDnsht_bad(capsys): ''' Test a bad TLD ''' response = [] response = getDnsht('com.zzz') assert 'error check your search parameter' in response def test_getDnsht_com(capsys): ''' Test a .com ...
import psutil from ISStreamer.Streamer import Streamer streamer = Streamer(bucket_name="test object logging", debug_level=2) # Example dict streamer.log_object({"foo": "1", "bar": "2"}) # Example lists cpu_percents = psutil.cpu_percent(percpu=True) streamer.log_object(cpu_percents, key_prefix="cpu") streamer.log_ob...
export const initialState = { html: null, value: null, items: null, mdItems: null, }; export const PRODUCT_LIST_REQUEST = 'PRODUCT_LIST_REQUEST'; export const PRODUCT_LIST_SUCCESS = 'PRODUCT_LIST_SUCCESS'; export const PRODUCT_LIST_FAILURE = 'PRODUCT_LIST_FAILURE'; export const PRODUCT_LIST_RESET = 'PRODUCT_LI...
/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or t...
/* Copyright 2020 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. * * Power and battery LED control for voema */ #include "ec_commands.h" #include "gpio.h" #include "led_common.h" #include "led_onoff_states.h" #inc...
/* Bullet Continuous Collision Detection and Physics Library Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is grant...
'use strict'; const https = require('https'); function httpRequest(params, postData) { return new Promise(function(resolve, reject) { var req = https.request(params, function(res) { var body = []; res.on('data', function(chunk) { body.push(chunk); }); ...
import hashlib userInput=str(input()) salt=bytes("Km5d5ivMy8iexuHcZrsD","ascii") itterations=200000 convertedInput = bytes(userInput,"ascii") output = hashlib.pbkdf2_hmac('sha512', convertedInput, salt , itterations) print(output.hex())
import { GraphQLList, GraphQLObjectType, GraphQLSchema, GraphQLString, GraphQLInt, GraphQLNonNull } from 'graphql' const data = require('./data.json') const User = new GraphQLObjectType({ name: 'User', description: 'Represent the type of an user', fields: { id: { type: GraphQLInt }, name: { ...
import App from "../app"; import { pubsub } from "../helpers/subscriptionManager.js"; import { withFilter } from "graphql-subscriptions"; export const CoolantQueries = { coolant(root, { simulatorId, systemId }) { let returnVal = App.systems.filter(s => s.type === "Coolant"); if (simulatorId) { returnVa...
const getTemplate = (items, deliveryDate, deliveryPrice) => ( ` export const ogItems = [ ${items.map(item => `{quantity: ${item.quantity}, name: "${item.name}", price: ${item.price}},`).join('\n ')} ]; export const ogDelivery = { price: ${deliveryPrice}, date: "${deliveryDate}" }; export const ogPaye...
from __future__ import unicode_literals from unittest import expectedFailure import warnings from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django import forms from django.test import TestCase, override_settings from django.test.client import RequestFactory f...
import Validator from 'validator'; import isEmpty from 'lodash/isEmpty'; const registerValidator = (data) => { const firstName = data.firstName.trim(), lastName = data.lastName.trim(), email = data.email.trim(), password = data.password.trim(), confirmPassword = data.confirmPassword.trim(); const e...
#pragma once #include <d3d11.h> #include <SimpleMath.h> #include "../ShaderPipeline.h" #include "../component/ConstantBuffer.h" #include "../component/Sampler.h" #include "../../geometry/Material.h" #include "../../../api/Application.h" class SimpleTextureShader : public ShaderSet { public: SimpleTextureShader(); ~...
/* * Outlook Integration library. * * Copyright (c) 2016, Ixperta Solutions s.r.o. * * This work is based on * Jitsi, the OpenSource Java VoIP and Instant Messaging client. * * Copyright @ 2015 Atlassian Pty Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file e...
var index = function (req, res) { res.render('contactus'); } exports.index = index;
# -*- coding: utf-8 -*- ''' The client libs to communicate with the salt master when running raet ''' # Import python libs import os import time import logging # Import Salt libs from raet import raeting from raet.lane.stacking import LaneStack from raet.lane.yarding import RemoteYard import salt.config import salt.c...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2018, Anaconda, Inc. and Intake contributors # All rights reserved. # # The full license is in the LICENSE file, distributed with this software. #------------------------------------------------------------------------...
export { PluginHost } from './plugged/host'; export { PluginContainer } from './plugged/container'; export { Action } from './plugged/action'; export { Getter } from './plugged/getter'; export { Watcher } from './plugged/watcher'; export { Template } from './plugged/template'; export { TemplatePlaceholder } from './plu...
/** * Toggle fullscreen, responds on the click on the FullScreen button * from the content toolbar * @link http://stackoverflow.com/a/23971798 */ function fnPluginHTMLFullScreen() { /*<!-- build:debug -->*/ if (marknotes.settings.debug) { console.log(' Plugin Page html - FullScreen'); } /*<!-- endbuild...
/* eslint-disable prettier/prettier */ import styled, { css } from 'styled-components'; import media from 'styled-media-query'; export const Picture = styled.picture` ${({ theme }) => css` align-items: center; display: flex; justify-content: center; height: 200px; padding: ${theme.common.spacings...
# # This file is part of LUNA. # # Copyright (c) 2020 Great Scott Gadgets <info@greatscottgadgets.com> # SPDX-License-Identifier: BSD-3-Clause """ Utilities for building USB descriptors into gateware. """ from nmigen import Signal, Module, Elaboratable from usb_protocol.emitters.descriptors ...
# IMPORTS from flask_wtf import FlaskForm from wtforms import StringField, SubmitField, PasswordField from wtforms.validators import Required, Email, Length, EqualTo, Regexp, ValidationError import re # Function which checks forbidden characters in a string def character_check(form, field): excluded_characters = ...
from baselines.common import explained_variance, zipsame, dataset from baselines import logger import baselines.common.tf_util as U import tensorflow as tf, numpy as np import time,sys from baselines.common import colorize from collections import deque from baselines.common import set_global_seeds from baselines.common...
from abc import ABC, abstractmethod from collections.abc import Iterable from numbers import Real from xml.etree import ElementTree as ET import numpy as np import openmc.checkvalue as cv from .._xml import get_text from ..mixin import EqualityMixin _INTERPOLATION_SCHEMES = [ 'histogram', 'linear-linear', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin # Register your models here. from .models import Email, Attachment, Company, PagesToWatch class PagesInline(admin.TabularInline): model = PagesToWatch class CompanyAdmin(admin.ModelAdmin): inlines = [ P...
var searchData= [ ['label_2ecpp',['Label.cpp',['../_label_8cpp.html',1,'']]], ['label_2eh',['Label.h',['../_label_8h.html',1,'']]], ['line_2ecpp',['Line.cpp',['../_line_8cpp.html',1,'']]], ['line_2eh',['Line.h',['../_line_8h.html',1,'']]], ['loadingstate_2ecpp',['LoadingState.cpp',['../_loading_state_8cpp.htm...
import re rewrites = [ (r'\s+', r' '), # normalise multiple whitespace (r'^\s', r''), # leading whitespace (r'\s$', r''), # trailing whitespace # should be specified in XML as enclist etc (r'^For the (.+?) variant: ', r''), (r'^When (.+?) is the ', r'is the '), # normalisation (r',', ...
#!C:\Users\James\Documents\GitHub\FRAME_FINAL\venv\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==40.8.0','console_scripts','easy_install' __requires__ = 'setuptools==40.8.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.py...
import os this_file = os.path.dirname(__file__) project_root = os.path.abspath(os.path.join(this_file, "../..")) data_dir = os.path.join(project_root, "data") stats_2020_path = os.path.join(data_dir, "stats_2020.csv") projected_2021_path = os.path.join(data_dir, "projected_2021.csv") stats_2021_path = os.path.join(da...
import React from 'react'; import { StoreContext } from 'state/store/hooks/index'; const returnPropsAsDefault = (store, props) => props; const Connect = (mapStateToProps = returnPropsAsDefault) => (Component) => { return function WrapConnect(props) { return ( <StoreContext.Consumer> {({ dispatch, ...
# model settings model = dict( type='CenterNet', pretrained='modelzoo://resnet18', backbone=dict( type='ResNet', depth=18, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_eval=False, style='pytorch'), neck=None, bbox_head=dict( ...
angular.module('common', ['ngMessages']) .controller('BaseFormCtrl', ['$scope', '$http', function ($scope, $http) { var fieldWithFocus; $scope.vm = { submitted: false, errorMessages: [] }; $scope.focus = function (fieldName) { fieldWithFocus = f...
# Generated by gen_torchvision_benchmark.py import torch import torch.optim as optim import torchvision.models as models from ...util.model import BenchmarkModel from torchbenchmark.tasks import COMPUTER_VISION ####################################################### # # DO NOT MODIFY THESE FILES DIRECTLY!!! # ...
/** @file Access to SC relevant IP base addresses. Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text o...
import styled from 'styled-components'; export const Wrapper = styled.div` background: ${props => props.background}; display: flex; flex-direction: column; text-align: center; align-items: center; `; export const Header = styled.div` color: ${props => props.color}; font-weight: bold; fo...
'use strict'; const gCSSProperties = { 'align-content': { // https://drafts.csswg.org/css-align/#propdef-align-content types: [ { type: 'discrete' , options: [ [ 'flex-start', 'flex-end' ] ] } ] }, 'align-items': { // https://drafts.csswg.org/css-align/#propdef-align-items types: [ ...
//////////////////////////////////////////////////////////////////////////// // // This file is part of RTIMULib // // Copyright (c) 2014-2015, richards-tech, LLC // // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"...
/* ----------------------------------------------------------------------------- * This file is a part of the NVCM Tests project: https://github.com/nvitya/nvcmtests * Copyright (c) 2018 Viktor Nagy, nvitya * * This software is provided 'as-is', without any express or implied warranty. * In no event will the autho...
from sklearn.svm.classes import SVC as Op import lale.helpers import lale.operators import lale.docstrings from numpy import nan, inf class SVCImpl(): def __init__(self, C=1.0, kernel='rbf', degree=3, gamma='auto_deprecated', coef0=0.0, shrinking=True, probability=False, tol=0.001, cache_size=200, class_weight='...