text
stringlengths
3
1.05M
const puppeteer = require('puppeteer'); const { format } = require('url'); const { join }= require('path'); (async () => { // https://github.com/Googlechrome/puppeteer/issues/290 const browser = await puppeteer.launch({ args: ['--no-sandbox', '--disable-setuid-sandbox'] }); const page = await browser.newPa...
import torch from torch.autograd import Variable def train(epoch, dataloader, net, criterion, optimizer, opt): net.train() for i, (adj_matrix, annotation, target) in enumerate(dataloader, 0): net.zero_grad() padding = torch.zeros(len(annotation), opt.n_node, opt.state_dim - opt.annotation_dim)...
import requests as req def insertion(): stuff = req.post('http://127.0.0.1:8000/user/ben/glossner/bgslide/hello') insertion()
var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] =...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WrapTight = void 0; const xml_components_1 = require("file/xml-components"); class WrapTightAttributes extends xml_components_1.XmlAttributeComponent { constructor() { super(...arguments); this.xmlKeys = { ...
import re from typing import List from urllib.parse import urlparse import pytest from bs4 import BeautifulSoup from google.appengine.ext import ndb from werkzeug.test import Client from backend.common.consts.account_permission import AccountPermission from backend.common.consts.media_type import MediaType from backe...
function loadOptions() { chrome.storage.sync.get({ /*handlePDF: false,*/ saveLocally: false, saveChromeBookmarks: true }, function(items) { //document.getElementById('handlePDF').checked = items.handlePDF; document.getElementById('saveLocally').checked = items.saveLocally; document.g...
/****************************************************************************** * Simulator.c * * Copyright (C) 2017 WANG YIFU * * Auther: Wang Yifu * E-mail: 340064514@qq.com * * Note: * ******************************************************************************/ #ifndef __SIMULATOR_H #define __SIMULATO...
"use strict"; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.definePrope...
import unittest from sim.battle import Battle from data import dex class TestDecisions(unittest.TestCase): def test_switch(self): battle = Battle(debug=False, rng=False) battle.join(0, [{'species': 'mew'}, {'species': 'mewtwo'}, {'species': 'magnezone'}]) battle.join(1, [{'species': 'pidge...
'use strict'; module.exports = { askForModuleName, askForClientSideOpts, askFori18n }; function askForModuleName() { if (this.baseName) return; this.askModuleName(this); } function askForClientSideOpts() { if (this.existingProject) return; var done = this.async(); var getNumberedQu...
canvas = document.getElementById('curves'); size = 700; img = new ArtShip(size, 2 * size, canvas); context = img.context; let step = img.ratio(10); let dens = img.ratio(20); function brush_hair (coordinates) { for (let brush_stroke = 0; brush_stroke < img.ratio(1); brush_stroke++) { let points = []; ...
import os import sys from typing import List from setuptools import find_packages, setup try: from biomass import __author__, __email__, __maintainer__ except ImportError: __author__ = __maintainer__ = "Hiroaki Imoto" __email__ = "himoto@protein.osaka-u.ac.jp" def get_version() -> str: version_file...
# Coin partitions # Problem 78 # Let p(n) represent the number of different ways in which n coins can be separated into piles. # For example, five coins can be separated into piles in exactly seven different ways, so p(5)=7. # OOOOO # OOOO O # OOO OO # OOO O O # OO OO O # OO O O O # O O O O ...
""" General func/tools used in pbsmrtpipe """ import os import sys import re import time import logging import logging.config import logging.handlers from jinja2 import Environment, PackageLoader from pbsmrtpipe.decos import ignored from pbsmrtpipe.constants import SLOG_PREFIX HTML_TEMPLATE_ENV = Environment(loader...
/* * Copyright 2009-2017 Alibaba Cloud 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...
""" MICROSOFT FORUM PAGE SCRAPER Website: answers.microsoft.com Example: > python 1_getsites.py --language de-de --product xbox """ import argparse import re import sys import os parser = argparse.ArgumentParser() parser.add_argument("--language", default="de-de", type=str, ...
"use strict"; var glob = require("glob"); var path = require("path"); module.exports = function (content, sourceMap) { this.cacheable && this.cacheable(); var resourceDir = path.dirname(this.resourcePath); var pattern = content.trim(); var files = glob.sync(pattern, { cwd: resourceDir }); if (!files....
import React from 'react'; import ReactDOM from 'react-dom'; import { createStore, combineReducers, applyMiddleware, compose } from 'redux'; import { Provider, connect } from 'react-redux'; import { createHashHistory } from 'history'; import { NAMESPACE_SEP } from './constant'; import createSagaMiddleware from 'redux-s...
/* Copyright (c) Uber Technologies, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. */ // @flow import * as React from 'react'; import { isFragment } from 'react-is'; export const flattenFragments = ( children?: React.Node, ChildWrapper...
import React from 'react' import { View, Text, Image, StyleSheet } from 'react-native' import { Colors, Metrics, Media, Fonts } from '../theme' type Props = { title: string, style?: number | Object | Array<number>, textStyle?: number | Object | Array<number>, middleComponent?: Object } export default function...
const User = require('../model/user') class App { getIndex = (req, res , next) => { res.render("index") } postIndex = async ( req , res , next ) => { try { const {name, email, phone, message} = req.body const client = await User.find({}) const che...
'use strict'; const joi = require('joi'); const delay = require('delay'); const register = server => { server.bullish.job({ name: 'add5', handler: (job) => delay(5000).then(() => { return Promise.resolve(job.data.input + 5); }), config: { validate: { input: joi.number(), } ...
/** Groups Controller */ // native modules // 3rd party modules // own modules const DefaultController = require('./'); class GroupsController extends DefaultController { constructor() { super('Group'); } } module.exports = GroupsController;
# -*- coding: utf-8 -*- """ Created on Tue Jun 25 13:55:10 2019 @author: Subhasis """ import sys import os import shutil import numpy as np import h5py as h5 import pandas as pd import yaml import argparse import network_data_analysis as nda """Find the highest spiking KCs so we can disconnect them and repeat the ...
#encoding=utf-8 import codecs import jieba path='F:/pycharm/data/TextSimilarity/dict/synonym/同义词库.txt' def construction_wordpairs(filepath): wordpairs={} with codecs.open(filepath, mode='r', encoding='utf8') as fr: lines = fr.readlines() for line in lines: if '=' in line: ...
#pragma once namespace Utility { // Return curent build process is in debug or not. inline bool IsDebug() { #ifdef _DEBUG return true; #else return false; #endif } }
import torch SEED = 1234 torch.manual_seed(SEED) torch.backends.cudnn.deterministic = True import DataSet import torch.nn as nn class TextRNN(nn.Module): def __init__(self): super(TextRNN, self).__init__() Vocab = len(DataSet.getTEXT().vocab) ## 已知词的数量 Dim = 100 ##每个词向量长度 dropout ...
"use strict"; (function() { angular .module("FormBuilderApp") .factory("FormService", FormService); function FormService($http) { var api = { createFormForUser : createFormForUser, findAllFormsForUser : findAllFormsForUser, deleteFormById : deleteFormById, ...
/*- * Copyright (c) 2012 Hamrouni Ghassen. * 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 condition...
# -*- coding: utf-8 -*- """ Copyright () 2018 All rights reserved FILE: poker.py AUTHOR: tianyuningmou DATE CREATED: @Time : 2018/3/15 下午4:37 DESCRIPTION: . VERSION: : #1 CHANGED By: : tianyuningmou CHANGE: : MODIFIED: : @Time : 2018/3/15 下午4:37 """ # 找出最大的顺子 def find_max_straight(num_list): # 先对给出的数据去重 ...
// Copyright 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef IOS_CHROME_BROWSER_SYNC_SYNC_OBSERVER_BRIDGE_H_ #define IOS_CHROME_BROWSER_SYNC_SYNC_OBSERVER_BRIDGE_H_ #import <Foundation/Foundation.h> #inclu...
from flask import Flask, jsonify, request from Models import db, Dispositivo from logging import exception app = Flask(__name__) app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///database\\dispositivo.db" app.config["SQLALCHEMY_TRAK_MODIFICATIONS"] = False db.init_app(app) # Routes @app.route("/") def home(): retu...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's // vendor/assets/javascripts directory can be referenced here using a relative path. // // It's not advisa...
""" Row-level correlations for spreadsheets used in the spreadsheet visualizer. """ from nest_py.core.data_types.tablelike_schema import TablelikeSchema COLLECTION_NAME = 'ssviz_feature_correlations' def generate_schema(): schema = TablelikeSchema(COLLECTION_NAME) # the spreadsheet whose correlation values a...
/* * Platform level USB initialization for FS USB OTG controller on omap1 and 24xx * * Copyright (C) 2004 Texas Instruments, Inc. * * This program 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 ...
from terminal import * term=Terminal() term.xprint("Short lines are OK.") term.xprint("But long lines are OK too because they will be wrapped.") term.xprint("It does not have to be text.") term.xprint(42) term.xprint("That is a number and it is OK.") term.xprint("We handle scrolling too.") for i in range(...
class CircularQueue: def __init__(self, n): self.len = n self.size = 0 self.circular_queue = [0] * n self.start = 0 self.end = 0 def enqueue(self, data): self.size += 1 if self.size > self.len: self.resize(self.len) self.circular_queu...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Coupled spin-1/2 (Static dipolar spectrum) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ¹³C-¹H static dipolar coupling simulation. """ # %% import matplotlib.pyplot as plt from mrsimulator import Simulator, SpinSystem, Site, Coupling from mrsimulator.methods import Bloc...
const test = require('ava') const AbortController = require('abort-controller') const pDefer = require('p-defer') const anySignal = require('./') test('should abort from any signal', async t => { const controllers = [...new Array(5)].map(() => new AbortController()) const signal = anySignal(controllers.map(c => c....
// BROBOT STEP CONSTANTS var STEPSMETER = 11428; // STEPS/METERS default: 11428 var STEPSTURN = 4675; // STEPS/TURN (360 deg) default:4675
const express = require('express'); const router = express.Router(); const config = require('../config.json'); const database = require('../controllers/database.js'); router.get('/', (req, res, next) => { database.query (`SELECT * FROM playerdata; SELECT pd.username as 'username', COUNT(ses.id) as 'joins' FROM games...
import { connect } from "react-redux"; import Container from "./container"; import { push } from "react-router-redux" import { actionCreators as userActions } from "redux/modules/user" const mapStateToProps = (state, ownProps) => { const { user: { username } } = state; return { username }; }; ...
import torch.nn as nn from lightconvpoint.nn.deprecated import Module class Identity(Module): """Indentity module compatible with LightConvPoint. # Forward arguments input: 3-D torch tensor. Input feature tensor. Dimensions are (B, I, N) with B the batch size, I the number of ...
# -*- coding: utf-8 -*- from __future__ import absolute_import import keras.backend as K from time import sleep def switch(condition, t, e): if K.backend() == 'tensorflow': import tensorflow as tf return tf.where(condition, t, e) elif K.backend() == 'theano': import theano.tensor as tt ...
// Vector rendering emulation modes (function () { "use strict"; Flynn.VectorMode = { PLAIN: 0, // No Vector rendering emulation (plain lines) V_THIN: 1, // Thin Vector rendering V_THICK: 2, // Thick Vector rendering }; if (typeof Flynn.Config == "undefined") { Flynn.Config = {}; // Cr...
import os from pathlib import Path # import django_on_heroku import dj_database_url # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'django-insecure-k^8bcdroc@(jkkq%va22otz1n2(rrd68s!c9a$m(*rq%x0lqry' # SECRET_KEY = os.enviro...
# -*- coding: utf-8 -*- # Copyright 2018 IBM. # # 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 agre...
#!/usr/bin/env python # Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Python test originally created or extracted from other peoples work. The # parts from me are licensed as below. It is at least Free Software where # it's copied from other people. In these cases, that will normally be # ...
tabageos = tabageos || {}; /* * Scales the game based on window.innerWidth/Height and gameWidth/Height * * gameWidth - the width of game game * gameHeight - the height of the game * divideScaleXBy - amount to divide the scaleX by (1.0 to 1.9) * divideScaleYBy - amount to divide the scaleY by * container - ...
/* * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Nicira, 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 * *...
from __future__ import print_function, division from sympy.core import S from sympy.core.function import _coeff_isneg from sympy.core.mul import Mul from sympy.core.numbers import Rational from sympy.core.power import Pow from sympy.core.relational import Equality from sympy.core.symbol import Symbol from sympy.utilit...
/* * Project: Mapper 1.0 * Description: Responsive html map area highlighter with area selection * Author: * License: */ // the semi-colon before function invocation is a safety net against concatenated // scripts and/or other plugins which may not be closed properly. ;(function ( $, window,...
/* * This header is generated by classdump-dyld 1.0 * on Tuesday, November 5, 2019 at 1:50:19 PM Mountain Standard Time * Operating System: Version 13.0 (Build 17J586) * Image Source: /Applications/Podcasts.app/Podcasts * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos. */ #import <Podca...
import React from 'react' import renderer from 'react-test-renderer' import serializer from 'jest-glamor-react' import { keyframes, sheet } from 'emotion/macro' import styled from 'react-emotion/macro' expect.addSnapshotSerializer(serializer(sheet)) describe('keyframes - macro', () => { test('renders', () => { ...
# -*- coding: utf-8 -*- # # Copyright 2018 Google LLC. 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 requir...
name0_1_1_1_1_3_0 = None name0_1_1_1_1_3_1 = None name0_1_1_1_1_3_2 = None name0_1_1_1_1_3_3 = None name0_1_1_1_1_3_4 = None
""" tasks.docstrings ~~~~~~~~~~~~~~~~ Check salt code base for for missing or wrong docstrings """ import ast import collections import os import pathlib import re from invoke import task # pylint: disable=3rd-party-module-not-gated from tasks import utils CODE_DIR = pathlib.Path(__file__).resolve().pa...
from django.shortcuts import render from .forms import ForecastForm,UploadFileForm from .utils import RecurrentNetworks import tensorflow as tf import numpy as np import pandas as pd import os from .utils import handle_uploaded_file from django.http import HttpResponse, Http404 # Create your views here. def download(...
from django.urls import path from . import views urlpatterns = [ path("", views.index, name="index"), path("<str:name>", views.greet, name="greet"), path("jeffer", views.jeffer, name="jeffer"), path("david", views.david, name="david") ]
import React from "react"; import "./Button.css"; class ReactButton extends React.Component { constructor(props){ super(props); this.handleClick=this.handleClick.bind(this); } handleClick(){ if(this.props.DISABLED !== true){ this.props.onClick(); } } render() { return ( <d...
print('Hello, World') ######################################################################## # This line is a COMMENT -- a note to human readers of this file. # When a program runs, it ignores everything from a # (hash) mark # to the end of the line with the # mark. # # We call files that have Python code in the...
import React from "react" import Display from "../components/display" import Layout from "../components/layout" const data = { title: "Soli", rows: [ { name: "Kenkeni", nodes: [0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 2, 2], }, { name: "Sangban", nodes: [2, 0, 1, 0, 3, 0, 3, 0, 1, 2, 0, 1]...
/* * Copyright (c) 2008-2021, Hazelcast, 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 ...
// Copyright (c) 2012 Ecma International. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- es5id: 15.2.3.6-4-320-1 description: > Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own data property of 'O', test ...
# requirements.txtの作るコマンド→ (myenv)$ pip freeze > requirements.txt # 動画や音声はファイルライクなオブジェクトで from __future__ import unicode_literals import os import io import math import random import aiohttp #画像転送系 # import requests #req import urllib.request import urllib.parse import json import discord from discord.ext import comma...
/* wl_types.h - Library for Arduino Wifi shield. Copyright (c) 2011-2014 Arduino. All right reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the Lice...
import { loginByEmail, logout, getInfo } from 'api/login'; import Cookies from 'js-cookie'; const user = { state: { user: '', status: '', email: '', code: '', uid: undefined, userType:'', auth_type: '', token: Cookies.get('Admin-Token'), name: '', avatar: '', introduction:...
ace.define("ace/mode/red_highlight_rules",[], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var RedHighlightRules = function() { var compoundKeywords = ""; this.$rules = { "st...
''' Created on Nov 11, 2018 @author: nilson.nieto ''' def custumgen(x,y): while x<y: yield x x+=1 for i in custumgen(1, 4): print(i) print(next(custumgen(7, 13)))
from django.db import models import django.contrib.auth.models as auth import channels class Room(models.Model): name = models.CharField(max_length=50,unique=True) moderator = models.ManyToManyField(auth.User,related_name='moderates') lecturer = models.ForeignKey(auth.User,on_delete=models.CASCADE) ...
/** * @jsx React.DOM * @copyright Prometheus Research, LLC 2014 */ 'use strict'; var Grid = require('./Grid'); var Row = require('./Row'); var Cell = require('./Cell'); module.exports = Grid; module.exports.Row = Row; module.exports.Cell = Cell;
""" Test Command ------------ $ python run_tests.py --module_name plot_playground.tests.test_linux_stats_plot """ import os from collections import deque import multiprocessing as mp import time import shutil import sys from nose.tools import assert_equal, assert_true, assert_false, \ assert_greater...
'use strict'; const pageState = { loginPageVisible: false, } const loginStatus = { status: 'NOT_LOGGED_IN', } export function isLogin(state=loginStatus, action) { switch (action.type) { case 'LOGGED_IN': return { ...state, status: 'LOGGED_IN', } break; ...
// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- info: The production x >>= y is the same as x = x >> y es5id: 11.13.2_A4.7_T2.8 description: > Type(x) is different from Type(y) and both types vary between Boolean (primiti...
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers // Copyright (c) 2018-2019, The DeployCoin Developers // // Please see the included LICENSE file for more information. #pragma once #include "BlockchainExplorerData.h" #include "ITransaction.h" #include "crypto/crypto.h" #include "cryptono...
// ** I18N // Calendar SV language (Swedish, svenska) // Author: Mihai Bazon, <mihai_bazon@yahoo.com> // Translation team: <sv@li.org> // Translator: Leonard Norrg�rd <leonard.norrgard@refactor.fi> // Last translator: Leonard Norrg�rd <leonard.norrgard@refactor.fi> // Encoding: iso-latin-1 // Distributed under the same...
import os import cv2 import shutil import numpy as np NAME_TRAFIC_SIGN = ["Cam dung va do xe", "Cam do xe", "Cam bop coi", "Cam xe tai", "Cam xe tai tu 2,5 tan", "Cam re trai", "Cam re phai", "Cam do xe ngay le", "Cam do xe ngay chan", "Cam di nguoc chieu", "...
/* @flow */ import StackFrame from './stack-frame' const regexExtractLocation = /\(?(.+?)(?::(\d+))?(?::(\d+))?\)?$/ function extractLocation(token: string): [string, number, number] { return regexExtractLocation .exec(token) .slice(1) .map(v => { const p = Number(v) if (!isNaN(p)) { ...
# Generated by Django 2.2.13 on 2020-08-18 09:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('exportplan', '0017_targetmarketdocuments'), ] operations = [ migrations.AlterField( model_name='routetomarkets', na...
// eslint-disable-next-line strict 'use strict'; const Model = require('../model.js'); const schema = require('./recipient-schema.js'); class Recipient extends Model {} module.exports = new Recipient(schema);
define({ "name": "SimCam Api documentation", "version": "0.0.7", "description": "Documentation for the REST api access provided at SimCam SDK", "title": "SimCam Api Documentation", "url": "http://127.0.0.1/simcam", "template": { "withCompare": true, "withGenerator": true, "aloneDisplay": false ...
/** * Copyright 2018 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/LICENSE-2.0 * * Unless require...
const fs = require('fs') const axios = require('axios') const d3 = require('d3') const Chess = require('chess.js').Chess const fangol = JSON.parse( fs.readFileSync( '../../content/2016-02-27-visual-look-chess/chess/fangol.json' ) ).openings const openingsFromData = d3 .hierarchy(fangol) .sum(d => (!d.chil...
import gulp from "gulp"; import { spawn } from "child_process"; import browserSync from "browser-sync"; import autoprefix from "gulp-autoprefixer"; import minify from "gulp-clean-css"; import sass from "gulp-sass"; const siteRoot = "_site"; const mainStylesheet = "_sass/main.scss"; /* Main stylesheet (pre-build) */ c...
/* Two-Factor Auth Tutorial Code Sample `nexmo.verify.request` to send a temp code to a user's phone, then `nexmo.verify.check` to validate the code entered by the user (on te web interface) In this sample app, upon a user registartion, store the user's phone number (as a key) and the generated request ID (as ...
const ADJECTIVES = ["pretty", "large", "big", "small", "tall", "short", "long", "handsome", "plain", "quaint", "clean", "elegant", "easy", "angry", "crazy", "helpful", "mushy", "odd", "unsightly", "adorable", "important", "inexpensive", "cheap", "expensive", "fancy"]; const COLOURS = ["red", "yellow", "blue", "green", ...
// Copyright (c) 2019-2020, The Worktips Project // // 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...
# Copyright (c) 2020 Microsoft Corporation. Licensed under the MIT license. from __future__ import absolute_import, division, print_function, unicode_literals import logging import math import torch from torch import nn import torch.nn.functional as F from torch.nn import CrossEntropyLoss, MSELoss from transformers....
var fileUpload = angular.module('shop'); fileUpload.directive("fileUpload", ['FileService', 'Upload', '$timeout', function(FileService, Upload, $timeout) { return { restrict: 'EA', require : '^ngModel', scope: { files:'=', fileIds:'=', ...
// SPDX-License-Identifier: Apache-2.0 import React, { useRef } from "react"; import { useQuery } from "@apollo/react-hooks"; import Container from 'react-bootstrap/Container'; import Nav from 'react-bootstrap/Nav'; import Tab from 'react-bootstrap/Tab'; import Row from 'react-bootstrap/Row'; import Col from 'react-bo...
from datetime import datetime from typing import List, Optional from pydantic import BaseModel, Field class PapersGetIn(BaseModel): """/papers get リクエストクラス Attributes: published_at (str): 論文の公開日時(YYYY/MM/DD) arxiv_query_id (int): ArxivクエリID is_stocked (bool): ストックのみを表示するか判定するフラグ ...
const { reactive, computed } = Vue function useWindow(top, left, width, height) { const rectangle = reactive({ top, left, width, height }) const cmRect = computed(() => ({ top: `${rectangle.top}px`, left: `${rectangle.left}px`, width: `${rectangle.width}px`, height: `${rectangle.height}px` })) ...
"""Top-level package for django-fsmfield.""" __author__ = """dryprojects""" __email__ = 'rk19931211@hotmail.com' __version__ = '0.1.0' from .fields import * __all__ = [ 'FSMField', 'FSMMixin', 'State', ]
from nltk.corpus import cmudict DOUBLERS = ('b', 'd', 'g', 'm', 'n', 'p', 't', 'z') DOUBLING_EXCEPTIONS = ('mb', 'ng', 'en') VOWELS = ('a', 'e', 'i', 'o', 'u') d = cmudict.dict() def double_up_con(word, suffix): return word[:-1] + word[-1] * 2 + suffix def to_past_tense(verb): """ Takes a present tense ve...
# -*- coding: utf-8 -*- from pytest import _, type_check_test @type_check_test() def test_wrapper(x: int, *args, **kwargs: type('T', (), {})) -> int: "Test docstring." @type_check_test( ok=[ _(1.1) ], fail=[ (_(1), 'invalid `x`: expected float, got int'), (_('foo'), 'invalid...
# -*- coding: utf-8 -*- # Copyright (c) 2019, VHRS and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class OfferLetter(Document): pass
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/ce/CostExplorer_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSMap.h> #include <aws/ce/model/Coverage.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <utilit...
import chain_flow import datetime import time class Execute_Cf_Environment(): def __init__(self,cf ): self.cf = cf def execute(self): time_stamp = datetime.datetime.today() old_hour = time_stamp.hour old_minute = time_stamp.minute old_second = time_stamp.second self.cf.execut...
# ---------------------------------------------------------# # astroNN.datasets.apogee_distances: APOGEE Distances # ---------------------------------------------------------# import numpy as np from astropy import units as u from astropy.io import fits from astroNN.apogee import allstar from astroNN.apogee.downloa...