text
stringlengths
3
1.05M
import React from 'react' import '../src/index.css' import { configure, storiesOf } from '@storybook/react' import { linkTo } from '@storybook/addon-links' import { Welcome } from '@storybook/react/demo' storiesOf('Welcome', module).add('to Storybook', () => <Welcome showApp={linkTo('Button')} />) const stories = r...
from ufma_scrapper import subunidade as subunity from models import Subunidade, Docente def saveSubunitysAndTeachers(): subunidades = subunity.get_subunidades() for subunidade in subunidades: subunidade = Subunidade(codigo=subunidade["codigo"], nome=subunidade["nome"]...
 lang.rows="Linhas" lang.cols="Colunas" lang.hotspot="Hotspot" lang.addhotspot="Criar um hotspot" lang.edithotspot="Editar hotspot" lang.deletehotspot="Excluir hotspot" lang.mapname="Nome do mapa" lang.style="Estilo" lang.box="Caixa" lang.boxshadow="box shadow*" lang.color="Cor" lang.cursor="Cursor" lang.position="P...
module.exports = { app: { type: 'amd', moduleName: function (path) { return 'appkit/' + path; }, files: [{ expand: true, cwd: 'client/app/', src: '**/*.js', dest: 'build/js/app/' }] } };
exports.run = async (client, message, args, level) => { const msg = await message.channel.send("Brightspace you ask?"); msg.edit(`https://brightspace.uhi.ac.uk/d2l/home`) }; exports.conf = { enabled: true, guildOnly: false, aliases: [], permLevel: "User" }; exports.help = { name: "bright...
#!/usr/bin/env python # encoding: utf-8 """ @version: ?? @author: mum @license: Apache Licence @contact: shuo502@163.com @author: ‘yo‘ @site: http://github.com/shuo502 @software: PyCharm @file: srclink.py @time: 2018/2/16 15:18 """ def func(): pass class Main(): def __init__(self): pass if __na...
/*------------------------------------------------------------------------- * * tsvector_parser.c * Parser for tsvector * * Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group * * * IDENTIFICATION * src/backend/utils/adt/tsvector_parser.c * *---------------------------------------------...
# Import Necessary Libraries import numpy as np import tensorflow as tf def Conv_Block(inputs, model_width, kernel, multiplier): # 2D Convolutional Block x = tf.keras.layers.Conv2D(model_width * multiplier, kernel, padding='same')(inputs) x = tf.keras.layers.BatchNormalization()(x) x = tf.keras.layers...
#ifndef TIMERS_H #define TIMERS_H #include <FreeRTOS.h> TickType_t xTaskGetTickCount(void); TickType_t xTaskGetTickCountFromISR(void); #endif /* TIMERS_H */
# pyGestalt Interfaces Module """Provides interfaces for connecting virtual nodes with their physical counterparts.""" #---- INCLUDES ---- import threading import queue import time import copy import random #for generating new addresses import serial import os, platform from pygestalt import core, packets, utili...
/* * Please, use UTF-8 encoding. * * Turkish language file. */ FCKLang['Dir'] = 'ltr' ; FCKLang['BrowseServer'] = 'Sunucuyu Gez' ; FCKLang['Folder'] = 'Folder' ; FCKLang['CreateNewFolder'] = 'Create a folder' ; FCKLang['UploadFile'] = 'Upload a file' ; FCKLang['Upload'...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. import { __awaiter, __generator } from "tslib"; import { HttpHeaders, isNode, URLBuilder } from "@azure/core-http"; import { HeaderConstants, URLConstants } from "./constants"; /** * Reserved URL characters must be properly...
import logging from django.contrib.gis.db import models logger = logging.getLogger('neighborhoods.models') class NeighborhoodSource(models.Model): name = models.CharField( max_length=255, ) slug = models.SlugField() priority = models.PositiveSmallIntegerField() def __unicode_...
!function(e){function n(n){for(var c,a,d=n[0],m=n[1],p=n[2],f=0,i=[];f<d.length;f++)a=d[f],Object.prototype.hasOwnProperty.call(t,a)&&t[a]&&i.push(t[a][0]),t[a]=0;for(c in m)Object.prototype.hasOwnProperty.call(m,c)&&(e[c]=m[c]);for(s&&s(n);i.length;)i.shift()();return r.push.apply(r,p||[]),o()}function o(){for(var e,n...
from datetime import timedelta import re from warnings import warn from django.utils.timezone import now from .base_handler import BaseHandler import requests API_TARGET = "https://api.bitbucket.org/2.0/repositories" descendants_re = re.compile(r"Forks/Queues \((?P<descendants>\d+)\)", re.IGNORECASE) class Bitbu...
/** ****************************************************************************** * @file PWR/PWR_CurrentConsumption/stm32f7xx_lp_modes.c * @author MCD Application Team * @brief This file provides firmware functions to manage the following * functionalities of the STM32F7xx Low Power Mo...
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Fre...
#!/usr/bin/env node /** * @license * Copyright 2016 The AMP HTML Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
import json import time from qiniu import Auth from aboutTa import config as cfg def get_res_url(filename): '''获取资源的URL''' return f'http://{cfg.QN_DOMAIN}/{filename}' # 七牛云接收JSON形式,需要保存成字典 def gen_token(uid, filename): policy = { 'scope': cfg.QN_BUCKET, # 指定上传的目标资源空间 Bucket ...
from __future__ import absolute_import import ast import os import StringIO import sys from functools import * from os import path import flake8_import_order import localpackage import X import y import Z from flake8_import_order import * from X import * from X import A, B, C, b, d from y import * from y import A, B,...
#External libs import boto3 import sys import json import os import datetime from botocore.exceptions import ClientError #Get our config import maestro.config.lambda_config as lambda_config #This is only here for printing pretty colors class color: PURPLE = '\033[95m' CYAN = '\033[96m' DARKCYAN = '\033...
var attackTarget; var evalScriptsCounter = 0, largeTextEscaped = '&lt;span&gt;test&lt;/span&gt;', largeTextUnescaped = '<span>test</span>'; (2048).times(function(){ largeTextEscaped += ' ABC'; largeTextUnescaped += ' ABC'; }); suite("String Namspace",function(){ test(".interpret()", function(){ as...
/* * Copyright 2019 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing ...
class UndergroundSystem: def __init__(self): # stationPairs = {(s1, s2) : [toTaltime, trips]} # c_in = {id: (time, s)} self.stationPairs = dict() self.c_in = dict() def checkIn(self, id: int, stationName: str, t: int) -> None: self.c_in[id] = (t, stationName) ...
from django.db import models from django.conf import settings from django_countries.fields import CountryField from django_mysql.models import EnumField from model_utils.models import TimeStampedModel from .choices import ( EnergyType, TempType, ModelType, PartnerChoice, ClassificationChoice, ...
// // GXTransitionCubeDelegate.h // GXTransitionSample // // Created by Gin on 2020/4/15. // Copyright © 2020 gin. All rights reserved. // #import "GXAnimationBaseDelegate.h" NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSUInteger, GXAnimationCubeDirection) { GXAnimationCubeDirectionLeft = 0, GXAnimationCubeD...
import io from 'socket.io-client'; const room = window.location.hash.slice(1); const socket = io(`/?room=${room}`); socket.on('room', ({ room }) => { window.location.hash = room; }); export default socket;
import Animate from '../mixin/animate'; import Class from '../mixin/class'; import {$$, addClass, after, assign, append, attr, before, css, getEventPos, height, includes, index, isEmpty, isInput, offset, off, on, pointerDown, pointerMove, pointerUp, remove, removeClass, scrollTop, toggleClass, toNodes, trigger, within}...
#------------------------------------------------------------------------------ # Copyright (c) 2011, Enthought, Inc. # All rights reserved. #------------------------------------------------------------------------------ from .qt_test_assistant import QtTestAssistant from .. import radio_button class TestQtRadioBut...
/** * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/license */ /** * This file was added automatically by CKEditor builder. * You may re-use it at any time to build CKEditor again. * * If you would like to build CKEd...
import * as inAction from './increment' import * as deAction from './decrement' const rootAction = { inAction, deAction, } export default rootAction
initSidebarItems({"enum":[["Position","A position that's either physical or logical."],["Size","A size that's either physical or logical."]],"fn":[["validate_scale_factor","Checks that the scale factor is a normal positive `f64`."]],"struct":[["LogicalPosition","A position represented in logical pixels."],["LogicalSize...
import sys import gensim import re import random import csv import logging import numpy as np import theanets import json from sklearn.metrics import classification_report, confusion_matrix from gensim.models import KeyedVectors def hasNoNumbers(inputString): return not any(char.isdigit() for char...
/** * @license * Copyright (c) 2018 amCharts (Antanas Marcelionis, Martynas Majeris) * * This sofware is provided under multiple licenses. Please see below for * links to appropriate usage. * * Free amCharts linkware license. Details and conditions: * https://github.com/amcharts/amcharts4/blob/master/LICENSE *...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=direct-thread.repository.get-by-participants.response.js.map
// jshint node:true // For details on each option run `ember help release` module.exports = { // angular style guide: https://github.com/angular/angular.js/blob/v1.4.8/CONTRIBUTING.md#commit style: 'angular', head: 'master', base: '-last' };
"use strict"; var __assign = (this && this.__assign) || Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; var __values = (this && thi...
import os import json from torch.utils.data import Dataset from torchvision.datasets.utils import download_url from PIL import Image from data.utils import pre_caption class coco_karpathy_train(Dataset): def __init__(self, transform, image_root, ann_root, max_words=30, prompt=''): ''' im...
# 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 RScatterplot3d(RPackage): """3D Scatter Plot. Plots a three dimensional (3D) point cl...
"""GPU-based image processing filters.""" import os from galry import * import pylab as plt # we define a list of 3x3 image filter kernels KERNELS = dict( original=np.array([[0,0,0],[0,1,0],[0,0,0]]), sharpen=np.array([[0,-1,0],[-1,5,-1],[0,-1,0]]), sobel=np.array([[1,0,-1],[2,0,-1],[1,0,-1]]), emboss=...
from django.apps import AppConfig class PoultryAppConfig(AppConfig): name = 'poultry_app'
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(d...
const expect = require('expect'); const { validate } = require('../../../../src/plugins/validation/swagger2/semantic-validators/operations-ibm'); describe('validation plugin - semantic - operations-ibm - swagger2', function() { it('should complain about PUT operation with body parameter and a missing consumes', fu...
import hashlib import logging import time from pathlib import Path from typing import Dict, List, Optional, Tuple from ..utils import Actions, Messages from . import ConfigurationManager, DatabaseHandler, Holding, StockPriceGetter, Trade class Portfolio: """Represent a trading portfolio including cash available ...
import service from '@/utils/request' import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken } from '@/utils/auth' const user = { state: { userInfo: {}, token: getToken(), name: 'innben', avatar: require("@/image/access/profile.jpg"), // roles: [...
"""Tasks scheduler. The goal is to minimize the weighted sum of completion times. We can achieve this by ordering tasks by their ratios (weight / length).""" import operator # [job_weight, job_length] jobs = [[3, 6], [54, 2], [1, 500], [1000, 1], [3, 555], [27, 1111], [2, 1000]] def schedule(tasks, alg=None): "...
/* * NASA Worldview * * This code was originally developed at NASA/Goddard Space Flight Center for * the Earth Science Data and Information System (ESDIS) project. * * Copyright (C) 2013 - 2014 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. *...
import re import subprocess from docutils import statemachine from sphinx.util.compat import Directive def setup(app): app.add_directive("config_help", GetConfigHelp) setup.app = app setup.config = app.config setup.confdir = app.confdir retdict = dict(version="1.0", parallel_read_safe=True, para...
const path = require('path'); const ImageMinimizerPlugin = require('image-minimizer-webpack-plugin'); module.exports = { entry: ['babel-polyfill', './client/src/index.js'], devServer: { // contentBase: __dirname + '/client/src/', publicPath: './build', proxy: { '/': 'http://localhost:4242', }...
# encoding:utf-8 """ Xromate系统user表,用于记录xromate系统的用户信息 """ import mongoengine as mongoe from Xromate.apps import XromateConfig, dumpstring import urllib2 import urllib import json class Users(mongoe.Document): """ collection name: user """ meta = { 'db_alias': XromateConfig.alias, } use...
''' SPDX-License-Identifier: Apache-2.0 Copyright 2017 Massachusetts Institute of Technology. ''' import argparse import sys import glob import numpy def main(argv=sys.argv): parser = argparse.ArgumentParser("keylime-utility-average_logged_deltas") parser.add_argument('-f', '--filename', required=True, ...
/* RedClock Copyright © 2021 Craige Hales All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. thanks to many people that posted bits of information! */ // clockHtml.h //typedef void (*html_cb_t)(FIL...
personagens = ['Batman', 'Mulher gato', 'Bane', 'Duas-caras'] identidades = ['Bruce Wayne', 'Selina Kyle', 'Bane Dorrance', 'Harvey Dent'] for personagem, identidade in zip(personagens, identidades): print('O nome de', personagem, 'é', identidade)
//------------ //System Vars //------------ var stage = document.getElementById("gameCanvas"); stage.width = STAGE_WIDTH; stage.height = STAGE_HEIGHT; var ctx = stage.getContext("2d"); ctx.fillStyle = "black"; ctx.font = GAME_FONTS; var selectedUnit = null; var spawnedUnit = null; var playerTurn = 1; var spawnedObject...
from _ast import PyCF_ONLY_AST from sys import version_info from pyflakes import messages as m, checker from pyflakes.test.harness import TestCase, skipIf, skip class Test(TestCase): def test_undefined(self): self.flakes('bar', m.UndefinedName) def test_definedInListComp(self): self.flakes(...
/* $OpenBSD$ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE S...
// Make sure we wait to attach our handlers until the DOM is fully loaded. $(function() { $(".change-devour").on("click", function(event) { var id = $(this).data("id"); var newDevour = $(this).data("newdevour"); var newDevourState = { devoured: newDevour }; // Send the PUT request. $.a...
import {createStore, applyMiddleware} from 'redux' import thunkMiddleware from 'redux-thunk' import createLogger from 'redux-logger' import rootReducer from './reducers' import {createSession} from 'redux-session'; import axiosMiddleware from 'redux-axios'; import httpClient from './httpClient' const loggerMiddleware ...
n = int(input()) X = list(map(float, input().split())) Y = list(map(float, input().split())) mean = lambda X: sum(X)/len(X) std = lambda X: (sum([(x-mean(X))**2 for x in X])/len(X))**(1/2) # Define function to caluculate rank of elemts in the list with sort() funtion. def rank_list(X): X_rank = [0] * len(X) fo...
const assert = require('assert'); const { deploy } = require('@completium/completium-cli'); const test = async () => { const [counter, _] = await deploy('counter_two_numbers.arl'); await counter.incrementBoth({ arg : { inc1 : 3, inc2 : 4 }}); const storage = await counter.getStorage(); const v1 = storage.v1.toNumb...
# sermsdos.py # # History: # # 3rd September 2002 Dave Haynes # 1. First defined # # Although this code should run under the latest versions of # Python, on DOS-based platforms such as Windows 95 and 98, # it has been specifically written to be compatible with # PyDOS, available at: # http://ww...
# -*- coding: utf-8 -*- ''' Integration tests for the docker_container states ''' # Import Python Libs from __future__ import absolute_import, print_function, unicode_literals import errno import functools import logging import os import subprocess import tempfile # Import Salt Testing Libs from tests.support.unit imp...
/* Copyright 2020 The Matrix.org Foundation C.I.C. 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 w...
const path = require('path'); const { createCanvas, registerFont, loadImage } = require('canvas'); const { MessageAttachment } = require('discord.js'); const database = require('kvaluedb'); const { getFillStyle } = require('../utils/levelling'); const error = require('../utils/error'); const { xpToNextLvl } = require('...
// var app = angular.module('logAggregator'); // app.controller('rtcontroller', function($scope, $http) { // $http.get('todos.json') // .then(function(res){ // $scope.todos = res.data; // }); // }); var app = angular.module('logAggregator'); app.controller('rtcontroller', functi...
""" Tests for DataFrame timezone-related methods """ import numpy as np import pytest from pandas.core.dtypes.dtypes import DatetimeTZDtype import pandas as pd from pandas import DataFrame, Series import pandas._testing as tm from pandas.core.indexes.datetimes import date_range class TestDataFrameTimezones: def...
#!/usr/bin/env python 3 # -*- coding: utf-8 -*- # # Copyright (c) 2021 PanXu, Inc. All Rights Reserved # """ 基于 bert 模型的 向量化 Authors: PanXu Date: 2021/10/23 11:45:00 """ import logging from typing import List import torch import traceback from transformers import BertTokenizer from easytext.data import Instance ...
import nuke def current_nuke_version(): return str(nuke.NUKE_VERSION_MAJOR) + '.' + str(nuke.NUKE_VERSION_MINOR) def current_platform(): from sys import platform if platform == "win32": return 'WIN' if platform == "linux" or platform == "linux2": return 'LINUX' if pl...
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @provides...
#!/usr/bin/env python3 # Copyright (c) 2014-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. """Test the -alertnotify, -blocknotify and -walletnotify options.""" import os from test_framework.test_f...
import _plotly_utils.basevalidators class UidValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name='uid', parent_name='streamtube', **kwargs): super(UidValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_t...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
##################################################################### # # # /main.pyw # # # # Copyright 2014, Monash University ...
import React, { useEffect, useState } from "react"; import AuthService from "../services/auth.service"; const LogHistory = () => { const [logs, setLogs] = useState([]); useEffect(() => { AuthService.getLogEntries().then( (res) => { setLogs(res.data) }).catch((err) => { s...
from unittest import TestCase from tests import abspath from pytezos.repl.interpreter import Interpreter from pytezos.michelson.converter import michelson_to_micheline from pytezos.repl.parser import parse_expression class OpcodeTestlist_concat_bytes_139(TestCase): def setUp(self): self.maxDiff = None ...
from openslides_backend.models.models import Projector from openslides_backend.permissions.permissions import Permissions from tests.system.action.base import BaseActionTestCase class ProjectorCreateActionTest(BaseActionTestCase): def setUp(self) -> None: super().setUp() self.create_model( ...
''' Nose test running Implements test and bench functions for modules. ''' import os import sys import warnings def get_package_name(filepath): # find the package name given a path name that's part of the package fullpath = filepath[:] pkg_name = [] while 'site-packages' in filepath: filepath...
/* * This header is generated by classdump-dyld 1.5 * on Tuesday, November 10, 2020 at 10:19:05 PM Mountain Standard Time * Operating System: Version 14.2 (Build 18K57) * Image Source: /System/Library/Frameworks/OSLog.framework/...
# import the necessary python packages to create a monitor # proxymanager makes using proxies really easy # requests is needed so that we can make requests to the www! from proxymanager import ProxyManager from datetime import datetime import requests import json import time # this api url is a given. normally you wi...
import React, { useState, useRef } from 'react' export const UploadInput = ({ onChange, value }) => { const [url, setUrl] = useState(value || '') function changeInput(e) { upLoadImg(e.currentTarget.files[0]) // onChange(e) } const inputRef = useRef(); function upLoadImg(fileObj) { ...
const puppeteer = require( "puppeteer-core" ); const net = require( "net" ); const process = require( "process" ); const port = process.argv[2] ?? 9222; const userDataDir = process.argv[3]; const portInUse = function( port, callback ) { var server = net.createServer( function( socket ) { socket.write( "Echo server...
var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia"...
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
//===- UniformSupport.h - Support utilities for uniform quant ---*- C++ -*-===// // // Copyright 2019 The MLIR Authors. // // 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....
const config = { "gatsby": { "pathPrefix": "/learn/graphql/react-native", "siteUrl": "https://hasura.io", "gaTrackingId": "UA-59768903-1", "trailingSlash": true }, "header": { "logo": "https://graphql-engine-cdn.hasura.io/learn-hasura/assets/homepage/logo.png", "logoLink": "https://hasura.io/learn/", "...
# vim: set encoding=utf-8 from unittest import TestCase from mock import patch from regulations.views import navigation class NavigationTest(TestCase): def test_get_labels(self): label = '204-1-a' self.assertEquals( ['204', '1', 'a'], navigation.get_labels(label)) @patch('regulati...
var $ = window.$ var Backbone = window.Backbone var L = window.L // full: http://stackoverflow.com/questions/13029904/twitter-bootstrap-add-class-to-body-referring-to-its-mode // Assigns class to body based on the width of screen // This is used to move narrative from sidebar to own tab in small screens function assig...
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
/** * Internal dependencies */ import { getCollection, getCollectionHeader } from '../selectors'; const getHeaderMock = ( total ) => { const headers = { total }; return { get: ( key ) => headers[ key ] || null, has: ( key ) => !! headers[ key ], }; }; const state = { 'wc/blocks': { products: { '[]': { ...
import torch import glob import os import cv2 import numpy as np from argparse import ArgumentParser from PIL import Image from torchvision.transforms import functional as F from tqdm import tqdm from utilities.print_utils import * from transforms.classification.data_transforms import MEAN, STD from utilities.utils imp...
"""Module for _PhraseSearcher: flexible phrase searching in spaCy `Doc` objects.""" from itertools import chain from typing import Any, Dict, List, Tuple, Union import warnings from spacy.tokens import Doc, Span, Token from spacy.vocab import Vocab from ..exceptions import FlexWarning class _PhraseSearcher: """...
// // AppDelegate.h // AppStoreUpdateKitDemo // // Created by GJH on 2/19/19. // Copyright © 2019 GJHi. All rights reserved. // #import <Cocoa/Cocoa.h> @interface AppDelegate : NSObject <NSApplicationDelegate> @end
import io import os import pickle from pathlib import Path import requests import yaml import zipfile import networkx as nx import numpy as np import sklearn # useful directories ROOT_DIR = Path(__file__).parent DATA_DIR = ROOT_DIR / "DATA" REPO_DIR = DATA_DIR / "REPO" RAW_DIR = DATA_DIR / "RAW" CFG_DIR = ROOT_DIR / ...
#!/usr/bin/env python2 ''' Since the roscpp library does not provide a way of doing introspection of ROS messages (i.e., accessing the fields of a message like a dictionary) I wrote this code to subscribe to a list of topics, get a subset of the fields from the listed topics, and publish them as a vecto...
/* * Copyright (c) 2017-2020 The Khronos Group 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 applicab...
# Eduardo Criado - 662844 # detector de spam import matplotlib.pyplot as plt from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfTransformer from sklearn.naive_bayes import MultinomialNB from sklearn.naive_bayes import BernoulliNB import numpy as np import json ...
import pytest import zmq from plenum.test.client.helper import create_zmq_connection from plenum.test.logging.conftest import logsearch from stp_core.loop.eventually import eventually @pytest.fixture(params=[zmq.REQ]) def zmq_connection(test_node, request, looper): sock = create_zmq_connection(test_node, request...
# Generated by Django 3.0.5 on 2020-05-21 23:17 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('forum', '0002_auto_20200...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Client = void 0; /* eslint-disable @typescript-eslint/no-unused-vars */ /* * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may ...
/**! * Sortable 1.14.0 * @author RubaXa <trash@rubaxa.org> * @author owenm <owen23355@gmail.com> * @license MIT */ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { ...