text
stringlengths
3
1.05M
var rc = require('rhoconnect_helpers'); var <%=class_name%> = function(){ this.login = function(resp){ // TODO: Login to your data source here if necessary resp.send(true); }; this.query = function(resp){ var result = {}; // TODO: Query your backend data source and assign the records // to ...
/** * Created by Administrator on 2016/7/13. */ var key_title=1; //对登录注册框标题底部效果设置的状态变量 function move(i){ //点击导航栏使页面滚动,list数组存储对应位置的元素class,传入i var list=[]; list[1]=".top"; list[2]=".introduction1"; list[3]=".help"; list[4]=".about"; var scroll_offset = $(list[i]).offset(); //得到pos...
$(document).ready(function(){ $(document).ajaxStart(function(){ $("#wait").css("display", "block"); $("#success").css("display", "block"); }); $(document).ajaxComplete(function(){ $("#wait").css("display", "none"); setTimeout(function(){ $("#success")...
/* @generated */ // prettier-ignore if (Intl.ListFormat && typeof Intl.ListFormat.__addLocaleData === 'function') { Intl.ListFormat.__addLocaleData({"data":{"conjunction":{"long":{"start":"{0}, {1}","middle":"{0}, {1}","end":"{0} and {1}","pair":"{0} and {1}"},"short":{"start":"{0}, {1}","middle":"{0}, {1}","end":"{...
from setuptools import find_packages, setup setup( name="src", packages=find_packages(), version="0.1.0", description="A short description of the project.", author="Your name (or your organization/company/team)", license="MIT", )
#!/usr/bin/env python """Flow to recover history files.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals # DISABLED for now until it gets converted to artifacts. import collections import datetime import os from typing import cast, Iterator from grr_r...
module.exports = { isLoggedIn(req, res, next) { if (req.isAuthenticated()) { return next(); } return res.redirect("/signin"); }, isNotLoggedIn(req, res, next) { if(!req.isAuthenticated()) { return next(); } return res.redirect("/profile"); } };
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon")); var _jsxRuntime = require("react/jsx-runtime")...
const express = require("express"); const {signup, signin, signout, forgotPassword, resetPassword} = require("../controllers/auth"); const {userById} = require("../controllers/user"); const {userSignUpValidator, passwordResetValidator} = require("../validator") const router = express.Router(); router.post('/signup...
__all__ = ('GuildWidget', 'GuildWidgetChannel', 'GuildWidgetUser',) from scarletio import cached_property from ..bases import DiscordEntity from ..http import urls as module_urls from ..user import Status from .guild import Guild class GuildWidgetUser(DiscordEntity): """ Represents an user object sent with...
# coding: utf-8 """ Files Upload and manage files. # noqa: E501 The version of the OpenAPI document: v3 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from hubspot.files.files.configuration import Configuration class ErrorDetail(object): "...
/** * Visual Blocks Language * * Copyright 2012 Fred Lin. * https://github.com/gasolin/BlocklyDuino * * 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/licen...
import * as React from "react" function SvgComponent(props) { return <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="scarlab scarlab-minimaize-square" {...props}> <path d="M...
import numpy as np from .. import tools from ..algo import Algo class DynamicCRP(Algo): # use logarithm of prices PRICE_TYPE = "ratio" def __init__(self, n=None, min_history=None, **kwargs): self.n = n self.opt_weights_kwargs = kwargs if min_history is None: if n is N...
(function (root, factory) { 'use strict'; if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define([ 'underscore', 'backbone', './item-view'], factory); } else if (typeof exports === 'object') { // CommonJS. module.exports = factory( ...
require('./_common.js'); var dns = require('dns'); test.expect(2); dns.resolve4('www.strongloop.com', function(err, addresses) { if (err) { throw err; } test.ok(typeof addresses === 'object'); test.ok(zone === zone.root); test.done(); });
# Note that the code for plot_stats_new_trial() and plot_best is my own from __future__ import print_function import copy import warnings import graphviz import matplotlib.pyplot as plt import numpy as np import neat FONTSIZE = 16 def plot_stats_new_trial(a, b, c, d, filename=''): """ This function combines...
var Vlasnik = require('../models/Vlasnik.js'); module.exports.create = function (req, res) { var vlasn = new Vlasnik(req.body); vlasn.save(function (err, result) { res.json(result); }); } module.exports.list = function (req, res) { Vlasnik.find({}, function (err, results) { res.json(results...
from django.test import TestCase import mock from mail.mails import create_mailgun_conference_route class TestMail(TestCase): @mock.patch('mail.mails.requests.post') def test_create_mailgun_conference_route_poster(self, mock_post): create_mailgun_conference_route('this', 'poster') mock_post.a...
angular.module('Aggie') .controller('SourcesShowController', [ '$scope', '$rootScope', '$stateParams', 'Source', 'source', 'Tags', 'FlashService', function($scope, $rootScope, $stateParams, Source, source, Tags, flash) { $scope.source = source; Source.resetUnreadErrorCount({ id: source._id }, s...
const should = require('should'); const _ = require('lodash'); const validate = require('../lib/index'); const FIELDS = ['required', 'email', 'string', 'number', 'array', 'boolean']; describe('Validate Data', function() { describe('Error Handling', function() { it('should throw error #1 - without any argu...
var Url = require('url'); var https = require('https'); module.exports.ActivEdgeMpsApi = function (url, apikey) { var obj = {}; obj.url = url; obj.apikey = apikey; obj.connectedNodes = {} obj.Init = function (cb) { obj.GetNodesAndCookie(cb); } // Get list of connected AMT nodes ...
// Grin, your overlay friend // Adds all necessary stuff for you. import { Overlay } from 'trading-vue-js' export default { name: 'Grin', mixins: [Overlay], methods: { meta_info() { return { author: 'C451', version: '2.0.0' } }, ...
"use strict"; module.exports = { attributes: { id: { type: Sequelize.INTEGER, primaryKey: true, autoIncrement: true } }, associations: function() { }, options: { tableName: 'Join_User_LikedCourses_Course', underscored: true, freezeTableName: true, timestamps: true, ...
ace.define("ace/theme/katzenmilch", ["require", "exports", "module", "ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssClass = "ace-katzenmilch"; exports.cssText = ".ace-katzenmilch .ace_gutter,\ .ace-katzenmilch .ace_gutter {\ background: #e8e8e8;\ color: #333\ }\ .ace-katz...
var util = require("util"); var https = require("https"); var parseString = require('xml2js').parseString; function CucmPerfmonSession(cucmServerUrl, cucmUser, cucmPassword) { this._OPTIONS = { host: cucmServerUrl, // The IP Address of the Communications Manager Server port: 8443, // Clearly port 8443 for...
import path from 'ramda/src/path'; import { buildATIPageTrackPath } from '../../atiUrl'; import { getPublishedDatetime, LIBRARY_VERSION, } from '../../../../lib/analyticsUtils'; export const buildCpsAssetPageATIParams = ( pageData, requestContext, serviceContext, ) => { const { platform, statsDestination }...
// sets focus on the slider, and sets its value to five stars let slider = testPageDocument.querySelector('[role="slider"]'); slider.setAttribute('aria-valuenow', '5'); slider.setAttribute('aria-valuetext', 'five of five stars'); slider.focus();
from fishualize.fish_functions import * get_data()
$(window).on("load",function(){Morris.Area({element:"smooth-area-chart",data:[{year:"2010",iphone:0,samsung:0},{year:"2011",iphone:150,samsung:90},{year:"2012",iphone:140,samsung:120},{year:"2013",iphone:105,samsung:240},{year:"2014",iphone:190,samsung:140},{year:"2015",iphone:230,samsung:250},{year:"2016",iphone:270,s...
/*! { "name": "DOM4 MutationObserver", "property": "mutationobserver", "caniuse": "mutationobserver", "tags": ["dom"], "authors": ["Karel Sedláček (@ksdlck)"], "polyfills": ["mutationobservers"], "notes": [{ "name": "MDN documentation", "href": "https://developer.mozilla.org/en-US/docs/Web/API/Mut...
import { Button, Icon, Popover, Checkbox, Popconfirm } from 'antd' import Sortable, { SortableContainer } from 'react-anything-sortable' const RefundDisplay = ({ displayVisible, userAttrList, userDisplayList, userDisplayListTemp, userDisplayMap, onUpdateState, onReset, onUpdate, }) => { const handle...
'use strict'; module.exports = { db: 'mongodb://tsdriverapp:tsdriverapp@ds011765.mlab.com:11765/tsdriverapp', app: { title: 'tsdriverapp - Development Environment' }, facebook: { clientID: process.env.FACEBOOK_ID || 'APP_ID', clientSecret: process.env.FACEBOOK_SECRET || 'APP_SECRET', callbackURL: '/auth/fa...
import styled from 'styled-components' export const Input = styled.input` width:100%; height : 35px; margin-bottom:1em; padding: 0 1em; box-sizing:border-box; border:none; box-shadow: 0 0 0 1px #E5E5E5; border-radius : 50px; background-color: transparent; position:relative; z-index:1; outline :...
import expect from 'expect'; import MockRedis from '../../src'; describe('incr', () => { it('should increment an integer', () => { const redis = new MockRedis({ data: { user_next: '1', }, }); return redis .incr('user_next') .then(userNext => expect(userNext).toBe(2)) ...
from __future__ import unicode_literals from django.contrib.auth import get_user_model from django.utils.text import Truncator from document.models import Topic, Project, Chapter from rest_framework import serializers from utils.custom_serializers import DateTimeField class UserSerializer(serializers.ModelSerializer...
'use strict'; /** * Test: Project Install Action * - Creates a new private in your system's temp directory * - Deletes the CF stack created by the private */ let Serverless = require('../../../lib/Serverless'), SError = require('../../../lib/Error'), path = require('path'), os = requir...
/*! * Select2 4.0.3 * https://select2.github.io * * Released under the MIT license * https://github.com/select2/select2/blob/master/LICENSE.md */ (function (factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['jquery'], factory); } ...
/* Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ CKEDITOR.plugins.setLang( 'smiley', 'nb', { options: 'Alternativer for smil', title: 'Sett inn smil', toolbar: 'Smil' } );
var RUNNING_TRACK_COLOR = "#ff7200", RUNNING_TRACK_WIDTH = 5, RUNNING_MILLESIMAL_SPEED = 1000; function FlowRunTrackInfor(config) { this.eleId = config.eleId; this.isIELowVer = config.isIELowVer || false; this._config = config || {}; this.action = config.action || ''; this.processInstanceId = config.processI...
'''OpenGL extension OES.texture_mirrored_repeat This module customises the behaviour of the OpenGL.raw.GLES1.OES.texture_mirrored_repeat to provide a more Python-friendly API Overview (from the spec) This extension extends the set of texture wrap modes to include a mode (GL_MIRRORED_REPEAT) that effect...
class JsonEditorREST { constructor() { this.sceneObject = null; //container { this.div = jQuery('<div/>', { id : 'jsonEditorContainer', style: 'width: 100%' }) } { this.jsonEditor = new JSONEditor(this.div[0], { modes : ['tree', 'code'] , onChange : $.proxy(this.onCh...
import { connect } from 'react-redux' import { withRouter } from 'react-router-dom' import { actions } from '../modules' import PurchaseOrder from '../components/PurchaseOrder' const mapDispatchToProps = { ...actions } const mapStateToProps = (state) => ({ status: state.purchaseOrder }) export default withRouter...
import { mount } from '@vue/test-utils'; import TagsTableRow from '~/modules/repositories/components/tags/tags-table-row'; import sinon from 'sinon'; describe('tags-table-row', () => { let wrapper; const tag = [ { id: 1, name: 'latest', author: { id: 2, name: 'vitoravelino',...
define(["jquery","core/notification","core/str","core/templates","mod_lti/form-field","core/modal_factory","core/modal_events"],function(a,b,c,d,e,f,g){var h,i={init:function(a,e){var i={url:a,postData:e},j=d.render("mod_lti/contentitem",i);return h?(h.setBody(j),void h.show()):void c.get_string("selectcontent","lti")....
module.exports = { rules: { // ==================================================== // Color // ==================================================== // Specify lowercase or uppercase for hex colors (Autofixable). // MAJOR: null 'color-hex-case': 'upper', // Specify short or long notation...
import styled from 'styled-components'; export default styled.button` cursor: pointer; color: #fff; background-color: #6c757d; border-color: #6c757d; display: inline-block; font-weight: 400; text-align: center; vertical-align: middle; -webkit-user-select: none; -moz-user-select: ...
"use strict"; /// <reference path="./typings/main.d.ts" /> var Library = (function () { function Library(nameArg) { this.name = nameArg; } ; Library.prototype.addAlbum = function (albumArg) { this.albums.push(albumArg); }; return Library; }()); exports.Library = Library; var Albu...
#coding:utf-8 import ftplib import sys,socket def ftpburp(ip,port): with open('ftp\user.txt','r') as user: users = user.readlines() with open('ftp\pass.txt','r') as passs: pwds = passs.readlines() user.close() passs.close() addr = (ip, int(port)) sock_21 = socket.socket(so...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from snakeskin.protos.token import prover_pb2 as snakeskin_dot_protos_dot_token_dot_prover__pb2 class ProverStub(object): """Prover provides support to clients for the creation of FabToken transactions, and to query the ledger. "...
/* robot_gui.js - Version 1.0 2013-09-29 An HTML5/rosbridge script to control and monitor a ROS robot Created for the Pi Robot Project: http://www.pirobot.org Copyright (c) 2013 Patrick Goebel. All rights reserved. This program is free software; you can redistribute it and/or modify it under th...
require('@babel/register'); ({ ignore: /node_modules/ }); require('@babel/polyfill'); const HDWalletProvider = require('@truffle/hdwallet-provider'); let mnemonic = 'include clog swift suggest firm crater remind artwork half knee bone gift'; let testAccounts = [ "0x92aebdd941fdbc1cc048b450ae8f5070d230a0806aaa831...
module.exports={A:{A:{"1":"F A B","2":"iB","8":"L D H"},B:{"1":"C E d K N I J AB"},C:{"1":"0 1 2 3 4 6 7 8 9 fB FB G L D H F A B C E d K N I J O P Q R S T U V W X Y Z a b c e f g h i j k l m n o M q r s t u v w x y z JB BB CB DB GB HB ZB YB"},D:{"1":"0 1 2 3 4 6 7 8 9 G L D H F A B C E d K N I J O P Q R S T U V W X Y Z...
#!/usr/bin/env python # -*- coding: utf-8 -*- # tifffile.py # Copyright (c) 2008-2014, Christoph Gohlke # Copyright (c) 2008-2014, The Regents of the University of California # Produced at the Laboratory for Fluorescence Dynamics # All rights reserved. # # Redistribution and use in source and binary forms, with or wit...
const auth = require("../../middlewares/authorize"); const multer = require("../../middlewares/multer-config"); const bcrypt = require("bcrypt"); const { User } = require("../../config/dbConfig"); const jwt = require("jsonwebtoken"); const Cookies = require('cookies'); module.exports = (app) => { app.post("/api/lo...
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.rexswipe = factory()); })(this, (function () { ...
(function () { 'use strict'; angular .module('core') .run(routeFilter); routeFilter.$inject = ['$rootScope', '$state', 'Authentication']; function routeFilter($rootScope, $state, Authentication) { $rootScope.$on('$stateChangeStart', stateChangeStart); $rootScope.$on('$stateChangeSuccess', sta...
import dash import dash_core_components as dcc import dash_html_components as html import os import plotly.graph_objs as go import pandas as pd import weather_wind.data_retrieval.wind_power import weather_wind.visualisation.wind_power import weather_wind.visualisation.weather_forecast from weather_wind.visualisation...
let transactions = []; let myChart; fetch("/api/transaction") .then(response => { return response.json(); }) .then(data => { // save db data on global variable transactions = data; populateTotal(); populateTable(); populateChart(); }); function populateTotal() { // reduce transacti...
//VSCode Run support===================================================================================== //为便于在JS IDE如VSCode,webStorm里脱离APP环境执行JS,以快速验证JS代码正确性 //用g_isNativeEnvironment检查是否在App环境, //如果不在App环境,Native接口重定向到JS同名函数打印调用 //jsFlutterRequire 转调Node运行环境中的require //如果不能运行,核对下js_ide_node_run_support.js文件中jsFlutter...
/*globals Ember*/ /*jshint eqnull:true*/ /** @module ember-data */ import normalizeModelName from "ember-data/system/normalize-model-name"; import { InvalidError } from 'ember-data/adapters/errors'; import { Map } from "ember-data/system/map"; import { promiseArray, promiseObject } from "ember-data/system/...
import renderer from 'react-test-renderer'; import Incrementor from '../Incrementor' describe('Incrementor UI', () => { it('has the expected UI output', () => { const tree = renderer.create(<Incrementor />); expect(tree.toJSON()).toMatchSnapshot(); }); });
((typeof self !== 'undefined' ? self : this)["webpackJsonpadvanced_import"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpadvanced_import"] || []).push([[2],{ /***/ "1331": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2017-2019 Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
/** * [y] hybris Platform * * Copyright (c) 2000-2014 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * ...
'use strict'; var isImplemented = require('../../../object/define-properties/is-implemented'); module.exports = function (a) { a(isImplemented(), true); };
/** * First we will load all of this project's JavaScript dependencies which * includes Vue and other libraries. It is a great starting point when * building robust, powerful web applications using Vue and Laravel. */ require('./tienda/bootstrap'); require('./comun');
var levenshtein = require('fast-levenshtein'); function prepareString(something, toLowercase = true) { if ( something.toString !== undefined && typeof something.toString == 'function' && something.toString() != '[object Object]' ) { something = something.toString(); } else...
require('dotenv').config(); const axios = require('axios'); const END_POINT_42_API = 'https://api.intra.42.fr'; const AuthUtils = { getToken: async function () { const data = { grant_type: 'client_credentials', client_id: process.env.FORTYTWO_CLIENT_ID, client_secret: process.env.FORTYTWO_CLIENT...
/*! * devextreme-vue * Version: 19.2.5 * Build date: Mon Dec 16 2019 * * Copyright (c) 2012 - 2019 Developer Express Inc. ALL RIGHTS RESERVED * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file in the root of the project for details. * * https://github....
/** * @package Extly.Components * @subpackage com_autotweet - AutoTweet posts content to social channels * (Twitter, Facebook, LinkedIn, etc). * * @author Prieco S.A. * @copyright Copyright (C) 2007 - 2015 Prieco, S.A. All rights reserved. * @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL ...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilitie...
$(document).ready(function() { $("#absence1").change(function() { var absencelundi = document.getElementById("absence1").value; visibilityAbsenceTime(absencelundi, "1"); }) $("#absence2").change(function() { var absencemardi = document.getElementById("absence2").value; ...
NDSearch.OnPrefixDataLoaded("ser",["Section"],[["Server",,[[,"TCP/IP Server/Client init",,,0,"File4:shunt_tlm.h:TCP/IP_Server/Client_init"]]]]);
import React from 'react' import { Link } from 'gatsby' import Layout from '../../components/Layout' import BlogRoll from '../../components/BlogRoll' import contestIcon from '../../img/contest.svg'; import challengesIcon from '../../img/challenges.svg'; import blogIcon from '../../img/blog.svg'; import announcementIco...
"use strict"; var _babelHelpers = require("./utils/babelHelpers.js"); exports.__esModule = true; var _react = _babelHelpers.interopRequireDefault(require("react")); var _Icon = require("./Icon"); var _fragments = require("./fragments"); var RoundLaptopChromebook = /*#__PURE__*/ function RoundLaptopChromebook(prop...
const aoh = require('./src/aoh'); // const homeUrl = 'http://aoh.org.uk/house/'; const artistUrl = 'http://aoh.org.uk/artist/'; const output = './output'; // const options = { // housesIndex: 'houses.html', // artistsIndex: 'artists.html', // dirIndex: './output', // housesDir: 'houses', // artistsDir: 'art...
import 'jest-styled-components'; import React from 'react'; import { render, cleanup } from 'react-testing-library'; import TableBody from '../TableBody'; afterEach(cleanup); test('<TableBody /> should render correctly', () => { const { container } = render(<TableBody />); expect(container.firstChild).toMatchSna...
export default function appReducer(state={editPostOpen:false, editPost:{}, editType:'post', location:'category'}, action) { switch (action.type) { //set the editPostOpen property in the application state case "OPEN_EDIT_POST": { return {editPostOpen:action.open, editPost:action.post, editType...
from django.contrib.auth.models import User from django.db import models from rest_framework.authtoken.models import Token from django.db.models.signals import post_save from django.dispatch import receiver class Game(models.Model): game_name = models.CharField(max_length=200) year = models.IntegerField("Ano...
/* * pass the id of an audio element */ function Sound(audioId, howManyChannels) { if(!howManyChannels) howManyChannels = 3; var nextChannel = 0; var channels = new Array(howManyChannels); var src; try{ src = document.getElementById(audioId).src; } catch(e){e.message+="\nSound not created."; throw e;} for(va...
/*! ========================================================= * Vue Argon Dashboard PRO - v1.1.0 ========================================================= * Product Page: https://www.creative-tim.com/product/argon-dashboard * Copyright 2019 Creative Tim (https://www.creative-tim.com) * Coded by www.creative-tim.com ...
import logging from instruction import Instruction class Pop_Instruction(Instruction): def __init__(self, location): self.location = location def dump(self, vm_state): return "[{:04X}] POP {:0}".format(vm_state["instruction_pointer"]-2, self.location) def execute(self, vm_state): ...
/* eslint-env mocha */ 'use strict' const { expect } = require('interface-ipfs-core/src/utils/mocha') const testHttpMethod = require('../../utils/test-http-method') const http = require('../../utils/http') const sinon = require('sinon') describe('/dns', () => { let ipfs beforeEach(() => { ipfs = { dns:...
import assert from 'assert'; import { HDSegwitElectrumSeedP2WPKHWallet, HDLegacyBreadwalletWallet, HDSegwitBech32Wallet, HDLegacyElectrumSeedP2PKHWallet, LegacyWallet, SegwitP2SHWallet, SegwitBech32Wallet, HDLegacyP2PKHWallet, HDSegwitP2SHWallet, WatchOnlyWallet, HDAezeedWallet, SLIP39SegwitP2SH...
// Copyright(c) 2019 Google LLC. // // 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 w...
T = int(input()) for x in range(1, T + 1): N, P = map(int, input().split()) S = map(int, input().split()) S = sorted(S, reverse = True) y = hours = sum(S[0] - s for s in S[:P]) for i in range(1, N - P + 1): hours -= (S[i - 1] - S[i]) * (P - 1) hours += S[i] - S[P + i - 1] if ...
from sapextractor.algo.p2p import p2p_1d_dataframe from pm4py.objects.conversion.log import converter as log_converter from pm4py.objects.log.util import sorting from pm4py.objects.log.exporter.xes import exporter as xes_exporter def apply(con, ref_type="EKKO", gjahr="2014", min_extr_date="2014-01-01 00:00:00", mandt...
var vport_internal__dev_8h = [ [ "ovs_internal_dev_get_vport", "vport-internal__dev_8h.html#a0babd16c94fbb92aecdf8a9ec8a1a380", null ], [ "ovs_internal_dev_rtnl_link_register", "vport-internal__dev_8h.html#ac6d8a2dd3cdef9e9ba9efdd4e0656f7c", null ], [ "ovs_internal_dev_rtnl_link_unregister", "vport-internal...
import itertools import math import pickle import random from libtbx.phil import parse master_phil = parse( """ nrefl = 0 .type = int shoebox_size { x = 10 .type = int y = 10 .type = int z = 10 .type = int } spot_size { x = 1.0 .type = float y = 1.0 .type = float z = 1.0 .typ...
import { addressFields, mapFields, objectFields, phoneFields, TYPES_OF_MENU_ITEM, } from '../../../common/constants/listOfFields'; import { emailValidationRegExp, objectURLValidationRegExp, phoneNameValidationRegExp, } from '../../../common/constants/validation'; import { regexCoordsLatitude, regexCoord...
import logging import traceback from django.core.exceptions import EmptyResultSet from django.utils import timezone from silk.collector import DataCollector from silk.config import SilkyConfig Logger = logging.getLogger('silk.sql') def _should_wrap(sql_query): if not DataCollector().request: return Fal...
import numpy as np import pandas as pd import torch import torch.nn as nn from sklearn.model_selection import train_test_split from sklearn.metrics import classification_report import transformers from transformers import AutoModel, BertTokenizerFast, BertConfig, AutoTokenizer, BertTokenizer, XLMRobertaConfig, XLMRober...
// (C) Copyright 2015 Martin Dougiamas // // 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 agre...
import { computed, reactive, onMounted } from '@vue/composition-api' import { addCategory, categoriesStore, fetchCategories, removeCategory } from '../store/categories' import { useSubmitting } from '../../core/compositions/submitting' import categoriesService from '../../../services/categories-service' import ...
function createGeneration(width, height) { var generation = new Array(height); for(var y = 0; y < height; y++) { generation[y] = []; for(var x = 0; x < width; x++) { generation[y][x] = Math.floor(Math.random() * 2); } } return generation; } function draw(context2d, generation, totalGeneratio...
/*! ramp-pcar 31-03-2015 19:53:59 : v. 5.2.0 * * RAMP GIS viewer - Elk; Sample of an implementation of RAMP **/ define(["dojo/_base/declare","dojo/_base/lang","dojo/query","dojo/_base/array","dojo/dom-class","dojo/dom-attr","dojo/dom-construct","dojo/topic","dojo/on","dojo/Deferred","dojo/text!./templates/datagri...
/* Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ CKEDITOR.plugins.setLang( 'format', 'cy', { label: 'Fformat', panelTitle: 'Fformat Paragraff', tag_address: 'Cyfeiriad', tag_div: 'Normal (DIV)'...
import buildLocalizeFn from '../../../_lib/buildLocalizeFn/index.js' import buildLocalizeArrayFn from '../../../_lib/buildLocalizeArrayFn/index.js' var weekdayValues = { narrow: ['ne', 'po', 'ut', 'st', 'št', 'pi', 'so'], short: ['neď', 'pon', 'uto', 'str', 'štv', 'pia', 'sob'], long: ['nedeľa', 'pondelok', 'uto...
/* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch B.V. licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not u...