text
stringlengths
3
1.05M
#!/usr/bin/env python2 # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * class SignR...
something = input('Enter something: ') print('The type of the entered value is: {}'.format(type(something))) print('Alpha: {}'.format(something.isalpha())) print('Numeric: {}'.format(something.isnumeric())) print('AlphaNum: {}'.format(something.isalnum())) print('Lower: {}'.format(something.islower())) print('Upper: {}...
""" Defines Neural Networks """ import torch import torch.nn.functional as F import torch.nn as nn import numpy as np from torch.autograd.variable import Variable from ..utils.generators.mixed_len_generator import Parser, \ SimulateStack from typing import List from .mdn import MixtureDensityNetwork from globals im...
/* -------------------------------------------------------------------------- */ /* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may ...
function getPrevalenceScore(ocurrency, damage) { var json_matrix = { "-101,-101": { "-101,-101": -100, "-76,-100": -90, "-51,-75": -80, "-26,-50": -70, "-1,-25": -60, "0,0": -50, "1,25": -40, "26,50": -30, "51,75": -20, "76,100": -10, "101,101": 0 }, "-76,-100": { "-101,-101": -90, "-76,-100": -80, "-51,-75": -70,...
from __future__ import absolute_import from __future__ import print_function import collections import datetime import re import os.path from .shims import subprocess_check_output MANUAL_EDIT_WARNING = """This file is generated using the %s script. DO NOT MANUALLY EDIT!!!! Last Modified: %s """ % (os.path.basename(...
import React from "react" import Layout from "../components/layout" import Seo from "../components/seo" const NotFoundPage = () => ( <Layout> <Seo title="404: Not found" /> <div className="about_inner"> <h1>NOT FOUND</h1> <p>You just hit a route that doesn&#39;t exist... the sadness.</p> ...
/* Este archivo debe estar * colocado en la carpeta raíz del * sitio. * * Cualquier cambio en el * contenido de este archivo hace * que el service worker se * reinstale. * * Normalmente se cambia el número * en el nombre del caché cuando * cambia el contenido de los * archivos. * * Cuando uses GitHub P...
(function() { define(['oraculum'], function(Oraculum) { 'use strict'; /* SortableColumn.ModelMixin ========================= A mixin to provide a sorting interface on a "column". It expects `sortCollection` to support the following interface: * Method: `getAttributeDirection` ...
// Auto-generated file. Do not edit! // Template: src/f16-dwconv/up-neonfp16arith.c.in // Generator: tools/xngen // // Copyright 2020 Google LLC // // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. #include <assert.h> #include <arm_...
// This file is generated automatically by `scripts/build/fp.js`. Please, don't change it. import fn from "../../addYears/index.js"; import convertToFP from "../_lib/convertToFP/index.js"; export default convertToFP(fn, 2);
// Copyright (c) 2012, Jason Davies // 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 code must retain the above copyright notice, this // list of conditions ...
import validateHttpStatus from '../validate-http-status'; /** * @description * Validate HTTP Status code 417 type CLIENT ERROR * * @param {Integer} statusCode - The HTTP Status code * @return {Boolean} * @throws {HTTPStatusError} When the statusCode is different then 417 */ function isExpectationFailed(statusC...
#!/usr/bin/python import os, sys, string from low import * from orthomcl import OrthoMCLCluster # ============================================================================= def usage(): print >> sys.stderr, "prints a mapping between each gene id and its cluster from orthomcl output\n" print >> sys.stderr, "usa...
from verify_email import verify_email enter = input("Enter the email to verify: ") verify = verify_email(enter) if verify == False: print("Invalid Email") else: print("Valid email")
import argparse import datetime import numpy as np import time import torch import torch.backends.cudnn as cudnn import json from pathlib import Path from timm.data import Mixup from timm.models import create_model from timm.loss import LabelSmoothingCrossEntropy, SoftTargetCrossEntropy from timm.scheduler import cre...
import * as i0 from '@angular/core'; import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, NgModule } from '@angular/core'; import * as i1 from '@angular/common'; import { CommonModule } from '@angular/common'; class ProgressSpinner { constructor() { this.strokeWidth = "2"; this.fi...
from time import sleep from abc import ABCMeta, abstractmethod from typing import List, Any class ClientBaseClass(metaclass=ABCMeta): @abstractmethod def cursor(self): """Return Something that inherits CursorBaseClass """ pass class CursorBaseClass(metaclass=ABCMeta): @a...
/** * [denomination description] * Editor : Iwan Gunawan * Email : iwan.gunawan81@gmail.com * @param {[type]} amount [description] * @return {[type]} [description] */ module.exports = function denomination(notes, amount) { //const notes = [1e5, 5e4, 2e4, 1e4, 5e3, 2e3, 1e3, 500, 100, 50]; if (typeof notes ==...
import os import sys import numpy as np srcDir = sys.argv[1] output = sys.argv[2] interval = 1 files = os.listdir(srcDir) files = list(filter(lambda x:".jpg" in x,files)) numImages = 20 #len(files) prefix = "_".join(files[0].split(".jpg")[0].split("_")[:-1]) files = [prefix+"_"+str(i)+".jpg" for i in range(0,numImage...
from time import time import sys import copy import logging class SodukuSolver: def __init__(self,dim,fileDir): self.dim = dim self.expandedNodes = 0 with open(fileDir) as f: content = f.readlines() self.board = [list(x.strip()) for x in content] self.rv = self.get...
from __future__ import annotations from abc import ABC, abstractmethod class Strategy(ABC): pass class StrategyImplementor(ABC): @abstractmethod def perform_action(self, *, strategy: Strategy): raise NotImplementedError()
/* * Copyright 2015-2017 WorldWind Contributors * * 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 l...
from django.conf import settings from django.db import models class Profile(models.Model): uuid = models.CharField(max_length=36, unique=True, blank = False, null = False, db_index = True) def getDBName(self): return "User_" + str(self.uuid).replace("-", "_") def __unicode__(self): ret...
from django.apps import AppConfig class AnalyticsConfig(AppConfig): name = 'v1.analytics'
import pygame import logging import os from game import Game from transition import Transition from text import Text WHITE = (255, 255, 255) BLACK = (0, 0, 0) LIMEGREEN = (50, 205, 50) YELLOW = (255, 255, 0) RED = (255, 0, 0) SLIVER = (192, 192, 192) FLAGS = pygame.FULLSCREEN | pygame.HWSURFACE | pygame.DOUBLEBUF cl...
import os.path from argparse import ArgumentParser import skimage.io as io import torch from torch.optim import Adam from torch.utils.data import DataLoader from datasets.dreyeve import DREYEVE from model.objective import KLD from model.single_branch import SingleBranchModel from utils import device from utils import...
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import * as serviceWorker from './serviceWorker'; ReactDOM.render(<App />, document.getElementById('root')); // If you want your app to work offline and load faster, you can change // unregister() to register() below. Note this come...
"use strict" class Matrix4f { static MATRIX_SIZE = 4; /** * @param {Float[4][4]} matrixArray */ constructor( matrixArray ) { this.m = matrixArray; } static identity = () => { return new Matrix4f( [ [1, 0, 0, 0], [0, ...
#!/usr/bin/env python # Copyright 2019 Paul Archer # # 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...
class pid: def _init_(p, i, d, target): self.kp = p self.ki = i self.kd = d self.integrator = 0.0 self.derivator = 0.0 self.err = 0.0 self.target = target def update(data): # Calculate error self.error = self.target - data # P part of PID p = self.kp * self.error ...
/** * @license * Copyright 2018 Google Inc. 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 a...
/** * FreeRDP: A Remote Desktop Protocol Implementation * Wayland Client Interface * * Copyright 2014 Manuel Bachmann <tarnyko@tarnyko.net> * * 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 Licens...
import copy import json import queue import random import traceback from threading import Thread, get_ident from compipe.runtime_env import Environment as env from ..response.response import response_channel_handlers, RespChannel from ..cmd_enroller import command_list from ..exception.task_queue_error import GErrorDu...
// $(document).ready(function(){ // // Menu Function // // Window scroll function // }); (function () { $('.nav-button').click(function(){ $('.nav-button, .side-nav, .nav-header, .nav-options').toggleClass('nav-open'); return false; }); // Food Menu function $('.nav-link.the-menu')....
/* Copyright (c) 2012 Dirk Willrodt <willrodt@zbh.uni-hamburg.de> 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 SOFTWARE IS PROVIDED "AS IS" AN...
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from topic_tools/MuxAddRequest.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class MuxAddRequest(genpy.Message): _md5sum = "d8f94bae31b356b24d0427f80426d0c3" _type ...
from line_profiler import LineProfiler from pymongo import MongoClient from threading import Thread import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output import itertools from io import BytesIO from PIL import Image import pickle import base64 imp...
from math import sqrt import numpy as np import pandas as pd import matplotlib.pyplot as plt from statsmodels.tsa.stattools import adfuller def compute_correlation(x,y,r2=False,auto=False): '''Take two array-like series to calculate the correlation x: numpy.array or pandas.DataFrame: x value for correlat...
/** * Created by juandaniel on 11/5/17. */
import sveltePreprocess from "svelte-preprocess"; import node from "@sveltejs/adapter-node"; import { mdsvex } from "mdsvex"; import autoprefixer from "autoprefixer"; const preprocessors = sveltePreprocess({ scss: { includePaths: ["src"], }, postcss: { plugins: [autoprefixer], }, }); /** @type {import(...
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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 License, or (a...
#!/usr/bin/env python ########################################################################## # # Copyright 2011 Jose Fonseca # All Rights Reserved. # # 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 th...
import React from 'react' import './Carousel.scss' export class Carousel extends React.Component { render() { return ( <div className={this.props.classes}> <div className="items-wraper"> <div className="items" id="items"> <div className="ite...
# Copyright (c) 2018 PaddlePaddle 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 app...
#!/usr/bin/python # # Create Webfaction website using Ansible and the Webfaction API # # ------------------------------------------ # # (c) Quentin Stafford-Fraser 2015 # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Lic...
/* Tests clFinish Copyright (c) 2013 Ville Korhonen / Tampere University of Technology Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limit...
""" The arraypad module contains a group of functions to pad values onto the edges of an n-dimensional array. """ import numpy as np from numpy.core.overrides import array_function_dispatch from numpy.lib.index_tricks import ndindex __all__ = ['pad'] ###################################################...
#include "../c-mpi.h" int mpi_matvec_manteuffel_M_nblock_eo( MPI_Comm mpi_comm, long int m, double *x, double *y, double *x_notlocal ){ int n, i, j, k, mloc, iglobal, my_rank, pool_size; n = sqrt( m ); MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); MPI_Comm_size(MPI_COMM_WORLD, &pool_size); mloc = m / pool_size + ...
km = float(input("Digite quantos KM foram percorridos: ")) dias = int(input("Digite quantos dias foram usados o veiculo: ")) diasTotal = dias * 60 kmtotal = km * 0.15 totalPagar = float(diasTotal + kmtotal) print(f"Voce utilizou o veiculo por {dias} dias e percorreu {km} km o total a pagar é de R${totalPagar:.2f}")
/* ---------------------------------------------------------------------------- * GTSAM Copyright 2010, Georgia Tech Research Corporation, * Atlanta, Georgia 30332-0415 * All Rights Reserved * Authors: Frank Dellaert, et al. (see THANKS for the full author list) * See LICENSE for the license information * ----...
/* * Copyright 2020 The Magma Authors. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, *...
import BFX from "bitfinex-api-node"; const coinList = [ "ltc", "eth", "etc", "rrt", "zec", "xmr", "dsh", "bcc", "bcu", "xrp", "iot", "eos", "san", "omg", "bch", "neo", "etp", "qtm", "bt1", "bt2", "avt", "edo", "btg", "dat", "qsh", "yyw" ]; const pairList_USD = [ "...
# -*- coding: utf-8 -*- from functools import reduce from operator import mul import numpy as np from africanus.gridding.simple.gridding import (grid as np_grid_fn, degrid as np_degrid_fn) from africanus.util.docs import mod_docs from africanus.util.requirements impor...
import os import sys from setuptools import setup, find_packages def readme(): with open('README.rst') as f: return f.read() exec(open(os.path.join('saleae', 'version.py')).read()) requires = [ 'future', 'enum34', 'psutil', ] setup( name='saleae', version=__version__, # packages=find_packages(ex...
# -*- coding: utf-8 -*- # Author: Daniel Yang <daniel.yj.yang@gmail.com> # # License: BSD 3 clause from ._neural_network import demo, multi_layer_perceptron_classifier # this is for "from <package_name>.neural_network import *" __all__ = ["demo", "multi_layer_perceptron_classifier",]
import React, { Component } from 'react'; import { connect } from 'dva'; import { Row, Col, Icon, Avatar } from 'antd'; import DescriptionList from '../../components/DescriptionList'; import PageHeaderWrapper from '../../components/PageHeaderWrapper'; import styles from './View.less'; const { Description } = Descripti...
# Import all the required modules from flask import Blueprint from flask_sqlalchemy import SQLAlchemy from .forms import * from . import * from wtforms import ValidationError, validators from main_app import db, bcrypt, login_manager from flask import current_app from flask_login import ( UserMixin, login_requi...
# -*- coding: utf-8 -*- # # K2HR3 OpenStack Notification Listener # # Copyright 2018 Yahoo! Japan Corporation. # # K2HR3 is K2hdkc based Resource and Roles and policy Rules, gathers # common management information for the cloud. # K2HR3 can dynamically manage information as "who", "what", "operate". # These are stored ...
// @flow import createAnnouncer from '../../../src/view/announcer/announcer'; import type { Announcer } from '../../../src/view/announcer/announcer-types'; describe('mounting', () => { it('should not create a dom node before mount is called', () => { const announcer: Announcer = createAnnouncer(); const el:...
# tks to https://github.com/pimoroni/bmp280-python from bmp280 import BMP280 try: from smbus2 import SMBus except ImportError: from smbus import SMBus class Bmp280: def __init__(self): self.bus = SMBus(1) self.bmp280 = BMP280(i2c_dev=self.bus) pass def get_temperature(self...
import React from "react" import PropTypes from "prop-types" import Helmet from "react-helmet" import { useStaticQuery, graphql } from "gatsby" import defaultImage from "../assets/Logo.svg" function SEO({ description, lang, meta, title, image, pagePath }) { const { site } = useStaticQuery( graphql` query {...
# =============================================================================== # Copyright 2019 Jan Hendrickx and Gabriel Parrish # # 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:/...
from migrate.changeset import SQLA_10 """ Safe quoting method """ def safe_quote(obj): # this is the SQLA 0.9 approach if hasattr(obj, 'name') and hasattr(obj.name, 'quote'): return obj.name.quote else: return obj.quote def fk_column_names(constraint): if SQLA_10: return [ ...
var express = require('express'); var app = express(); var session = require('express-session'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); //Cookie and Session 的基础功能 app.use(cookieParser()); app.use(bodyParser.urlencoded({ extended: false, })); app.use(bodyParser.json())...
""" Copyright (c) 2016-2020 Keith Sterling http://www.keithsterling.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, m...
import typing import datetime from redbot.core import commands from copy import copy import asyncio # Credits: # The idea for this cog came from @Jack1142. This PR will take time, so I'm making it. If one day this one is integrated into Red, this cog may make it easier to manage. (https://github.com/Cog-Creator...
function myMenus() { var x = document.getElementById("nav-links"); if (x.style.display === "block") { x.style.display = "none"; } else { x.style.display = "block"; } }
### Usage python this_program.py pdb.list ### def no_repeat(lista): unico = set() for m in lista: if m not in unico: unico.add(m) return unico #from libpydock.util.Table import Table #from numpy import array import numpy as np import os import sys import scipy import pylab import scipy.cluster.hierarchy as sch...
// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' import Vuex from 'vuex' import VueI18n from 'vue-i18n' import fullscreen from 'vue-fullscreen' import VueClipboard from 'vue-clipboard2' import 'element-ui/li...
// [VexFlow](http://vexflow.com) - Copyright (c) Mohit Muthanna 2010. // @author Mohit Cheppudira // @author Greg Ristow (modifications) // // ## Description // // This file implements accidentals as modifiers that can be attached to // notes. Support is included for both western and microtonal accidentals. // // See `...
from time import sleep valores = [] for cont in range(1, 6): #Ler vários valores pelo teclado e colocar na lista valores.append(int(input(f'Digite o {cont} valor: '))) print('Vamos organizar os valores!') valores.sort() #Organiza os valores em órdem crescente sleep(2) #Gracinha que fiz pra ficar mais legal ...
from src.utils.helper_synonym import get_synonym_all def test_get_synonym_all(terms_synonyms): assert get_synonym_all(terms=terms_synonyms.keys()) == terms_synonyms
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { selectBook } from '../actions/index'; import { bindActionCreators } from 'redux'; class BookList extends Component { renderList() { return this.props.books.map((book) => { return ( <li key={boo...
#ifndef VIX_LOGMANAGER_H #define VIX_LOGMANAGER_H #include <vix_platform.h> #include <vix_singleton.h> namespace Vixen { class VIX_API LogManager : public Singleton <LogManager> { friend class Singleton <LogManager>; public: }; extern LogManager& g_LogManager; } #endif // !VIX_LOGMANAGER_H
# -*- coding: utf-8 -*- """ This module implements the class StandardNetwork. StandardNetwork creates a ring network as defined in Santhakumar et al. 2005 with some changes as in Yim et al. 2015. See StandardNetwork docstring for details. Created on Tue Nov 28 13:01:38 2017 @author: DanielM """ from neuron import h, ...
#!/usr/bin/env python import scipy.io import numpy as np import argparse, sys from ppi import irefindex as iref from ppi import parsers from ppi import string_db as sdb import stratipy.filtering_diffusion as diffuse import scipy.sparse as sp import sys import os.path import pickle def parse_gene_list_file(fh): rv = ...
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2017-02-23 22:12 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tournament', '0145_auto_20170211_1825'), ] operations = [ migrations.AddField( model_name='league', ...
var async = require("async"); /******************* Name: fetchScreen Description: Load selected screen object *******************/ exports.fetchScreen = function (req, res, next) { var Screen = require('../models/screen'); Screen.find(req.params.id, function(err, screen){ if( err){ console.log("Error r...
#include <stdio.h> #include <unistd.h> #include <string.h> #include <stdlib.h> #include <sys/wait.h> #include <signal.h> int hijos; char *message = "procesando...\t"; void Usage() { printf("Usage:signals10 ejecutable [arg2..argn]\n"); printf("Este programa crea tantos procesos como argumentos recibe menos 1 que lue...
import React, { Fragment } from "react"; import { BrowserRouter, Route, Switch, withRouter } from "react-router-dom"; import Header from "./components/common/header"; import Footer from "./components/common/footer"; import Home from "./components/home"; import SinglePost from "./components/post/single"; import AboutPag...
# 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 from ... import _utilities, _tables from...
import axios from 'axios'; export const GameAPIScope = 'api://05acec15-d6fb-4dae-a9b3-5886a7709df9/user_impersonation'; export default function(accessToken) { return axios.create({ baseURL: 'https://nursehack-gamificationapi.azurewebsites.net/api', headers: { common:{ 'cont...
//集团架构的增删改管理 var ORG_OrganizationManager = function(){ //初始化相关事件 var initEvent = function(){ //新建架构主管事件 $("#addNewOrgLeader").click(function(){ var leaderDiv = $("#addOrgLeader"); if(leaderDiv.is(":visible")){ leaderDiv.hide(); }else{...
#!/usr/bin/env python3 import json import logging import os import re import subprocess import sys import time from io import BytesIO import pycurl import RPi.GPIO as GPIO from config import * # Logging fun root = logging.getLogger() root.setLevel(logging.DEBUG) handler = logging.StreamHandler(sys.stdout) handler.se...
from plaid.api.api import API class Balance(API): '''Accounts balance endpoint.''' def get(self, access_token, _options={}, account_ids=None): ''' Retrieve real-time balance information for accounts. :param str access_token: :param [s...
# Code is generated: DO NOT EDIT # Copyright 2019 Machine Zone, Inc. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from kubespec import context from kubespec import types from kubespec.k8s import base from kubespec.k8s.batch import v1 as ba...
var FileLoggerAdapter = require('../src/Adapters/Logger/FileLoggerAdapter').FileLoggerAdapter; var Parse = require('parse/node').Parse; var request = require('request'); var fs = require('fs'); var LOGS_FOLDER = './test_logs/'; var deleteFolderRecursive = function(path) { if( fs.existsSync(path) ) { fs.readdirS...
######################################### ## Written by steven.feltner@spot.io ## Script to update the desiredCount (# of tasks) for all services have less running than desired. ######################################### ### Parameters ### cluster = '' region = '' desiredCount = 0 # AWS Profile Name (Optional) profil...
const logger = require('loglevel'); const defaultHost = require('./host'); const validateOptions = require('./validateOptions'); const { getDefaultLineTransformers } = require('./transformers'); const { convertLegacyThemeOption } = require('./themeUtils'); const { processExtensions } = require('./processExtension'); /...
import tkinter as tk from lib.app import Application if __name__ == "__main__": root = tk.Tk() root.title("SCARA Motion Control System") app = Application(root) root.eval("tk::PlaceWindow . center") root.protocol("WM_DELETE_WINDOW", app.on_close) app.mainloop()
import numpy as np import pytest import scipy.sparse import tensorflow as tf import torch from scipy.sparse import csr_matrix from jina import DocumentArray, Document, DocumentArrayMemmap from tests import random_docs rand_array = np.random.random([10, 3]) def da_and_dam(): rand_docs = random_docs(100) da =...
const Express = require("express"); const App = Express(); const port = 80; App.use("/", Express.static("public")); App.get("/api/:number", (req, res) => { let result = {"error": "Not found!"}; if(req.params.number == 5) { result = {"secret": "You got the secret!"}; } res.json(result); }); ...
/** * meraki * * This file was automatically generated for meraki by APIMATIC v2.0 ( https://apimatic.io ). */ 'use strict'; const BaseModel = require('./BaseModel'); /** * Creates an instance of PortRuleModel */ class PortRuleModel extends BaseModel { /** * @constructor * @param {Object} obj ...
from typing import List, Optional from holidaycal.holiday import AbstractHoliday, LondonBankHolidays, NYBankHolidays class AbstractCalendar: """ Abstract object to create a calendar with a list of holiday rules. """ rules: List[AbstractHoliday] = [] def __init__(self, name: Optional[str] = None...
// Copyright (c) %%year%% by Code Computerlove (http://www.codecomputerlove.com) // Licensed under the MIT license // version: %%version%% (function (window, Util) { Util.extend(Util, { Events: { /* * Function: add * Add an event handler */ add: function(obj, type, handler){ ...
import os import sys BASE_DIR = os.path.dirname( os.path.dirname(os.path.dirname(os.path.dirname( os.path.abspath(__file__))))) sys.path.append(BASE_DIR) import numpy as np from tools.path import CIFAR100_path from simpleAICV.classification import backbones from simpleAICV.classification import losses f...
module.exports = api => { api.cache(false) return { presets: ['@babel/preset-typescript', '@babel/preset-env'], plugins: ['@babel/plugin-proposal-class-properties'] } }
import numpy as np import gym from gym import Wrapper from gym.wrappers.time_limit import TimeLimit from collections import namedtuple import paper_gym import gym_minigrid import gym_miniworld import gym_classics from rlpyt.envs.base import EnvSpaces, EnvStep from rlpyt.envs.wrappers import RLPYT_WRAPPER_KEY from rlp...
from django.conf.urls import url, include from . import views from django.conf import settings from django.conf.urls.static import static urlpatterns = [ url(r'^$', views.index, name='Index'), url(r'^create/profile$', views.create_profile, name='create-profile'), url(r'^new/project$', views.new_project, na...