text
stringlengths
3
1.05M
'use strict'; const assert = require('assert'); const debug = require('debug')('Loader'); const JSON5 = require('json5'); const resolve = require('./lib/resolve'); const normalizeObject = require('./lib/utils').normalizeObject; class Loader { constructor (opts) { assert(opts && typeof opts.fetch === 'function'...
class DomBuilder { constructor(config, pathPrefix) { this.config = config; this.pathPrefix = pathPrefix + '/'; } getDom(context) { if (context.noSong || context === {} || context.state === "off") { return this.getWrapper(this.getNothingIsPlayingContent()); } els...
import React from 'react'; import LoadPlayerWidget from "./LoadPlayerWidget"; import Label from "../../BaseReactComponents/Label/Label"; import TextInput from "../../BaseReactComponents/TextInput/TextInput"; import {useOnChangeSetter} from "../../../customHooks/useOnChangeSetter"; export default function () { cons...
/* * /MathJax-v2/jax/output/HTML-CSS/fonts/STIX/Variants/Regular/All.js * * Copyright (c) 2009-2018 The MathJax Consortium * * 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 ...
/* global describe, it, expect */ var bootable = require('..'); describe('bootable', function() { it('should export function', function() { expect(bootable).to.be.a('function'); }); it('should export Initializer constructor', function() { expect(bootable.Initializer).to.be.a('function'); }); ...
"use strict"; /* * ###### * ###### * ############ ####( ###### #####. ###### ############ ############ * ############# #####( ###### #####. ###### ############# ############# * ###### #####( ###### #####. ###### ##### ###### ##### ###### * ######...
//obj Image Animation var hoverLayer = $("body"); var objImgOne = $(".fk-global-img__obj"); //Animation Init hoverLayer.mousemove(function(e) { var valueX = (e.pageX * -1) / 60; var valueY = (e.pageY * -1) / 80; if(objImgOne.length) { objImgOne.css({ transform: "translate3d(" + valueX ...
webpackJsonp([7],{KVrM:function(n,e,t){var i=t("cI2X");"string"==typeof i&&(i=[[n.i,i,""]]),i.locals&&(n.exports=i.locals);t("rjj0")("2242582c",i,!0)},X7Z6:function(n,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=t("SJI6"),a={name:"",data:function(){return{total:0,siteNum:"",radio:1,formLabel...
import axios from 'axios' import { getToken } from '@/utils/auth' import generateToken from '@/utils/tokenGenerator' export function upload(api, file) { var data = new FormData() data.append('file', file) const config = { headers: { 'token': getToken(), 'uuid': generateToken(), 'key': 'adap...
/** * External dependencies */ import { RuleTester } from 'eslint'; /** * Internal dependencies */ import rule from '../no-global-get-selection'; const ruleTester = new RuleTester( { parserOptions: { ecmaVersion: 6, }, } ); ruleTester.run( 'no-global-get-selection', rule, { valid: [ { code: 'defaultVie...
deepmacDetailCallback("2c3557000000/24",[{"d":"2012-09-13","t":"add","a":"1-6-4, Osaki\nOSAKI NEW CITY 4th Building 19F\nShinagawa-ku TOKYO 141-0032\n","c":"JAPAN","o":"ELLIY Power CO..Ltd"},{"d":"2015-08-27","t":"change","a":"1-6-4, Osaki Shinagawa-ku TOKYO US 141-0032","c":"US","o":"ELLIY Power CO..Ltd"}]);
/* Vendor imports */ import React from 'react' import PropTypes from 'prop-types' import { graphql, Link } from 'gatsby' import { useTrail, animated } from 'react-spring' import Image from 'gatsby-image' /* App imports */ import Layout from '../../components/layout' import SEO from '../../components/seo' import Config ...
export const GET_REQUESTS_REQUEST = 'app/RequestsPage/GET_REQUESTS_REQUEST'; export const GET_REQUESTS_SUCCESS = 'app/RequestsPage/GET_REQUESTS_SUCCESS'; export const GET_REQUESTS_ERROR = 'app/RequestsPage/GET_REQUESTS_ERROR'; export const ACCEPT_REQUEST_REQUEST = 'app/RequestsPage/ACCEPT_REQUEST_REQUEST'; export cons...
import { MRoot } from '../m-root.vue'; import MField from '../m-field.vue'; export const UTreeView = { name: 'u-tree-view', nodeName: 'u-tree-view-node', mixins: [MRoot, MField], props: { data: Array, value: null, values: Array, field: { type: String, default: 'text' }, ...
module.exports = d => { const data = d.util.openFunc(d); if (data.err) return d.error(data.err); const [number, decimalPosition] = data.inside.splits; if (isNaN(number) || number.trim() === '') return d.aoiError.fnError(d, 'custom', {inside: data.inside}, 'Invalid Number Provided In'); if (isNaN(d...
def sumR1(Int1,Int2): ''' :param Int1: Integer between 0 and 100 inclusive :param Int2: Integer between 0 and 100 inclusive :return: Sum of Int1 and Int2 >>> sumR1 (3, 57) --> 60 >>> sumR1 (0, 100) --> 60 ''' if Int1 in range(0.101) and Int2 in range(0,101): print ...
// @flow weak import SwipeableViews from './SwipeableViews'; export default SwipeableViews;
# This takes a lot of time to run, so not written as unit test. import netvlad_tf.nets as nets import cv2 import matplotlib.pyplot as plt import numpy as np import scipy.io as scio import scipy.spatial.distance as scid import scipy.signal as scisig import tensorflow as tf import os # import tensorflow.compat.v1 as tf...
// @flow import type { BackendNetworkInfo } from '../../../common/lib/state-fetch/types'; export type AddressUtxoRequest = {| ...BackendNetworkInfo, addresses: Array<string>, |}; export type RemoteUnspentOutput = {| +amount: string, +receiver: string, +tx_hash: string, +tx_index: number, +creationHeight...
var should = require('should'); var pomelo = require('../../'); var ChannelService = require('../../lib/common/service/channelService'); var app = require('../mock-base/app/mockApplication.js'); var mockBase = process.cwd() + '/test'; var channelName = 'test_channel'; var mockApp = {serverId: 'test-server-1'}; descri...
import React from 'react' import { Link } from 'react-router' const Landing = () => ( <div className='landing'> <h1>svideo</h1> <input type='text' placeholder='Search' /> <Link to='/search'>or Browe All</Link> </div> ) export default Landing
const createError = require('http-errors'); const express = require('express'); const path = require('path'); const cookieParser = require('cookie-parser'); const morgan = require('morgan'); const winston = require('./config/winston'); const indexRouter = require('./routes/index'); const roomsRouter = require('./route...
App.MenuTabView = Ember.View.extend({ tagName: 'div', classNames: ['tab-menu'], classNameBindings: ['controller.controllers.editor.device.platform'], templateName: 'views/menu_tab_view' });
from django.contrib import admin from django.db.models.query import QuerySet from django.contrib.admin.views.main import ChangeList from django.http import HttpResponseRedirect from django.utils.translation import ugettext_lazy as _ from django.contrib.admin.options import IncorrectLookupParameters from django import t...
import IP from "./ip"; import request from '@/plugin/axios' export function getBookById (data) { return request({ url: IP.IP + '/book/getById?id=' + data, method: 'get' }) } export function addBook (data) { return request({ url: IP.IP + '/book/add', method: 'post', ...
import relation class RelationActionDirect(Form): '''RelationType Form''' def __init__(self, data = None, items = None, post = None, **args): super().__init__(data, items, post, **args) to_entity_type = args['to_entity_type'] to_entity_id = args['to_entity_id'] relation_type = args['relation_type'] f...
import React from 'react'; import { View, Text, TouchableWithoutFeedback, StyleSheet } from 'react-native'; import { Image } from 'react-native-expo-image-cache'; import colors from '../config/colors'; function Card({title, subTitle, imageUrl, onPress, thumbnailUrl}) { return ( <TouchableWithoutFeedback onPress...
const pti = require('puppeteer-to-istanbul') describe('Title', () => { beforeAll(async () => { path = HOST + ":" + process.env.FRONTEND_PORT; await page.goto(path, { waitUntil: 'load' }); // Enable both JavaScript and CSS coverage await Promise.all([ page.coverage.startJ...
import { mount, createLocalVue } from '@vue/test-utils'; import { wrapperFactoryBuilder } from 'tests/unit/helpers'; import { getMessages } from '@/lang'; import HdCheckbox from '@/components/form/HdCheckbox.vue'; const checkboxClass = 'checkbox'; const checkboxInnerSelector = '.checkbox__inner'; const checkboxLabelSe...
/* * Poshy Tip jQuery plugin v1.2 * http://vadikom.com/tools/poshy-tip-jquery-plugin-for-stylish-tooltips/ * Copyright 2010-2013, Vasil Dinkov, http://vadikom.com/ */ (function(e){var a=[],d=/^url\(["']?([^"'\)]*)["']?\);?$/i,c=/\.png$/i,b=!!window.createPopup&&document.documentElement.currentStyle.minWidth=="unde...
import re class Ingredients: ''' Constructor ''' def __init__(self,input_file): # ingredients is a dictionary - key is ingredient name, value is a list containing number of times it appears and the allergen it contains, if any self.foods = {} self.ingredients = {} self...
# shellocr.py # Extract OCR using Tesseract # Created by Abhijeet Singh import subprocess import shlex # shlex is used for passing parameters # subprocess.call(['./extract_text.sh']) # Run above if no parameters are required subprocess.call(shlex.split('./extract_text.sh ./pdf/ ./txt/'))
// external dependencies import PropTypes from 'prop-types'; import React, {Component, PureComponent} from 'react'; // classes import Measured from './Measured'; // constants import {KEY_NAMES} from './constants'; // utils import {getComponentName, getMeasureKeys} from './utils'; export const createSetOriginalRef =...
from checkov.common.models.enums import CheckResult, CheckCategories from checkov.cloudformation.checks.resource.base_resource_check import BaseResourceCheck class ECRPolicy(BaseResourceCheck): def __init__(self): name = "Ensure ECR policy is not set to public" id = "CKV_AWS_32" supported_r...
// Thanks to nyc not working properly with proxies this // doesn't affect coverage. but it does ensure that every command has a usage // that contains its name, and if it has completion it is a function const npm = require('../../lib/npm.js') const t = require('tap') const { cmdList } = require('../../lib/utils/cmd-lis...
/** * 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...
import test.test_support compiler = test.test_support.import_module('compiler', deprecated=True) from compiler.ast import flatten import os, sys, time, unittest from random import random from StringIO import StringIO # How much time in seconds can pass before we print a 'Still working' message. _PRINT_WORKING_MSG_INTE...
export function isComplexPluginOutput(obj) { return typeof obj === 'object' && obj.hasOwnProperty('content'); } //# sourceMappingURL=types.js.map
const Discord = require('discord.js'); var admin = require('firebase-admin'); const https = require('https'); var db = admin.database().ref(); module.exports = { name: 'get', description: 'Get permissions for a certain user based on name', dev: false, execute(snapshot, message, args) { var found = f...
# -*- coding: utf-8 -*- """ /*************************************************************************** autoclass A QGIS plugin deep learning based classifier Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/ ------------------...
const baseConfig = { preset: 'ts-jest/presets/js-with-ts', testEnvironment: 'node', transform: { '^.+\\.ts?$': 'ts-jest', }, testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(ts|js)?$', moduleFileExtensions: ['js', 'ts'], coveragePathIgnorePatterns: ['/node_modules/', 'src/internalVa...
import stringRaw from 'string-raw'; export default stringRaw` /* Date: 17.V.2011 Author: pumbur <pumbur@pumbur.net> */ .hljs { display: block; overflow-x: auto; padding: 0.5em; background: #222; } .hljs, .hljs-subst { color: #aaa; } .hljs-section { color: #fff; } .hljs-comment, .hljs-quote, .hlj...
window.__NUXT__=(function(a,b,c,d){return {staticAssetsBase:"\u002Fstatic\u002F1597376630",layout:"default",error:b,state:{notification:{show:a,title:c,message:c},isShowSidebar:a,isSupportWebShare:a,headerTitle:"e-AlQur'an",page:"home",lastReadVerse:b,settingActiveTheme:{name:"dark",bgColor:"#071e3d",fgColor:"#fff"},se...
exports.config = { // // ================== // Specify Test Files // ================== // Define which test specs should run. The pattern is relative to the directory // from which `wdio` was called. Notice that, if you are calling `wdio` from an // NPM script (see https://docs.npmjs.com/c...
# Copyright 2021 BlobCity, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
import React from 'react' import { graphql, StaticQuery } from 'gatsby' import styled from 'styled-components' import BackgroundImage from 'gatsby-background-image' const BackgroundSection = ({ className }) => ( <StaticQuery query={graphql` query { desktop: file(relativePath: { eq: "Contact...
describe('CoinChanger', function() { beforeEach(function() { coinChanger = new CoinChanger(); }); it('should give no change for 0', function() { expect(coinChanger.changeFor(0)).toEqual([]); }); it('should give 1 penny change for 1', function() { expect(coinChanger.changeFor(1)).toEqual([1]); ...
const path = require('path') const CopyWebpackPlugin = require('copy-webpack-plugin') const sfcPlugin = require('./index') const dirHTML = path.resolve(__dirname, 'bench', 'html'); module.exports = { entry: './bench/js/main.tsx', output: { filename: '[name].js', path: path.resolve(process.cwd(), 'dist'),...
let bodyParser = require('body-parser') let express = require('express') let mongoose = require('mongoose') let assignmentRouter = require('./routers/assignment.router') let userRouter = require('./routers/user.router') let auth = require('./auth') mongoose.connect('mongodb://user:1234@ds151963.mlab.com:51963/mongoho...
"use strict"; var DecoratorsWriter = (function () { function DecoratorsWriter(writer, decoratorWriter) { this.writer = writer; this.decoratorWriter = decoratorWriter; } DecoratorsWriter.prototype.write = function (def, flags, separator) { var _this = this; if (separator === v...
from __future__ import division, unicode_literals import torch import onmt.io from pdb import set_trace class TranslationBuilder(object): def __init__(self, data, fields, n_best, replace_unk, has_tgt): self.data = data self.fields = fields self.n_best = n_best self.replace_unk = r...
const dino = document.querySelector('.dino'); const background = document.querySelector('.background'); let isJumping = false; let isGameOver = false; let position = 0; let score = 0; function handleKeyUp(event) { if (event.keyCode === 32) { if (!isJumping) { jump(); } } } function jump() { isJum...
"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...
/** * 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/LICENSE-2.0 * * Unless require...
/** * SEO component that queries for data with * Gatsby's useStaticQuery React hook * * See: https://www.gatsbyjs.org/docs/use-static-query/ */ import React from "react"; import PropTypes from "prop-types"; import {Helmet} from "react-helmet"; import {useStaticQuery, graphql} from "gatsby"; const SEO = ({descr...
"test js"
(window.webpackJsonp=window.webpackJsonp||[]).push([[39],{1010:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return addEventListener})),__webpack_require__.d(__webpack_exports__,"b",(function(){return raf})),__webpack_require__.d(__webpac...
moduleSearchIndex = [{"l":"poo"}]
let os = require('os'); let random = require('random-js')(); const UINT8_MAX = 255; const INT16_MIN = -32767 - 1; const INT16_MAX = 32767; const UINT16_MAX = 65535; const INT32_MIN = -2147483647 - 1; const INT32_MAX = 2147483647; const UINT32_MAX = 4294967295; const INT64_MIN = -9223372036854775807 - 1; cons...
/** * Copyright IBM Corp. 2019, 2020 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. * * Code generated by @carbon/icon-build-helpers. DO NOT EDIT. */ import { _ as _objectWithoutProperties, I as Icon, a as _extends } from '../I...
const express = require("express"); const router = express.Router(); const bcrypt = require("bcryptjs"); const jwt = require("jsonwebtoken"); const config = require("config"); const { check, validationResult } = require("express-validator/check"); const auth = require("../../middleware/auth"); const User = require(".....
import Utils from '@/Utils'; describe('Utils', () => { it('Has methods', () => { expect(Utils.formatDate).toBeDefined(); }); it('Formats 1 date', () => { const date1 = new Date('2018-01-16'); const date = Utils.formatDate(date1); expect(date).toEqual('2018 January - present'); }); it('Form...
const path = require('path') const fs = require('fs') const { sortDependencies, installDependencies, runLintFix, printMessage, } = require('./utils') const pkg = require('./package.json') const templateVersion = pkg.version const { addTestAnswers } = require('./scenarios') module.exports = { metalsmith: {...
/** * Copyright (c) 2008-2011 The Open Planning Project * * Published under the BSD license. * See https://github.com/opengeo/gxp/raw/master/license.txt for the full text * of the license. */ /** api: (define) * module = gxp.form * class = ViewerField * base_link = `Ext.form.Field <http://extjs...
import * as asn1js from "asn1js"; import { getParametersValue, clearProps } from "pvutils"; //************************************************************************************** /** * Class from RFC5652 */ export default class EncapsulatedContentInfo { //***************************************************...
(function(){var n=Markdown.getSanitizingConverter(),t=$(".wmd-input");t.each(function(){var t=$(this).attr("id").substr(9),i=new Markdown.Editor(n,t,{handler:function(){window.open("http://daringfireball.net/projects/markdown/syntax")}});i.hooks.set("insertImageDialog",function(n){var r=$("#wmd-input"+t),f,u=r.selecti...
// Copyright (c) International Business Machines Corp. 2019 // 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, modi...
'use strict' const mongodb = require('../../utilities/mongodb') const defaultPipe = require('../helpers/defaultPipe') const Pipeline = require('pipes-and-filters') const AdminId = 1 const getTeams = (req, res) => { const pipeline = defaultPipe.getPipelineInstance(getTeamsWorker, (err, result) => { // This is ex...
'use strict' // var lexicon = require('nypl-registry-utils-lexicon') var db = require('nypl-registry-utils-database') var normalize = require('nypl-registry-utils-normalize') var _ = require('highland') var uuid = require('node-uuid') /** * Given max and min it will distrubute across the requested number as a array of ...
import React, { useState, memo } from 'react'; import _ from 'lodash'; import { Scrollbars } from 'react-custom-scrollbars'; import InfiniteScroll from 'react-infinite-scroller'; import { BsThreeDots } from 'react-icons/bs'; import { GrDrag } from 'react-icons/gr'; import { FiTrash2 } from 'react-icons/fi'; import Crea...
// Load the AWS SDK for Node.js // eslint-disable-next-line import/no-extraneous-dependencies /* eslint-disable */ const AWS = require('aws-sdk'); /* eslint-enable */ const jobSettings = require('./settings.json'); // Set the region exports.handler = async (event) => { AWS.config.update({ region: event.awsRegion });...
__author__ = 'Nick Allen <nick.allen.cse@gmail.com>' MARTEN_FIXTURE = True
const connection = require('../database/connection'); module.exports = { async index(request, response){ const { page = 1 } = request.query; const [count] = await connection('incidents').count(); const incidents = await connection('incidents') .join('ongs', 'ongs.id', '=', 'in...
# 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 or at # https://developers.google.com/open-source/licenses/bsd """Unit tests for the sitewide_helpers module.""" from __future__ import print_function from __...
'use babel'; import NumpyShapeCommentatorView from '../lib/numpy-shape-commentator-view'; describe('NumpyShapeCommentatorView', () => { it('has one valid test', () => { expect('life').toBe('easy'); }); });
import sys import argparse import os import resource from circus import logger from circus.arbiter import Arbiter from circus.pidfile import Pidfile from circus import __version__ from circus.util import MAXFD, REDIRECT_TO, configure_logger, LOG_LEVELS from circus.util import check_future_exception_and_log def get_m...
import numpy as np import pandas as pd from pathlib import Path from regex import search import streamlit as st from sklearn.preprocessing import StandardScaler from sklearn.linear_model import Ridge from sklearn.pipeline import make_pipeline from sklearn.model_selection import train_test_split from sklearn.metrics im...
from __future__ import print_function import os import numpy as np import tensorflow as tf import configparser import argparse import signal import glob os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import progressbar import cv2 import utils as u from network import build_encoder #This is to generate the codebook \bar_C f...
const environment = process.env.NODE_ENV const isDevelopment = 'development' === environment module.exports = ({options}) => ({ plugins: { /** * https://stylelint.io/user-guide/rules/ */ stylelint: { "rules": { "at-rule-disallowed-list": [], "at-rule-name-case": "lower", ...
angular.module('ticketmonster').controller('EditShowController', function($scope, $routeParams, $location, flash, ShowResource , EventResource, PerformanceResource, VenueResource, TicketPriceResource) { var self = this; $scope.disabled = false; $scope.$location = $location; $scope.get = function(...
import DS from 'ember-data'; export default DS.Model.extend({ /** * {String} title of the post. */ title: DS.attr("string"), /** * {String} body of the post. */ body: DS.attr("string") });
from pythreader import TaskQueue, Task, DEQueue, PyThread, synchronized, ShellCommand import re, json, os, os.path, traceback import subprocess, time from part import PartitionedList from py3 import to_str from stats import Stats Version = "1.3" try: import tqdm Use_tqdm = True except: Use_tqdm = False f...
import pytest from openshift_checks.package_version import PackageVersion, OpenShiftCheckException def task_vars_for(openshift_release, deployment_type): service_type_dict = {'origin': 'origin', 'openshift-enterprise': 'atomic-openshift'} service_type = service_type_dict[deployment_t...
const { Model, DataTypes } = require('sequelize'); const sequelize = require('../config/connection'); class Vote extends Model {} Vote.init( { id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true }, user_id: { type: DataTypes.INTEGER, refer...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'UploadConfig' db.create_table(u'upload_uploadconfig', ( (u'datacollectorconfig_p...
class MessagingCtrl { constructor() { "ngInject"; this.message = {}; this.status = false; } chooseAllMessages() { this.status = !this.status; console.log('this.status', this.status); this.single = this.status; this.group = this.status; this.addingOfIndividualUsers = this.status; ...
/*! * OpenUI5 * (c) Copyright 2009-2019 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ sap.ui.define(["../Plugin","../Support","../ToolsAPI","sap/base/security/encodeXML"],function(e,t,o,i){"use strict";var r=e.extend("sap.ui.core.support.plugins.TechInfo"...
# coding: utf-8 from __future__ import unicode_literals import json import math import re from .aws import AWSIE from ..compat import compat_HTTPError from ..utils import ( clean_html, ExtractorError, InAdvancePagedList, int_or_none, parse_iso8601, str_or_none, urlencode_postdata, ) clas...
from finite_state_machine import StateMachine, transition from finite_state_machine.exceptions import ConditionsNotMet import pytest def test_state_machine_requires_state_instance_variable(): class LightSwitch(StateMachine): def turn_on(self): pass def turn_off(self): pass...
import matplotlib.pyplot as plt x_values = list(range(1, 1001)) y_values = [x**2 for x in x_values] # plt.scatter(x_values, y_values, s=40) # plt.scatter(x_values, y_values, edgecolors='none', s=40) # plt.scatter(x_values, y_values, c='red', edgecolors='none', s=40) plt.scatter(x_values, y_values, c=(0, 0, 0.8), edg...
(function(angular, undefined) { 'use strict'; angular.module('binterfaceApp.constants', []) .constant('appConfig', {userRoles:['guest','user','admin']}) ; })(angular);
from PIL import Image, ImageEnhance from components import Icon, Text, NoScroll_Text, Indicator_Image, Indicator_Image_Control, Image_Pause_Control, Image_ScrollDown_Control, Image_FadeIn_Control, Image_FadeOut_Control, Image_ScrollLeft_Control SCROLL_IN = 0 PAUSE = 1 SCROLL_LEFT = 2 FINISHED = 3 FADE_OUT = 4 FADE_IN...
from django.http import JsonResponse, HttpResponseBadRequest, HttpResponse from src.tipboard.app.applicationconfig import getRedisPrefix from src.tipboard.app.properties import BASIC_CONFIG, REDIS_DB, DEBUG, ALLOWED_TILES, API_KEY from src.tipboard.app.cache import MyCache, save_tile from src.tipboard.app.parser import...
const ContentTransition = () => { const elements = document.querySelectorAll('.js-transition--slide') let observer = new IntersectionObserver(entries => { entries.forEach(entry => { if (entry.intersectionRatio > 0) { entry.target.classList.add('js-transition--active') observer.unobserve(e...
import axios from 'axios' import PixelAvatarContract from '../../../../abis/PixelAvatars.json' import { inject } from 'vue' import { PIXEL_AVATAR_TOKEN, SERVER_URL } from '../../constants' import { ethers } from 'ethers' export default function useAvatarContract() { const client = inject('web3client') let cac...
import { setData } from '@progress/kendo-angular-intl'; setData({ name: "de-CH", likelySubtags: { de: "de-Latn-DE" }, identity: { language: "de", territory: "CH" }, territory: "CH", numbers: { symbols: { decimal: ".", group: "’", ...
#META: timeout=long import pytest from conftest import product, flatten # Note that we can only test things here all implementations must support valid_data = [ ("acceptInsecureCerts", [False, None]), ("browserName", [None]), ("browserVersion", [None]), ("platformName", [None]), ("pageLoadStrate...
from st2common.query.base import Querier from st2common.constants.action import LIVEACTION_STATUS_SUCCEEDED class TestQuerier(Querier): def __init__(self, *args, **kwargs): super(TestQuerier, self).__init__(*args, **kwargs) def query(self, execution_id, query_context, last_query_time=None): r...
import state from './state.js'; import ListrError from './listr-error.js'; class TaskWrapper { constructor(task, errors) { this._task = task; this._errors = errors; } get title() { return this._task.title; } set title(title) { this._task.title = title; this._task.next({ type: 'TITLE', data: tit...
""" Tests to check DTM math functions and Topic-Word, Doc-Topic proportions. """ import numpy as np # for arrays, array broadcasting etc. from gensim.models import ldaseqmodel, ldamodel from gensim.corpora import Dictionary import os.path import unittest import logging module_path = os.path.dirname(__file__) # ne...