text
stringlengths
3
1.05M
Dagaz.Controller.persistense = "none"; ZRF = { JUMP: 0, IF: 1, FORK: 2, FUNCTION: 3, IN_ZONE: 4, FLAG: 5, SET_FLAG: 6, POS_FLAG: 7, SET_POS_FLAG: 8, ATTR: 9, SET_ATTR: 10, PROMOTE: ...
""" Simple demo code """ import logging from . import Iterator logger = logging.getLogger(__name__) activities = Iterator({ "country_code": "so", "day_gteq": "2020-01-01", "limit": 5, }) for i, activity in enumerate(activities): print(activity.default_language, activity.identifier, activity.title) ...
# Image # Use an image card to display a base64-encoded #image. # --- from h2o_wave import site, ui import io import base64 import numpy as np import matplotlib.pyplot as plt np.random.seed(19680801) n = 25 plt.figure(figsize=(3, 3)) plt.scatter( np.random.rand(n), np.random.rand(n), s=(30 * np.random.rand(n)...
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "QzoneModel.h" @class NSArray, QZLayoutInfo; @interface QzoneFeedCellMusic : QzoneModel { } // Remaining properties @property(retain, nonatomic) QZLayoutInfo *info; // @...
"""Websocket client section for the Slurry stream processing microframework.""" __version__ = '0.4.2' from trio_websocket import ConnectionClosed, ConnectionTimeout, HandshakeError, DisconnectionTimeout from .websocket import Websocket
import React from 'react'; import { Divider, TopNavigation, Text, TopNavigationAction } from '@ui-kitten/components'; const Question = (props) => { return <Text>{props.content}</Text> } export default Question;
import hashlib as hasher import datetime as date import random # Define what a Snakecoin block is class Block: def __init__(self, index, timestamp, data, previous_hash): self.index = index self.timestamp = timestamp self.data = data self.previous_hash = previous_hash self.hash = self.hash_block()...
import { lighten } from "polished"; const textColor = "#333"; export default { primary: "#26a69a", second: "#e10050", text: { primary: textColor, second: lighten(0.2, textColor), third: lighten(0.4, textColor) }, disabled: lighten(0.6, textColor) };
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import configargparse from onmt.utils.logging import init_logger from onmt.translate.translator import build_translator import onmt.opts as opts def main(opt): translator = build_translator(opt, report_score=True) transla...
// When the window has finished loading create our google map below google.maps.event.addDomListener(window, 'load', init); function init() { // Basic options for a simple Google Map // For more options see: https://developers.google.com/maps/documentation/javascript/reference#MapOptions var mapOptions = {...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import ais_parse as parse import ais_draw as draw if __name__ == "__main__": all_MMSI_cargo = [] all_MMSI_tanker = [] cargo_path = "xxx" tanker_path = "xxx" tmp_cargo = [os.path.join(cargo_path + os.sep, s) for s in os.listdir(c...
from collections import Counter from part1 import groups total = 0 for group in groups: print(f"\nGroup: {group}") group_size = len(group) print(f"Length of group: {group_size}") counts = Counter("".join(group)) print(counts) counts = Counter(list(counts.values()))[group_size] total+=count...
from typing import List from pdip.cqrs.decorators import responseclass @responseclass class GetDashboardWidgetsResponse: Data: List[any] = None def to_dict(self): return {"Data": [dict_data for dict_data in self.Data]}
/* * Copyright (c) 2002-3, Intel Corporation. All rights reserved. * Created by: salwan.searty REMOVE-THIS AT intel DOT com * This file is licensed under the GPL license. For the full content * of this license, see the COPYING file at the top level of this * source tree. * Test that the killpg() function ...
# Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany # # 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://w...
#!/bin/python3 import sys x1,v1,x2,v2 = input().strip().split(' ') x1,v1,x2,v2 = [int(x1),int(v1),int(x2),int(v2)] if (x1 < x2 and v1 <= v2) or (abs(x2-x1) % abs(v2-v1) != 0): print ('NO') else: print ('YES')
# Copyright 2017 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 (c) 2015-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. */ 'use strict...
'use strict'; module.exports = { up: (queryInterface, Sequelize) => { /* Add altering commands here. Return a promise to correctly handle asynchronicity. Example: return queryInterface.createTable('users', { id: Sequelize.INTEGER }); */ return queryInterface.createTable('Users', { id: { ...
from api.app import create_app
var evtManager = new EventManager(); var cacheManager = new CacheManager(); var calMediator = new CalendarMediator(evtManager, cacheManager); var calOpts = {}; var calManagerOpts = { AnimationDaySelectorOptions: { animationDays: animationDays } }; var calendar = new Calendar(document.querySelector("#cal...
import ComponentEditorNav from './ComponentEditorNav' export default ComponentEditorNav
#!/usr/bin/env python # -*- coding: utf-8 -*- import theano.tensor as T from deepy import NeuralLayer, AutoEncoder, Dense from deepy import GaussianInitializer, global_theano_rand class ReparameterizationLayer(NeuralLayer): """ Reparameterization layer in a Variational encoder. Only binary output cost fu...
/* $Id: groestl.c 260 2011-07-21 01:02:38Z tp $ */ /* * Groestl implementation. * * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and assoc...
#!/usr/bin/env python import os from opsbro.log import logger # linux only, because to problems for other os :) # Basic USER_HZ, something like 100 (means 100 tick by seconds) if hasattr(os, 'sysconf_names') and hasattr(os, 'sysconf'): SC_CLK_TCK = os.sysconf_names['SC_CLK_TCK'] USER_HZ = os.sysconf(SC_CLK_TC...
/** * @license * Copyright 2015 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 * * Un...
/********************************************************************** * * GEOS - Geometry Engine Open Source * http://geos.osgeo.org * * Copyright (C) 2006 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU Lesser General Public Licence as p...
from tkinter import * #importando a biblioteca tkinter e todas as suas funcionalidades #função que soma, estou pegando o texto dela atravez da função get e atribuindo #ao label 'lb_result' que foi criado atravez da propriedade 'text' def soma(): num1 = int(n1.get()) num2 = int(n2.get()) lb_result['text'] =...
# 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 may not u...
jQuery(document).ready(function($) { /* * jQuery simple and accessible modal window, using ARIA * @version v1.11.1 * Website: https://a11y.nicolas-hoffmann.net/modal/ * License MIT: https://github.com/nico3333fr/jquery-accessible-modal-window-aria/blob/master/LICENSE */ // loading moda...
import React, { useEffect, useState } from 'react' import { useUsers } from '../../../hooks/useUsers' import { CButton, CCard, CCardBody, CCardFooter, CCardHeader, CCardText, CCardTitle, CCol, CContainer, CRow, CSpinner, } from '@coreui/react' export const Users = () => { const { getUsers, isLo...
(function () { /* Imports */ var Meteor = Package.meteor.Meteor; var global = Package.meteor.global; var meteorEnv = Package.meteor.meteorEnv; var ECMAScript = Package.ecmascript.ECMAScript; var _ = Package.underscore._; var Random = Package.random.Random; var Accounts = Package['accounts-base'].Accounts; var MeteorDe...
/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolar...
class CutoffRounder: def round(self, num, cutoff): div = num.split('.') if(len(div) == 1): return div[0] if(div[0] == ''): num = 0 else: num = float(div[0]) if(div[1] == ''): dec = 0 else: ...
### This file helps you prepare the input files including ### mol_param.cu/hh, coord_ref.cu/hh, expt_data.cu/hh, and env_param.cu/hh ################################################################ ######## Specify parameters (edit as you see fit) ############## ####################################################...
from __future__ import print_function from __future__ import division import os import sys import time import datetime import os.path as osp import numpy as np import torch import torch.nn as nn import torch.backends.cudnn as cudnn from torch.optim import lr_scheduler from args import argument_parser, image_dataset_...
/* * sdpcontrol.c * * Copyright (c) 2001-2003 Maksim Yevmenkin <m_evmenkin@yahoo.com> * 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...
/** ****************************************************************************** * @file stm32f1xx_hal_i2c.c * @author MCD Application Team * @brief I2C HAL module driver. * This file provides firmware functions to manage the following * functionalities of the Inter Integrate...
from setuptools import setup, find_packages packages = find_packages() with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setup( name="eda_plugin", version="0.2.20", description="Event-driven acquisition", long_description=long_description, long_description_cont...
/** @file x64 CPU Exception Handler. Copyright (c) 2012 - 2017, Intel Corporation. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license ma...
(window.webpackJsonp=window.webpackJsonp||[]).push([[61],{1576:function(e,t,a){"use strict";a.r(t);var n=a(25),r=a.n(n),l=a(24),s=a.n(l),o=a(26),i=a.n(o),c=a(27),u=a.n(c),m=a(21),d=a.n(m),p=a(28),f=a.n(p),h=a(0),g=a.n(h),N=a(33),v=a(15),b=function(e,t,a){return{type:"FETCH_NOTES",filters:e,sorts:t,pagination:a}},E=func...
/** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib 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 a...
# Copyright (c) 2017 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the BSD 3-Clause License. """Project Schema.""" from pprint import pformat from collections import defaultdict as ddict from numbers import Number import itertools from collections.abc import Mapping...
import React, { createContext, useCallback, useContext, useEffect, useState, } from "react"; const RecordContext = createContext(); RecordContext.displayName = "RecordContext"; export const useRecordContext = () => useContext(RecordContext); export const RecordProvider = ({ list, onRowClick = () => nul...
let a_x = 100; let a_y = 100; let a_keys = {}; function setup() { createCanvas(512, 512); fill(255, 0, 0); } function draw() { background(200); if (keyIsDown(LEFT_ARROW)) { a_x -= 5; } if (keyIsDown(RIGHT_ARROW)) { a_x += 5; } if (keyIsDown(UP_ARROW)) { a_y -= 5; } if (keyIsDown(DOWN_A...
from copy import copy from typing import Type, Optional, Dict, Tuple from django.conf import settings from django.contrib.admin.options import ModelAdmin from django.contrib.admin.views.main import ChangeList from django.core.exceptions import FieldDoesNotExist from django.db import models from django.db.models import...
const { date } = require('../../lib/utils') const db = require('../../config/db') module.exports = { all(callback) { db.query(` SELECT instructors.*, count(members) AS total_students FROM instructors LEFT JOIN members on (members.instructor_id = instructors.id) GR...
const fs = require('fs') const { APP_HOST, APP_PORT } = require('../app/config') const fileService = require('../service/file.service') const categoryService = require('../service/category.service') const goodService = require('../service/good.service') const userService = require('../service/user.service') class Fil...
# -*- coding: utf-8 -*- """Base exchange class""" # ----------------------------------------------------------------------------- __version__ = '1.29.53' # ----------------------------------------------------------------------------- from ccxt.base.errors import ExchangeError from ccxt.base.errors import NetworkEr...
__all__ = ['wigner', 'qfunc', 'spin_q_function', 'spin_wigner', 'wigner_transform'] import numpy as np from numpy import ( zeros, array, arange, exp, real, conj, pi, copy, sqrt, meshgrid, size, conjugate, cos, sin, polyval, fliplr, ) import scipy.sparse as sp import scipy.fftpack as ft import scipy....
/* generated by Svelte vX.Y.Z */ import { SvelteComponent, add_render_callback, append, detach, element, init, insert, listen, noop, safe_not_equal, set_data, text } from "svelte/internal"; function create_fragment(ctx) { let scrolling = false; let clear_scrolling = () => { scrolling = false; }; le...
# -*- coding: utf-8 -*- """ meraki This file was automatically generated for meraki by APIMATIC v2.0 ( https://apimatic.io ). """ import meraki.models.reserved_ip_range_model import meraki.models.dhcp_option_model class UpdateNetworkVlanModel(object): """Implementation of the 'updateNetwor...
from .wsbn import WSBNFull from .math_ops import *
const { AwsCdkConstructLibrary, ProjectType, NpmAccess } = require("projen"); const project = new AwsCdkConstructLibrary({ name: "aws-domain-redirector", description: "AWS CDK construct to redirect one domain to another.", repository: "https://github.com/awslabs/aws-domain-redirector", author: "mattsb42-aws", ...
import { RenderMethods } from "./engine"; function appendHTMLIframe(element, html) { const iframe = document.createElement("iframe"); element.append(iframe); iframe.style.height = "100%"; iframe.style.width = "100%"; const doc = iframe.contentWindow.document; doc.open(); doc.write(html); doc.close(); }...
from django.urls import reverse from rest_framework import status from rest_framework.test import APITestCase from .factories import DataSourceFactory, OrganizationFactory class OrganizationAPITestCase(APITestCase): def setUp(self): data_source = DataSourceFactory(name='abc') self.organization =...
#!/usr/bin/env python import nltk import pandas as pd import os import gensim # PARAMETERS ================ EMBEDDING_DIM = 300 def train_w2v(sent_list, size=100): model = gensim.models.Word2Vec(sent_list, min_count=1,size=size) model.delete_temporary_training_data(replace_word_vectors_with_normalized=True) ...
# Copyright 2017 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...
# Generated by Django 3.0.5 on 2020-04-25 17:40 import django.contrib.gis.db.models.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('browser', '0006_auto_20200425_1826'), ] operations = [ migrations.CreateModel( name='...
# #! # # Neural style transfer # # (https://www.tensorflow.org/alpha/tutorials/generative/style_transfer) import time import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import tensorflow as tf # ## Setup mpl.rcParams["figure.figsize"] = (13, 10) mpl.rcParams["axes.grid"] = False # - base_u...
/* * Copyright (c) 2015 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...
#!/usr/bin/env python3 import pandas as pd data_path = '../data/ProcessedAGU.csv' # Read in using pandas df = pd.read_csv(data_path) # Read in using csv module and convert to lists with open('../data/ProcessedAGU.csv') as file: csv_file = csv.reader(file) data_set = list() for line in csv_file: ...
import Vue from 'vue' import VueRouter from 'vue-router' import Home from '../views/Home.vue' Vue.use(VueRouter) const routes = [ { path: '/', name: 'Home', component: Home }, { path: '/about', name: 'About', // route level code-splitting // this generates a separate chunk (about.[ha...
from irods_capability_automated_ingest.core import Core from irods_capability_automated_ingest.utils import Operation from irods.meta import iRODSMeta import os filesystem_mode = 'filesystem::mode' class event_handler(Core): @staticmethod def post_data_obj_create(hdlr_mod, logger, session, meta, **options): ...
#!/usr/bin/env python3 import sys import json import argparse parser = argparse.ArgumentParser(description='Compare two json files') parser.add_argument('file1', help="First JSON file") parser.add_argument('file2', help="Second JSON file") args = parser.parse_args() with open(args.file1) as f1, open(args.file2) as f...
# coding: utf-8 import pprint import re import six from huaweicloudsdkcore.sdk_response import SdkResponse class ListReposDetailsResponse(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (...
import actiontypes from '../actiontypes'; const initState = { loading: false, error: false, orders: null, order: null, } const orderReducer = (state = initState, action) => { switch (action.type) { case actiontypes().orders.fetchInit: return { ...state, loading: true } ca...
import json import os import sys import zipfile from xml.etree import ElementTree as xml_et from shutil import copyfile from requests import get if sys.version_info >= (3,): from tempfile import TemporaryDirectory import xmlrpc.client as xmlrpclib else: from backports.tempfile import TemporaryDirectory ...
from django.apps import AppConfig class LoliConfig(AppConfig): name = 'loli'
from typing import Any, Dict from ..param_spec import ParamSpec from .rundescribertypes import InterDependenciesDict class InterDependencies: """ Object containing the ParamSpecs of a given run """ def __init__(self, *paramspecs: ParamSpec) -> None: for paramspec in paramspecs: ...
# pylint:disable=unused-variable # pylint:disable=unused-argument # pylint:disable=redefined-outer-name from typing import Dict from uuid import UUID, uuid4 from models_library.projects_state import RunningState from pydantic.types import PositiveInt import pytest from aiohttp import web from aioresponses import aio...
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <T1Twitter/NSObject-Protocol.h> @class UIViewController; @protocol T1DashPresenter <NSObject> @property(readonly, nonatomic, ...
/** * * @param {Config} config */ module.exports = config => { config.defineGetter('browserSync', () => config.resolve({ https: true, port: 8001, logLevel: 'debug', urls: [], ...(config.get('browserSync') || {}) }) ); /** * * @param url */ config.defineMethod('...
goog.provide('os.data.histo.ColorBin'); goog.require('goog.array'); goog.require('goog.events'); goog.require('os.data.RecordField'); goog.require('os.histo.Bin'); goog.require('os.style'); /** * Histogram bin that tracks the colors of items in the bin. * * @param {string} baseColor The base color of the layer r...
require('dotenv').config(); const { ApolloServer } = require('apollo-server'); const isEmail = require('isemail'); const typeDefs = require('./schema'); const { createStore } = require('./utils'); const resolvers = require('./resolvers'); const LaunchAPI = require('./datasources/launch'); const UserAPI = require('./d...
/* * Copyright 2010 The Android Open Source Project * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkDevice_DEFINED #define SkDevice_DEFINED #include "SkRefCnt.h" #include "SkCanvas.h" #include "SkColor.h" #include "SkImageFilter.h" #include "Sk...
!function(e){const i=e.el=e.el||{};i.dictionary=Object.assign(i.dictionary||{},{"%0 of %1":"",Aquamarine:"",Black:"","Block quote":"Περιοχή παράθεσης",Blue:"",Bold:"Έντονη","Bulleted List":"Λίστα κουκκίδων",Cancel:"Ακύρωση","Centered image":"","Change image text alternative":"Αλλαγή εναλλακτικού κείμενου","Choose headi...
angular.module('evaluator').config(function() { var Faye = { VERSION: '1.1.1', BAYEUX_VERSION: '1.0', ID_LENGTH: 160, JSONP_CALLBACK: 'jsonpcallback', CONNECTION_TYPES: ['long-polling', 'cross-origin-long-polling', 'callback-polling', 'websocket', 'eventsource', 'in-process'],...
#ARC016e def main(): import sys input=sys.stdin.readline sys.setrecursionlimit(10**6) if __name__ == '__main__': main()
// Copyright (c) 2018-2019, Zhirnov Andrey. For more information see 'LICENSE' #pragma once #include "stl/Math/Math.h" #include "stl/Math/Bytes.h" #include "stl/Containers/ArrayView.h" namespace FGC { // // Structure View // template <typename T> struct StructView { // types public: using Self = StructV...
var searchData= [ ['scan',['scan',['../classmxberry_1_1dev_1_1_m_lint_scanner.html#a2aa7bfdacea4acec81c8bac6a61ecb81',1,'mxberry::dev::MLintScanner']]], ['scandir',['scanDir',['../classmxberry_1_1dev_1_1_m_lint_scanner.html#ae314e4af2cf4beb132ec9a734fd40563',1,'mxberry::dev::MLintScanner']]], ['scanwithhtmlreport...
import { Build, Artifact, Stone } from "./models"; /** * @param {!Artifact} artifact * @param {!Stone} stone * @returns {Number} */ function stoneSettingCost(artifact, stone) { return Math.floor(artifact.base_crafting_price * 0.05 + stone.base_crafting_price * 0.1); } /** * @param {!Build} build * @returns {N...
# 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 voluptuous as vol from esphome.components import output from esphome.components.pca9685 import PCA9685OutputComponent import esphome.config_validation as cv from esphome.const import CONF_CHANNEL, CONF_ID, CONF_PCA9685_ID, CONF_POWER_SUPPLY from esphome.cpp_generator import Pvariable, get_variable DEPENDENCIES...
#!/usr/bin/python # inheritance.py class Animal: def __init__(self): print("Animal created") def whoAmI(self): print("Animal") def eat(self): print("Eating") class Dog(Animal): def __init__(self): Animal.__init__(self) print("Dog created") def whoAmI(self): pr...
/** * Copyright (c) 2017-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. * * @flow str...
import React, { useState } from "react"; import { TickLoader } from "../../../components/spinner"; import Style from "./style.scss"; export const FigmaDesignApp = (props) => { const FigmaLiveAddr = "https://www.figma.com/embed?" + "embed_host=share&" + "url=https%3A%2F%2Fwww.figma.com%2Ffile%2FNqS0N6THcw...
/** * Copyright 2017, GeoSolutions Sas. * 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. */ module.exports = { plugins: { IdentifyPlugin: require('../plugins/Identify'), TOCPlugin: requir...
/* * Copyright (c) 2011, The Iconfactory. 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 condi...
import cadquery as cq from cadquery_massembly import MAssembly, Mate from jupyter_cadquery.viewer.client import show from jupyter_cadquery import web_color # Avoid clean error cq.occ_impl.shapes.Shape.clean = lambda x: x # Bearing def ring(inner_radius, outer_radius, width): ring = cq.Workplane(origin=(0, 0, -...
// CodeMirror version 2.34 // All functions that need access to the editor's state live inside // the CodeMirror function. Below that, at the bottom of the file, // some utilities are defined. // CodeMirror is the only global var we claim window.CodeMirror = (function() { "use strict"; // This is the fun...
var expect = require( 'chai' ).expect; var path = require( 'path' ); var pathTo = require( '../index' ); describe( 'Module path-to', function () { it( 'should create an path resolved with five up levels', function() { expect( pathTo( 5, 'app' )).to.equal( path.resolve( '../../../../../app' )); }); it( 'sh...
import numpy as np import torch import random from tqdm import tqdm import copy from bridgedata.utils.general_utils import AttrDict # from bridgedata.data_sets.robonet_dataloader import FilteredRoboNetDataset from bridgedata.utils.general_utils import Configurable from bridgedata.data_sets.data_augmentation import get_...
from __future__ import annotations from dataclasses import dataclass from typing import Any from edutorch.typing import NPArray from ..nn.module import Module from .optimizer import Optimizer @dataclass class SGD(Optimizer): """ Performs vanilla stochastic gradient descent. """ model: Module l...
""" Beacon to manage and report the status of one or more salt proxy processes .. versionadded:: 2015.8.3 """ import logging import salt.utils.beacons log = logging.getLogger(__name__) def _run_proxy_processes(proxies): """ Iterate over a list of proxy names and restart any that aren't ...
((function(){"use strict";var ARController=(function(width,height,camera){var id;var w=width,h=height;this.orientation="landscape";this.listeners={};if(typeof width!=="number"){var image=width;camera=height;w=image.videoWidth||image.width;h=image.videoHeight||image.height;this.image=image}this.defaultMarkerWidth=1;thi...
""" Landing convention tests. """ from hamcrest import ( assert_that, equal_to, is_, ) from microcosm.api import create_object_graph def test_landing(): """ Default landing returns OK. """ graph = create_object_graph(name="example", testing=True) graph.use("landing_convention") ...
import React, { Component } from 'react'; import cx from 'classnames'; import PropTypes from 'prop-types'; import InitialsPropType from '../../prop-types/initials'; import ListPropType from '../../prop-types/list'; import StyleObjectPropType from '../../prop-types/style'; import { proxyDataProps } from '../../utils/dat...
const nodemailer = require('nodemailer'); const nodeMailer = () => { 'use strict'; async function main() { // Generate test SMTP service account from ethereal.email // Only needed if you don't have a real mail account for testing // let account = await nodemailer.createTestAccount(); const htmlEma...
import React from 'react'; const App = React.createClass({ render() { return this.props.children; } }); export default App;