text
stringlengths
3
1.05M
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from peewee import fn import datetime from models import QuestionEvent, TaskPeriod logger = logging.getLogger('data') CONCERN_COUNT = 6 # needs to be updated to reflect count of concerns in our study # A tuple of...
import { Seq } from 'immutable'; import PromiseState from './PromiseState'; export default ({ type, types = [type], mapResolved = payload => payload, handle = state => state, }) => (state = PromiseState.INVALID, action) => { const value = Seq(types) .map(type => { switch (action.type) { ...
'use strict'; exports.ons = { default: { onsAddr: 'http://onsaddr-internal.aliyun.com:8080/rocketmq/nsaddr4client-internal', }, };
import { getCandidatesList, getCandidate } from '@/api'; const fetchPayload = async ({ commit }) => { try { const { candidatos } = await getCandidatesList('governador', 'SC'); commit('SET_CANDIDATES', candidatos); const promises = candidatos.map(candidato => getCandidate(candidato.id, 'SC')); const ...
(function ($) { if (!$) { return; } $(function () { var $registerForm = $('#RegisterForm'); $.validator.addMethod("customUsername", function (value, element) { if (value === $registerForm.find('input[name="EmailAddress"]').val()) { return true; ...
const router = require("express").Router(); const gitHubController = require("../../controllers/gitHubController"); router.route("/") .get(gitHubController.findAll) .post(gitHubController.create); router .route("/:id") .delete(gitHubController.remove); // router.get('/', (req,res) => res.send('Make a Dent'))...
#include <algorithm> // std::swap class IntCell { public: explicit IntCell( int initialValue = 0 ) // no parameter default constructor { storedValue = new int{ initialValue }; } IntCell( const IntCell & rhs ) // copy constructor { storedValue = new int( *rhs.storedValue...
#pragma once #define MAXCHANNELS 16 #define MINRC 1000 //1000 to 2000 is old standard for RC channels. midRc needs to be adjustable. #define MAXRC 2000 //1000 to 2000 is old standard for RC channels. midRc needs to be adjustable. //config structure which is loaded by config typedef struct { float deadBand[MAX...
import { restore, filterWidget } from "__support__/e2e/cypress"; import { setAdHocFilter } from "../../native-filters/helpers/e2e-date-filter-helpers"; describe.skip("issue 17551", () => { beforeEach(() => { restore(); cy.signInAsAdmin(); cy.createNativeQuestion({ native: { query: ...
/* ========================================================================== Licensed under BSD 2clause license. See LICENSE file for more information Author: Michał Łyszczek <michal.lyszczek@bofc.pl> ========================================================================== */ #ifndef PARAM_TESTS_H #defin...
import { shallow } from '@vue/test-utils' import BUpload from '@components/upload/Upload' describe('BUpload', () => { it('is called', () => { const wrapper = shallow(BUpload) expect(wrapper.name()).toBe('BUpload') expect(wrapper.isVueInstance()).toBeTruthy() }) })
from Repositories.JobRepository import JobRepository from Controllers.StateController import * class JobController: def __init__(self): self.repository = JobRepository() def add_job(self, location, requirements, company_email_id): try: if middleware_company(): retu...
module.exports = { presets: [['@vue/app', { useBuiltIns: 'entry' }]] };
const mix = require('laravel-mix'); /* |-------------------------------------------------------------------------- | Mix Asset Management |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel appli...
#coding=utf-8 # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # #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...
from math import sqrt, ceil def largestPrimeFactor(number): """Return largest prime factor of 'number'""" i = 2 while i <= int(ceil(sqrt(number))): if number % i == 0: number //= i i = 2 else: i += 1 return number print(largestPrimeFac...
(function($) { 'use strict'; var TxtType = function(el, toRotate, period) { this.toRotate = toRotate; this.el = el; this.loopNum = 0; this.period = parseInt(period, 10) || 2000; this.txt = ''; this.tick(); this.isDeleting = !1 }; TxtType.proto...
/*! angularjs-slider - v5.9.0 - (c) Rafal Zajac <rzajac@gmail.com>, Valentin Hervieu <valentin@hervieu.me>, Jussi Saarivirta <jusasi@gmail.com>, Angelin Sirbu <angelin.sirbu@gmail.com> - https://github.com/angular-slider/angularjs-slider - 2016-12-12 */ /*jslint unparam: true */ /*global angular: false, console: ...
/** * @file 组件样式入口 */ import '../../core/styles/index'; import './index.less'; import '../../empty/style'; import '../../checkbox/style'; import '../../button/style'; import '../../input/style';
# -*- coding: utf-8 -*- """ Created on Tue Jul 2 09:25:41 2019 @author: michaelek """ import pytest from tethys_utils import * import pandas as pd from tethys_utils.datasets import get_path pd.options.display.max_columns = 10 ############################################### ### Parameters d_name1 = '218810' d_pat...
from __future__ import division from builtins import object import numpy as np from scipy.ndimage import convolve from sporco import linalg from sporco import util class TestSet01(object): def setup_method(self, method): np.random.seed(12345) def test_01(self): rho = 1e-1 N = 64 ...
from django.shortcuts import render from django.views.generic.list import ListView from .models import Query class QueryListView(ListView): model = Query
from concurrent.futures import ThreadPoolExecutor import pytest from azure.identity.aio import DefaultAzureCredential from adlfs import AzureBlobFileSystem URL = "http://127.0.0.1:10000" ACCOUNT_NAME = "devstoreaccount1" KEY = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="...
/* Copyright (c) 2017-2021, Hans Erik Thrane */ /* !!! THIS FILE HAS BEEN AUTO-GENERATED !!! */ #pragma once #include <fmt/format.h> #include <cassert> #include <string_view> #include <type_traits> #include <magic_enum.hpp> #include "roq/compat.h" #include "roq/literals.h" namespace roq { //! Enumeration of req...
// @flow export function setJsonRpcRoutes(server: any) { server.all('api/wallet-core/', 'api/wallet-core/', async ctx => { const {jsonrpc, id, method, params} = ctx.request.body; setCors(ctx); try { const result = await server.gateways.walletCore[method](...params); return (ctx.response.body =...
/* * Copyright 2017 Banco Bilbao Vizcaya Argentaria, S.A. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
#ifndef GPU_ENERGY_H #define GPU_ENERGY_H #include <utility> //#include "heap.h" /* Class used to transform between xyz coordinates and abc coordinates.*/ class UNIT_CELL { double va_x; double vb_x, vb_y; double vc_x, vc_y, vc_z; double inv_va_x; double inv_vb_x, inv_vb_y; double inv_vc_x, inv_vc_y, inv_...
import React from 'react'; import {connect} from "react-redux"; class ComA extends React.Component{ // 1) 初始化阶段 constructor(props){ super(props); this.state = { }; } handleClick=()=>{ // console.log("输出:",this.props); this.props.addAction(); } render(){ ...
"""This module contains main Application class. The class implements core logic of the program. """ import fnmatch import logging import logging.handlers from enum import Enum from typing import Tuple import colorlog import utils import yaml CLI_OK = 0 CLI_ERROR = 1 class Command(Enum): """The enum of comma...
import React from 'react'; import { BrowserRouter, Switch, Route } from 'react-router-dom'; import Main from './pages/main'; import Product from './pages/product'; const Routes = () => ( <BrowserRouter> <Switch> <Route exact path="/" component={ Main } /> <Route path="/products/:id" compone...
# -*- coding: utf-8 -*- ######################################################################## # # License: BSD # Created: April 02, 2007 # Author: Francesc Alted - faltet@pytables.com # # $Id$ # ######################################################################## """Utilities to be use...
# Crie um programa que leia um número real qualquer e mostre na tela a sua porção inteira. (math) # Digita um número 6.67; esse número tem a parte inteira 6. import math n = float(input('Digite um número real: ')) print(f'O número digitado foi {n} e sua porção inteira é {math.trunc(n)}') n = float(input('Digite um nú...
import React, { Component } from 'react' class Product extends Component { render() { return ( <div> </div> ) } } export default Product;
"""fileformattoml.py unit tests.""" import pytest from pypyr.context import Context from pypyr.errors import KeyInContextHasNoValueError, KeyNotInContextError import pypyr.steps.fileformattoml as fileformat # region validation def test_fileformattoml_no_in_obj_raises(): """None in path raises.""" context = ...
Highcharts.theme={colors:["#DDDF0D","#7798BF","#55BF3B","#DF5353","#aaeeee","#ff0066","#eeaaee","#55BF3B","#DF5353","#7798BF","#aaeeee"],chart:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"rgb(96, 96, 96)"],[1,"rgb(16, 16, 16)"]]},borderWidth:0,borderRadius:15,plotBackgroundColor:null,plotShadow:fa...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # MIT License # Copyright (c) 2021 Tharuk, This is a part of nstcentertainmentbot. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE ...
exports.backupTwoToneImpl = require('@material-ui/icons/BackupTwoTone').default;
from typing import List, Tuple import pandas as pd from glob import glob from os import path TaggedName = Tuple[str, pd.DataFrame] TaggedNameList = List[TaggedName] def get_testing_set(folder: str, prefix: str) -> TaggedNameList: """I've laid out my testing data so that each set of files starts with the same pr...
#!/usr/bin/env python from collections import namedtuple from datetime import datetime from typing import List import pandas as pd from hummingbot.core.data_type.trade_fee import TradeFeeBase from hummingbot.core.data_type.common import OrderType, TradeType class Trade(namedtuple("_Trade", "trading_pair, side, pri...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_memmove.c :+: :+: :+: ...
from django.shortcuts import render from django.core.paginator import Paginator from django.shortcuts import render from .models import Department def index(request): department_list = Department.objects.all() paginator = Paginator(department_list, 10) page = request.GET.get('page') departments = paginator.get_pa...
(function(e){"function"==typeof define&&define.amd?define(["jquery","moment"],e):e(jQuery,moment)})(function(e,t){var n="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),a="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_");(t.defineLocale||t.lang).call(t,"es",{months:"enero_febrero_marz...
import warnings import logging from pathlib import Path import torch.nn from torch.nn.parameter import Parameter import torch.nn.functional as F import torch.autograd as autograd import dadmatools.models.flair.nn import dadmatools.models.flair as flair import torch from dadmatools.models.flair.data import...
var request = require('request'); var util = require('util'); //The target var statusUpdateService = { statusUpdates: {}, sendUpdate: function(status) { console.log('Status sent: ' + status); var id = Math.floor(Math.random() * 1000000); statusUpdateService.statusUpdates[id] = status; return id; ...
import React from 'react'; import SideBarNavItem from './SideBarNavItem'; import { dashboardSidebarData } from '../../dummy-data-structures/dashboard-sidebar-data'; function SideBar({ hide }) { return ( <div className={'dashboard_sidebar_container' + (hide ? ' hide' : '')}> {dashboardSidebarData.map(navIte...
import gulp from 'gulp'; import path from 'path'; import {expect} from 'chai'; import {tmpDir, chDir, overrideMethod} from '../src/cleanup-wrapper'; import {expectEventuallyDeleted} from 'stat-again'; describe('Testing tmpDir wrapper', function () { before(function () { this.dirty = function (dir = 'tmp_utils') ...
import { OldFilmFilter } from "@pixi/filter-old-film"; import { Application, Container, Loader, Sprite, Ticker } from "pixi.js"; import Swiper from "swiper"; import animate from "animateplus"; import { getRandomId } from "src/utils"; const filterParams = { noise: 0.23, scratchDensity: 3.67, noiseSize: 0.16, se...
from setuptools import find_packages, setup setup( name="asyncache", version="0.1.1", url="https://github.com/hephex/asyncache", license="MIT", author="Hephex", description="Helpers to use cachetools with async functions", long_description=open("README.rst").read(), keywords="cache cac...
from setuptools import setup, find_packages import os # To use a consistent encoding from codecs import open from cmwalk import version # Get the long description from the README file def readme(): here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst'), encoding='utf-8') ...
from __future__ import annotations from typing import Any, Dict async def run_python( ctx: Dict[Any, Any], py: str, *, kernel_name: str = "LSST" ) -> str: """Execute Python code in a JupyterLab pod with a specific Jupyter kernel. Parameters ---------- ctx Arq worker context. py : str...
#! /usr/bin/env node /* * Copyright (c) 2018-present, IBM CORP. * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var program = require('commander'); program .version('0.0.1') .description('Create extensions for Maximo\'s object st...
#!/usr/bin/env python # coding: utf-8 import os import logging import json import yaml import importlib import imp import traceback from logger import log, stdouthandler, logfilehandler, timestamp from version import detectversion from helpers import findfile auto_paths = [ 'gamelog.txt', 'errorlog.txt', '...
import * as algoliaSearchActionsConstants from '../actions/algoliaSearchActionsConstants'; const initialState = { keyword: '', algoliaLeadsList: [], algoliaContactsList: [], algoliaAccountsList: [], algoliaTasksList: [], algoliaEventsList: [], algoliaDealsList: [], algoliaLeadsListLoa...
#/opt/local/bin/python3 import sys, math, re, time, os import numpy as np import numpy.random as rand import random import hashlib from copy import deepcopy #helpful resources: https://www.youtube.com/c/learnmeabitcoin/videos #Txn for transaction #BlkChn for blockchain #################################################...
"""Simple daemonize manager implementation.""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import logging import os import sys from ..interfaces import daemonize as daemonize_iface from ..interfaces import exit ...
# # Copyright (c) nexB Inc. and others. # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this list # of conditions and the following disclaimer. #...
import pandas as pd from pathlib import Path def parse_dates(s): """ Fast date parser, source: https://github.com/sanand0/benchmarks/tree/master/date-parse This is an extremely fast approach to datetime parsing. For large data, the same dates are often repeated. Rather than re-parse these, we stor...
# Pylint doesn't play well with fixtures and dependency injection from pytest # pylint: disable=redefined-outer-name import os import tarfile import hashlib import re import shutil import pytest from buildstream._testing import cli # pylint: disable=unused-import from buildstream._testing import create_repo from bu...
import React from "react"; import "../styles/Categories.css"; const Categories = ({ children, title }) => ( <React.Fragment> <div className="categories"> <h3 class="categories__title">{title}</h3> {children} </div> </React.Fragment> ); export default Categories;
from secrets import choice from AyiinXd import CMD_HANDLER as cmd from AyiinXd import CMD_HELP from AyiinXd.ayiin import ayiin_cmd, deEmojify, eod, eor from Stringyins import get_string @ayiin_cmd(pattern="rst(?: |$)(.*)") async def rastick(animu): text = animu.pattern_match.group(1) xx = await eor(animu, ge...
/* Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the ...
// Copyright (c) 2009-2017 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef PERFECTCOIN_WALLET_CRYPTER_H #define PERFECTCOIN_WALLET_CRYPTER_H #include <keystore.h> #include <serialize.h> #incl...
/** * ========================== * @description Scene's platform object * ========================== * * @author Evgeny Savelyev * @since 21.12.17 * @version 1.0.0 * @licence See the LICENCE file in the project root. */ "use strict"; const Actor = require("../Actor"); const RectBox = require("../....
let fetch = require('node-fetch') let handler = async (m, { conn }) => conn.sendButtonLoc(m.chat, await (await fetch(thanks)).buffer(), ` BIG THANKS TO •Allah swt •My ortu •⳹ ❋ཻུ۪۪⸙Zifabotz⳹ ❋ཻུ۪۪⸙ •Rozi{OWNER ZIFABOTZ} •Penyedia Layanan API •Orang-orang yang Berdonasi `.trim(), watermark, 'Menu', '.menu') handler.hel...
from .response import BotResponse class NothingResponse(BotResponse): def run(self): pass
# Copyright (C) 2021 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause # See: https://spdx.org/licenses/ import unittest import numpy as np from lava.lib.optimization.problems.constraints import ( DiscreteConstraints, EqualityConstraints, InequalityConstraints, ArithmeticConstraints, Cons...
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; const SvgIconCustom = global.__MUI_SvgIcon__ || SvgIcon; let SwapCalls = props => <SvgIconCustom {...props}> <path d="M18 4l-4 4h3v7c0 1.1-.9 2-2 2s-2-.9-2-2V8c0-2.21-1.79-4-4-4S5 5.79 5 8v7H2l4 4 4-4H7V8c0-...
import time import requests from bs4 import BeautifulSoup from crawlers.generic import BaseCrawler from settings import BEGIN_CRAWL_SINCE class ScreenEggsCrawler(BaseCrawler): def __init__(self, *args, **kwargs): super(ScreenEggsCrawler, self).__init__(source='screen_eggs', *args, **kwargs) self...
""" Django settings for sport_club project. Generated by 'django-admin startproject' using Django 3.2. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ import os f...
import math import os import time import numpy as np import pandas as pd import sklearn from tabulate import tabulate from tqdm import tqdm from ..utils.alias_table import AliasTable from ..utils.common_util import get_dataframe_from_npz, save_dataframe_as_npz from ..utils.constants import ( DEFAULT_FLAG_COL, ...
#pragma once #include "Module.h" // Just a basic example of how a render system that utilizes the modules and cecsar could look like. class BasicRenderSystem final : public jecs::Module<BasicRenderSystem> { public: // Anti Aliasing MSAA. int32_t aaSamples = 4; // Render the models using multiple cameras and their...
from mpl_toolkits.mplot3d import axes3d import matplotlib.pyplot as plt from matplotlib import cm fig = plt.figure() ax = fig.gca(projection='3d') X, Y, Z = axes3d.get_test_data(0.05) ax.plot_surface(X, Y, Z, rstride=8, cstride=8, alpha=0.3) cset = ax.contour(X, Y, Z, zdir='z', offset=-100, cmap=cm.coolwarm) #cset = a...
from __future__ import absolute_import from datetime import timedelta from requests import RequestException from django.core.exceptions import PermissionDenied from django.http import HttpResponseRedirect from django.urls import reverse from django.utils import timezone from allauth.exceptions import ImmediateHttpRe...
const mongoose = require('mongoose') const Schema = mongoose.Schema; const ProfileSchema = new Schema({ handle: { type: String, required: true, max: 40 }, country: { type: String }, location: { type: String }, birthdate: { type: String }...
/* 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...
// Copyright 2012 Mark Cavage, Inc. All rights reserved. 'use strict'; var crypto = require('crypto'); var zlib = require('zlib'); var assert = require('assert-plus'); var once = require('once'); var errors = require('restify-errors'); ///--- Globals var BadDigestError = errors.BadDigestError; var RequestEntityTo...
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import csv import inspect import os from telemetry.page import page as page_module from telemetry.page import page_set_archive_info from telemetry.user_stor...
import React, { Component } from 'react'; import Link from 'gatsby-link'; import { Image } from 'semantic-ui-react'; import banner from './banner.png'; class Header extends Component { constructor() { super(); } render() { return ( <div style={{ margin: '0 auto', maxWidth: 960, ...
from shutil import rmtree from pathlib import Path from sys import getsizeof from os.path import exists from os import mkdir, getcwd from tqdm import tqdm from neo4j import GraphDatabase from neo4j.exceptions import ServiceUnavailable from ._backends import to_json, get_unique_prop_key class Extractor: def __i...
import os import time import torch from tqdm import tqdm from tensorboardX import SummaryWriter from torch.utils.data import DataLoader from misc import util, ops from network.model import Glow class Trainer: criterion_dict = { 'single_class': lambda y_logits, y: Glow.single_class_loss(y_logits, y), ...
# Copyright (c) 2017-present, Facebook, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
/* * 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 ...
# 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. import math import torch import torch.nn.functional as F from fairseq import metrics, modules, utils from fairseq.criterions import FairseqC...
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
const aws = require('aws-sdk'); function LogScraper(region) { const cloudwatchlogs = new aws.CloudWatchLogs({region}); const getAllLogItemsMatching = async function (params) { let data = await cloudwatchlogs.filterLogEvents(params).promise(); let events = data.events; let nextToken =...
import React, { forwardRef } from 'react'; import PropTypes from 'prop-types'; const SkipStartBtnFill = forwardRef(({ color, size, ...rest }, ref) => { return ( <svg ref={ref} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width={size} height={size} fill={color} ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('default', '0001_initial'), ('psa'...
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\tag.py # Compiled at: 2020-01-16 03:44:59 # Size of source mod 2**32: 2481 bytes import functools fr...
// main.js hacked to let compiler made stuff without problems when we build the requireVersion minified, // then it's removed from minified code define( [], function(){} );
from P458.data import ( attributes, read_arff, ) from P458.id3 import ( id3, ) from P458.tree import ( str_tree, decide, ) data = read_arff('./data/contact-lenses.arff') decision_tree = id3(data, 'contact-lenses') row = ['sunny', 'hot', 'high', False, False] result = decid...
import glob from io import DEFAULT_BUFFER_SIZE import math import os import json import random import shutil import copy import time import warnings from collections import defaultdict, OrderedDict from pathlib import Path from threading import Thread import cv2 import numpy as np import torch from PIL import Image, E...
from sentence_transformers import SentenceTransformer from .similarity_functions import * function_dispatcher = { 'cosine' : cosine, 'euclidean' : euclidean,'manhattan':manhattan,'minkowski':minkowski} class sentence_embedding(): '''load the pretrained model''' def __init__(self,model_name): self.mode...
/***************************************************************************** Copyright (c) 2011, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source cod...
/** * Copyright 2014-2016 CyberVision, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicabl...
"""ACH Server URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-ba...
import fetch from 'isomorphic-fetch' import { FETCH_PARAMS_REQUEST, FETCH_PARAMS_SUCCESS, FETCH_PARAMS_FAILURE, UPDATE_PARAMS } from "../actionTypes"; import {apiGetParams} from "../api"; import {thunkCreator} from "./utils"; export const updateParams = (rowIndex, colIndex, type, value) => { const ...
# -*- coding: utf-8 -*- """Tests for the family module.""" # # (C) Pywikibot team, 2014-2015 # # Distributed under the terms of the MIT license. # from __future__ import unicode_literals __version__ = '$Id: bb5b11f9d8c6799ce123b546d89d9bacd0051875 $' from pywikibot.family import Family, SingleSiteFamily from pywikib...
import React from 'react'; import { BrowserRouter as Router } from 'react-router-dom'; import { screen, getByText, getByRole, getAllByRole, fireEvent, waitForElementToBeRemoved, waitFor, } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { noop } from 'lodash'; i...
/* * 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 ma...
# IMPORTATION STANDARD import os # IMPORTATION THIRDPARTY import pytest # IMPORTATION INTERNAL from gamestonk_terminal.economy import economy_controller # pylint: disable=E1101 # pylint: disable=W0603 # pylint: disable=E1111 @pytest.mark.vcr(record_mode="none") @pytest.mark.parametrize( "queue, expected", ...