text
stringlengths
3
1.05M
# -*- coding: utf-8 -*- # # Copyright 2019-2022 BigML # # 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 ...
/** * Author: Samuel Rohde (rohde.samuel@cubez.io) * * Copyright 2020 Samuel Rohde * * 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 re...
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/sagemaker/SageMaker_EXPORTS.h> #include <aws/sagemaker/model/AutoMLMetricEnum.h> #include <utility> namespace Aws { namespace Utils { namespace Json { class JsonValue; ...
'use strict'; const mongoose = require('mongoose'); const Customer = mongoose.model('Customer'); exports.create = async data => { var customer = new Customer(data); await customer.save(); }; exports.authenticate = async data => { const res = await Customer.findOne({ email: data.email, password: data.pa...
from rest_framework.fields import CharField from rest_framework.serializers import ModelSerializer, Serializer from services.viewcounts.models import PageViewsModel class PageViewSerializer(Serializer): page_url = CharField(required=True, allow_blank=False, max_length=200) user_id = CharField(required=True, ...
#pragma once #include <cassert> #include <functional> #include <span> #include <utility> #include <vector> #include <range/v3/algorithm/sort.hpp> #include <range/v3/view/enumerate.hpp> #include <range/v3/view/filter.hpp> #include <range/v3/view/transform.hpp> #include <range/v3/view/zip.hpp> template <typename ItemT...
# proxy module from traitsui.qt4.ui_live import *
export * from './slider'; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL3ByaW1lbmcvc2xpZGVyLyIsInNvdXJjZXMiOlsicHVibGljX2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLFVBQVUsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vc2xp...
import redis import click import json import os import zipfile import io DATA_BIN_FINE_NAME = 'Data.bin' META_DATA_FILE_NAME = 'MetaData.json' class Colors(object): @staticmethod def Cyan(data): return '\033[36m' + data + '\033[0m' @staticmethod def Yellow(data): return '\033[33m' + d...
/* Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.lang.vi={dir:'ltr',editorTitle:'Trình biên tập trực quan, %1',source:'Mã HTML',newPage:'Trang mới',save:'Lưu',preview:'Xem trước',cut:'Cắt',copy:'Sao chép',pas...
import BackToTop from "@/components/common/BackToTop/BackToTop"; export const backToTop = { components:{ BackToTop }, data(){ return { isShowBackTop:false } }, methods:{ backToTop(){ this.$refs.scroll.scrollTo(0,0,500); }, listenShowBackTop(){ this.isShowBackTop = thi...
/* * Copyright (C) 2021 Huawei Device 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 applica...
3tuple(string,string,uint256,uint256,uint32,uint32,uint32,uint8,uint8,uint8,bool,bool,bool)[]: NPSCZUSr,no swag,0,9252183311529579,1629107003,1629092916,72003,4,50,3,false,false,true,Ashley's 👻,safelips swag,1,1598124591541123,1629107617,1629021347,288006,9,93,3,false,false,true,agCHJbuD,,2,1315411858406600,1629065440...
// import { defaultAction } from '../actions'; // import { DEFAULT_ACTION } from '../constants'; // describe('FinancialWizardContainer actions', () => { // describe('Default Action', () => { // it('has a type of DEFAULT_ACTION', () => { // const expected = { // type: DEFAULT_ACTION, // }; // ...
// Init Github const github = new Github; // Init UI const ui = new UI; // Search input const searchUser = document.getElementById('searchUser'); searchUser.addEventListener('keyup', (e) => { // Get input text const userText = e.target.value; if(userText !== '') { // Make http call github.g...
import React, { Component, PropTypes } from "react"; import { connect } from 'react-redux'; import { passwordReset } from '../../actions/auth'; import MessageError from '../common/MessageError'; import MessageSuccess from '../common/MessageSuccess'; import Button from '../common/Button'; /** * Password reset */ cl...
# Generated by Django 3.1.4 on 2020-12-16 20:00 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('administracion', '0005_auto_20201215_1928'), ] operations = [ migrations.RemoveField( model_nam...
# Copyright 2019 Open End AB # # 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, s...
#YOLOv4-DeepSORT用 import os import glob import pandas as pd import re import statistics current_dir=os.path.dirname(os.path.abspath(__file__)) path = 'test_info.txt' df = pd.read_csv(os.path.join(current_dir, path), header=None) #列名を追加 df.columns=["trackid","class", "xmin", "ymin","xmax","ymax"] #class別集計 df = df[["tra...
//@ sourceURL=/controller/main.js /* * Derive from the base class. */ function Main() { MudderyMain.call(this); } Main.prototype = prototype(MudderyMain.prototype); Main.prototype.constructor = Main; /* * Event when the connection opens. */ Main.prototype.onConnectionOpen = function() { this.puppet = false; ...
#import <UIKit/UIKit.h> FOUNDATION_EXPORT double Pods_test101_TestsVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_test101_TestsVersionString[];
# -*- coding: utf-8 -*- from json import loads from django.test import TestCase from eth_tester import EthereumTester from web3.providers.eth_tester import EthereumTesterProvider from ..event_listener import EventListener from ..factories import DaemonFactory from ..models import Block, Daemon from ..utils import rem...
// @flow import {LocalStore} from "./localStore"; /* * A simple abstraction over 'localStorage' to provide transparent JSON * serialization and deserialization. * * The implementation is borrowed heavily from Khan Academy's LocalStore * module, and also KaVideoPlayer's SafeLocalStore module. */ export default c...
import argparse import typing from os import path from pathlib import Path, PurePath import shtab import yaml from opera.commands.info import info from opera.error import DataError, ParseError from opera.parser import tosca from opera.storage import Storage from opera.utils import prompt_yes_no_question def add_par...
import sys import sdl2 import sdl2.ext def run(): sdl2.ext.init() window = sdl2.ext.Window("The Pong Game", size=(800, 600)) window.show() factory = sdl2.ext.SpriteFactory(sdl2.ext.SOFTWARE) spriterenderer = factory.create_sprite_render_system(window) running = True while running: ...
from django.db import models from django.contrib.auth.models import AbstractUser from django.db.models.base import Model from django.utils import timezone from userAuthentication.models import User, User_profile import random, json # Create your models here. class Store(models.Model): user = models.OneToOne...
/** * @author Kai Salmen / https://kaisalmen.de * Development repository: https://github.com/kaisalmen/WWOBJLoader */ import { BufferAttribute, BufferGeometry, LineSegments, Mesh, Points, } from "three"; /** * * @param {MaterialHandler} materialHandler * @constructor */ const MeshReceiver =...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "Engine/GameInstance.h" #include "PongGameInstance.generated.h" /** * */ UCLASS() class PONG_API UPongGameInstance : public UGameInstance { GENERATED_BODY() public: /** */ UFUNCTION(B...
from __future__ import print_function, absolute_import, division # makes KratosMultiphysics backward compatible with python 2.6 and 2.7 #import kratos core and applications import KratosMultiphysics import KratosMultiphysics.DelaunayMeshingApplication as KratosDelaunay import KratosMultiphysics.PfemFluidDynamicsApplic...
# # Copyright 2019 Peifeng Yu <peifeng@umich.edu> # # This file is part of Salus # (see https://github.com/SymbioticLab/Salus). # # 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:...
const notasEstudiantes = [ [8, 35], [10, 45], [7, 20], ]; function calcularMediaPonderada(elemento1, elemento2, elemento3) { for (let i = 0; i < notasEstudiantes[0]; i++) { notasEstudiantes[1] / 100; var notaPonderada = notasEstudiantes[0] * notasEstudiantes[1]; } }
/** * @file * JavaScript behaviors for HTML editor integration. */ (function ($, Drupal, drupalSettings) { 'use strict'; // @see http://docs.ckeditor.com/#!/api/CKEDITOR.config Drupal.webform = Drupal.webform || {}; Drupal.webform.htmlEditor = Drupal.webform.htmlEditor || {}; Drupal.webform.htmlEditor.o...
var AdminLTEManager = function () { var SECTION_NAME = window.location.href.replace( Constants.SITE_URL+"/", "" ).replace( window.location.search, "" ).replace(/\.\w+#?$/,"").replace(/live_/,""), NO_CONTROLLO = ["index","recupera_password","registrazione"]; return { init: function () ...
var group__ADC__Register__Offsets = [ [ "MXC_R_ADC_CTRL", "group__ADC__Register__Offsets.html#ga9e1797652143ddae4930a834d0f93e6f", null ], [ "MXC_R_ADC_STATUS", "group__ADC__Register__Offsets.html#gafa877017385418fa56e9ecaae03ca97c", null ], [ "MXC_R_ADC_DATA", "group__ADC__Register__Offsets.html#gab691c46a...
'use strict'; const fs = require('fs'); const childProcess = require('child_process'); const Daemon = function() { this.settings = null; }; Daemon.prototype.lockFailedExitCode = 1; Daemon.prototype.startFailedExitCode = 2; Daemon.prototype.stopFailedExitCode = 1; Daemon.prototype.releaseLockFailedExitCode = 2; Dae...
''' * Copyright (C) 2019-2020 Intel Corporation. * * SPDX-License-Identifier: BSD-3-Clause ''' import sys import os import shutil import subprocess import tempfile import shlex import requests import yaml from jsonschema import Draft7Validator, FormatChecker from schema import model_list_schema MODEL_OPTIMIZER_ROOT =...
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b)...
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable class FocalLoss(nn.Module): def __init__( self, gamma=0, alpha=None, size_average=True, ignore_index=-100 ): super(FocalLoss, self).__init__() self.gamma = gamma self.alpha = ...
# 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...
const models = require('../../models'); const tpl = require('@tryghost/tpl'); const errors = require('@tryghost/errors'); const mega = require('../../services/mega'); const messages = { postNotFound: 'Post not found.' }; const emailPreview = new mega.EmailPreview({ apiVersion: 'v3' }); module.exports = { ...
const availableNotes = ["c4", "d4", "e4", "f4", "g4", "a4", "b4", "c5"] function LevelCreator(resources, audioCache) { // this.levelDefinitions = levelDefinitions; this.resources = resources; this.audioCache = audioCache; this.gameBoardBuilder = new GameBoardBuilder({ resources: this.resources, audioCa...
/** * description here * @author xupingmao * @since 2016 * @modified 2020/10/11 18:25:35 */ #include "include/mp.h" #include <setjmp.h> void mp_push_exception(MpFrame* f){ MpObj file = func_get_file_name_obj(f->fnc); MpObj fnc_name = func_get_name_obj(f->fnc); MpObj ex = mp_format(" File %o: in %o ,...
import React from 'react'; export default React.createClass({ render () { return ( <footer className="footer_"> <div className="row"> <div className="medium-6 column"> <ul className="inline-list"> <li><Link ...
'use strict'; /** @namespace DevKit */ var DevKit; (function (DevKit) { 'use strict'; DevKit.TimeZoneLocalizedNameApi = function (e) { var EMPTY_STRING = ''; var f = '@OData.Community.Display.V1.FormattedValue'; function webApiField(entity, logicalName, schemaName, entityLogicalCollectionName, entityLogi...
/** *********************************************************************************************************************** * Copyright (c) 2020, China Mobile Communications Group Co.,Ltd. * COPYRIGHT (C) 2006 - 2020,RT-Thread Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); you...
#!/usr/bin/env python # import sys # import os # # # Using https://stackoverflow.com/questions/51520/how-to-get-an-absolute-file-path-in-python # utils_path = os.path.abspath("utils") # # # Using https://askubuntu.com/questions/470982/how-to-add-a-python-module-to-syspath/471168 # sys.path.insert(0, utils_path) impo...
import os # Configure settings for project # Need to run this before calling models from application! os.environ.setdefault('DJANGO_SETTINGS_MODULE','proTwo.settings') import django # Import settings django.setup() import random from appTwo.models import User from faker import Faker fakegen = Faker() def populate(N...
import React, { Component } from 'react'; import { Link } from 'react-router-dom'; import { signup, signInWithGoogle, signInWithGitHub } from "../helpers/auth"; export default class SignUp extends Component { constructor() { super(); this.state = { error: null, email: '', password: '', ...
# class for colorful prints class color: CYAN = '\033[96m' PURPLE = '\033[95m' BLUE = '\033[94m' YELLOW = '\033[93m' GREEN = '\033[92m' RED = '\033[91m' DARKGRAY = '\033[90m' WHITE = '\033[48m' DARKCYAN = '\033[36m' BLACK = '\033[35m' UNDERLINE = '\03...
var JobsList = React.createClass({displayName: "JobsList", getInitialState: function() { return { data: JobStore.getState(), } } , componentDidMount: function() { amplify.subscribe( 'JobStore.change', this._handleChange ) } , componentDidUnmound: function() { ...
(function () { "use strict"; angular.module("dlFullscreen", []); })();
""" Tests to ensure that the training loop works with a dict """ import os import pytest import torch from pytorch_lightning import Trainer from pytorch_lightning.callbacks import EarlyStopping, ModelCheckpoint from pytorch_lightning.core.step_result import TrainResult from tests.base import EvalModelTemplate from te...
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.protot...
# Copyright (c) 2016-present, Facebook, Inc. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import argparse import logging import subprocess from pathlib import Path from typing import List, Optional import libcst from typing_extensions im...
# 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...
from aws_cdk import aws_ecr as ecr, core class ECRStack(core.Stack): def __init__(self, scope: core.Construct, id: str, **kwargs) -> None: super().__init__(scope, id, **kwargs) self.airflow_webserver_repo = ecr.Repository( self, "airflow_webserver_repo", reposi...
import { EventEmitter } from "events"; import { _makeEmitter } from "./emitter"; import { SubscriptionState } from "./subscription-state"; /** * A subscription provides {@link Notification} of events. * * @remarks * See {@link Subscriber} for details on establishing a subscription. * * @public */ export class Su...
// Leif Peterson and Eric Rissler 2016 #pragma once #include "InteractInterface.generated.h" /** * */ UINTERFACE(Blueprintable) class UInteractInterface : public UInterface { GENERATED_UINTERFACE_BODY() }; class IInteractInterface { GENERATED_IINTERFACE_BODY() public: UFUNCTION(BlueprintNativeEvent, BlueprintC...
define(['util', 'jquery', 'jquery.highlight'], function(util, $) { $(document).ready(function () { /* * Codeblock copy to clipboard action */ $('.codeblock').mouseover(function(){ // WH-1806 var item = $('<span class="copyTooltip wh-tooltip-container" data-t...
import argparse import random import time from tqdm import trange import hivemind from hivemind.utils.threading import increase_file_limit logger = hivemind.get_logger(__name__) def random_endpoint() -> hivemind.Endpoint: return f"{random.randint(0, 256)}.{random.randint(0, 256)}.{random.randint(0, 256)}." \ ...
from . import datasets from . import esperimenti from . import grafici from . import hello_world from . import indici from . import matematica from . import metriche from . import modello_lineare from . import preprocessamento from . import scraping from . import selezione_variabili from . import tests from . import va...
import React from 'react'; import { connect } from 'dva'; import { Layout } from 'antd'; import { Switch, routerRedux } from 'dva/router'; import NavBar from 'components/NavBar'; import { LeftSideBar, RightSideBar } from 'components/SideBar'; import TopBar from 'components/TopBar'; // import SkinToolbox from 'component...
import unittest from unittest.mock import Mock from pyats.topology import Device from pyats.topology import loader from genie.metaparser.util.exceptions import SchemaEmptyParserError from genie.libs.parser.junos.show_lacp import ShowLacpInterfacesInterface """ TestCase for: * show lacp interfaces {interface} ...
module.exports = { root: true, parser: '@typescript-eslint/parser', extends: [ 'plugin:@typescript-eslint/recommended', 'prettier/@typescript-eslint', 'standard', 'prettier', 'prettier/standard', ], parserOptions: { ecmaFeatures: { legacyDecorators: true, }, }, plugins: [...
import { main } from './example001'; import { readFileSync } from 'fs'; import { test } from 'ava'; test('Expected stl', async (t) => { await main(); const produced = readFileSync('tmp/example001.html', { encoding: 'utf8' }); const expected = readFileSync('example001.html', { encoding: 'utf8' }); t.is(produced...
import test from 'tape' import React from 'react' import { shallow } from 'enzyme' import HomeBtn from '../../../src/client/components/home_button.js' test('<HomeBtn />', t => { const wrapper = shallow(<HomeBtn />) t.equal(wrapper.contains( <button className='w-75 h3 bg-white f_lato br-pill center db main_blac...
// @flow import extend from 'lodash/extend'; import Binary from './Binary'; export default class Over extends Binary { constructor(left, right = null) { super(left, right); const { default: AliasPredication } = require('../AliasPredication'); extend(this, AliasPredication); } get operator() { r...
/** * サイトホーム */ import * as React from "react" import { Link } from "gatsby" import { Text, } from "@chakra-ui/react" import Layout from "../components/layout" const frontMatter = { title: 'ホーム', description: 'ウマ娘のツール' } const IndexPage = () => ( <Layout frontMatter={frontMatter}> <Text fontSize="3...
import Link from "next/link" import { signIn, signOut, useSession } from "next-auth/react" import styles from "./header.module.css" import { text } from '../lib/data' // The approach used in this component shows how to build a sign in and sign out // component that works on pages which support both client and server s...
# Generated by Django 4.0.2 on 2022-02-08 12:42 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Address', fields=[ ('id', models.BigAutoFie...
# uncompyle6 version 3.2.0 # Python bytecode 2.4 (62061) # Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] # Embedded file name: otp.avatar.LocalAvatar from pandac.PandaModules import * from libotp import Nametag, WhisperPopup from direct.gui.DirectGui import * fro...
import brownie from util.constants import BROWNIE_PROJECT accounts = brownie.network.accounts def test_transfer(): token = _deployToken() assert token.totalSupply() == 1e21 token.transfer(accounts[1], 1e20, {"from": accounts[0]}) assert token.balanceOf(accounts[1]) == 1e20 assert token.balanceOf(...
#include "bus.h" void nesbus_clear(uint8_t * bus, int start, int size) { for (int i = start; i < size; i++) { if (i >= 0x0000 && 0xFFFF <= i) * (bus + i) = 0x00; } } void nesbus_write(uint8_t * bus, uint16_t address, uint8_t data) { if (address >= 0x0000 && 0xFFFF >= address) ...
const webpackConfig = { resolve: { extensions: ['.js'] }, module: { rules: [ { test: /\.js?$/, use: ['babel-loader'], exclude: /(node_modules)/ } ] } }; module.exports = webpackConfig;
/* istanbul instrument in package npmtest_morgan */ /*jslint bitwise: true, browser: true, maxerr: 8, maxlen: 96, node: true, nomen: true, regexp: true, stupid: true */ (function () { 'use strict'; var local; // run shared js-env code - init-before (function () { ...
__all__ = [ 'main', ] import argparse import itertools import logging import sys from collections import OrderedDict import iga.context import iga.fargparse import iga.ninja import iga.package from iga.context import load_workspace from iga.label import Label from iga.ninja import NinjaRule def parse_argv(argv)...
/** * 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. * * @flow */ 'use strict'; describe('Timeline profiler', () => { let React; let ReactDOM; let Scheduler; let utils; let...
/* 登录请求【第一个】 特征:url后面接参数,但是是POST请求。没有返回信息(可能是被拦截了?) API地址:api/oauth/oauth/token 参数:url后 */ // http://localhost:8080/api/oauth/oauth/token?grant_type=pwd&scope=all&client_id=nti_client_id&client_secret=nti_client_secret&username=chenjun&password=e5078bfbbe579416d62161980fa0bc20 // ` // grant_type: pwd // scope: all /...
/*********** * GLOBALS * ***********/ var um_rows = document.getElementsByClassName( "um-container" ); var save_data = null; var storage_enabled = typeof( Storage ) !== "undefined"; /************* * CALLBACKS * *************/ function onUMMarkerChange( checkbox, index ) { var row = checkbox.parentElement.parentEl...
#pragma once #include <Macro/RectangleArray.h> #include <map> #include <vector> #include <set> void log(const char* text, ...); std::map<int, int> computeAssignments(Util::RectangleArray< double> &cost); void myRestartGame(); void logScore(bool isWinner, std::string mapName); std::vector<double> exponentialDis...
# Copyright 2018 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
//p5.play var wallTop, wallBottom, wallLeft, wallRight, player; var WALL_THICKNESS = 30; //var playerImg, backgroundImg; // player variables var playerInitialX = 60; var playerInitialY = 300; var playerInitialDirection = 180; var playerX = playerInitialX; var playerY = playerInitialY; var playerDirection = playerIni...
APP_DIRECTORY_NAME = "APP" SRC_DIRECTORY_NAME = "src" TEMPLATES_DIRECTORY_NAME = "templates" # Production React Js Template files having Github Repository Links REACTJS_TEMPLATES_URLS_DICT = { "package.json-tpl": "https://raw.githubusercontent.com/Jitensid/django-webpack-dev-server/main/assets/reactjs/package.json...
import React, { useState, useEffect } from 'react'; import { Link as RouterLink, withRouter } from 'react-router-dom'; import PropTypes from 'prop-types'; import validate from 'validate.js'; import { makeStyles } from '@material-ui/styles'; import { Grid, Button, IconButton, TextField, Link, FormHelperText,...
import matplotlib.pyplot as plt import numpy as np import pandas as pd from scipy.signal import argrelextrema class TestOutlierDetector(): def __init__(self): self.targets = ['is_signal', 'mass_jj'] def create_testing_dataframe(self, df, feature_cols=None, sample_frac=1.): # optinally use onl...
/*========================================================================= * * Copyright NumFOCUS * * 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.or...
define(["utils"], function(utils) { /** CallbackManager() */ var CallbackManager = utils.make_class(); CallbackManager.prototype = { init: init, set: set, remove: remove, run: run }; return CallbackManager; function init() { } function set(name, fn) { /** As in d...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = flattenUniq; // Copyright 2017-2020 @polkadot/metadata authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. /** @internal...
import json import os import cv2 as cv from torch.utils.data import Dataset from torchvision import transforms from config import image_folder # Data augmentation and normalization for training # Just normalization for validation data_transforms = { 'train': transforms.Compose([ transforms.Resize(256), ...
from PIL import Image from sys import platform import imagehash print("Flagpole") userFlagDir = str(input("Enter the directory that stores your flags > ")) userInput = str(input("Enter the path to the flag you want to test > ")) try: userHash = imagehash.average_hash(Image.open(userInput)) except: print("Inval...
"""SCons.Scanner.Python This module implements the dependency scanner for Python code. One important note about the design is that this does not take any dependencies upon packages or binaries in the Python installation unless they are listed in PYTHONPATH. To do otherwise would have required code to determine where ...
// SCRIPT TIMING var scriptStartTime = new Date(); console.log("Global Script Started at : " + scriptStartTime.getHours() + "h : "+scriptStartTime.getMinutes() + "m : " + scriptStartTime.getSeconds() + "s"); var scriptEndTime = new Date(); scriptTimingMs = parseFloat(scriptEndTime.getTime() - scriptStartTime.getTime...
'use strict'; function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var fs = require('fs'); var path = require('path'); var hasha = _interopDefault(require('hasha')); const cheerio = require('cheerio'); function traverse(dir, list) { const dirList = fs.r...
import { createSlice } from '@reduxjs/toolkit'; import { addAttendanceAsync, getAttendanceAsync, getSalesAsync, addSalesAsync } from './salesThunk'; export const salesInitialState = { status: 'idle', error: {}, success: false, getattendancestatus: 'idle', getattendanceerror: {}, getattendancedata: null, ...
const fs = require('fs'); const path = require('path'); const moment = require('moment'); const GENESIS_TOKEN = path.resolve(__dirname, 'blockchain/genesis_token.json'); const GENESIS_ACCOUNTS = path.resolve(__dirname, 'blockchain/genesis_accounts.json'); const GENESIS_OWNERS = path.resolve(__dirname, 'blockchain/genes...
#pragma once class HttpRequest; /** * @brief 解析 Http 请求 * */ class HttpRequestParser { public: enum HTTP_CODE { No_Request = 0, Get_Request, Bad_Request, Forbidden_Request, Internal_Error, Closed_Connection }; enum LINE_STATE { Line_OK = 0, Line_Bad, Line_More, Line_Overflow ...
class Router { constructor() { this.stack = [] } register(path, methods, middleware) { let route = { path, methods, middleware } this.stack.push(route) } get(path, middleware) { // 注册路由 this.register(path, 'get', middleware) } post(path, middleware) { // 注册路由 this.register(...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Search engine API.""" import hashlib from functools import partial import six fr...
import threading import requests import time import json import pandas as pd import time import unidecode spanish_path = "./datasets/es.json" english_path = "./datasets/all_data_en.json" file = open(english_path, "r") data = [] for index, line in enumerate(file): data.append(json.loads(line)) if index == 1000...
import numpy as np from numba import jit dt = np.double @jit def shade(ray, hit): if (hit.distance < np.Inf): return hit.normal * 128 + 128 else: #theta = np.acos(ray.direction.y) / - np.pi #phi = atan2(ray.direction.x, -ray.direction.z) / - np.pi * 0.5 #return _SkyboxTexture.SampleLevel(sampler_S...