text
stringlengths
3
1.05M
from __future__ import print_function from contextlib import contextmanager import enum from queue import Queue, Empty import numpy as np from PIL import Image from ._freenect2 import lib, ffi __all__ = ( 'NoDeviceError', 'NoFrameReceivedError', 'Device', 'FrameType', 'FrameFormat', 'Frame',...
import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from matplotlib.lines import Line2D from matplotlib.ticker import FormatStrFormatter from matplotlib.colors import BoundaryNorm, ListedColormap from combine2d.core.data_logging import load_pickle from combine2d.core.visualizati...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = function (prop) { return function (input) { return input[prop]; }; }; ; module.exports = exports["default"];
import torch import torch.nn as nn from torchcrf import CRF import numpy as np from nets.base import NN from nets.modules import word_emb, char_CNN, char_RNN, word_RNN, word_CNN, init_all class RNN(NN): def __init__(self, conf, vocab, char_vocab, tag_vocab): super(RNN, self).__init__() # Word em...
$(function(){ $("#encode-uricomp-btn").click(function(){ var s = $("#encode-uricomp").val(); s = $.trim(s); $("#decode-uricomp").val(encodeURIComponent(s)); }); $("#decode-uricomp-btn").click(function(){ var s = $("#decode-uricomp").val(); s = $.trim(s); $("#encode-uricomp").val(decodeURIComponen...
import React from 'react'; import { render } from '@testing-library/react'; import App from './App'; test('renders learn react link', () => { const { getByText } = render(<App />); const textElement = getByText(/Hello World/i); expect(textElement).toBeInTheDocument(); });
""" WSGI config for Shopiva 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.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault(...
import binascii from uuid import UUID from typing import Optional from anthemtool.cas.cas import Cas from anthemtool.cas.types import RESOURCE_TYPES class File: """ Base for all data files that reside in CAS files. """ def __init__(self, sha1: Optional[bytes] = None, ...
# Generated by Django 2.2 on 2019-04-04 23:21 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import updates.models class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MO...
import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import { Utils } from '../../utils/utils'; import { gettext } from '../../utils/constants'; import ModalPortal from '../modal-portal'; import CreateFolder from '../../components/dialog/create-folder-dialog'; import CreateFile from '../../compo...
# -*- coding: utf-8 -*- from __future__ import division, unicode_literals, print_function, absolute_import import os import sys import logging if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest try: import numpy as np HAS_NUMPY = True ndarray = np.ndarray NUMPY_...
// This snippet file was generated by processing the source file: // ./auth-next/yahoo-oauth.js // // To make edits to the snippets in this file, please edit the source // [START auth_yahoo_signin_redirect_result_modular] import { getAuth, getRedirectResult, OAuthProvider } from "firebase/auth"; const auth = getAuth(...
# # # Copyright oVirt Authors # SPDX-License-Identifier: Apache-2.0 # # import gettext import os import subprocess from . import base from . import config def _(m): return gettext.dgettext(message=m, domain='ovirt-engine') class Java(base.Base): def __init__(self, component=None): super(Java, se...
""" Utilities for working with the local dataset cache. This file is adapted from the AllenNLP library at https://github.com/allenai/allennlp Copyright by the AllenNLP authors. """ import gzip import json import logging import os import shutil import sys import tarfile import tempfile from contextlib import contextman...
""" This file contains a variety of plugins for refining how mypy infers types of expressions involving Enums. Currently, this file focuses on providing better inference for expressions like 'SomeEnum.FOO.name' and 'SomeEnum.FOO.value'. Note that the type of both expressions will vary depending on exactly which instan...
module.exports = function (sails) { /** * Module dependencies. */ var idHelper = require('./helpers/id')(sails), util = require('../../util'); /** * CRUD find() blueprint * * @api private */ return function update (req, res, next) { // Grab model class based on the controller this blueprint co...
var gulp = require('gulp'); var minify = require('gulp-minify'); var concat = require('gulp-concat'); var rm = require("gulp-rimraf"); gulp.task('clean', function () { gulp.src('dist/*').pipe(rm()); }); gulp.task('bundle', function () { return gulp.src([ './lib/jquery-ext.js', './lib/params.js...
var state = require('../music-state'), rhythm = require('../rhythm-keeper'), logger = require('../Logger'); // Constructor function RhythmController(io, musicplayer) { if (!(this instanceof RhythmController)) return new RhythmController(io, musicplayer); this._io = io; this._musicplayer = musicpla...
/* * Copyright 2013 The Android Open Source Project * * 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...
# MyApp/urls.py from django.urls import path from django.contrib.auth import views as auth_views from MyApp import views app_name = 'MyApp' urlpatterns = [ path('login/', auth_views.LoginView.as_view(template_name='accounts/login.html'), name='login'), path('signup/', views.signup, name='signup'), path('l...
export function linear ( pos ) { return pos; } export function easeIn ( pos ) { return Math.pow( pos, 3 ); } export function easeOut ( pos ) { return ( Math.pow( ( pos - 1 ), 3 ) + 1 ); } export function easeInOut ( pos ) { if ( ( pos /= 0.5 ) < 1 ) { return ( 0.5 * Math.pow( pos, 3 ) ); } return ( 0.5 * ( ...
# # This file is part of Python-AD. Python-AD is free software that is made # available under the MIT license. Consult the file "LICENSE" that is # distributed together with this file for the exact licensing terms. # # Python-AD is copyright (c) 2007 by the Python-AD authors. See the file # "AUTHORS" for a complete ove...
import abc import typing import feast from feast.registry import Registry from feast.infra.offline_stores.bigquery import BigQueryOfflineStore, BigQueryOfflineStoreConfig from feast.infra.offline_stores.offline_store import RetrievalJob from feast.infra.online_stores.redis import RedisOnlineStore, RedisOnlineStoreConfi...
from operator import itemgetter def kdtree(points, axis): if not points: return None median = len(points) // 2 points.sort(key=itemgetter(axis)) axis = (axis + 1) % 2 return [points[median], kdtree(points[0:median], axis), kdtree(points[median + 1:], axis)] poin...
from pathlib import Path import plotly from .config import get_config_file, run_from_ipython, set_config_file PKG_DIR = Path(__file__).parents[1] SRC_DIR = PKG_DIR / 'plotlyink' NOTEBOOKS_DIR = PKG_DIR / 'notebooks' # If inside ipython shell, init_notebook_mode # connected = True -> for smaller file sizes (plotly.j...
module.exports = { description: 'User events', run: async (data, bot) => { switch (data.payload.type) { case 'connection': // Send message when user (dis)connects on minecraft if (data.source.type === 'minecraft') { if (data.payload.event.c...
import * as React from "react" import * as techStyles from "./techspecs.module.css" const Techspecs = () => ( <section> <h2>Technical Specs Component</h2> <div className={techStyles.grid}> <text className={techStyles.category}>Frame</text> <text className={techStyles.spec}>HIMALO Bicycle Frame full S...
# Standard Libary import json # First-Party import requests # Django from django.conf import settings from django.contrib import messages from django.contrib.auth import authenticate from django.contrib.auth import login as log_in from django.contrib.auth import logout as log_out from django.contrib.auth.decorators im...
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2018-03-06 04:00 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('trr', '0001_initial'), ] operations = [ migrations.AlterField( ...
webpackJsonp([11],{"/JGO":function(l,n,u){"use strict";function e(l){return d["\u0275vid"](0,[(l()(),d["\u0275eld"](0,null,null,503,"div",[],[[24,"@routerTransition",0]],null,null,null,null)),(l()(),d["\u0275ted"](null,["\n "])),(l()(),d["\u0275eld"](0,null,null,1,"app-page-header",[],null,null,null,r.b,r.a)),d["\u0...
define(["require", "exports", "@microsoft/load-themed-styles"], function (require, exports, load_themed_styles_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); load_themed_styles_1.loadStyles([{ "rawString": ".callout_9366f74f .ms-Suggestions-itemButton{padding:0px;border:no...
# Copyright (c) Yuta Saito, Yusuke Narita, and ZOZO Technologies, Inc. All rights reserved. # Licensed under the Apache 2.0 License. """Bandit Simulator.""" from tqdm import tqdm import numpy as np from ..utils import check_bandit_feedback_inputs, convert_to_action_dist from ..types import BanditFeedback, BanditPoli...
#!/usr/bin/env python try: import unittest2 as unittest except ImportError: import unittest import journalism class TestTable(unittest.TestCase): def test_journalism(self): with self.assertRaises(NotImplementedError): journalism.save()
#!/usr/bin/python # create QuantLib models from Python models try: import QuantLib as ql except ModuleNotFoundError as e: print('Error: Module QuantLibPayoffs requires a (custom) QuantLib installation.') raise e try: from QuantLib import RealMCSimulation, RealMCPayoffPricer_discountedAt except Import...
export default class FloatingLabel { constructor(rootEl) { this.rootEl = rootEl; this.input = this.rootEl.querySelector( 'input:not([type="checkbox"]), textarea, select, input:not([type="radio"])', ); this.activeState = false; this.init(); } init() { this.bindEvents(); if (this....
"use strict"; const supertest = require('supertest'); const expect = require('chai').expect; const Priest = require('../militants/Priest'); const Warrior = require('../militants/Warrior'); const MagicStick = require('../weapons/MagicStick'); describe('Server Fantasy Controller', () => { describe('Priest test', () =...
// Copyright (c) 2009-2018 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef GLOBALBOOST_CLIENTVERSION_H #define GLOBALBOOST_CLIENTVERSION_H #if defined(HAVE_CONFIG_H) #include <config/globalbo...
#define MD_GAME_NAME "MD Portal Scene" #define MD_GAME_TITLE "MD Portal Scene" #define MD_LOG_NAME "MDPortals" #define MD_SYSTEM_POOL_SIZE 360000 * 2 #define MD_PACKDIR_NAME "pdportal" #define MD_LOG_LEVEL 0 #define MD_AI_RUNS_PER_SECOND 30 #define MD_SYMBIAN_UID 0x00000003 #define MD_PALM_CREATOR_ID 'MDD3'
import numpy as np import pandas as pd import pytest from evalml.automl import AutoMLSearch from evalml.automl.automl_algorithm import IterativeAlgorithm from evalml.automl.callbacks import raise_error_callback from evalml.automl.engine import CFEngine, DaskEngine, SequentialEngine from evalml.problem_types import ( ...
import * as tslib_1 from "tslib"; import * as React from 'react'; import { anchorProperties, getNativeProps, memoizeFunction } from '../../../Utilities'; import { ContextualMenuItemWrapper } from './ContextualMenuItemWrapper'; import { KeytipData } from '../../../KeytipData'; import { isItemDisabled, hasSubmenu } from ...
""" References: https://www.python.org/dev/peps/pep-3143/ https://pypi.org/project/python-daemon/ """ import daemon import time from .sync import sync from .config import config def daemonize(): """ Runs the program as a daemon following PEP-3143. In summary, it means that the current session can be te...
var reverse = function(x) { //first I have to turn the number to a string to index it '123' //then split the '123' into '1','2','3' // reverse and we have '3','2','1' // join the digits back to 1 string to make a number because they are now separted by ''; we have '321' const max = Math.pow(2,31) - ...
models = [ "EleutherAI/gpt-neo-125M", "EleutherAI/gpt-neo-1.3B", "gpt2", "distilgpt2", "gpt2-medium", "gpt2-large", "KoboldAI/GPT-Neo-125M-AID", "KoboldAI/fairseq-dense-125M", ] current_model = models[0]
from django.contrib.auth.tokens import PasswordResetTokenGenerator class TokenGenerator(PasswordResetTokenGenerator): pass generate_token = TokenGenerator()
import numpy as np import pytest from estimagic.benchmarking.more_wild import get_start_points_mancino from estimagic.benchmarking.more_wild import MORE_WILD_PROBLEMS @pytest.mark.parametrize("name, specification", list(MORE_WILD_PROBLEMS.items())) def test_more_wild_function_at_start_x(name, specification): _cri...
/* * Kendo UI Web v2013.1.319 (http://kendoui.com) * Copyright 2013 Telerik AD. All rights reserved. * * Kendo UI Web commercial licenses may be obtained at * https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx * If you do not own a commercial license, this file shall be governed by the * GN...
# Generated by Django 3.2.4 on 2021-06-17 22:49 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0002_auto_20210617_2222'), ] operations = [ migrations.RemoveField( model_name='profile', name='fullname', ...
/** * @license * Copyright 2016 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 requir...
#ifndef sa_botage_editor_included #define sa_botage_editor_included //---------------------------------------------------------------------- #include "mip.h" #include "gui/mip_widgets.h" #include "plugin/mip_editor.h" //#include "../data/img/knob4_60x60_131.h" //#include "../data/img/sa_logo_40_trans_black.h" //#incl...
# Copyright 2020 ASL19 Organization # # 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 wr...
from hnlp.config import ARCH if ARCH == "tf": from hnlp.sampler.sampler_tf import gen_input, gen_hidden else: raise NotImplemented
# -*- coding: utf-8 -*- ''' Copyright (c) 2016, Virginia Tech 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...
#!/usr/bin/env python import roslib; roslib.load_manifest('beginner_tutorials') import rospy import actionlib from beginner_tutorials.msg import * if __name__ == '__main__': rospy.init_node('do_dishes_client') client = actionlib.SimpleActionClient('do_dishes', DoDishesAction) client.wait_for_server() goal = DoDi...
# -*- coding: utf-8 -*- """ This module defines a class for identifying contacts.""" import numpy as np from caviar.prody_parser import LOGGER from caviar.prody_parser.atomic import AtomPointer, AtomMap from caviar.prody_parser.utilities import importLA, checkWeights from .measure import calcCenter linalg = importL...
'use strict'; const OrderHook = exports = module.exports = {}; OrderHook.updateValues = async (model) => { model.$sideLoaded.subtotal = await model.items().getSum('subtotal'); model.$sideLoaded.qty_items = await model.items().getSum('quantity'); model.$sideLoaded.discount = await model.discounts().getSum('disco...
# Generated by Django 2.0.13 on 2019-04-24 19:28 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='TestSnippet', fields=[ ('id', models.AutoF...
from setuptools import setup setup(name = 'bit', version = '0.2.0', description = '[b]ermuda [i]nformation [t]riangle', url = 'https://github.com/mpg-age-bioinformatics/bit', author = 'Bioinformatics Core Facility of the Max Planck Institute for Biology of Ageing', author_email = 'bioinfo...
#!/usr/bin/env python """Parallel word frequency counter. This only works for a local cluster, because the filenames are local paths. """ from __future__ import division import os import time import urllib from itertools import repeat from wordfreq import print_wordfreq, wordfreq from IPython.parallel import Client, Re...
/* * Code for class reference TYPED_POINTER [NATURAL_16] */ #include "eif_eiffel.h" #include "../E1/estructure.h" #ifdef __cplusplus extern "C" { #endif extern void EIF_Minit821(void); #ifdef __cplusplus } #endif #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #endif #ifdef __cplusplus extern "...
import ksvuefp from './components/ksvuefp.vue' import ksvuefpSection from './components/ksvuefp-section.vue' import utils from './utils' import options from './defaultOptions' function plugin (Vue) { Vue.prototype.$ksvuefp = new Vue({ data: { fpLoaded: false, currentIndex: 0, slidingActive: fal...
var nodemailer = require('nodemailer'); var transporter = nodemailer.createTransport({ service: 'Mailgun', auth: { user: process.env.MAILGUN_USERNAME, pass: process.env.MAILGUN_PASSWORD } }); /** * GET /contact */ exports.contactGet = function(req, res) { res.render('contact', { title: 'Contact' ...
from tulip import spec, synth, transys from tulip import dumpsmach import cPickle as pickle dim = 8 env_vars = {'env2':(0,dim-1)} #env_init = {'env3 = 0', 'env2 = 0'} env_init = set() env_safe = set() # The environment robots have to move to adjacent cells at each step for iter1 in range(dim-2): if dim - iter1 >= 3 a...
if(Util.getCookie('aside') == 'on' && $('#sidebar').length != 0) { $("body").toggleClass("open"); } // $('.top_btn').click( function () { // $( 'html, body' ).animate( { scrollTop : 0 }, 400 ); // return false; // }); $("#sidebar-close,#sidebar-toggle").click(function () { $("body").toggleClass("open"); if(...
// // Copyright (c) 2008-2019 the Urho3D project. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, mod...
from random import choice aluno1 = input('Primeiro aluno: ') aluno2 = input('Segundo aluno: ') aluno3 = input('Terçeiro aluno: ') aluno4 = input('Quarto aluno: ') lista = [aluno1,aluno2,aluno3,aluno4] escolhido = choice(lista) print('O aluno escolhido foi o {}'.format(escolhido))
from datetime import date, datetime from unittest import TestCase import numpy as np import pytest import shapely from mock import MagicMock from openeo.capabilities import Capabilities from openeo.graphbuilder import GraphBuilder from openeo.rest.connection import Connection from openeo.rest.imagecollectionclient im...
# coding=utf-8 from webspider.web.handlers.keyword_statistics import KeywordStatisticsApiHandler, KeywordStatisticsPageHandler __all__ = [ 'KeywordStatisticsApiHandler', 'KeywordStatisticsPageHandler' ]
from typing import Any, Dict, Optional, Union from django.core.exceptions import ValidationError from django.http import HttpRequest, HttpResponse from django.shortcuts import render from django.utils.translation import ugettext as _ from django.views.decorators.http import require_safe from confirmation.models impor...
import pytest import json from documenters_aggregator.spiders.chi_citycouncil import Chi_citycouncilSpider test_response = [] with open('tests/files/chi_citycouncil.json') as f: for line in f: test_response.append(json.loads(line)) spider = Chi_citycouncilSpider() parsed_items = [spider._parse_item(item) ...
define([ 'Backbone', 'jQuery', 'Underscore', 'text!templates/Integrations/IntegrationsTemplate.html', 'text!templates/Integrations/IntMagentoTemplate.html', 'text!templates/Integrations/IntConflictItems.html', 'views/selectView/selectView', 'dataService', 'helpers/eventsBinder', ...
!function(e){function t(t){for(var n,o,f=t[0],i=t[1],s=t[2],u=0,l=[];u<f.length;u++)o=f[u],a[o]&&l.push(a[o][0]),a[o]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(d&&d(t);l.length;)l.shift()();return c.push.apply(c,s||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,o=1;...
# -*- coding: utf-8 -*- """Verify that pywinpty dependency licenses are present.""" import os import sys import json import glob import os.path as osp RECIPE_DIR = os.environ['RECIPE_DIR'] BASE_GLOB = '{0}-LICENSE*' DEPENDENCIES = 'dependencies.json' LIBRARY_LICENSES = osp.join(RECIPE_DIR, 'library_licenses') # Pac...
#!/usr/bin/env python import numpy as np from vpg_ros.srv import TestService,TestServiceResponse import rospy def envoyer(req): #t_float = [1.1, 2.2, 3.3, 4.4, 5.5] t_float = np.array([[[1.1, 1.2, 1.3], [2.1, 2.2, 2.3], [3.1, 3.2, 3.3], [4.1, 4.2, 4.3]], [[21.1, 21.2, 21.3], [22.1, 22.2, 2...
import torch import nibabel as nib import numpy as np import pandas as pd from pathlib import Path from src.data.datasets import BaseDataset from src.data.transforms import Compose, ToTensor class LitsAdaptDataset(BaseDataset): """The dataset of the Liver Tumor Segmentation Challenge (LiTS) in MICCAI 2017 fo...
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ import type { ReactDOMEventResponder, ReactDOMResponderEvent, ReactDOMResponderContext, } from 'shared/ReactDOMT...
from django.contrib import admin from .models import Author # Register your models here. admin.site.register(Author)
from keystoneauth1 import loading from keystoneauth1 import session from novaclient import client """ load from env auth_url=os.environ["OS_AUTH_URL"], username=os.environ["OS_USERNAME"], password=os.environ["OS_PASSWORD"], user_domain_id=os.environ["OS_USER_DOMAIN_ID"], project_...
export const FETCH_CATEGORIES_START = 'GET_CATEGORIES_START'; export const FETCH_CATEGORIES_SUCCESS = 'GET_CATEGORIES_SUCCESS'; export const FETCH_CATEGORIES_FAIL = 'GET_CATEGORIES_FAIL'; export const CREATE_CATEGORY_START = 'CREATE_CATEGORY_START'; export const CREATE_CATEGORY_SUCCESS = 'CREATE_CATEGORY_SUCCESS'; exp...
/* * @CopyRight: * FISCO-BCOS is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * FISCO-BCOS is distributed in the hope that it ...
import unittest from rubicon.objc import ( NSDictionary, NSMutableDictionary, NSObject, ObjCClass, objc_method, objc_property, ) from rubicon.objc.collections import ObjCDictInstance class NSDictionaryMixinTest(unittest.TestCase): py_dict = { 'one': 'ONE', 'two': 'TWO', 'three': '...
/* Autogenerated with Kurento Idl */ /* * (C) Copyright 2013-2015 Kurento (http://kurento.org/) * * 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/li...
import requests #21f1e0290080452784b4ffeb9869f130 def news(): message='' url = ('http://newsapi.org/v2/top-headlines?' 'country=in&' 'apiKey=21f1e0290080452784b4ffeb9869f130') response = requests.get(url) json_response=response.json() for i in json_response['articles...
"use strict"; var _a; Object.defineProperty(exports, "__esModule", { value: true }); exports.ComputeEnvironment = exports.AllocationStrategy = exports.ComputeResourceType = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const ec2 = require("@aws-cdk/aws-ec2"); const iam = require("@aws-cdk/aws-iam"); const...
var private = {}, self = null, library = null, modules = null; function Message(cb, _library) { self = this; self.type = 7 library = _library; cb(null, self); } Message.prototype.create = function (data, trs) { return trs; } Message.prototype.calculateFee = function (trs) { return 0; } Message.prototype.veri...
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl...
const AWS = require('aws-sdk') const { accessKeyId, secretAccessKey, bucketName, defaultRegion } = require('./config'); const S3 = new AWS.S3({ accessKeyId, secretAccessKey, region: defaultRegion, }) function saveFile(directoryName, fileName, fileStream) { return new Promise((resolve, reject) => { ...
// create Agora client var client = AgoraRTC.createClient({ mode: "rtc", codec: "vp8" }); var localTracks = { videoTrack: null, audioTrack: null }; var remoteUsers = {}; // Agora client options var options = { appid: null, channel: null, uid: null, token: null }; let statsInterval; // the demo can auto j...
# Python RPG # Alex Galhardo Vieira # https://github.com/AlexGalhardo/Python-RPG # aleexgvieira@gmail.com # https://alexgalhardo.com # !/usr/bin/python3 # coding: utf-8 # ./Functions/Prints.py # Print Game Introductions def Game_Introduction(): print("\n\t Welcome to Python CLI RPG!\n") print('\n\t Created by: A...
"use strict"; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ Object.defineProperty(exports, "__esModule", { value: true }); const testing_1 = require("@angular-devk...
import _extends from"@babel/runtime/helpers/extends";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers...
/** * @file telplugins_c_api.h * @brief Plugins Core C-API Header * @author Totte Karlsson & Herbert M Sauro * * <-------------------------------------------------------------- * This file is part of cRoadRunner. * See http://code.google.com/p/roadrunnerlib for more details. * * Copyright (C) 2012-2013 * Un...
// // AdapterCNY.h // AdapterPatternDemo-Simple // // Created by 魏欣宇 on 2018/4/10. // Copyright © 2018年 Dino. All rights reserved. // #import "AdapterUSD.h" #import "TargetCNYProtocol.h" @interface AdapterCNY : AdapterUSD<TargetCNYProtocol> @end
"use strict"; exports.__esModule = true; exports.MjmlAccordionTitle = void 0; var _react = _interopRequireWildcard(require("react")); var _utils = require("./utils"); var _excluded = ["children"]; function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop...
import logging from typing import Optional from pydantic import BaseModel from inoft_vocal_framework.dummy_object import DummyObject from inoft_vocal_framework.exceptions import raise_if_variable_not_expected_type, raise_if_value_not_in_list, raise_if_variable_not_expected_type_and_not_none # todo: refactor to Pyda...
from __future__ import print_function import json import logging import os import sys import gunpowder as gp import numpy as np import pymongo from synful.gunpowder import IntensityScaleShiftClip def block_done_callback( db_host, db_name, worker_config, block, start, ...
def main(): def solution(roman): I = 1 V = 5 X = 10 L = 50 C = 100 D = 500 M = 1000 result = 0 numeral = 0 length = len(roman) for letter in roman: if numeral < length - 1: if vars()[roman[numeral + 1...
""" tests.test_core ~~~~~~~~~~~~~~~~~ Provides tests to verify that Home Assistant core works. """ # pylint: disable=protected-access,too-many-public-methods # pylint: disable=too-few-public-methods import os import unittest from unittest.mock import patch import time import threading from datetime import datetime, ti...
# coding: utf-8 from __future__ import absolute_import from bitmovin_api_sdk.common import BaseApi, BitmovinApiLoggerBase from bitmovin_api_sdk.common.poscheck import poscheck_except from bitmovin_api_sdk.models.bitmovin_response import BitmovinResponse from bitmovin_api_sdk.models.response_envelope import ResponseEn...
#!/usr/bin/node const Automerge = require('automerge') const fs = require("fs"); const { argv } = require('process'); var data = fs.readFileSync(argv[1]); const doc = Automerge.load(data) // To resolve the conflict simply write to the current branch file console.log(doc.text.join(''))
/* =========================================================== * pl.js * Polish translation for Trumbowyg * http://alex-d.github.com/Trumbowyg * =========================================================== * Author : Paweł Abramowicz * Github : https://github.com/pawelabrams */ jQuery.trumbowyg.l...