text
stringlengths
3
1.05M
/* $Id: m_i386.h 3553 2011-05-05 06:14:19Z nanang $ */ /* * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as publi...
"""Application module.""" from dependency_injector.wiring import inject, Provide from fastapi import FastAPI, Depends from .containers import Container from .services import Service app = FastAPI() @app.api_route("/") @inject async def index(service: Service = Depends(Provide[Container.service])): value = awa...
# simple Jacob's Ladder simulator # written a long time ago by T.C. Broonsie import time import random import displayio from adafruit_matrixportal.matrix import Matrix #--| User Config |----------------------------------------- MATRIX_WIDTH = 64 MATRIX_HEIGHT = 32 BACK_COLOR = 0x000000 BOLT_COLOR = 0xFFFFFF BOLT_WIDTH...
"""Local Development settings""" from __future__ import absolute_import from os.path import join, normpath from .base import * # change debug to true and template debug DEBUG = True TEMPLATE_DEBUG = DEBUG # database for local development DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3'...
import React from 'react' import { graphql } from 'gatsby' import Img from 'gatsby-image' import styles from './gallery.module.css' export const query = graphql` query GalleryImages { allFile(filter: {sourceInstanceName: {eq: "gallery"}}) { edges { node { childImageSharp { flu...
""" Copyright 2018 Amazon.com, Inc. or its affiliates. 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 the Software without restriction, including without limitation the rights to ...
import os import numpy as np dir = "/export/medical_ai/ucsf/ssl_rtog/moco/model_R50_b=256_lr=0.03_pg5plus/distant_met_5year/no_lr_schedule/pod5" run_dirs = ['run1', 'run2', 'run3', 'run4', 'run5'] def extract_auc(dir_contents, prefix="testing"): paths = [f for f in dir_contents if f[-4:] == ".png" and f.split('_...
module.exports = function AmaraPluginDoclet() { return function createHandler(dispatch) { const rx = /\*\s*?@([^\s]+)\s+(ANY|ALL|SOME|NONE)?\s?(.+)/gi; function parseDoclets(code) { const doclets = {}; let match; while (match = rx.exec(code)) { ...
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
import React from "react" import {useStaticQuery, graphql} from "gatsby" const ReactMarkdown = require('react-markdown') const Transfers = () => { const data = useStaticQuery(graphql` { markdownRemark(frontmatter: {path: {eq: "/transfers/"}}) { html } }`) return <ReactMarkdown ...
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP # # GNU Zebra is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2, or (at your option) any # later version. # # GNU Zebra is distribu...
//! moment.js locale configuration //! locale : korean (ko) //! //! authors //! //! - Kyungwook, Park : https://github.com/kyungw00k //! - Jeeeyul Lee <jeeeyul@gmail.com> (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../moment')) : typeof define ===...
/* * rs5c372.c * * Device driver for Ricoh's Real Time Controller RS5C372A. * * Copyright (C) 2004 Gary Jennejohn garyj@denx.de * * Based in part in ds1307.c - * (C) Copyright 2001, 2002, 2003 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * Keith Outwater, keith_outwater@mvis.com` * Steven Scholz, ...
# -*- coding: utf-8 -*- """ @brief: Extract judicial acts from `bsr.sudrf.ru` @file: settings.py @author: dmryutov (dmryutov@gmail.com) @date: 23.04.2017 -- 29.04.2017 """ import re ALL_ACTS = r'https://bsr.sudrf.ru/bigs/portal.html#%7B%22mode%22:%22QUERY_HISTORY%22,%22historyQueryId%22:%22B6A74295-C7E2-4A42-B3A...
from greent.util import LoggingUtil from greent.service import Service from greent import node_types from greent.graph_components import KNode, LabeledID, KEdge from greent.util import Text from csv import reader import logging import requests import traceback import os # declare a logger and initialize it logger = Lo...
/** * @author mrdoob / http://mrdoob.com/ */ THREE.CSS2DObject = function ( element ) { THREE.Object3D.call( this ); this.element = element; this.element.style.position = 'absolute'; this.addEventListener( 'removed', function ( event ) { if ( this.element.parentNode !== null ) { ...
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-02-29 13:09 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('opere', '0003_remove_opera_image_grayscale'), ] operations = [ migrations.Ad...
from __future__ import absolute_import from __future__ import division from __future__ import print_function """Tasks that test correctness of algorithms.""" from six.moves import xrange from common import reward as reward_lib # brain coder from single_task import misc # brain coder class BasicTaskManager(object)...
"use strict"; let getH2 = document.getElementById("fill-auto"); let color = { ele: { r: 177, g: 137, b: 1, }, setEle: function () { this.ele.r = (this.ele.r + Math.random() * 255) % 255; this.ele.g = (this.ele.g + Math.random() * 255) % 255; //this.ele.b = (this.ele.b + Math.random() * 5) % 255; }, se...
const WHITESPACE = { BEFORE: 'before', AFTER: 'after', BOTH: 'both', NONE: 'none', DEFAULT: 'after' } const ESCAPES = { paragraph: { pattern: /\n\n+|\r\r+|\r\n(\r\n)+/g, artifact: '\n\n', whitespace: WHITESPACE.NONE, capitalizeNext: true }, 'wiki-citation': { pattern: /\[\d+\]/g, ...
# Copyright 2018 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...
QUnit.testStart(function() { const markup = '<!--qunit-fixture-->\ <div id="container">\ <div id="treeList">\ </div>\ </div>\ '; $('#qunit-fixture').html(markup); }); import 'common.css!'; import 'generic_light.css!'; import 'ui/tree_list/ui.tree_list'; import $ from 'jquery'; import {...
"""Rides URLS.""" # Django from django.urls import include, path # Django REST Framework from rest_framework.routers import DefaultRouter # Views from .views import rides as rides_views router = DefaultRouter() router.register( r'circles/(?P<slug_name>[a-zA-Z0-9_-]+)/rides', rides_views.RideViewSet, bas...
from django.db import models from django_oso.models import AuthorizedModel class User(models.Model): username = models.CharField(max_length=255) is_moderator = models.BooleanField(default=False) is_banned = models.BooleanField(default=False) posts = models.ManyToManyField("Post") class Meta: ...
/* * portfinder.js: A simple tool to find an open port on the current machine. * * (C) 2011, Charlie Robbins * */ "use strict"; var fs = require('fs'), net = require('net'), path = require('path'), async = require('async'), mkdirp = require('mkdirp').mkdirp; var internals = {}; internals.testPo...
#!/usr/bin/env python # ****************************************************************************** # $Id: gdalcopyproj.py d7e898f6034a9c6c0f83cfbff921434dfc2082be 2018-04-18 23:07:52 +1000 Ben Elliston $ # # Name: gdalcopyproj.py # Project: GDAL Python Interface # Purpose: Duplicate the geotransform and p...
const test = require('tape') const ram = require('random-access-memory') const dht = require('@dswarm/dht') const ddatabaseCrypto = require('@ddatabase/crypto') const DDatabaseProtocol = require('@ddatabase/protocol') const Basestore = require('basestorex') const BasestoreNetworker = require('..') const BOOTSTRAP_POR...
import React, { useEffect, useState } from 'react'; import Card from '@material-ui/core/Card'; import CardActionArea from '@material-ui/core/CardActionArea'; import CardMedia from '@material-ui/core/CardMedia'; import Grow from '@material-ui/core/Grow'; import Typography from '@material-ui/core/Typography'; import { Bo...
import os import shutil import subprocess import sys import tempfile from tests import LimitedTestCase, main base_module_contents = """ import socket import urllib print "base", socket, urllib """ patching_module_contents = """ from eventlet.green import socket from eventlet.green import urllib from eventlet import ...
// src/plugins/vuetify.js import Vue from 'vue' import Vuetify from 'vuetify' import 'vuetify/dist/vuetify.min.css' import colors from 'vuetify/lib/util/colors' Vue.use(Vuetify); const opts = {theme: { themes: { light: { primary: '#2D3753', secondary: '#2D3753', accent...
#!/usr/bin/env python u""" compute_tidal_elevations.py Written by Tyler Sutterley (06/2021) Calculates tidal elevations for an input file Uses OTIS format tidal solutions provided by Ohio State University and ESR http://volkov.oce.orst.edu/tides/region.html https://www.esr.org/research/polar-tide-models/list-o...
""" Base settings to build other settings files upon. """ from pathlib import Path import environ ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent # cookbook/ APPS_DIR = ROOT_DIR / "cookbook" env = environ.Env() env.read_env(str(ROOT_DIR / ".env")) # GENERAL # -------------------------------------...
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ https://github.com/cgloeckner/pyvtt/ Copyright (c) 2020-2021 Christian Glöckner License: MIT (see LICENSE for details) """ from pony.orm import db_session import cache, orm from test.utils import EngineBaseTest class GmCacheTest(EngineBaseTest): def set...
"""jc - JSON CLI output utility `fstab` file parser Usage (cli): $ cat /etc/fstab | jc --fstab Usage (module): import jc.parsers.fstab result = jc.parsers.fstab.parse(fstab_command_output) Compatibility: 'linux', 'freebsd' Examples: $ cat /etc/fstab | jc --fstab -p [ { "fs_...
exports.config = { // See http://brunch.io/#documentation for docs. files: { javascripts: { joinTo: 'js/app.js' // To use a separate vendor.js bundle, specify two files path // http://brunch.io/docs/config#-files- // joinTo: { // 'js/app.js': /^js/, // 'js/vendor.js': /^...
/* Crie uma função `multiplicaPorCinco` que aceite um argumento, multiplique-o por `5`e retorne o novo valor. */ function multiplicaPorCinco(num){ return num * 5 }; console.log(multiplicaPorCinco(5))
// This program is a part of NITAN MudLIB #include <ansi.h> #include <combat.h> string name() { return HIR "天寰神炎" NOR; } inherit F_SSERVER; int perform(object me, object target) { object weapon; string msg; int skill; if (! target) target = offensive_target(me); if (! targe...
#!/usr/bin/env python # straight outta them aubio docs def apply_filter(path): from aubio import source, sink, digital_filter from os.path import basename, splitext # open input file, get its samplerate s = source(path) samplerate = s.samplerate # create an A-weighting filter f = digital...
# Copyright (C) H.R. Oosterhuis 2020. # Distributed under the MIT License (see the accompanying README.md and LICENSE files). import numpy as np def sample_rankings(log_scores, n_samples, cutoff=None, prob_per_rank=False): n_docs = log_scores.shape[0] ind = np.arange(n_samples) if cutoff: ranking_len = min...
""" Să se găsească numărul de inversiuni semnificative dintr-o permutare. Inversiune semnificativă: i < j cu a_i > 2 * a_j 7 > 2 * 3 OK 7 > 2 * 4 NU (7, 3) inversiune (nesemnificativa) (7, 4) inversiune semnificativa 7 10 5 6 3 4 2 8 Soluție: la fel ca algoritmul de numărat inversiuni din curs, cel bazat pe ...
var polygamma_8hpp = [ [ "polygamma", "polygamma_8hpp.html#a1aab975128b9cfbd175699a9587b34d0", null ], [ "polygamma", "polygamma_8hpp.html#a132b29cd86870cdd360652baeb54c663", null ] ];
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import logging import os import subprocess from py_zipkin import Encoding, get_default_tracer from py_zipkin.transport import BaseTransportHandler from py_zipkin.util import generate_rand...
import { Meteor } from 'meteor/meteor'; import { RocketChat } from 'meteor/rocketchat:lib'; import LivechatVisitors from '../models/LivechatVisitors'; Meteor.methods({ 'livechat:registerGuest'({ token, name, email, department, customFields } = {}) { const userId = RocketChat.Livechat.registerGuest.call(this, { t...
import Request from './request' class User { static submit(data) { console.log(data) return new Request("/user/submit", { data: data, method: "POST" }) } static getData(number){ return new Request("/user/get_data", { data: {number: number}, method: "POST" }) } } ex...
// import { put, takeLatest } from 'redux-saga/effects'; // import es6promise from 'es6-promise'; // import fetch from 'isomorphic-unfetch'; // // import { actionTypes, loadDataSuccess, loadDataError } from './actions'; // // es6promise.polyfill(); // // function* loadDataSaga() { // try { // const res = yield fe...
/** * Cesium - https://github.com/CesiumGS/cesium * * Copyright 2011-2020 Cesium 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/LICEN...
import { MergeMapOperator } from './mergeMap-support'; export default function mergeMap(project, resultSelector, concurrent = Number.POSITIVE_INFINITY) { return this.lift(new MergeMapOperator(project, resultSelector, concurrent)); }
"use strict"; if (!require("./is-implemented")()) { Object.defineProperty(Math, "log10", { value: require("./shim"), configurable: true, enumerable: false, writable: true }); }
/** ****************************************************************************** * @file TIM/TIM15_ComplementarySignals/stm32f10x_it.h * @author MCD Application Team * @version V3.5.0 * @date 08-April-2011 * @brief This file contains the headers of the interrupt handlers. *********************...
import copy import numpy as np from fatd.exceptions import (MissingImplementationError, IncorrectShapeError) def reshape_array(array, axis=0): if len(array.shape) == 1: if axis == 0: return array.reshape(1, array.shape[0]) else: return array.res...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Multilayer Perceptrons in fancy shapes. """ import ConfigSpace as CS import ConfigSpace.hyperparameters as CSH import torch.nn as nn from autoPyTorch.utils.config_space_hyperparameter import add_hyperparameter, get_hyperparameter from autoPyTorch.components.networks....
new Crawler({ appId: "", apiKey: "", rateLimit: 8, startUrls: ["https://inertiajs.com/releases", "https://inertiajs.com/"], renderJavaScript: false, sitemaps: [], exclusionPatterns: [], ignoreCanonicalTo: false, discoveryPatterns: ["https://inertiajs.com/**"], schedule: "at 15:30 on Wednesday", ac...
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}r...
var message = 'Hello Node!'; var
import os from flask import Flask, jsonify from project.api.orders.views import orders_blueprint from project.api.payment.views import payment_blueprint from project.api.restaurant.views import restaurant_blueprint from project.api.users.views import users_blueprint def create_app(): app = Flask(__name__) ...
# -*- coding: utf-8 -*- # Copyright 2020 ProjectQ-Framework (www.projectq.ch) # # 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 # # ...
const contentContainerPadding = 10; const spaceNormal = 10; const spaceMore = 20; export { contentContainerPadding, spaceNormal, spaceMore };
import os import glob def get_latest_model(): """Gets the latest model path for training classifier""" list_of_models = glob.glob('models/*') list_of_models_modified = [] for model in list_of_models: if 'cae' in model: pass else: list_of_models_modif...
import React, { Component } from 'react'; import { dataFetch } from '../../../services/widget-api'; import Spinner from '../../Spinner'; import * as ENV from '../../../env'; const CLIENT_ID = ENV.GA_CLIENT_ID; const API_KEY = ENV.GA_API_KEY; import './ga.css'; class GaWidget extends Component { constructor(pr...
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-10-03 19:22 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0019_invoice_buyerpayssalestax'), ('discoun...
/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { NgModuleFactory as R3NgModuleFactory } from '../render3/ng_module_ref'; import { stringify } from '../util/s...
########################################## # # # Date: 9 Nov 2017 # # Author: Thiss # # # ########################################## """ Copyright 2017 Thisseas Xanthopoulos Licensed un...
"use strict"; /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *-------------------------------------------------...
document.addEventListener('DOMContentLoaded',() => { });
import os import featurevecs def vector(filename, authorsName): #filename is one of the author's works, authorsName is their feature vector file inputFile = open(filename, "r") features = open(authorsName, "a+") #calculate the feature vector expected of the file #featurevecs.Extract(inputFile) features.write(s...
const weights = [20,15,10,5,2.5,1.25] function liftingCalc(w){ if (w<20){return false} var res = [] var side = (w-20)/2 var idx = 0 while(side>0){ side>=weights[idx] ? (res.push(weights[idx]), side-=weights[idx]) : idx++ if (idx>5){return false} } return res }
from helpers.enums import Network subgraph_ids = { "nfts": "0xba5edb751ccf93770796e273d8bce83e1e81e2d4-3", } subgraph_urls = { # Chain graphs Network.BinanceSmartChain: "https://api.thegraph.com/subgraphs/name/axejintao/badger-dao-bsc", Network.Ethereum: "https://api.thegraph.com/subgraphs/name/axejint...
import cv2 __all__ = [ "INPUT_IMAGE_ID_KEY", "INPUT_IMAGE_KEY", "INPUT_INDEX_KEY", "OUTPUT_EMBEDDINGS_KEY", "OUTPUT_LOGITS_KEY", "OUTPUT_MASK_16_KEY", "OUTPUT_MASK_2_KEY", "OUTPUT_MASK_32_KEY", "OUTPUT_MASK_4_KEY", "OUTPUT_MASK_64_KEY", "OUTPUT_MASK_8_KEY", "OUTPUT_MASK_...
import React, { Component } from 'react'; import Badge from '@material-ui/core/Badge'; import Icon from '@material-ui/core/Icon'; import Radio from '@material-ui/core/Radio'; import Table from '@material-ui/core/Table'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableC...
"use strict"; // Do this as the first thing so that any code reading it knows the right env. process.env.BABEL_ENV = "development"; process.env.NODE_ENV = "development"; // Makes the script crash on unhandled rejections instead of silently // ignoring them. In the future, promise rejections that are not handled will ...
/*! * (C) BKKR Framework https://bkkr-team.github.io/bkkr-docs/ - MIT License */ import{r as t,h as o,H as n}from"./p-24bb0787.js";import{s as r}from"./p-18201c80.js";let a=class{constructor(o){t(this,o)}render(){const{color:t}=this;return o(n,{class:r(t)},o("slot",{name:"start"}),o("div",{class:"toolbar-content"},o(...
import chai, {expect} from 'chai'; import chaiHttp from 'chai-http'; import {RelayerUnderTest} from '../../../lib/utils/relayerUnderTest'; import {utils} from 'ethers'; import {createMockProvider, getWallets, deployContract} from 'ethereum-waffle'; import {waitForContractDeploy} from '@universal-login/commons'; import ...
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL3$ ** Commercial License Usage ** Licensees holding ...
/* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2000 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the ...
from __future__ import absolute_import, division, print_function """ This module contains some example ``Rollup`` objects, each implementing the interface expected by the Manhattan backend for rollup aggregations. """ import time from datetime import datetime, timedelta import pytz class LocalRollup(object): d...
// Copyright 2014 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. #ifndef COMPONENTS_VIZ_SERVICE_FRAME_SINKS_FRAME_SINK_MANAGER_IMPL_H_ #define COMPONENTS_VIZ_SERVICE_FRAME_SINKS_FRAME_SINK_MANAGER_IMPL_H_ #include <std...
#pragma once #include <QThread> #include <capnp/dynamic.h> #include "cereal/visionipc/visionipc_server.h" #include "selfdrive/ui/replay/camera.h" #include "selfdrive/ui/replay/route.h" constexpr int FORWARD_SEGS = 2; constexpr int BACKWARD_SEGS = 2; class Replay : public QObject { Q_OBJECT public: Replay(QStri...
/* resrc.c -- read and write Windows rc files. Copyright (C) 1997-2014 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. Rewritten by Kai Tietz, Onevision. This file is part of GNU Binutils. This program is free software; you can redistribute it and/or modify it under the t...
var path = require('path'); var fs = require('fs'); var appRoot = 'src/'; var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8')); var bundleOptions = { //mangle: false }; module.exports = { root: appRoot, source: appRoot + '**/*.js', html: appRoot + '**/*.html', style: 'styles/**/*.css'...
# Copyright 2015 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...
# Copyright 2008-2015 Nokia Solutions and Networks # # 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...
// // OfflineManager.h // Mapwize Tester // // Created by Laszlo Blum on 2019. 04. 22.. // #import <Foundation/Foundation.h> #import <MapwizeUI/MapwizeUI.h> #import "Mapwize.h" NS_ASSUME_NONNULL_BEGIN @interface OfflineManager : NSObject - (void) initManager:(Mapwize*) plugin styleURL:(NSString*) styleURL; - (voi...
const path = require('path'); const fs = require('fs-promise'); const express = require('express'); const consolidate = require('consolidate'); const morgan = require('morgan'); const favicon = require('serve-favicon'); const config = require('./config'); const app = express(); app.engine('html', consolidate.nunjuck...
# 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. # -----------------------------------------------------...
import keras import tensorflow as tf from IPython import display from keras.preprocessing.image import array_to_img import matplotlib.pyplot as plt from numpy.random import seed seed(888) tf. set_random_seed(404) from keras.datasets import cifar10 (x_train,y_train),(x_test,y_test)=cifar10.load_data() print(type(x_train...
# -*- coding: utf-8 -*- """CLI parser""" import argparse def get_cli_parser(): """Creates CLI parser""" parser = argparse.ArgumentParser( description='Find N most common colors in images.') parser.add_argument('file', metavar='<INPUT FILE>', type=str, nargs=1, help='File w...
import json import validators from csv2sqllike.PseudoSQLFromCSV import PsuedoSQLFromCSV from csv2sqllike.Transfer2SQLDB import Transfer2SQLDB class QueueManager(Transfer2SQLDB): def __init__(self, info_dict=None): """ db_info = dict(host=<ip_address>, user=<user_name>, password=<password>, db=<db...
(function(exports) { function Thermistor(pins) { exports.BaseComponent.call(this); this.dataPin = pins.Thermistor; this.componentsEl = document.querySelector('#components'); } Thermistor.prototype = Object.create(exports.BaseComponent.prototype); Thermistor.prototype.init = f...
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 VMware, Inc. # Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. Yo...
const sideBarConfig = require("./baseConfig/sidebarConfig") const navConfig = require('./baseConfig/navConfig') module.exports = { title: "忘带伞的阿离", description: '', head: [ ['link', {rel: 'icon', href: 'assets/favicon.ico'}] ], themeConfig: { // logo: "/assets/img/bg.jpg", // 导航栏链接 nav: navC...
#include "vulkan_image.h" #include "vulkan_device.h" #include "core/dmemory.h" #include "core/logger.h" void vulkan_image_create( vulkan_context* context, VkImageType image_type, u32 width, u32 height, VkFormat format, VkImageTiling tiling, VkImageUsageFlags usage, VkMemoryPropertyFla...
from aws_cdk import core accounts = { 'Dns': { 'account': '366442540808', 'region': 'us-east-1' }, 'Prod': { 'account': '366442540808', 'region': 'us-east-1' }, 'Beta': { 'account': '944207523762', 'region': 'us-east-1' }, 'Dev-mhall6': { ...
# Copyright (c) 2020 Yubico AB # 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...
YUI.add("moodle-core-notification-ajaxexception",function(e,t){var n,r,i,s,o,u,a;n="moodle-dialogue",r="notificationBase",i="yesLabel",s="noLabel",o="title",u="question",a={BASE:"moodle-dialogue-base",WRAP:"moodle-dialogue-wrap",HEADER:"moodle-dialogue-hd",BODY:"moodle-dialogue-bd",CONTENT:"moodle-dialogue-content",FOO...
import csv import os import datetime x = datetime.datetime.now() date=x.strftime("%d %b,%Y") time=x.strftime("%I:%M:%S %p") #billing system def bill(): f=open("bills.csv","w") fw=csv.writer(f) fw.writerow(['\t'+'*'*15,'ALPHA HOSPITAL','*'*15,'\n']) fw.writerow(['\tHERE IS YOUR BILL !\n ']) fw.writer...
""" Flask-Ask ------------- Easy Alexa Skills Kit integration for Flask """ from setuptools import setup def parse_requirements(filename): """ load requirements from a pip requirements file """ lineiter = (line.strip() for line in open(filename)) return [line for line in lineiter if line and not line.star...
const prices = [20, 10, 30, 25, 15, 40, 80, 5] const salePrices = prices.map(price => price / 2) console.log(salePrices)
from logging import Logger from unittest import TestCase from unittest.mock import Mock from app.ingest.domain.services.exceptions.get_ingest_by_package_id_exception import GetIngestByPackageIdException from app.ingest.domain.services.exceptions.process_status_message_handling_exception import \ ProcessStatusMessa...
from hintapi.utils import State def test_state(): state = State({"message": "hello world"}) with state: assert state.message == "hello world" state.like = "you" assert state.like == "you" del state.like with state: assert state.message == "hello world" assert ...
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...