text
stringlengths
3
1.05M
/* * Copyright 2010-2017 Amazon.com, Inc. or 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fil...
'use strict'; const get = require('lodash/get'); const { removeNilProperties } = require('@cumulus/common/util'); const { handleScheduleEvent } = require('../lambdas/sf-scheduler'); const Rule = require('../models/rules'); const filterRulesbyCollection = (rules, collection = {}) => rules.filter( (rule) => { //...
import React, {Component} from 'react'; import Avatar from '@material-ui/core/Avatar'; import Button from '@material-ui/core/Button'; import CssBaseline from '@material-ui/core/CssBaseline'; import TextField from '@material-ui/core/TextField'; import FormControlLabel from '@material-ui/core/FormControlLabel'; import Ch...
// Copyright Csaba Molnar, Daniel Butum. All Rights Reserved. #pragma once #include "DlgObject.h" #include "DlgTextArgumentCustom.generated.h" class UDlgContext; // Abstract base class for a custom text argument // Extend this class to define additional data you want to store // // 1. Override GetText // 2. Return ...
//===- IdentifierResolver.h - Lexical Scope Name lookup ---------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
/** * GraphicsJS is a lightweight JavaScript graphics library with an intuitive API, based on SVG/VML technology. * Version: 1.3.9 (2019-12-17) * License: BSD 3-clause * Copyright: AnyChart.com 2019. All rights reserved. */ (function(){var f,aa=aa||{},n=this;function r(a){return void 0!==a}function u(a){return"str...
import ItemIndex from './components/items/index.vue'; import ItemCreate from './components/items/create.vue'; import ItemEdit from './components/items/edit.vue'; export const routes = [ { path: '/items', component: ItemIndex, name: "ItemIndex" }, { path: '/items/create', ...
const entity = require("../utilities/entity.js"); function wallslide(ent, map, x = 0, y = 0) { let tiles; let tileEdge; const bounds = entity.bounds(ent); // Final amounts of movement to allow let xo = x; let yo = y; // Check vertical movement if (y !== 0) { tiles = map.tilesAtCorners(bounds, 0, yo); con...
import os class Config: ''' General configuration parent class ''' SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://moringa:access@localhost/pitch' SECRET_KEY = 'uncrackablesecretkey' SQLALCHEMY_TRACK_MODIFICATIONS = True UPLOADED_PHOTOS_DEST ='app/static/photos' # email configuration...
const hash = require('object-hash'); const typemap = { REQUEST: 'request_condition', RESPONSE: 'response_condition', CACHE: 'cache_condition', }; /** Helper class with high-level operations for condition-management. */ class Headers { constructor(fastly) { this._fastly = fastly; } /** * Creates fu...
var GAMEGINE=function(t,i){var n=this;this.callback=i,this.running=!1,this.updateTimeRedraw,this.fps=t.fps||60,this.ops=t.ops||this.fps,this.leftOps=0,this.tickLengthRedraw=1e3/this.fps,this.width=t.width,this.height=t.height,this.canvas=t.canvas,this.canvas instanceof HTMLElement||(this.canvas=document.getElementById(...
/**用户名和密码的非空验证**/ $("#uname").blur(function () { if (!this.value) { $("#showResult").text("用户名不能为空!"); $("#showResult").css("color", "red"); return false; } }); $("#upwd").blur(function () { if (!this.value) { $("#showResult").text("密码不能为空!"); $("#showResult").css("color", "red"); return f...
# Taken from http://scikit-learn.org/stable/auto_examples/model_selection/plot_confusion_matrix.html import itertools import ipdb import numpy as np import matplotlib.pyplot as plt from sklearn import svm, datasets from sklearn.model_selection import train_test_split from sklearn.metrics import confusion_matrix d...
// piece of data - val // reference to next node - next class Node { constructor(val) { this.val = val; this.next = null; } } // const first = new Node("Hi"); // first.next = new Node("there"); // first.next.next = new Node("how"); // first.next.next.next = new Node("are"); // first.next.next.next.next = ...
module.exports = { plugins: ['no-smart-quotes'], rules: { 'no-smart-quotes/no-smart-quotes': 2 } }
from .cost import Cost import numpy as np import json class ParticleVectorNLocalConvolution4Network(object): def __init__(self, particle_input=None, cost="mse", regularizer=None): self.layers = [] self.cost_name = cost self.cost_function = Cost.get(cost) self.cost_d_function = Co...
"use strict"; var cells_1 = require('./cells'); var rows_1 = require('./rows'); var thead_component_1 = require('./thead.component'); exports.NG2_SMART_TABLE_THEAD_DIRECTIVES = [ cells_1.ActionsComponent, cells_1.ActionsTitleComponent, cells_1.AddButtonComponent, cells_1.CheckboxSelectAllComponent, ...
# Copyright 2021 The TensorFlow 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/LICENSE-2.0 # # Unless required by applica...
import numpy as np import minecraft.world from typing import Tuple, List, Dict from util.wool import * import util.coord as tup from pprint import pprint class GateVersion: input_positions: Dict[str, Tuple[int, int, int]] def __init__(self, celltype, size, input_positions, output_positions, implementation_fil...
/*********************************************************************************************************************** * DISCLAIMER * This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. * No other uses are authorized. This software is owned by Renesas Elect...
# Generated by Django 4.0 on 2022-04-06 16:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('account', '0014_alter_userprofile_phone'), ] operations = [ migrations.CreateModel( name='UserBusinessRelation', field...
/*! calc-polyfill 25-01-2016 */ !function(win,doc){"use strict";function contentLoaded(a,b){var c=!1,d=!0,e=a.document,f=e.documentElement,g=e.addEventListener,h=g?"addEventListener":"attachEvent",i=g?"removeEventListener":"detachEvent",j=g?"":"on",k=function(d){("readystatechange"!=d.type||"complete"==e.readyState)&&(...
import {utils} from "../../utils.js"; const letters = { ' ': {width: 16, points: []}, '!': { width: 10, points: [ [5, 21], [5, 7], [-1, -1], [5, 2], [4, 1], [5, 0], [6, 1], [5, 2] ] }, '"': {...
function populationInTowns(dataRows) { let total = new Map(); for(let dataRow of dataRows){ let [town, population] = dataRow.split(/\s*<->\s*/); population = Number(population); if(total.has(town)){ total.set(town, total.get(town) + population); } else { t...
/* * Copyright 2010-2017 Amazon.com, Inc. or 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fil...
import pytest import card_data @pytest.fixture async def cards(): return await card_data.get() def find(cards, query): return [ card_data.effective_card_name(card) for card in card_data.find(cards, query.split()) ] def test_bellring(cards): assert find(cards, "bellring")[:1] == [ ...
/* T O R . H * BRL-CAD * * Copyright (c) 1993-2016 United States Government as represented by * the U.S. Army Research Laboratory. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as publis...
import React from "react" import { Link } from "gatsby" import Layout from "../components/layout" import SEO from "../components/seo" const SecondPage = () => ( <Layout> <SEO title="Page two" /> <h1>Hi from the second page</h1> <p>Welcome to page 2</p> <p>Welcome to page 2 again</p> <Link to="/"...
import dolfyn.adv.api as avm import dolfyn.data.base import numpy as np from os import path dolfyn.data.base.debug_level = 1 try: test_root = path.realpath(__file__).replace("\\", "/").rsplit('/', 1)[0] + '/' except: test_root = './' pkg_root = test_root.rsplit('/', 2)[0] + "/" dat = avm.load(test_root + 'd...
function removeItemAndRedundantWhiteSpace(list, item) { var prev = item.prev; var next = item.next; if (next !== null) { if (next.data.type === 'WhiteSpace' && (prev === null || prev.data.type === 'WhiteSpace')) { list.remove(next); } } else if (prev !== null && prev.data.ty...
/** * @file This module contains all the unit tests of the application. Unit tests are * implemented with the NodeUnit unit test library. */ var nodeUnit = require('nodeunit'); /** * Test the home page with a unit test. TODO: Currently this is only provided * for demonstration purposes. * * @param {object} tes...
try: from setuptools import setup from setuptools import find_packages packages = find_packages() except ImportError: from distutils.core import setup import os packages = [x.strip('./').replace('/','.') for x in os.popen('find -name "__init__.py" | xargs -n1 dirname').read().strip().split('\n')...
function order(size, crust, toping, number, price){ this.sizes = size; this.crustName = crust; this.topings = toping; this.desiredNumber = number; this.correspondingPrice = price; }; var smallSize = new order("small", "crust", "toping", "number", "12"); var mediumSize = new order("medium", "cr...
/* eslint-env jest */ const examplePage = require('../../examples/tanzschule-stender-de.html.js') const { linkExtractor } = require('../../') describe('utils/linkExtractor', () => { let subject beforeEach(() => { return linkExtractor(examplePage, 'http://www.tanzschule-stender.de').then(x => { subject = x })...
#include "util/unit_test.h" #include "util/mock.h" #include <stdio.h> static int mocked_int_function1() { MOCK_CALL(mocked_int_function1, int); return -1; } static int mocked_int_function2() { MOCK_CALL(mocked_int_function2, int); return -2; } static int mocked_int_function3() { MOCK_CALL(mocked_int_fun...
# Copyright (c) 2015 OpenStack Foundation # # 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 ...
row1 = ['🟪','🟪','🟪'] row2 = ['🟪','🟪','🟪'] row3 = ['🟪','🟪','🟪'] map = [row1, row2, row3] print(f'{row1}\n{row2}\n{row3}') position = input('where do you want to put the treasure?\n:') horizonal = int(position[0]) vertical = int(position[1]) map[vertical-1][horizonal -1] = '💲' print(f'{row1}\n{row2}\n{row3...
Ext.define('Admin.view.email.ComposeViewModel', { extend: 'Ext.app.ViewModel', alias: 'viewmodel.emailcompose' // TODO - Add view data or remove if not needed });
import numba as nb import numpy as np @nb.cuda.jit(device=True) def add(a, b): return float3(a[0]+b[0], a[1]+b[1], a[2]+b[2]) @nb.cuda.jit(device=True) def diff(a, b): return float3(a[0]-b[0], a[1]-b[1], a[2]-b[2]) @nb.cuda.jit(device=True) def dot(a, b): return a[0]*b[0] + a[1]*b[1] + a[2]*b[2] @nb...
GENERATED_REPORTS_ID = '1wMBdCcT3MBMdlydxCXspBM8WbQ9GoT-q'
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
import FWCore.ParameterSet.Config as cms # # Geometry master configuration # # Ideal geometry, needed for simulation from Geometry.CMSCommonData.cmsIdealGeometryAPD1XML_cfi import * from Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi import * # Reconstruction geometry services # Tracking Geometry from ...
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/health/Health_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <utility> namespace Aws { template<typename RESULT_TYPE> class AmazonWebServiceResult; n...
const { Reports } = require('@crowdin/crowdin-api-client'); const fetch = require('node-fetch'); const fs = require('fs'); require('dotenv').config(); const api = new Reports({ token: process.env.API_TOKEN, }); function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } async function getTopMe...
import json import boto3 import os import string iam_client = boto3.client('iam') # Variables FILE_CONFIG_SCOPES = 'Config-Scopes' FILE_CONFIG_ENVIRONMENTS = 'Config-Environments' FILE_CONFIG_USERS = 'Config-Users' FILE_CONFIG_KEYS = 'Config-Keys' FILE_CONFIG_GROUPS = 'Config-Groups' FILE_TEMPLATE_MAIN = 'Main' FILE_...
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import A...
#include "libmx.h" void mx_push_back(t_list **list, void *data) { t_list *back_node; back_node = *list; if (!back_node) { *list = mx_create_node(data); } else { while (back_node->next) back_node = back_node->next; back_node->next = mx_create_node(data); } }...
import datetime from database.database_schemas import Schemas from sqlalchemy import Column, ForeignKey, Integer, String, DateTime from sqlalchemy.dialects.mysql import BIGINT, SMALLINT, DOUBLE, TIMESTAMP, TINYINT from database.base import Base class InnodbFtIndexCache(Base): """Maps to INNODB_FT_INDEX_CACHE ta...
import filterDOMProps from 'uniforms/filterDOMProps'; filterDOMProps.register('grid'); function gridClassNamePart (size, value, side) { const sizeInfix = size === 'xs' ? '' : `${size}-`; return side === 'label' ? `col-${sizeInfix}${value}` : `col-${sizeInfix}${(12 - value)}`; } const gridOrde...
Montreal APERO data sync (apero_mtl_sync.py) =============================================== Options are: =============================================== --name={NAME} Change the directory name (i.e. mini_data_0_6_037) --exclude Night directories to exclude (separated by commas NO SPACES) ...
/* Copyright (c) 2012-2013 Cheese and Bacon Games, LLC */ /* See the file docs/COPYING.txt for copying permission. */ #ifndef effect_firework_h #define effect_firework_h #include "light_data.h" #include <vector> class Effect_Firework_Particle{ public: //If true, the particle is flying outward. //If fals...
from ._classifier import OCLRandomForestClassifier import numpy as np class OCLRandomForestLabelClassifier(): def __init__(self, opencl_filename="temp.cl", max_depth: int = 2, num_ensembles: int = 10): """ A RandomForestClassifier for label classification that converts itself to OpenCL after traini...
# Auto generated by generator.py. Delete this line if you make modification. from scrapy.spiders import Rule from scrapy.linkextractors import LinkExtractor XPATH = { 'name' : "//h2[@class='itemTitle tit']", 'price' : "//ul/li[@class='even typeTextfield group1']/span[@class='itemExtraFieldsValueGia']", 'ca...
import FWCore.ParameterSet.Config as cms from SimGeneral.MixingModule.mixObjects_cfi import * from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer mixCollectionValidation = DQMEDAnalyzer('MixCollectionValidation', outputFile = cms.string('histosMixCollStep2MM.root'), minBunch = cms.int32(-12), maxBunc...
import React, { Component } from "react"; import {StyleSheet, Platform, ScrollView} from "react-native"; import { DatePickerDialog } from 'react-native-datepicker-dialog'; import DateTimePicker from 'react-native-modal-datetime-picker'; import moment from 'moment'; import { TextField } from 'react-native-material-text...
"""Config flow for VLC media player Telnet integration.""" from __future__ import annotations import logging from typing import Any from aiovlc.client import Client from aiovlc.exceptions import AuthError, ConnectError import voluptuous as vol from homeassistant import core, exceptions from homeassistant.components....
import Flex from 'components/Flex' import Input from 'components/Input' import TextArea from 'components/TextArea' import Table from 'components/Table' export { Flex, Input, Table, TextArea }
#!/usr/env/python3 from main import * from pathlib import Path import re import os from subprocess import getoutput from monty.os import cd import pymongo COMPATH=Path("/WORK/nscc-gz_material_1/ICSD_vasp/abacus_calc/matgen_scf/completed") def yield_stru(root): for i in root.rglob('*'): if len(i.parts) ...
const { expect } = require('chai') const db = require('../../server/db/index') const Book = db.model('book') describe('▒▒▒ Backend tests ▒▒▒', () => { beforeEach('Synchronize and clear database', () => db.sync({ force : true })); after('Synchronize and clear database', () => db.sync({ force : true })); describ...
export const LOGOUT = 'LOGOUT'; export const LOGIN_REQUEST = 'LOGIN_REQUEST'; export const LOGIN_SUCCESS = 'LOGIN_SUCCESS'; export const LOGIN_FAILURE = 'LOGIN_FAILURE'; export const SIGNUP_REQUEST = 'SIGNUP_REQUEST'; export const SIGNUP_SUCCESS = 'SIGNUP_SUCCESS'; export const SIGNUP_FAILURE = 'SIGNUP_FAILURE'; export...
'use strict'; var publishExternalAPI = require('../src/angular_public'); var createInjector = require('../src/injector'); describe('angularPublic', function() { it('sets up the angular object and the module loader', function() { publishExternalAPI(); expect(window.angular).toBeDefined(); expect(window...
# -*- coding: utf-8 -*- import sys, os, pepper class Controller: __methods = {} __args = [] __kwargs = {} def __init__(self): for f_name in dir(self): if f_name.startswith('option'): self.__methods[pepper.utils.deCamelCase(f_name[6:])] = f_name def validMethod(...
/* ** $Id: lcode.c,v 2.25.1.5 2011/01/31 14:53:16 roberto Exp $ ** Code generator for Lua ** See Copyright Notice in lua.h */ #include <stdlib.h> #define lcode_c #define LUA_CORE #include "lua.h" #include "lcode.h" #include "ldebug.h" #include "ldo.h" #include "lgc.h" #include "llex.h" #include ...
def form_url(main_url: str, url: str, data: dict = None) -> str: """ Form and return the URL for the Hypixel API with GET Params. Parameters ---------- main_url: str The Main URL With the root domain. url: str The Route in the Main URL to access the JSON From. data: t.Option...
import chainer class SequentialFeatureExtractor(chainer.Chain): """A feature extractor model with a single-stream forward pass. This class is a base class that can be used for an implementation of a feature extractor model. Callable objects, such as :class:`chainer.Link` and :class:`chainer.Func...
import json import os import subprocess import sys import click import netifaces import utilities_common.cli as clicommon import utilities_common.multi_asic as multi_asic_util from natsort import natsorted from sonic_py_common import device_info, multi_asic from swsssdk import ConfigDBConnector from swsscommon.swsscom...
import Vue from 'vue' import App from './App.vue' import router from './router' import Router from 'vue-router' import 'vant/lib/index.css' import toast from './components/common/toast' // vant插件 import vant from 'vant' import store from './store/index' Vue.config.productionTip = false Vue.prototype.$bus=new Vue() Vue...
from typing import Any from typing import Callable from typing import Iterable def _create_getter_and_setter(name: str): def getter(self): return getattr(self.func, name) getter.__name__ = name prop = property(getter) def setter(self, value): setattr(self.func, name, value) setter...
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See http://js.arcgis.com/3.15/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details. //>>built define({"widgets/Directions/setting/nls/strings":{searchTabTitle:"Ustawienie \u017ar\u00f3d\u0142a wys...
const BaseEntity = require('./BaseEntity') class Line extends BaseEntity { constructor(x1, y1, x2, y2) { super("LINE") this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2; } toDxfString() { //https://www.autodesk.com/techpubs/autocad/acadr14/dxf/...
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[151],{ /***/ "./resources/js/Demo/UIElements/Advance/Datepicker.js": /*!************************************************************!*\ !*** ./resources/js/Demo/UIElements/Advance/Datepicker.js ***! \****************************************************...
# -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-05-15 12:35 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('action', '0011_auto_20180515_2203'), ] operations = [ migrations.RemoveField( ...
# Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # Based on chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com> # Based on func.py # (c) 2014, Michael Scherer <misc@zarb.org> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt...
export default class tSwitch { constructor(props) { this.properties = { element: (props.element) ? props.element : false, isActive: (props.isActive) ? props.isActive : false, isDisabled: (props.isDisabled) ? props.isDisabled : false, background: (props.backgro...
/*! jQuery v3.0.0 | (c) jQuery Foundation | jquery.org/license */ !function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?wi...
""" Copyright 2021-2021 The jdh99 Authors. All rights reserved. 配置文件 Authors: jdh99 <jdh821@163.com> """ import dcompy as dcom TAG = 'tziot' # 最大帧字节数 FRAME_MAX_LEN = 1024 PROTOCOL_NUM = 0 # 连接间隔.单位:s CONN_INTERVAL = 30 # 连接超时时间.单位:s CONN_TIMEOUT_MAX = 120 # 本机单播地址 local_ia = 0 local_pwd = '' # 核心网参数 core_ia = 0x...
import requests import json from datetime import datetime from time import sleep from mongoengine import connect from pymongo import MongoClient from database.mongo_service import MongoService class ReviewTranslatedService(MongoService): def __init__(self): super().__init__() def get_all_sentiment...
Object.defineProperty(exports, "__esModule", { value: true }); var annotationModule = require("./chart-annotation.common"); var chartModule = require("../../"); var utilsModule = require("tns-core-modules/utils/utils"); var chart_public_enum_1 = require("../../misc/chart-public-enum"); var dateHelperModule = require("....
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-12-03 14:01 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('user', '0005_auto_20171126_0001'), ] operations = [ migrations.AlterField( ...
'use strict'; module.exports = { up: function (queryInterface, Sequelize) { // add open bool queryInterface.addColumn( 'SlackUsers', 'tz', { type: Sequelize.STRING, allowNull: true } ); }, down: function (queryInterface, Sequelize) { return queryInterface....
import styled from "styled-components" const Button = styled.button` background-color: #6ec21a; border: none; padding: 10px 25px; color: white; font-size: 13px; font-weight: 600; flex-shrink: 0; ` export default Button
from django.db.models.signals import m2m_changed from django.dispatch import receiver from .models import Image @receiver(m2m_changed, sender=Image.users_like.through) def users_like_changed(sender, instance, **kwargs): instance.total_likes = instance.users_like.count() instance.save()
import math import random import functools import operator import torch from torch import nn from torch.nn import functional as F from torch.autograd import Function from models.stylegan2.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d import torchvision toPIL = torchvision.transforms.ToPILImage() import numpy...
import operator class intcode_computer: def __init__(self, program, input_values=[]): self.pointer = 0 self.program = list(program) self.opcodes = { 1: self.addition, 2: self.multiplication, 3: self.input, 4: self.output, 5: self.jump(operator.ne), 6: self.jump(operator.eq), ...
# -*- coding: utf-8 -*- from typing import Union, Tuple import numpy as np class AsciiPlot: """ ┏━━━┓ ┫ ┃ ┗━┳━┛ """ def __init__( self, size: Tuple[float, float] = (80, 35) ): self.__size = None self.__xlim = None self.__ylim = None ...
from erdos.data_stream import DataStream from erdos.message import Message from erdos.op import Op from erdos.timestamp import Timestamp from erdos.utils import setup_logging import flux_utils from flux_utils import is_control_stream, is_not_control_stream from flux_buffer import Buffer import threading class FluxEg...
/* Copyright (c) 2012, Bastien Dejean * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditi...
/* eslint-disable */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.dayjs=e()}(this,function(){"use strict";const t=60,e=60*t,s=24*e,r=7*s,n=(t,e,s)=>!t||t.length>=e?t:`${Array(e+1-t.length).join(s)}${t}`;class i{constructor(t){th...
//! moment.js locale configuration //! locale : Albanian (sq) //! author : Flakërim Ismani : https://github.com/flakerimi //! author: Menelion Elensúle: https://github.com/Oire (tests) //! author : Oerd Cukalla : https://github.com/oerd (fixes) ;(function (global, factory) { typeof exports === 'object' && typeof mo...
# -*- coding: utf-8 -*- # cifar10_nn # author - Quentin Ducasse # https://github.com/QDucasse # quentin.ducasse@ensta-bretagne.org # Two Conv-2D followed by two Fully-Connected import torch.nn as nn import torch.nn.functional as F class LeNet(nn.Module): '''This neural network consists of the following flow: ...
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.6.0 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # # HPSegNet import torch import torch.nn as nn import...
(function (){ angular .module('directivas') .controller('Ejercicio17Ctrl', Controller); function Controller(){} }());
/* Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { function removeRawAttribute( $node, attr ) { if ( CKEDITOR.env.ie ) $node.removeAttribute( attr ); else delete $node[ attr ]; } var cellNodeRege...
import test2 import test3 import test4
# Copyright (c) <2021> Side Effects Software Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # thi...
from os import path from pydub import AudioSegment src = "LUCI_output.mp3" dst = "test.wav" sound = AudioSegment.from_mp3(src) sound.export(dst, format="wav")
class Solution: def removeDuplicates(self, nums): """ :type nums: List[int] :rtype: int """ if len(nums) == 0: return 0 slow = 0 for fast in range(1, len(nums)): if nums[fast] != nums[slow]: slow += 1 nums[slow] = nums[fast] return slow + 1
/* Copyright 2018-2020 Picovoice Inc. You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE" file accompanying this source. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on ...
function mostrar() { var contador=0; // declarar variables var respuesta='si'; while(respuesta!='no') { } }//FIN DE LA FUNCIÓN
# Modifications copyright (C) 2017 Pluralsight LLC # 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 L...