text
stringlengths
3
1.05M
""" Unit tests for the problem interface.""" import sys import unittest import itertools from io import StringIO import numpy as np import openmdao.api as om from openmdao.core.driver import Driver from openmdao.test_suite.components.paraboloid import Paraboloid from openmdao.test_suite.components.sellar import Sell...
# Copyright 2016 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. # # NOTE: Created with generate_compiled_resources_gyp.py, please do not edit. { 'targets': [ { 'target_name': 'iron-button-state-extracted', ...
import warnings import torch from mmcv.utils import build_from_cfg, is_list_of from torch.nn import GroupNorm, LayerNorm from torch.nn.modules.batchnorm import _BatchNorm from torch.nn.modules.instancenorm import _InstanceNorm from .builder import OPTIMIZER_BUILDERS, OPTIMIZERS @OPTIMIZER_BUILDERS.register_module()...
import React from 'react'; import classNames from 'classnames'; import useTheme from '../utils/useTheme'; const Button = ({ children, href, variant, ...rest }) => { const theme = useTheme(); const El = href ? 'a' : 'button'; return ( <El className={classNames('button', { [`button--variant-${va...
import matplotlib.pyplot as plt import seaborn as sns from sklearn.decomposition import PCA from cupcake.smush.base import SmushPlotterBase class PCAPlotter(SmushPlotterBase): axis_label = 'Principal Component {:d}' def __init__(self, data, n_components, color, hue, hue_order, palette, s...
__version__ = '1.3.8'
import neptune from config import EnvConfig import pandas as pd import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D comet_cfg = EnvConfig() session = neptune.Session(api_token=comet_cfg.neptune_token) project = session.get_project(project_qualified_name=comet_cfg.neptune_project_...
const Colors = require("colors"); const Discord = require("discord.js"); /** * @param {Discord.Client} client * @param {boolean} hidetoken */ async function cmd(client, hidetoken) { console.log(`${"Discord Control Client version 120721".magenta} - made by ${"Cal (DrRed96)".red}`); console.log(`${"[Username...
import _plotly_utils.basevalidators class AxValidator(_plotly_utils.basevalidators.AnyValidator): def __init__( self, plotly_name='ax', parent_name='layout.annotation', **kwargs ): super(AxValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
// // OHCubeView.h // OHCubeView // // Created by Øyvind Hauge on 30/08/16. // Copyright © 2016 Oyvind Hauge. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for OHCubeView. FOUNDATION_EXPORT double OHCubeViewVersionNumber; //! Project version string for OHCubeView. FOUNDATION_EXPORT c...
// Copyright (c) 2018-2020, Zhirnov Andrey. For more information see 'LICENSE' #pragma once #include "scene/Common.h" #define GLM_FORCE_RADIANS #define GLM_FORCE_LEFT_HANDED #define GLM_FORCE_DEPTH_ZERO_TO_ONE #define GLM_ENABLE_EXPERIMENTAL #define GLM_FORCE_CXX14 //#define GLM_FORCE_EXPLICIT_CTOR //#define GLM_FO...
import Component from '@ember/component'; import { getWithDefault, set } from '@ember/object'; /** @class PipelineParameterizedBuild @namespace Components @extends Ember.Component @public */ export default Component.extend({ /** * showSubmitButton * @type {Boolean} true to show button groups, hide otherwi...
""" Storage module contains the abstract implementation of storage for `sunpy.data.data_manager.Cache` and a concrete implementation using sqlite. """ import sqlite3 from abc import ABCMeta, abstractmethod from pathlib import Path from contextlib import contextmanager __all__ = [ 'StorageProviderBase', 'Sqlite...
from flask_wtf import FlaskForm from flask_wtf.file import FileField,FileAllowed from wtforms import StringField,TextAreaField, SubmitField,ValidationError from wtforms.validators import InputRequired,Email from flask_login import current_user from ..models import User class UpdateProfile(FlaskForm): username = St...
(function() {var implementors = {}; implementors["nalgebra"] = [{"text":"impl&lt;T, R, C&gt; <a class=\"trait\" href=\"nalgebra/trait.SimdValue.html\" title=\"trait nalgebra::SimdValue\">SimdValue</a> for <a class=\"type\" href=\"nalgebra/base/type.OMatrix.html\" title=\"type nalgebra::base::OMatrix\">OMatrix</a>&lt;T,...
"Tests for twistd.mail"
import urllib print 'downloading crude oil data' urllib.urlretrieve("https://fred.stlouisfed.org/graph/fredgraph.csv?chart_type=line&recession_bars=on&log_scales=&bgcolor=%23e1e9f0&graph_bgcolor=%23ffffff&fo=Open+Sans&ts=12&tts=12&txtcolor=%23444444&show_legend=yes&show_axis_titles=yes&height=450&stacking=&range=1yr&m...
/* * Copyright 2017 NXP * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ /*********************************************************************************************************************** * This file was generated by the MCUXpresso Config Tools. Any manual edits made to t...
/***********************************************************************/ /* */ /* OCaml */ /* */ /* Xavier Ler...
# -*- coding: utf-8 -*- # Minio Python Library for Amazon S3 Compatible Cloud Storage, # (C) 2015, 2016 Minio, 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.o...
define(["mmHistory"], function() { function Router() { var table = {} "get,post,delete,put".replace(avalon.rword, function(name) { table[name] = [] }) this.routingTable = table } function parseQuery(url) { var array = url.split("?"), query = {}, path = a...
# -*- coding: utf-8 -*- """ file collects widgets that call matplotlib """ from __future__ import print_function, division, absolute_import from PyQt4.QtCore import * from PyQt4.QtGui import * import numpy as np from matplotlib.backends.backend_qt4agg import\ FigureCanvasQTAgg as FigureCanvas import matplotlib.pyp...
var a00470 = [ [ "I2CBuses", "a00981.html", "a00981" ], [ "DISABLE_INTERRUPT", "a00470.html#a07adac5c5eb0d63bed4b79a50bcb676b", null ], [ "ENABLE_INTERRUPT", "a00470.html#a6b267a18dae3dc4d7a2a0b8fdb38e701", null ], [ "I2C_ACK_TIMEOUT", "a00470.html#a4f8a83ae9459703637408a0a194445ac", null ], [ "I2C_...
""" This file defines the common pytest fixtures used in current directory. """ import os from contextlib import contextmanager import pytest import tempfile import socket import subprocess import json import time from pathlib import Path from unittest import mock import ray import ray.ray_constants as ray_constants f...
import { asyncRoutes, constantRoutes } from '@/router' // asyncRoutes 异步路由,登录后通过 role,判断该用户是否有该权限,当有权限时,再将该router加入到constantRoutes // constantRoutes 恒定路由,放一些公共路由,不需要权限判断 /** * Use meta.role to determine if the current user has permission * @param roles * @param route */ function hasPermission(roles, route) { ...
# -*- coding: utf-8 -*- import wx # TODO: Parametros: levar para App.utils ou Parameters.manager DEFAULT_LABEL_BG_COLOR = '#B0C4DE' #LightSteelBlue SELECTION_WIDTH = 2 SELECTION_COLOR = 'green' # Mixin for a selectable Panel class SelectablePanelMixin(object): #def __init__(self, selected=False): # ...
""" molecool A python package for analyzing and visualizing molecular files. For MolSSI workshop. """ import sys from setuptools import setup, find_packages import versioneer short_description = __doc__.split("\n") # from https://github.com/pytest-dev/pytest-runner#conditional-requirement needs_pytest = {'pytest', 't...
#!/usr/bin/env python """ Example of a confirmation prompt. """ from prompt_toolkit.shortcuts import confirm if __name__ == "__main__": answer = confirm("Should we do that?") print("You said: %s" % answer)
# The Clear BSD License # # Copyright (c) 2021 Alexander Reustle and the NuSpaceSim Team # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted (subject to the limitations in the disclaimer # below) provided that the following conditions are met: # # ...
import React from 'react' import { TreeSelect } from '@alicloud/console-components' const treeData = [{ label: 'Component', value: '1', children: [{ label: 'Form', value: '2', children: [{ label: 'Input', value: '4' }, { label: 'Select', value: '5' }] }, { label:...
from . import base_api_core class admin_console(base_api_core.Core): def __init__(self, ip_address, port, username, password, secure=False, cert_verify=False, dsm_version=7, debug=True): super(admin_console, self).__init__(ip_address, port, username, password, secure, cert_verify, dsm_ver...
import transformType1 from '../../main/transformers/type1Transformer'; describe('type1Transformer.js', () => { it('transforms the incoming type 1 object', () => { const rawType1 = { value: 'PROP1' }; const result = transformType1(rawType1); expect(result).toBe('prop1'); }); });
webpackHotUpdate_N_E("pages/index",{ /***/ "./src/components/NavBar.tsx": /*!***********************************!*\ !*** ./src/components/NavBar.tsx ***! \***********************************/ /*! exports provided: NavBar */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__...
/* * Copyright (c) 2004-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #pra...
from slot import * class Gilgamesh(DragonBase): ele = 'light' att = 124 a = [('a', 0.5)] dragonform = { 'act': 'c3 s', 'dx1.dmg': 1.60, 'dx1.startup': 21 / 60.0, # c1 frames 'dx1.hit': 2, 'dx2.dmg': 1.76, 'dx2.startup': 24 / 60.0, # c2 frames 'd...
(function(ctx){ var $el, level; var map = { init: function (){ $el = $('#grid'); return this; }, // chargement d'un nouveau level set: function(json){ level = json; var topo = level.topo, items = level.items, $line, n, item, elevation = ['down', '', 'up']; for(v...
import unittest """ Task 2: Convert the string of numbers to a list of integers Example: "78+67+65" = [78, 67, 65] """ class Testsuite(unittest.TestCase): numbers = "78+101+118+101+114+32+67+111+100+101+32+65+108+111+110+101" result = [78, 101, 118, 101, 114, 32, 67, 111, 100, 101, 32, 65, 108, 111, 110, 10...
from __future__ import annotations from corkus.utils.utils import Utils from .member import Member from typing import List, Union, TYPE_CHECKING from .base_guild import BaseGuild if TYPE_CHECKING: from .player import Player from .partial_player import PartialPlayer from .partial_online_player import Parti...
import FileJob from "./FileJob.js" class PutFileJob extends FileJob { constructor(rootDir, workPath) { super(rootDir, workPath) this.type = "putFile" } } export default PutFileJob;
/****************************************************************************** * Copyright 2018 The Apollo 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 ...
#include <stdio.h> #include <stdlib.h> #include "../lib/dedup-characters.h" int main(int argc, char **argv) { (void)argc; (void)argv; dedup_characters(getchar, putchar, ' '); return EXIT_SUCCESS; }
const inquirer = require("inquirer"); const fs = require("fs"); const util = require("util"); const generateReadMe = require("./generateREADME"); const writeFileAsync = util.promisify(fs.writeFile); //badges function promptUser() { return inquirer.prompt([ // array of questions for user { type: "input",...
import test from 'blue-tape' import React from 'react/addons' //import SnakeGame from '../src/SnakeGame' const utils = React.addons.TestUtils test('sleep', async function (t) { let start = Date.now() let end = Date.now() const renderer = utils.createRenderer() t.ok(true, 'takes about 20 milliseconds') })
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const chokidar = require("chokidar"); const path_1 = require("path"); const shell = require("shelljs"); const copy_path_resolve_1 = require("./helpers/copy-path-resolve"); const get_value_or_default_1 = require("./helpers/get-value-or-default"...
""" init file for the parser """ # flake8: noqa: F401 from .segments_base import BaseSegment, RawSegment, ParseContext from .segments_common import (KeywordSegment, ReSegment, NamedSegment, LambdaSegment, Indent, Dedent) from .grammar import (Sequence, GreedyUntil, StartsWith, Con...
""" WSGI config for A2SL project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←← ←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←← ↓↓...........................................................................↓↓ ↓↓..........................↓...
from django.db import models from django.utils import timezone from django.utils.translation import gettext_lazy as _ from django.core.validators import MinValueValidator, MaxValueValidator class TimePeriod(models.Model): """ Model defining Time periods from a start day to a end day. """ start_date = m...
import React from 'react'; import { shallow } from 'enzyme'; import Info from './Info'; it('Renders', () => { const tree = shallow(<Info />); expect(tree).toMatchSnapshot(); });
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
"""Add channels Revision ID: fb1a5a75318a Revises: 22730d234ab9 Create Date: 2020-03-27 13:47:47.871533 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'fb1a5a75318a' down_revision = '22730d234ab9' branch_labels = None depends_on = None def upgrade(): # #...
from django.contrib.auth.hashers import PBKDF2PasswordHasher from django.core.exceptions import ValidationError from django.forms import fields, forms, widgets from django.utils.timezone import datetime def validate_password(value): pwhasher = PBKDF2PasswordHasher() if not pwhasher.verify(value, 'pbkdf2_sha25...
import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; import IconButton from '@material-ui/core/IconButton'; import MenuIcon from '@material-ui/icons/Menu'; const useStyles = makeStyles((theme) => ({ menuButton: { marginRight: theme.spacing(2), }, drawerToggle: { ...
/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Pow...
// @flow import { BlurView } from '@react-native-community/blur' import * as React from 'react' import { type ViewStyle, StyleSheet } from 'react-native' import { type AirshipBridge, AirshipModal } from 'react-native-airship' import { fixSides } from '../../util/sides.js' import { useTheme } from '../services/ThemeCo...
/** PSP helper library ***************************************/ /** **/ /** menu.h **/ /** **/ /** This file contains declarations for a generic menu **/ ...
from functools import wraps from flask import ( Flask, render_template, request, redirect, url_for, flash, g, session ) from flask_sqlalchemy import SQLAlchemy from werkzeug.security import check_password_hash, generate_password_hash app = Flask(__name__) app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///{}/{}".f...
# -*- coding: utf-8 -*- ### 參考 keras/example 裡的 neural_style_transfer.py ### 詳細可到這裡觀看他們的原始碼: ### https://github.com/fchollet/keras/blob/master/examples/neural_style_transfer.py from __future__ import print_function import os import os.path import sys import math import wave import random import numpy as np import keras...
#!/user/bin/env python '''interactionFingerprinter.py This class creates dataset of ligand - macromolecule and macromolecule - macromolecule interaction information. Criteria to select interactions are specified by the InteractionFilter. ''' __author__ = "Mars (Shih-Cheng) Huang" __maintainer__ = "Mars (Shih-Cheng) H...
import { applicationContext } from '../../../applicationContext'; import { presenter } from '../../presenter'; import { runAction } from 'cerebral/test'; import { validateUploadCourtIssuedDocumentAction } from './validateUploadCourtIssuedDocumentAction'; presenter.providers.applicationContext = applicationContext; de...
# -*- coding: utf-8 -*- """ heroku.api ~~~~~~~~~~ This module provides the basic API interface for Heroku. """ from .compat import json from .helpers import is_collection from .models import * from .structures import KeyedListResource from heroku.models import Feature from requests.exceptions import HTTPError import...
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/builtin/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = _interopRequireDefault(require("react")); var _createSvgIcon = _interopRequireDefault(require("./utils/c...
'use strict'; import plugins from 'gulp-load-plugins'; import yargs from 'yargs'; import browser from 'browser-sync'; import gulp from 'gulp'; import rimraf from 'rimraf'; import yaml from 'js-yaml'; import fs from 'fs'; import dateFormat from 'dateformat'; im...
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. // *************************************************************** // - [number] indicates a test step (e.g. 1. Go to a page) // - [*] indicates an assertion (e.g. * Check the title) // - Use element ID when...
# -*- coding: utf-8 -*- """ Script allowing to run the preprocessing in command line. """ import os import argparse import pprint from pysnpimpute.utils import create_logger from pysnpimpute.preprocessing import preprocess DOC = """ Preprocess the <bfile> dataset. Steps: - replace genders with imputed genders if r...
#!/usr/bin/env python3 import argparse import sys from pathlib import Path from taskipy.exceptions import TaskipyError from taskipy.task_runner import TaskRunner def main(): parser = argparse.ArgumentParser( prog='task', description='runs a task specified in your pyproject.toml under [tool.taskip...
export const OpeningHoursSpecification = { label: "OpeningHoursSpecification", description: `A structured value providing information about the opening hours of a place or a certain service inside a place. The place is open if the opens property is specified, and closed otherwise. If the value for the closes prop...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from cms.utils.conf import get_cms_setting from .forms import MediumEditorTextForm from .models import MediumEdito...
export { TranslationsModal, TranslationsDashboard, } from './components'; export { prepareTranslations } from './services/translations';
# my first python script # this will print 50 random numbers # load the random number generator # Python notes: # Comments start with a '#'. # Indentation matters. # Python IS case sensitive. # See also: Style Guide for Python Code import random sampleSize = 50 random.seed(0) # loop over sampleSize times......
import sys import os import time import tempfile import shutil import subprocess import re import threading try: from Queue import Queue, Empty except: from queue import Queue, Empty # Python-aware urllib stuff if sys.version_info >= (3, 0): from urllib.request import urlopen else: from urllib2 import u...
/* * Author: Christian Huitema * Copyright (c) 2017, Private Octopus, Inc. * All rights reserved. * * 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. * * THI...
# Generated by Django 2.1.2 on 2018-11-05 11:17 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Back', '0003_auto_20181105_0026'), ] operations = [ migrations.AlterField( model_name='agregaradoptante', name='ciud...
# Script to be run with legacy Bempp to generate the comparison data. import bempp.api import numpy as np import os.path import sys # run `python generate_fmm_data.py REGENERATE` to regenerate everything REGENERATE = "REGENERATE" in sys.argv data = {} def generate_vector(size, filename): global data if fil...
// Copyright (c) 2018 Jetabroad (Thailand) Co., Ltd. All Rights Reserved. // Licensed under the MIT license. See the LICENSE.md file in the project root for license information. #pragma once #include "CallbackThunk.h" #include "ExceptionDumper.h" #include "Logger.h" #include "ModuleHandle.h" #include "ThreadLocalStora...
/*ckwg +29 * Copyright 2016 by Kitware, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of...
class Company(): code: "" avgVolume3Months: 0.00 avgVolume10Days: 0.00 returnOnEquity: 0.00 grossDebitOverEbitida: 0.00 returnOnEquity_5yrAvg: 0.00 payoutRatio: 0.00 dividendYeld: 0.00 dividendYeld_5yrs: 0.00 valuation: 0.00 dt_processing: "" def __init__(self, _c...
const gulp = require('gulp'); const watch = require('gulp-watch'); const ghPages = require('gulp-gh-pages'); const connect = require('gulp-connect'); const open = require('gulp-open'); require('./gulp/i18n'); require('./gulp/build'); require('./gulp/plato'); gulp.task('connect', () => { connect.server({ ro...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
import React from 'react'; import {Link, withRouter} from 'react-router-dom'; import {connect} from 'react-redux'; import {MOVIE_API, SHOW_API, axios, ORDER_API, THEATER_API} from "../../global"; class MoviePage extends React.Component { constructor(props) { super(props) this.state = { ...
/* * This header is generated by classdump-dyld 1.5 * on Tuesday, November 10, 2020 at 10:11:27 PM Mountain Standard Time * Operating System: Version 14.2 (Build 18K57) * Image Source: /System/Library/PrivateFrameworks/GeoServic...
import numpy as np ############################################################################ # Functions to compute in log-domain. ############################################################################ def logzero(): return -np.inf def safe_log(x): if x == 0: return logzero() return np.l...
# coding=utf-8 import os import unittest from JenkinsStatistics import jenkins_statistics_reports import JenkinsStatistics.jenkins_statistics class JenkinsStatisticsTests(unittest.TestCase): def job_info_factory(self, month=9, year=2015, ...
"""Unit tests for core functions.""" import os import tempfile import pytest import docconvert # local from . import test_resources class TestShebangScripts(object): def test_python_script(self): valid_script = os.path.join(test_resources.FIXTURES, "python_script") assert docconvert.core.has_p...
/* eslint-disable no-var*/ import { parseString } from "xml2js"; import flatmap from "flatmap"; import access from "safe-access"; import validateSequenceArray from "./utils/validateSequenceArray"; import searchWholeObjByName from "./utils/searchWholeObjByName"; //Here's what should be in the callback: // { // parse...
from django.shortcuts import render from django.http import HttpResponse import MySQLdb def index(request): return render(request, 'home/home.html') def new(request): return render(request, 'home/new.html') def beatmaps(request): return render(request, 'home/beatmaps.html') def search(req...
// extract coverage data from the _$jscoverage global, and serialize it into // a simple json format. module.exports = function() { var jscoverage = global._$jscoverage; var a = []; if (jscoverage) { Object.keys(jscoverage).forEach(function(file) { var o = { file: file, source: jscovera...
import os import json project_root = os.path.dirname(__file__) with open(os.path.join(project_root, '../../configs/config.json'), 'r') as f: config = json.load(f) MAIN_TEST_PATH = config["MAIN_TEST_PATH"] RANDOM_PRIOR_PATH = os.path.join(project_root, "../../data/augmented.prior") SAS_MODEL_PATH = os.path.join(...
async function loadWasm(wasmMemory) { const wasm = await fetch("wasm/worker.wasm"); const buffer = await wasm.arrayBuffer(); const imports = { env: { memory: wasmMemory, _randomBetween: (minInclusive, maxExclusive) => Math.floor( Math.random() * (maxExclusive - minInclusive) + mi...
import { call, put, select, takeLatest } from 'redux-saga/effects' import { delay } from 'redux-saga/lib' import { canUseDOM } from 'exenv' import { fetchResource } from '../../sagas/api' import { isPolling } from '../selectors/yearCapacity' import { yearActiveNumber } from '../selectors' import * as api from '../../...
#ifndef _COMMAND_LINE_H_ #define _COMMAND_LINE_H_ #include "include.h" #include "command_table.h" #define CLI_DEBUG #ifdef CLI_DEBUG #define CLI_PRT os_printf #define CLI_WPRT warning_prf #else #define CLI_PRT os_null_printf #define CLI_WPRT os_null_printf #endif #define DEBUG_PARSER 1 #...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.13.5 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re...
""" .. _ex-read-neo: How to use data in neural ensemble (NEO) format ================================================ This example shows how to create an MNE-Python `~mne.io.Raw` object from data in the `neural ensemble <https://neo.readthedocs.io>`__ format. For general information on creating MNE-Python's data obje...
function getRandomInt(max) { return Math.floor(Math.random() * Math.floor(max)); } exports.getRandomInt = getRandomInt;
import Ember from 'ember'; const { computed } = Ember; export default Ember.Component.extend({ tagName: 'li', classNames: ['dropdown-delete'], classNameBindings: ['isConfirmed'], isConfirmed: false, notConfirmed: computed.not('isConfirmed'), actions: { onDelete() { if (thi...
/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "EUTRA-RRC-Definitions" * found in "/home/labuser/Desktop/openairinterface5g_f1ap/openair2/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-14.7.0.asn1" * `asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D /home/labuser/D...
/* eslint no-console: 0 */ var isDev = process.env.NODE_ENV !== 'production'; export var warn = function warn(condition, format, a, b, c, d, e, f) { if (isDev && typeof console !== 'undefined' && console.warn) { if (format === undefined) { console.warn('LogUtils requires an error message argument'); } ...
require("./index.js").handler({}, {}, function(err, data) { if (err) { console.log("err", err); } else { console.log("success!", data); } });
import torch import torch.nn.functional as F from ca_particles import Simulation class CASimulation(Simulation): def __init__(self, ca_model, device, batch_size, env_size=32, env_depth=16, update_prob=0.5): self.model = ca_model self.env_size = env_size self.env_depth = env_depth ...
from django.db import models from django.utils.translation import ugettext, ugettext_lazy as _ from ordered_model.models import OrderedModel from simple_history.models import HistoricalRecords from projects.models import BaseModel, Issue class Subtask(BaseModel, OrderedModel): history = HistoricalRecords() i...