text
stringlengths
3
1.05M
const mongoose = require('mongoose'); const TypeSchema = new mongoose.Schema({ initials: { type: String, required: true, unique: true }, description: { type: String, required: true } }); TypeSchema.method({}); TypeSchema.statics = {}; module.exports = mongoose.model('Type', TypeSchema);
/* ** $Id: loslib.c,v 1.19.1.3 2008/01/18 16:38:18 roberto Exp $ ** Standard Operating System library ** See Copyright Notice in lua.h */ #include <errno.h> #include <locale.h> #include <stdlib.h> #include <string.h> #include <time.h> #define loslib_c #define LUA_LIB #include "lua.h" #include "lauxlib.h" #include ...
// JavaScript Document var turnplate={ restaraunts:[], //大转盘奖品名称 colors:[], //大转盘奖品区块对应背景颜色 //fontcolors:[], //大转盘奖品区块对应文字颜色 outsideRadius:222, //大转盘外圆的半径 textRadius:165, //大转盘奖品位置距离圆心的距离 insideRadius:65, //大转盘内圆的半径 startAngle:0, //开始角度 bRotate:false //false:停止;ture:旋...
from handlerparent import Handler from google.appengine.ext import db from time import sleep from myapp.functions.decorators import (user_logged_in, comment_exists, user_owns_comment) class DeleteComment(Handler): """Delete comment from blog post page.""" @user_logged...
from django.conf import settings from django.core.mail.backends import console, smtp from django.core.mail.backends.base import BaseEmailBackend from django.core.mail.message import EmailMessage from slackclient import SlackClient class ReadableSubjectEmailBackend(console.EmailBackend): """ console.EmailBackendを拡...
# coding=utf-8 # *** WARNING: this file was generated by crd2pulumi. *** # *** 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 __all__ = ['Provide...
from __future__ import absolute_import from sentry.utils.services import LazyServiceWrapper from .base import EventStorage, Columns # NOQA backend = LazyServiceWrapper( EventStorage, "sentry.eventstore.snuba.SnubaEventStorage", {}, metrics_path="eventstore" ) backend.expose(locals())
'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- ...
"""This module is used to get files that are related to changed or deleted files. Since the bilara-data-integrity tests are now only run on a per file basis, we need to make sure that when an html file is modified the tests are run on both the html and root file. This module will also make sure that if an hmtl file i...
shadow$provide.module$node_modules$validator$lib$whitelist=function(global,process,require,module,exports,shadow$shims){Object.defineProperty(exports,"__esModule",{value:!0});exports.default=function(str,chars){(0,_assertString2.default)(str);return str.replace(new RegExp("[^"+chars+"]+","g"),"")};var _assertString2=(g...
# Generated by Django 3.2 on 2021-05-04 15:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('trees', '0002_rename_job_tree'), ] operations = [ migrations.AlterField( model_name='tree', name='humidity', ...
from django.test import SimpleTestCase from django.test import Client class BasicLoadTestCase(SimpleTestCase): ####################################################### # Front page def test_front_page_loads(self): c = Client() r = c.get('/') self.assertEqual(r.status_code, 200) ...
/* * NVM Express device driver * Copyright (c) 2011-2014, Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed ...
import numpy as np from sklearn.neighbors import KNeighborsClassifier as KNN import matplotlib.pyplot as plt class Solution(): #structure of the solution def __init__(self): self.num_features = None self.num_agents = None self.max_iter = None self.obj_function = None ...
describe('datepicker directive', function () { var $rootScope, $compile, element; beforeEach(module('ui.bootstrap.datepicker')); beforeEach(module('template/datepicker/datepicker.html')); beforeEach(module('template/datepicker/day.html')); beforeEach(module('template/datepicker/month.html')); beforeEach(mod...
#!/usr/bin/python # # Copyright 2012 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 b...
from collections import namedtuple,OrderedDict import re import sys from inspect import isgeneratorfunction,getargspec import csv from io import StringIO from datetime import datetime import json def print_error(err_string): """Function to write to stderr""" sys.stderr.write("ERROR[UDF]: " + str(err_string) + "\n"...
import json texto = '''{ "fiec": "instituicao_feliz", "alunos": [5,6,9], "prof": { "ti": { "hard": "Fillipe"}}}''' dicionario = json.loads(texto) print(dicionario) #1) imprima o valor da chave fiec ex: print( resultado['fiec'] ) print(dicionario['fiec']) #2) imprima o tamanho da lista alunos print( len(dicionario['a...
require('dotenv').config() const Koa = require('koa') const next = require('next') const Body = require('koa-bodyparser') const Router = require('koa-router') const { graphqlKoa } = require('apollo-server-koa') const { graphiqlKoa } = require('apollo-server-koa') cons...
import sys import os import inspect import logging from pathlib import Path from datetime import datetime from typing import Optional, Union, Mapping from sphinx.application import Sphinx from sphinx.ext import autosummary # remove PyCharm’s old six module if "six" in sys.modules: print(*sys.path, sep="\n") f...
# 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 ...
import sys sys.path.append('./trainer') import argparse import nutszebra_cifar10 import shake_shake import nutszebra_data_augmentation import nutszebra_optimizer if __name__ == '__main__': parser = argparse.ArgumentParser(description='cifar10') parser.add_argument('--load_model', '-m', ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _getLocaleMetadata = require("../../shared/lib/i18n/get-locale-metadata"); var _cookie = _interopRequireDefault(require("next/dist/compiled/cookie")); var _routerUtils = require("../router-utils"); function _interopRequireDefault(obj) ...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: daemon.proto import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message...
export const RUN_COMMAND = 'RUN_COMMAND'; export function runCommand(text) { return { type: RUN_COMMAND, text }; }
# Hard-coded for convert metadata into phoneme import tqdm from g2p_en import G2p from argparse import ArgumentParser def write_metadata(metadata, out_file): with open(out_file, 'w', encoding='utf-8') as f: for m in metadata: if m is None: continue f.wr...
/* * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contribut...
/* vsprintf with automatic memory allocation. Copyright (C) 2002-2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your ...
/** * Extend the base Actor entity by defining a custom roll data structure which is ideal for the Simple system. * @extends {Actor} */ export class DeltaGreenActor extends Actor { /** * Augment the basic actor data with additional dynamic data. */ prepareData() { super.prepareData(); const actor...
from util.Docker import Docker from util.Api import Api import os import unittest class Dredd: image = 'weaveworksdemos/openapi:snapshot' container_name = '' def test_against_endpoint(self, service, api_endpoint, links=[], env=[], dump_streams=False): self.container_name = Docker().random_...
/* Forty by HTML5 UP html5up.net | @ajlkn Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) */ (function($) { skel.breakpoints({ xlarge: '(max-width: 1680px)', large: '(max-width: 1280px)', medium: '(max-width: 980px)', small: '(max-width: 736px)', xsmall:...
console.time('Loading module'); var Module = require('../build/minisat.js')(); console.timeEnd('Loading module'); console.log(Module.MEMSTATS); var ptr = Module._yo(); console.log(Module.MEMSTATS); Module._unyo(ptr); console.log(Module.MEMSTATS);
# -*- coding: utf-8 -*- import datetime import copy import httplib2 import apiclient import time import pytz import yaml import zipfile from six import string_types, text_type, PY2 if PY2: import collections as abc else: import collections.abc as abc from PIL import Image, ImageEnhance from twilio.rest import C...
"""Tests for circular imports in all local packages and modules. This ensures all internal packages can be imported right away without any need to import some other module before doing so. This module is based on an idea that ``pytest`` uses for self-testing: * https://github.com/sanitizers/octomachinery/blob/be18b54...
function goToHome() { goTo(0); }
from io import BytesIO from django.conf import settings from django.core import signals from django.core.handlers import base from django.http import HttpRequest, QueryDict, parse_cookie from django.urls import set_script_prefix from django.utils.encoding import repercent_broken_unicode from django.utils.functional im...
from pytest import ExitCode def test_base_url_loading_is_correct(integration): integration.makepyfile( f""" def test_base_url_loading(pydriver): assert pydriver.current_url == "{integration.server_url}/" """ ) result = integration.run_headless_it() assert result.re...
// vim: set nowrap: var util = require('util') var t = require('tap') var LRU = require('../') var l = LRU() function inspect (str) { t.equal(util.inspect(l), str) t.equal(l.inspect(), str) } inspect('LRUCache {}') l.max = 10 inspect('LRUCache {\n max: 10\n}') l.maxAge = 50 inspect('LRUCache {\n max: 10,\n ...
"""Arabic transliteration, Roman <-> Arabic Unicode. This implementation is based on the following resources: 1. http://languagelog.ldc.upenn.edu/myl/ldc/morph/buckwalter.html. 2. https://github.com/Alfanous-team/alfanous/blob/master/src/alfanous/Romanization.py 3. https://en.wikipedia.org/wiki/ArabTeX """ __author__...
var expect = require('chai').expect var cclib = require('../src/index') var util = require('../src/util') describe('util', function() { it('number2bitArray', function() { var bits = util.number2bitArray(54648432) expect(bits).to.deep.equal([0,0,0,0,1,1,1,0,0,1,1,1,1,0,1,1,1,0,0,0,0,0,1,0,1,1,0,0,0,0,0,0]) ...
import numpy as np import matplotlib.pyplot as plt from lambwaves import Lamb """ In order to set up the Lamb class, you will need the following parameters: thickness : Thickness of the plate, in mm. nmodes_sym : Number of symmetric modes to calculate. nmodes_antisym : Number of antisymmetr...
/* * * Copyright 2015 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
// Licensed to Cloudera, Inc. under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. Cloudera, Inc. licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this f...
const express = require("express"); const compression = require("compression"); require("./webpack.config.js"); // So that webpack lints itself const app = express(); // Accept JSON as req.body const bodyParser = require("body-parser"); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json());...
"""empty message Revision ID: da72e17349e0 Revises: 29c287ced518 Create Date: 2021-05-03 21:14:58.038973 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'da72e17349e0' down_revision = '29c287ced518' branch_labels = None depends_on = None def upgrade(): # ...
var FormValidator = function () { // function to initiate Validation Sample 1 var runValidator1 = function () { var form1 = $('#form'); var errorHandler1 = $('.errorHandler', form1); var successHandler1 = $('.successHandler', form1); $.validator.addMethod("FullDate", function () ...
import os from typing import TextIO, Optional from pathlib import Path import shutil import yaml from cumulusci.core.utils import process_list_of_pairs_dict_arg from cumulusci.core.exceptions import TaskOptionsError from cumulusci.tasks.bulkdata.base_generate_data_task import BaseGenerateDataTask from snowfakery.ou...
/******************************************************************************* * If not stated otherwise in this file or this component's Licenses.txt file the * following copyright and licenses apply: * * Copyright 2018 RDK Management * * Licensed under the Apache License, Version 2.0 (the "License"); * you m...
import sys from PyQt6.QtCore import QSize from PyQt6.QtGui import QFont from PyQt6.QtWidgets import QApplication, QDialog, QFrame, QPushButton, QStackedWidget, QStyle, QVBoxLayout from pyqtnavutils import NavigationBar, NavigationBarItem class Window(QDialog): def __init__(self) -> None: super().__init_...
var fs = require("fs"); var path = require("path"); exports.server = { port: 8181 }; exports.wp = { url: "http://local.1001.io:81", siteUrl: "http://local.1001.io", root: path.join(__dirname, "../wordpress/") }; exports.cache = { maxAge: 1000 * 60 * 5 // 5 min }; var version = fs.readFileSync(pa...
var CronJob = require('cron').CronJob; const mysqldump = require('mysqldump') const moment = require('moment') const { google } = require('googleapis'); const path = require('path'); const fs = require('fs'); //client id const CLIENT_ID = 'CLIENT_ID' const CLIENT_SECRET = 'CLIENT_SECRET'; const REDIRECT_URI = 'REDIRECT...
const Router = require("koa-router"); const { verifyAuth, verifyPermission, } = require("../middlewares/auth.middleware"); const { verifyLabelExists } = require("../middlewares/label.middleware"); const { createMoment, getMoment, getMomentList, updateMoment, deleteMoment, addLabels, getFileInfo, } = r...
const getters = { sidebar: state => state.app.sidebar, language: state => state.app.language, device: state => state.app.device, visitedViews: state => state.tagsView.visitedViews, cachedViews: state => state.tagsView.cachedViews, token: state => state.user.token, avatar: state => state.user.avatar, nam...
//// [computedPropertyNames26_ES5.ts] class Base { bar() { return 0; } } class C extends Base { [ { [super.bar()]: 1 }[0] ]() { } } //// [computedPropertyNames26_ES5.js] var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p]...
# !/usr/bin/python # -*- coding: utf-8 -*- # Created by PJZero on 17-5-3 from matplotlib.pylab import * N = 150 r = 2 * rand(N) theta = 2 * pi * rand(N) area = 200 * r ** 2 * rand(N) colors = theta ax = subplot(111, polar=True) c = scatter(theta, r, c=colors, s=area) c.set_alpha(0.75) show()
ko.templateRewriting = (function () { var memoizeDataBindingAttributeSyntaxRegex = /(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi; var memoizeVirtualContainerBindingSyntaxRegex = /<!--\s*ko\b\s*([\s\S]*?)\s*-->/g; function vali...
"""Tuya devices.""" import dataclasses import datetime import logging from typing import Any, Callable, Dict, List, Optional, Tuple, Union from zigpy.quirks import CustomCluster, CustomDevice import zigpy.types as t from zigpy.zcl import foundation from zigpy.zcl.clusters.closures import WindowCovering from zigpy.zcl....
/** * External link tool * * @class * @extends mw.cx.tools.TranslationTool * @constructor * @param {mw.cx.dm.TranslationUnit} model * @param {Object} config */ mw.cx.tools.ExternalLinkTool = function CXExternalLinkTool( model, config ) { config.order = 50; config.title = 'External link'; mw.cx.tools.External...
import R from 'ramda'; import { parser } from './Common'; const hungryLineParser = (regex, transform, wrapIn = null) => { const parseLine = input => { let results = [], result; let x = 0; while ((result = regex.exec(input))) { results.push(transform(...result)); } return results; }...
import React from 'react' import ReactDOM from 'react-dom' import * as serviceWorker from './serviceWorker' import App from './App' ReactDOM.render(<App />, document.getElementById('root')) serviceWorker.unregister()
import express from 'express'; import swaggerUi from 'swagger-ui-express'; import swaggerDocument from '../swagger.json'; const router = express.Router(); router.use('/', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); export { router as docsRouter };
/* ** idecrypt.c Crypto extension to pidentd. ** ** This file is in the public domain. -- Planar 1994.02.22 ** ** Decryption utility. */ #ifdef INCLUDE_CRYPT #include <stdio.h> #include "paths.h" #include "crypto.h" char is_base_64 [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
from typing import Any, List, Mapping, Optional, Union import click from datetime import datetime import json import logging import os import time import traceback import warnings import ray from ray.util import get_node_ip_address from ray.tune import TuneError from ray.tune.callback import CallbackList from ray.tun...
const SIGN = document.getElementById("but"); const SIGNUP = document.getElementById("my-Form"); let emailInput = document.getElementById("email"); let passwordInput = document.getElementById("password"); const msg = document.getElementById('msg'); SIGN.addEventListener('click', () => { loginForm(); }); function l...
var docs = initDOMHeapCoreLevel1(); var jsUnitCore = initJsUnitCore(); var DOMTestCase = initDOMTestCase(jsUnitCore); /** * The "createElement(tagName)" method raises an INVALID_CHARACTER_ERR DOMException if the specified tagName contains an invalid character. Retrieve the entire DOM document a...
#!/usr/bin/env python # # PKCS#10 syntax # # ASN.1 source from: # http://tools.ietf.org/html/rfc2314 # # Sample captures could be obtained with "openssl req" command # from pyasn1.type import tag, namedtype, namedval, univ, constraint from pyasn1_modules.rfc2459 import * class Attributes(univ.SetOf): componentType...
#!/usr/bin/env node /** * @license * Copyright 2016 The AMP HTML Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
#ifndef BUFFER_H #define BUFFER_H #include <assert.h> #ifndef HALIDE_ATTRIBUTE_ALIGN #ifdef _MSC_VER #define HALIDE_ATTRIBUTE_ALIGN(x) __declspec(align(x)) #else #define HALIDE_ATTRIBUTE_ALIGN(x) __attribute__((aligned(x))) #endif #endif #ifndef BUFFER_T_DEFINED #define BUFFER_T_DEFINED #include <stdbo...
/* * Copyright (c) Microsoft Corporation. * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. const { Contai...
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under ...
export class eventEmmiter{ constructor(){ this.state = {} } // метод @on подписывает $callback-функию на событие $type on(type, callback){ this.state[type] ? this.state[type] = this.state[type] : this.state[type] = [] this.state[type].push(callback) } // метод @init вызыв...
import React from 'react'; import SvgIcon from '../../components/SvgIcon'; const Copy = (props) => ( <SvgIcon {...props}> <g> <path d="M18 9h-3V5.67A2.68 2.68 0 0012.33 3H5.67A2.68 2.68 0 003 5.67v6.66A2.68 2.68 0 005.67 15H9v3a3 3 0 003 3h6a3 3 0 003-3v-6a3 3 0 00-3-3zm-9 3v1H5.67a.67.67 0 01-.67-.67V5.67...
require('./bootstrap'); window.Vue = require('vue'); Vue.component('pagination', require('laravel-vue-pagination')); Vue.component('customer', require('./components/customer.vue').default); Vue.component('addCustomer', require('./components/addCustomer.vue').default); Vue.component('editCustomer', require('./compo...
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[21],{ /***/ "./resources/js/admin/views/Base/Carousels/Carousels.jsx": /*!***************************************************************!*\ !*** ./resources/js/admin/views/Base/Carousels/Carousels.jsx ***! \********************************************...
import random import numpy as np import os from PIL import Image import matplotlib.pyplot as plt import matplotlib from path import Path import pandas as pd import glob2 from matplotlib.figure import Figure import sys import errno from tkinter import * # matplotlib.use("TkAgg") # from matplotlib.backen...
# -*- coding: utf-8 -*- """ This module provides utilities for validating and preparing an annotation schema. """ import logging from collections import OrderedDict import json from typing import Dict, List from datetime import datetime from sarpy.compliance import string_types, int_func, integer_types __classifica...
// all enumerable object keys, includes symbols var getKeys = require('./_object-keys.js'); var gOPS = require('./_object-gops.js'); var pIE = require('./_object-pie.js'); module.exports = function (it) { var result = getKeys(it); var getSymbols = gOPS.f; if (getSymbols) { var symbols = getSymbols(it); va...
// Copyright 2004-present Facebook. All Rights Reserved. #pragma once #include <ABI24_0_0jschelpers/ABI24_0_0JavaScriptCore.h> namespace facebook { namespace ReactABI24_0_0 { void addNativeTracingHooks(JSGlobalContextRef ctx); } }
#!/usr/bin/env python3 from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_framework.script import * from test_framework.mininode import * from test_framework.qtum import * from test_framework.address import * from test_framework.blocktools import * import io """...
import numpy as np import unittest import paddle.v2.framework.framework as framework import paddle.v2.framework.initializer as initializer DELTA = 0.00001 class TestConstantInitializer(unittest.TestCase): def test_constant_initializer_default_value(self): """Test the constant initializer with default va...
//===-- ASTStructExtractor.h ------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
webpackJsonp([3],{ /***/ 294: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FacePageModule", function() { return FacePageModule; });...
self["webpackHotUpdate_N_E"]("pages/index",{ /***/ "./src/components/Acomplishments/AcomplishmentsStyles.js": /*!***************************************************************!*\ !*** ./src/components/Acomplishments/AcomplishmentsStyles.js ***! \***************************************************************/ /**...
enyo.kind({ name: "CurrentLocation", kind: "Component", events: { onSuccess: "", onFailure: "doFailure" }, doFailure: function(error) { // error 2 is "POSITION_UNAVAILABLE"; may happen on desktop if wifi is off or n/a console.log("Geolocation error #" + error.code + ": " + error.message); ...
(function() { function Username($cookies) { var Username = {}; Username.createUsername = function(username) { // pass in a username // use the $cookies service to set the cookie to that username $cookies.put('currentUser', username); } Username.getCurrentUser = function(){ return $coo...
module.exports = { label:'Museum Theme' }
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
// Business Logic function pingpong(number){ result = []; for (var i = 1; i <= number; i ++) { if (i % 15 == 0) { result.push("ping-pong"); } else if (i % 5 == 0) { result.push("pong"); } else if (i % 3 == 0) { result.push("ping"); } else { result.push(i); } }; return re...
module.exports={C:{"48":0.00891,"51":0.00446,"52":0.23612,"56":0.00891,"60":0.00891,"61":0.00446,"62":0.00446,"63":0.01782,"65":0.00446,"66":0.00891,"67":0.00891,"68":0.09801,"70":0.00446,"72":0.02228,"75":0.00446,"78":0.07128,"79":0.00446,"80":0.02228,"81":0.00891,"83":0.00891,"84":0.01782,"85":0.01337,"86":0.01782,"8...
module.exports = { env: { es6: true, node: true, }, extends: ["plugin:react/recommended", "airbnb", "prettier"], globals: { Atomics: "readonly", SharedArrayBuffer: "readonly", }, parserOptions: { ecmaFeatures: { jsx: true, }, ecmaVersion: 2018, sourceType: "module", }...
import requests from typing import List token = 'e18ed0b5-818a-43ec-9042-22abb5622840' def get_list(): url = 'http://47.102.118.1:8089//api/challenge/list' r = requests.get(url) s = [] for i in r.json(): s.append(i['uuid']) return s def post_create(letter: str, exclude: int, challenge: ...
"""Conversion from SUC MSD tags to UCoNNL feature lists. This tag conversion was taken from this ruby script: https://github.com/spraakbanken/parsing/blob/master/msd_to_feats.rb It might be worth improving this in the future, but it's good enough for now. """ MSD_TO_FEATS = { "UTR": "Gender=Com", "NEU": "Gen...
import copy import logging import numpy as np from .dataset import DataSet from . import helpers from functools import reduce log = logging.getLogger('psychic.cv') def cross_validate(subsets, node): """ Cross-validate on subsets using node. Returns a list with the output of node on the test sets. It can g...
#@title 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under...
from django import forms class HomePageForm(forms.Form): nsamplesrange= [tuple([x,x]) for x in range(100,1001,100)] nsamples=forms.IntegerField(label="Number of samples?", widget=forms.Select(choices=nsamplesrange)) methodchoices= [ ('smc', 'Sequential Monte Carlo'), ('gibbs', 'Gibbs'...
/***************************************************************************** * Open MCT, Copyright (c) 2014-2017, United States Government * as represented by the Administrator of the National Aeronautics and Space * Administration. All rights reserved. * * Open MCT is licensed under the Apache License, Version ...
'use strict' /** * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/controllers.html#core-controllers) * to customize this controller */ module.exports = {}
/*BEGIN_LEGAL Intel Open Source License Copyright (c) 2002-2016 Intel Corporation. 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 copyr...
import React from 'react'; import styled from 'styled-components'; import Layout from '../components/layout'; const TextP = styled.p` & + p { text-indent: 2em; } `; const AboutPage = () => ( <Layout title="About Blurbsy"> <section> <h2>Hello!</h2> <TextP> This project is based on the observation that...
import gc import webrepl import micropython from html import * from machine import Timer import time import network import socket from WWC import WWC import ure import btree import machine import sys controller = WWC() webrepl.start() def scheduleExp(arg): controller.checkControl() gc.collect() def timerExp...