text stringlengths 3 1.05M |
|---|
"use strict";
exports.default = void 0;
var _renderer = _interopRequireDefault(require("../../core/renderer"));
var _events_engine = _interopRequireDefault(require("../../events/core/events_engine"));
var _guid = _interopRequireDefault(require("../../core/guid"));
var _uiForm = _interopRequireDefault(require("./ui... |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//--------------------------------... |
import { html, render, nothing } from '../node_modules/lit-html/lit-html.js'
import page from '../node_modules/page/page.mjs'
import { createFormObject, showNotification } from '../src/helper.js'
import { memes } from '../requests/req.js'
import { notifications } from '../components/notification.js'
const createMeme =... |
from unittest import mock
import pytest
from django.conf import settings
from critical.utils import (
complete_url,
django_cms_is_present,
get_url_from_request,
use_critical_css_for_request,
)
try:
from cms.api import create_page, publish_page
from cms.models import Page
except ImportError:
... |
# Practice_#1
# Quick Brown Fox
# Use a for loop to take a list and print each element of the list in its own line.
sentence = ["the", "quick", "brown", "fox", "jumped", "over", "the", "lazy", "dog"]
# Method_#1
for word in sentence:
print(word)
# Method_#2
'''
for index in range(0, len(sentence) ):
prin... |
var blackTheme = {
'common.bi.image': 'http://localhost:8080/src/image/editor-logo.png',
'common.bisize.width': '190px',
'common.backgroundImage': 'none',
'common.backgroundColor': '#1e1e1e',
'common.border': '0px',
// header
'header.backgroundImage': 'none',
'header.backgroundColor': '... |
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
define([
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/shipping-rate-processor/new-address',
'Magento_Checkout/js/model/shipping-rate-processor/customer-address'
], function (quote, defaultProc... |
"""Utility script to generate copies of icons with colors based
on our themes. Necessary workaround because qt does not allow
for styling svg elements using qss
"""
import os
import re
import shutil
import sys
from subprocess import SubprocessError, check_call
from typing import Dict, List, Tuple
from ..utils.theme i... |
/** @license
* Copyright 2016 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
describe('UI', () => {
const Util = shaka.test.Util;
const UiUtils = shaka.test.UiUtils;
/** @type {!jasmine.Spy} */
let onErrorSpy;
/** @type {!HTMLVideoElement} */
let video;
/** @type {!HTMLElement} */
let videoCo... |
/*
* Kendo UI Complete v2014.1.318 (http://kendoui.com)
* Copyright 2014 Telerik AD. All rights reserved.
*
* Kendo UI Complete commercial licenses may be obtained at
* http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
* If you do not own a commercial license, this file shall be governed by the trial ... |
var PrimitivePoints = (
function () {
var vertexShader;
var fragmentShader;
var geometry;
var appearance;
var viewer;
function _(options) {
viewer = options.viewer;
vertexShader = VSPolylie();
fragmentShader = FSPolyline();
... |
import styled from 'styled-components'
import { borderColor } from '../../constants/colors'
export const Container = styled.div`
position: fixed;
bottom: 0;
width: 100%;
background-color: white;
`
export const ContainerFooter = styled.div`
display: flex;
justify-content: space-around;
alig... |
import Joi from 'joi'
import { coveragePercentage } from '../color-formatters.js'
import { BaseSvgScrapingService } from '../index.js'
import { parseJson } from '../../core/base-service/json.js'
// https://docs.codecov.io/reference#totals
// A new repository that's been added but never had any coverage reports
// uplo... |
// Copyright 2017 the V8 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.
// Flags: --allow-natives-syntax
var v = {}
function foo() {
v[0] = 5;
v[-0] = 27;
return v[0];
}
assertEquals(27, foo());
%OptimizeFunctionOnN... |
const pessoas = [
{nome: 'Luiz', idade: 62},
{nome: 'Maria', idade: 23},
{nome: 'Eduardo', idade: 55},
{nome: 'Letícia', idade: 19},
{nome: 'Rosana', idade: 32},
{nome: 'Wallace', idade: 47}
];
// Retorne as pessoas que tem o nome com 5 letras ou mais
const cincoOuMais = pessoas.filter(pessoa => pessoa.nom... |
var app=getApp();//获取appid
var rand=require('../../utils/random.js');//获取随机数
var sign=require('../../utils/sign.js');//获取签名
Page({
data:{
changeData:"",
pramName:"" ,
realname:""
},
onLoad:function(options){
wx.setNavigationBarTitle({
title: '修改'+options.barName
})
... |
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.getTextOperation = exports.findDiff = void 0;
const ot_1 = require('ot');
const lcs_1 = require('./lcs');
const MAX_DIFF_SIZE = 10000;
function findDiff(originalText, modifiedText, pretty) {
return lcs_1.stringDiff(originalText, ... |
import React from 'react';
import Header from 'gatsby-theme-carbon/src/components/Header';
const CustomHeader = props => (
<Header {...props}>
Black Music album Review <span>by planet.ky</span>
</Header>
);
export default CustomHeader;
|
import sys, os, random, argparse, re, collections
import numpy as np
import tensorflow as tf
from tensorflow.contrib import nccl
from gensim.models import Word2Vec
from collections import defaultdict
from scipy.stats import truncnorm
import sentencepiece as spm
sys.path.append('models')
sys.path.insert(0, os.path.absp... |
const asyncServer = require("./async-reply");
const benchmark = require("./benchmark");
const MaxParallel = 16;
const srv1 = asyncServer("test_salt_1");
const srv2 = asyncServer("test_salt_2");
const srv3 = asyncServer("test_salt_3");
const srv4 = asyncServer("test_salt_4");
if (process.argv.indexOf("-n") + process.a... |
/*global Poof */
/*global Package */
/*global Import */
/*global Class */
/*global JourneyToOzScrollController */
/*global OverlayController */
/*global Modernizr */
/*global JourneyToOzPage1 */
/*global Analytics */
Package('page',
[
Import('page.OzPageBase'),
Import('controller.JourneyToOzScrollController'),
Cl... |
export const PrinterFill = {
name: 'printer',
theme: 'fill',
icon: '<svg viewBox="64 64 896 896" focusable="false"><path d="M732 120c0-4.4-3.6-8-8-8H300c-4.4 0-8 3.6-8 8v148h440V120zm120 212H172c-44.2 0-80 35.8-80 80v328c0 17.7 14.3 32 32 32h168v132c0 4.4 3.6 8 8 8h424c4.4 0 8-3.6 8-8V772h168c17.7 0 32-14.3... |
import * as React from "react"
import ContentBottomRegion from "../regions/content-bottom"
import { styles } from "../../styles/layout/content-bottom.module.scss"
const ContentBottomLayout = () => {
return (
<div className={styles}>
<ContentBottomRegion />
</div>
)
}
export default ContentBottomLa... |
#!/usr/bin/env python
import sys
sys.path.append("../")
from logparser import MoLFI, evaluator
import os
import pandas as pd
input_dir = "../logs/" # The input directory of log file
output_dir = "MoLFI_result/" # The output directory of parsing results
benchmark_settings = {
"HDFS": {
... |
/// Waves API Mock
/// See:
/// curl "http://localhost:3000/waves-api/transactions/address/3PJ4q4sqriJs2y7Z45wmbLrbmV9MDecbPxD/limit/25"
/// curl "https://nodes.wavesnodes.com/transactions/address/3PJ4q4sqriJs2y7Z45wmbLrbmV9MDecbPxD/limit/25"
/// curl http://localhost:8420/v1/waves/3PJ4q4sqriJs2y7Z45wmbLrbmV9MDecbPxD
m... |
/*!
* 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(['sap/ui/Device','sap/ui/base/DataType','sap/ui/base/EventProvider','sap/ui/core/Control','sap/base/util/ObjectPath','sap/ui/core/library',"sap/base/string... |
webpackJsonp([0],{"+7Yw":function(t,n,e){"use strict";e("te0Z")},"+DfV":function(t,n,e){"use strict";var r=e("9j4o"),i=e("pSFt");n.a=function(t){"function"!=typeof t&&(t=e.i(r.i)(t));for(var n=this._groups,o=n.length,a=new Array(o),u=0;u<o;++u)for(var s,c=n[u],f=c.length,l=a[u]=[],h=0;h<f;++h)(s=c[h])&&t.call(s,s.__dat... |
import { library } from "@fortawesome/fontawesome-svg-core";
import {
faTrash,
faSignOutAlt,
faEdit,
faSpinner,
faPlusCircle,
faPhone,
faEnvelope,
faMapMarkedAlt,
faLock,
} from "@fortawesome/free-solid-svg-icons";
const Icons = () => {
return library.add(
faTrash,
faSignOutAlt,
faEdit... |
'use strict'
const Controller = require('egg').Controller;
class UserController extends Controller {
async info() {
const { ctx } = this
ctx.body = 'hi, user'
}
async signup() {
const { ctx } = this
const info = ctx.request.body
const res = await ctx.service.user.signup(info)
ctx.body = {
status: 2... |
'use strict';
var https = require('https');
var fs = require('fs');
const args = process.argv;
const arg = args[2];
const separator = args[3] || ',';
let mode = 'default';
let json = '';
if (arg === 'save') {
mode = 'save';
} else if (arg === 'parse') {
mode = 'parse';
}
const options = {
host: 'bitnode... |
import os, sys
import json
import argparse
import pandas as pd
import torch
from EVE.model import VAE_model
from EVE.utils import data_utils
def compute_evol_indices(
MSA_data_folder,
MSA_list,
protein_index,
MSA_weights_location,
theta_reweighting,
VAE_checkpoint_location,
model_paramete... |
module.exports = {
preset: "ts-jest",
testEnvironment: "jsdom",
testMatch: ["**/tests/**/*-test.[jt]s?(x)"],
};
|
var server = require('../../server');
var ds = server.dataSources.mysqlProser;
var lbTables = [
'MainAudit',
'MainCdr',
'InvSchedule',
'InvService',
'InvClient',
'InvBreak',
'InvQueue',
'InvAgent',
'InvScale',
'InvCampaign',
'InvSupervisor',
'HcaQueue',
'HcaAgent',
];
ds.automigrate(lbTables... |
const { basename, join, relative, resolve } = require('path')
const { PAGE_FILENAME } = require('../../util/page')
const { write } = require('../../util/file')
const { titleize } = require('../../util/string')
exports.desc = 'Create a basic structure and config file'
exports.builder = argv =>
argv
.string('dir'... |
/* ***************************************************************************
*
* Copyright (c) 2021, the iexjs authors.
*
* This file is part of the iexjs library, distributed under the terms of
* the Apache License 2.0. The full license can be found in the LICENSE file.
*
*/
export * from "./analystRecommend... |
const TaskService = require('../../../services/taskService');
const PermissionChecker = require('../../../services/iam/permissionChecker');
const permissions = require('../../../security/permissions')
.values;
const schema = `
taskDestroy(ids: [String!]!): Boolean
`;
const resolver = {
taskDestroy: async (root,... |
$(document).ready(function() {
UESContainer.renderGadget('store-gadget-div', portalGadgets.store);
// counters when generating node IDs
var nodeCounter = 0;
var newCounter = 0;
var tabId = 0;
// form : http://stackoverflow.com/questions/979975/how-to-get-the-value-from-url-parameter {{##
var queryString = f... |
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.d... |
# -*- coding: utf-8 -*-
# Copyright (c) 2019, Neel Singh and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class PayDetails(Document):
pass
|
/* jshint indent: 1 */
module.exports = function(sequelize, DataTypes) {
return sequelize.define('restcommTranscriptions', {
sid: {
type: DataTypes.STRING(34),
allowNull: false,
primaryKey: true,
field: 'sid'
},
dateCreated: {
type: DataTypes.DATE,
allowNull: false,
field: 'date_created'
... |
import wrDisbounce from './src/disbounce.vue'
wrDisbounce.install = function(Vue) {
Vue.component(wrDisbounce.name)
}
export default wrDisbounce |
/*
AngularJS v1.6.7
(c) 2010-2017 Google, Inc. http://angularjs.org
License: MIT
*/
(function(S,q){'use strict';function Ea(a,b,c){if(!a)throw Pa("areq",b||"?",c||"required");return a}function Fa(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;V(a)&&(a=a.join(" "));V(b)&&(b=b.join(" "));return a+" "+b}function... |
/*! For license information please see 2.28d00783.chunk.js.LICENSE.txt */
(this.webpackJsonpfrontend=this.webpackJsonpfrontend||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(34)},function(e,t,n){var r,o=n(56),i=n(23),a=n(58),l=n(59),s=n(60);"undefined"!==typeof ArrayBuffer&&(r=n(61));var u="undefined"!==typeo... |
document.getElementById("submit-btn").addEventListener("click", (e) => {
// e.preventDefault();
const body = {
body: document.getElementById("comment-area").value,
author: document.getElementById("author").value,
id: document.getElementById("title").getAttribute("data-id")
}
// ... |
const User = require("../../../../models/user.js");
module.exports = async function handleAnonDisconnect({io, chessGame, opponentColor, user}) {
if(chessGame.isGameOver) {
const turn = user.activeGameColor === "w" ? "white" : "black";
io.to(chessGame[opponentColor].socketId).emit("action", {
... |
import sys
import numpy as np
from src.classifier.classifier_training.training import train_classifier
from src.classifier.classifier_evaluation.eval_on_testset import evaluate_on_test_set
from src.regard_prediction.inference import predict
from src.classifier.utils import get_data
from src.classifier.classifier_tun... |
from http.server import HTTPServer, BaseHTTPRequestHandler
class Serv(BaseHTTPRequestHandler):
def do_Get(self):
if self.path == '/':
self.path = '/index.html'
try:
file_to_open = open(self.path(1:l).read())
self.send_response(200)
except:
file_to_open = "file not fount"
... |
import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'
const root = document.getElementById('{{PKG_NAME}}')
ReactDOM.render((
<App/>
), root)
|
/* global $:true */
+function ($) {
"use strict";
/**
* 首字母索引
* @param {*object} params
*/
var Index = function (params) {
this.params = params;
this.tpl = $.t7(this.params.indexListTemplate).compile();
};
Index.prototype.render = function (list) {
this.list = $(list || ".list");
... |
/* jscs:disable */
'use strict';
let webpackConfig = require('./webpack.config.js');
webpackConfig.module.postLoaders = webpackConfig.module.postLoaders || [];
webpackConfig.module.postLoaders.push({
test: /\.js$/,
exclude: /(test|node_modules|bower_components)\//,
loader: 'istanbul-instrumenter'
});
module.ex... |
var class_socket_1_1_quobject_1_1_socket_io_client_dot_net_1_1_client_1_1_client_on_1_1_handle_impl =
[
[ "HandleImpl", "class_socket_1_1_quobject_1_1_socket_io_client_dot_net_1_1_client_1_1_client_on_1_1_handle_impl.html#aaa771a20d218ed5de2edf8f39d18aa20", null ],
[ "Destroy", "class_socket_1_1_quobject_1_1_so... |
const { Base } = require("./base.error");
class PaymentError extends Base {
constructor(code = 402,message) {
super({
message,
status: 402,
code,
});
}
}
module.exports = {
PaymentError,
};
|
/* *
*
* (c) 2016 Highsoft AS
* Author: Øystein Moseng
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
'use strict';
import U from '../Core/Utilities.js';
var extend = U.extend, pick = U.pick;
var min = Math.min, max = Math.max, a... |
module.exports = {
semi: true, // 语句后加分号
trailingComma: 'all', // 尾随逗号(none |es5 | all)
singleQuote: true, // 使用单引号
printWidth: 80, // 每一行的最大长度, 尽量和编辑器保持一致
tabWidth: 2, // Tab 缩进的长度
useTabs: true, // 使用 Tab 缩进
endOfLine: 'auto', // 文件尾部换行的形式
arrowParens: 'always', // 箭头函数参数使用小括号包裹
};
|
/**
* @license Apache-2.0
*
* Copyright (c) 2020 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) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above ... |
/* Copyright (C) 2017 ethbets
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD license. See the LICENSE file for details.
*/
// Extract from: https://github.com/ethereum/go-ethereum/blob/aa9fff3e68b1def0a9a22009c233150bf9ba481f/jsre/ethereum_js.go#L2288
import ... |
# Copyright (c) AIRBUS 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.
# Plot utilities outside of the main library, needs additional dependencies like seaborn.
from __future__ import annotations
from typing import List
im... |
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("omi"));
else if(typeof define === 'function' && define.amd)
define(["omi"], factory);
else if(typeof exports === 'object')
exports["switch-video-two-tone"]... |
from django import forms
from .models import RotatorAdminPanel
from .snippets import flare
class RotatorAdminPanelForm(forms.ModelForm):
class Meta:
model = RotatorAdminPanel
fields = (
"max_steps", "max_user_plans", "lurk_plan_cooldown",
"evaluated_plan_cooldown",
)
... |
var Dq = require('dom-queue');
module.exports = function (parentSelector, items) {
var nav = document.createElement('nav');
nav.setAttribute('class', 'nav-list');
var parent = document.querySelector(parentSelector);
parent.appendChild(nav);
var navList = Dq({container: 'nav-list', parent: documen... |
const express = require('express');
const router = express.Router();
// Course Model
const Course = require('../../models/Course');
// @route GET api/courses
// @desc Get All Courses
// @access Public
router.get('/', (req, res) => {
Course.find()
.sort({ date: -1 })
.then(courses => res.json... |
const express = require('express')
const path = require('path')
const fs = require('fs')
const morgan = require('morgan')
const app = express()
const Router = require('./router')
const chalk = require('chalk')
class Server {
constructor(port) {
this.app = app
this.port = port
this.router = new Router()
... |
#!/usr/bin/env python
# coding: utf8
import mysql.connector
from mysql.connector import errorcode
from utils import utils
from utils import configParser as cp
class DatabaseConnector:
def __init__(self, config):
# get database config
self.user = config['db_user']
self.password = config['db_pass']
self.hos... |
const mongoose = require('mongoose');
require('dotenv/config');
//Asynchronously connect to Mongo DB
//Read coneection url from .env
const ConnectMongo = async () => {
try {
await mongoose.connect(process.env.DB_CONNECTION, {
useNewUrlParser: true,
useUnifiedTopology: true,
useFindAndModify: false,
});
... |
import os
import pytest
from test.test_utils import ECS_AML2_CPU_USWEST2, ECS_AML2_GPU_USWEST2, CONTAINER_TESTS_PREFIX
from test.test_utils import ecs as ecs_utils
from test.test_utils import ec2 as ec2_utils
TF_MNIST_TRAINING_SCRIPT = os.path.join(CONTAINER_TESTS_PREFIX, "testTensorFlow")
@pytest.mark.model("mni... |
/* @flow */
import config from 'core/config'
import { warn, cached } from 'core/util/index'
import { mark, measure } from 'core/util/perf'
import Vue from './runtime/index'
import { query } from './util/index'
import { compileToFunctions } from './compiler/index'
import { shouldDecodeNewlines, shouldDecodeNewlinesFor... |
;
(function (win, doc) {
'use strict';
//polyfill for element.closest
if (window.Element && !Element.prototype.closest) {
Element.prototype.closest =
function (s) {
var matches = (this.document || this.ownerDocument).querySelectorAll(s),
i,
... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var locale = {
placeholder: 'Zaman Seç'
};
var _default = locale;
exports["default"] = _default;
//# sourceMappingURL=tr_TR.js.map
|
'use strict';
const _ = require('lodash');
const dynamodb = require('../dynamodb.js');
const baseResponse = require('../base-response.js');
const log = require('../log.js');
module.exports = (event, ctx, cb) => {
const response = _.assign({}, baseResponse);
const body = {
success: true
};
cons... |
/*
@adobe/react-spectrum-workflow (c) by Adobe
@adobe/react-spectrum-workflow is licensed under a
Creative Commons Attribution-NoDerivatives 4.0 International License.
You should have received a copy of the license along with this
work. If not, see <http://creativecommons.org/licenses/by-nd/4.0/>.
*/
import React fro... |
function SwaggerDefinition(title, description) {
this.swagger = '2.0';
this.info = {
'version': '',
'title': title,
'description': description
};
this.host = '';
this.basePath = '';
this.schemes = [];
this.consumes = [];
this.produces = [];
this.securityDefinitions = {};
this.paths = {}... |
import config from 'config'
import modal from '@components/modal'
import button from '@components/button'
import patient from '@components/patient'
import storage from '@utils/localStorage'
//
// send user a notification
// --------------------------------------------------
export default (user, doctor = null, remove... |
var desert = {
// Variables
size: 25,
// Functions
onload: function() {
land.addLand("desert", this.size, -1, this.load.bind(this), this.getText.bind(this));
},
load: function() {
},
getText: function() {
var lines = this.asciiDesert.slice(0);
for (var i = 0... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _vue = require("vue");
var _PauseCircleFilled = _interopRequireDefault(require("@ant-design/icons-svg/lib/asn/PauseCircleFilled"));
var _AntdIcon = _interopRequireDefault(require("../components/AntdIcon")... |
window.sequenceFlowWidth = 1.2;
window.sequenceFlowHeight = 3.5;
window.taskOutlineWidth = 0.5;
window.gatewayOutlineWidth = 0.5;
window.eventOulineWidth = 0.3;
window.globalScaleFactor = 0.17;
window.layer0 = 0;
window.layer1 = 0.01;
window.layer2 = 0.02;
window.flowOutlineWidthFactor = .8;
window.roomHeight = 7.5;
wi... |
import logging
import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config.from_object(os.environ.get('CONFIG', 'config.LocalConfig'))
# Database
db = SQLAlchemy(app)
# Logger
logger = logging.getLogger('time_manager_logger')
handler = logging.StreamHandler()
handler.... |
import videojs from 'video.js';
import './Progress.scss';
const SeekBar = videojs.getComponent('SeekBar');
SeekBar.prototype.getPercent = function getPercent() {
const time = this.player_.currentTime();
const percent = time / this.player_.duration();
return percent >= 1 ? 1 : percent;
};
SeekBar.prototype.ha... |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
try:
from unittest.mock import patch
except ImportError:
from mock import patch
import odoo
from odoo.tests import tagged
from odoo.tests.common import HttpCase
@tagged('post_install', '-at_install')
class Tes... |
class NumMatrix(object):
def __init__(self, matrix):
"""
:type matrix: List[List[int]]
"""
if matrix == None or len(matrix) == 0:
return None
self.cum_sums = [ [0] + i for i in matrix]
self.cum_sums.insert(0, [0 for i in range(len(matrix[0])+1)... |
from math import ceil
from typing import Dict, Any, List, Optional
import gym
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from torch.optim.lr_scheduler import LambdaLR
from core.algorithms.onpolicy_sync.losses import PPO
from core.algorithms.onpolicy_sync.losses.ppo import PPOCon... |
from openpyxlzip import Workbook
from openpyxlzip.chart import (
PieChart,
ProjectedPieChart,
Reference
)
from openpyxlzip.chart.series import DataPoint
data = [
['Pie', 'Sold'],
['Apple', 50],
['Cherry', 30],
['Pumpkin', 10],
['Chocolate', 40],
]
wb = Workbook()
ws = wb.active
for r... |
//>>built
require({cache:{"url:dijit/templates/MenuSeparator.html":"<tr class=\"dijitMenuSeparator\">\n\t<td class=\"dijitMenuSeparatorIconCell\">\n\t\t<div class=\"dijitMenuSeparatorTop\"></div>\n\t\t<div class=\"dijitMenuSeparatorBottom\"></div>\n\t</td>\n\t<td colspan=\"3\" class=\"dijitMenuSeparatorLabelCell\">\n\t... |
mycallback( {"CONTRIBUTOR OCCUPATION": "Financial Advisor", "CONTRIBUTION AMOUNT (F3L Bundled)": "100.00", "ELECTION CODE": "P2012", "MEMO CODE": "", "CONTRIBUTOR EMPLOYER": "Bob Dreizler", "DONOR CANDIDATE STATE": "", "CONTRIBUTOR STREET 1": "1125-35th Street", "CONTRIBUTOR MIDDLE NAME": "", "DONOR CANDIDATE FEC ID": ... |
//animate.web v1.0.5 https://github.com/webanimate/animate.web#readme
!function(e,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):((e="undefined"!=typeof globalThis?globalThis:e||self).animateweb=e.animateweb||{},e.animateweb.slideInLeft=i())}(t... |
import numpy as np
from Align.affine_transform import Affine
# The number of iterations in RANSAC
ITER_NUM = 2000
class Ransac():
def __init__(self, K=3, threshold=1):
''' __INIT__
Initialize the instance.
Input argements:
- K : the number of corresponding points,... |
# -*- coding:utf-8 -*-
import os
import django
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
DEBUG = False
TEMPLATE_DEBUG = DEBUG
SECRET_KEY = 'THISuISdNOT9A$SECRET9x&ji!vceayg+wwt472!bgs$0!i3k4'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'django_mysql',
... |
const FlashMessage = require('front-end-widgets/bootstrap-flash-message');
let {sendPUTFormRequest} = require('front-end-widgets/utils');
module.exports = ((config) => {
const {
UPDATE_ARTICLE__EP,
FALLBACK_ERR_FLASH,
FLASH_MSGS_DIV__SEL
} = config
const submitButton = $('[type="su... |
import React, { useState, useEffect } from 'react'
import styled from '@emotion/styled'
const AQContainer = styled.div`
background-color: ${props => props.bg};
padding: 2em;
`
const api_url = 'https://api-endpoint.eloop.at/infos'
const useFetch = url => {
const [data, setData] = useState(null)
const [loading,... |
var searchData=
[
['rawmsrsignal_2ecpp',['RawMSRSignal.cpp',['../_raw_m_s_r_signal_8cpp.html',1,'']]],
['rawmsrsignal_2ehpp',['RawMSRSignal.hpp',['../_raw_m_s_r_signal_8hpp.html',1,'']]],
['readme_2emd',['README.md',['../_r_e_a_d_m_e_8md.html',1,'']]],
['record_2ecpp',['record.cpp',['../record_8cpp.html',1,'']]... |
import { DEFAULT_EXTENSIONS } from '@babel/core';
import { babel } from '@rollup/plugin-babel';
import { DEFAULTS, nodeResolve } from '@rollup/plugin-node-resolve';
const addTsExtensions = input => input.concat(['.ts', '.tsx']);
export default [
{
input: 'src/index.tsx',
external: [/@babel\/runtime/, 'react... |
from collections import defaultdict
from queue import Queue
from graphviz import Digraph
class DFA:
def __init__(self, transitions, start, ends):
self.transitions = transitions
self.start = start
self.ends = ends
def accepts(self, s):
state = self.start
for ch in s:... |
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 = Reflect.decorate(d... |
import 'bootstrap/dist/css/bootstrap.min.css'
import React, { useState} from "react"
import Header from "./Header";
import DatePicker from 'react-datepicker';
import {newCode} from "./RandomIDCode";
import 'react-datepicker/dist/react-datepicker.css'
import { createAnExperiment } from "./ProfessorObjects";
import { use... |
"""
Non-machine learning approach to an autocorrect function
Limitations:
Edits become exponential
No dependency on previous words (no tagging, markov, etc)
NEED TO FIND A CORPUS BECAUSE I DONT HAVE ONE
also i probably won't be able to find one for conversational speech (idk, bet, lmfao) but that's whatever. maybe i... |
/**
* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
* Sectors - Mamba
* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*/
module.exports = {
"Gakoma": [
"Gakomeye",
"Gatare",
"Kinamba",
"Kivomo",
"Kizenga",
"Rebero",
"Rugenge",
"Rugwiza",
"Ruhuha",
"S... |
var _32 = {
elem: 'svg',
attrs: {
xmlns: 'http://www.w3.org/2000/svg',
viewBox: '0 0 32 32',
width: 32,
height: 32,
},
content: [
{
elem: 'path',
attrs: {
d:
'M28 6v20H4V6h24m0-2H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z',
},
}... |
import PropTypes from 'prop-types';
import { makeStyles } from '@material-ui/core/styles';
import { Drawer, List, Divider, ListItem, ListItemIcon, ListItemText } from '@material-ui/core';
import { MoveToInbox, Mail } from '@material-ui/icons';
const useStyles = makeStyles({
list: {
width: 250,
},
});
const Si... |
# Copyright 2016 - Nokia
#
# 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, sof... |
define((()=>{return e={690:e=>{window.require&&window.require.config({map:{"*":{"jupyter-matplotlib":"nbextensions/jupyter-matplotlib/index"}}}),e.exports={load_ipython_extension:function(){}}}},r={},function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{}};return e[n](o,o.exports,t),o.exports}(690);var e,r})); |