text
stringlengths
3
1.05M
'use strict'; // external imports require("core-js/modules/es.symbol"); require("core-js/modules/es.symbol.description"); require("core-js/modules/es.symbol.iterator"); require("core-js/modules/es.array.iterator"); require("core-js/modules/es.object.assign"); require("core-js/modules/es.object.define-property"); ...
// Change header let username = localStorage.getItem('user'); let replace = document.getElementById('username'); replace.innerText = username; let logout = document.getElementById('logout'); logout.addEventListener('click', (event)=>{ // request to return to login let req = new XMLHttpRequest(); req.open('...
"""Charts.""" from dataclasses import dataclass from supersetapiclient.base import ( Object, ObjectFactories, json_field, default_string ) @dataclass class Chart(Object): JSON_FIELDS = [ "params" ] id: int description: default_string() slice_name: default_string() params: json_fi...
import React from 'react' export const Header = () => { return ( <h2>Expense Tracker</h2> ) }
Module = typeof(Module) != "undefined" ? Module : {}; Module['wasmBinary'] = (() => { var wasmcode="AGFzbQEAAAABeBNgAX8Bf2ABfwBgA39/fwBgA398fwBgAn9/AGACf38Bf2ADf39/AX9gBH9/f38AYAAAYAV/f39/fwBgBX9/f39/AX9gBH9/f38Bf2AAAX9gA35/fwF/YAJ+fwF/YAZ/fH9/f38Bf2ABfAF+YAJ8fwF8YAR/f3x/AALAAQoDZW52BWFib3J0AAEDZW52Dl9fX2Fzc2VydF9mYWls...
import React from 'react'; import { useTranslation } from 'react-i18next'; import { Link } from 'react-router-dom'; import './Art.scss'; function Art({ id, pictureName, image, }) { const [t] = useTranslation(); return ( <div className="row row-eq-height"> <div className="car...
import { RelationshipDirectionField } from './relationship'; import { shouldAugmentRelationshipField } from '../../augment'; import { OperationType } from '../../types/types'; import { TypeWrappers, isListTypeField, unwrapNamedType } from '../../fields'; import { PagingArgument, OrderingArgument, Filtering...
/* Title: Reversed Strings Description: Complete the solution so that it reverses the string value passed into it. Examples: solution('world'); // returns 'dlrow' Kata Link: https://www.codewars.com/kata/reversed-strings Discuss Link: https://www.codewars.com/kata/reversed-string...
import React from 'react' const Loading = () => { return ( <section id="loading-spinner"> <div id="loading-container"> <div className="loading-ball" /> <div className="loading-ball" /> <div className="loading-ball" /> <div className="loading-ball" /> </div> <div ...
import json import functools import asyncio from collections import defaultdict from aiohttp import web from aiohttp.abc import AbstractView from jsonschema.validators import validator_for __author__ = """Dmitry Chaplinsky""" __email__ = 'chaplinsky.dmitry@gmail.com' __version__ = '0.1.1' def _raise_exception(cls, ...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("va...
/** * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ /* globals window, document, console */ import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'; import ArticlePl...
import numpy as np import scipy as sp import scipy.sparse import stukapy as st def constructLP(network, formulation, alphap): if formulation == 'ISF': c, Aub, bub, Cub, Aeq, beq, Ceq, lb, ub = [], [], [], [], [], [], [], [], [] p0 = 1. for lineOutage in network.lineOutages: p0...
import copy from django.dispatch import receiver from django.urls import resolve, reverse from django.utils.safestring import mark_safe from django.utils.translation import gettext_noop, ugettext_lazy as _ from i18nfield.rest_framework import I18nField from i18nfield.strings import LazyI18nString from pretix.base.setti...
import Head from "next/head"; import { Form, Input, Button, message } from "antd"; import { MailOutlined, LockOutlined, UserOutlined } from "@ant-design/icons"; import firebase from "../firebase/firebase"; import Router from "next/router"; import { useEffect } from "react"; export default function signup() { useEffe...
//alert("Spirekeeper is'nt out yet, so stay calm u cheesy lil weirdo")
const request = require("supertest") // const superagent = require("superagent") const express = require("express"); const session = require("express-session"); const passport = require("../config/passport"); const initialize_connection = require("../config/db_connection"); const db_obj = require("../config/db_config")...
define(["../../polymer/polymer-legacy.js","../../polymer/lib/legacy/polymer-fn.js","../neon-animation-behavior.js"],function(_polymerLegacy,_polymerFn,_neonAnimationBehavior){"use strict";(0,_polymerFn.Polymer)({is:"slide-from-left-animation",behaviors:[_neonAnimationBehavior.NeonAnimationBehavior],configure:function c...
#!/usr/bin/env python """Simple signal generator for testing transmit Continuously output a carrier with single sideband sinusoid amplitude modulation. Terminate with cntl-C. """ import argparse import math import signal import time import numpy as np import SoapySDR from SoapySDR import * #SOAPY_SDR_ constants i...
import router from './router' import store from './store' import { Message } from 'element-ui' import NProgress from 'nprogress' // progress bar import 'nprogress/nprogress.css' // progress bar style import { getToken } from '@/utils/auth' // get token from cookie import getPageTitle from '@/utils/get-page-title' impor...
import os import re import string import traceback from typing import TextIO from jinja2 import Template from jinja2.exceptions import TemplateSyntaxError, TemplateError from jinja2 import StrictUndefined, Undefined from mkdoxy.node import Node, DummyNode from mkdoxy.doxygen import Doxygen from mkdoxy.constants import ...
jest.dontMock('../n.js'); var n = require('../n'); describe('calc n', function() { it('n(0.5) = 2.198', function() { expect(n(0.5)).toBe(2.198); }); it('n(2) = 1', function() { expect(n(2)).toBe(1); }); it('n(0.4) = 1.76', function() { expect(n(0.4).toFixed(2)).toBe('1.76'); }); });
!function(e){function t(t){for(var r,o,d=t[0],f=t[1],u=t[2],i=0,l=[];i<d.length;i++)o=d[i],a[o]&&l.push(a[o][0]),a[o]=0;for(r in f)Object.prototype.hasOwnProperty.call(f,r)&&(e[r]=f[r]);for(s&&s(t);l.length;)l.shift()();return c.push.apply(c,u||[]),n()}function n(){for(var e,t=0;t<c.length;t++){for(var n=c[t],r=!0,o=1;...
var React = require('react'), vkey = require('vkey'); var AltText = React.createClass({ displayName: 'AltText', getDefaultProps: function() { return { component: 'span', modifier: '<alt>', normal: '', modified: '' }; }, getInitialState: function() { return { modified: false }; }, ...
import React from 'react'; import { View, TouchableWithoutFeedback, Image, Dimensions } from 'react-native'; import { withNavigation } from 'react-navigation'; import { handleOBDeeplinkWithNavigation } from '../../utils/navigation'; import {I18n} from '../../langs/I18n'; const { width } = Dimensions.get('window'); ...
import React, { useState, useEffect } from 'react' import DataTable from 'react-data-table-component' import { Card, CardContent } from '@material-ui/core' import IconButton from '@material-ui/core/IconButton' import { AssignmentTurnedIn, Delete } from '@material-ui/icons' import { AddBox } from '@material-ui/icons' im...
// Create an instance of Notyf var notyf = new Notyf(); setTimeout(function() { notyf.confirm('Seja bem vindo'); }, 500);
import logo from "../../images/logo.svg"; const Heading = () => { return( <div> <img src={logo} alt="tr" width="1000em" height="140em" style={{width: "100%", alignItems: "center", borderBottom: "2px solid black"}}/> </div> ); } export default Heading;
module.exports = { host: null, port: null, username: null, password: null, database: null, entities: [], synchronize: false, logging: false, min: 3, max: 5, globalMax: 100, updateClientListInterval: 10 * 1000 };
const loaderUtils = require("loader-utils"); const loaderApi = () => {}; loaderApi.pitch = function loader(request) { const resourcePath = JSON.stringify(this.resourcePath) return ` import content from ${loaderUtils.stringifyRequest( this, `!!${request}` )} let onUpdate = null let onError = null if (module...
const Employee = require('./Employee'); class Intern extends Employee { constructor(name,id,email,school) { super(name,id,email); this.school = school; } getSchool() { return this.school; } getRole() { return "Intern"; } } module.exports = Intern;
//>>built define("dijit/form/_CheckBoxMixin",["dojo/_base/declare","dojo/dom-attr","dojo/_base/event"],function(_1,_2,_3){ return _1("dijit.form._CheckBoxMixin",null,{type:"checkbox",value:"on",readOnly:false,_aria_attr:"aria-checked",_setReadOnlyAttr:function(_4){ this._set("readOnly",_4); _2.set(this.focusNode,"readO...
# Copyright 2017 NEC Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
import React from 'react'; import { shallow } from 'enzyme'; import CellMask from '../CellMask'; import DragMask from '../DragMask'; import zIndexes from 'common/constants/zIndexes'; describe('DragMask', () => { const setup = (propsOverride = {}) => { const props = { columns: [ { width: 50, left: ...
# -*- coding: utf-8 -*- # # Greengraph documentation build configuration file, created by # sphinx-quickstart on Thu Jan 05 13:29:09 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # ...
const getInterfaces = require('../get-interfaces'); module.exports.get = function (ast) { const interfaces = getInterfaces(ast); const results = interfaces.map(i => { return ast.text.slice(i.pos, i.end); }); return results.join(''); };
# -*- coding:utf-8 -*- # Copyright 2017 Xiaomi, 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 o...
/* WIN = 'w' LOSS = 'l' TIE = 't' ROCK = 'r' PAPER = 'p' SCISSORS = 's' */ const RESULTS_MESSAGES = { w: 'You won!', l: 'You lost!', t: 'A tie!' } const COLORS = { w: '#006db3', l: '#F44336', t: '#FF9800' } const IMAGES = { r: 'img/rock.svg', p: 'img/paper.svg', s: 'img/scissors.svg', } export class Components...
$(document).ready(function() { $("#form_roles").validate({ rules : { rol : { required : true, minlength : 3 } } }); });
import throttle from 'lodash.throttle'; import { composeWithDevTools } from 'redux-devtools-extension/developmentOnly'; import { createStore, applyMiddleware, compose } from 'redux'; import thunk from 'redux-thunk'; import reducers from './reducers/index'; import { saveState } from './localStorage'; let composer; if ...
# GENERATED BY KOMAND SDK - DO NOT EDIT import komand import json class Input: API_KEY = "api_key" SSL_VERIFY = "ssl_verify" URL = "url" class ConnectionSchema(komand.Input): schema = json.loads(""" { "type": "object", "title": "Variables", "properties": { "api_key": { "$ref":...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import PodcastActions from '~/store/ducks/podcasts'; import { Container, PodcastList, PageTitle, Podcast, Cover, Info, Title, Count, } from './styles'; cl...
/* * ------------------------------------------ * 字体/字号执行命令封装实现文件 * @version 1.0 * @author genify(caijf@corp.netease.com) * ------------------------------------------ */ var f = function(){ var _ = NEJ.P, _f = NEJ.F, _e = _('nej.e'), _p = _('nej.ut.cmd'), _proFont; if (...
from __future__ import unicode_literals from base64 import b64encode import requests from printful._compat import urllib, force_text, force_bytes class PrintfulException(Exception): pass class PrintfulApiException(PrintfulException): def __init__(self, message, code): super(PrintfulApiException, ...
import React, { PureComponent } from 'react' import { connect } from 'dva' import { Row, Col, Card, Form, Input, Select, Icon, Button, Dropdown, Menu, InputNumber, DatePicker, Modal, message } from 'antd' import styles from './MobileApp.search.less' import GlobalComponents from '../../custcomponents' import Candidat...
const mongoose = require('mongoose'); const Schema = mongoose.Schema; const newsSchema = new Schema({ title: { type: String, required: true }, description: { type: String, required: true }, category: [String], urlImage: String, author: { type: String, required: true }, createdAt: Date, updatedAt: Date, }...
function SvgLabelImportantOutlined(props) { return ( <svg xmlns='http://www.w3.org/2000/svg' height='1em' viewBox='0 0 24 24' width='1em' className='svg-icon' {...props}> <path d='M0 0h24v24H0V0z' fill='none' /> <path d='M4 18.99h11c.67 0 1.27-.32 1.63-.83L21 12l-4.37-6.16C16.27 5.33 15.67 5 ...
// vars var data = {}, unicoreData = [], order = [], lca = "", pans = [], cores = [], unicores = [], unicorePresent = false, rank = 0, matrix; // Add an event handler to the worker self.addEventListener('message', function (e) { var data = e.data; switch (data.cmd) { cas...
export { Dimensions } from './math/Dimensions'; export { Geometric3 } from './math/Geometric3'; export { QQ } from './math/QQ'; export { Unit } from './math/Unit';
from typing import Union from django.db import models from dirtyfields import DirtyFieldsMixin from user.models import User from challenge.utils import eval_token_expression class ChallengeManager(models.Manager): def enabled(self): self.get_queryset().filter(sub_challenge__enabled=True).distinct() cl...
import mitt from 'mitt' import keyBind from '../utils/keyBind' import { rendererOn, rendererSend, NAMES, rendererInvoke } from '../../common/ipc' import { base as baseName, sync as syncName } from './names' import { common as hotKeyNamesCommon } from '../../common/hotKey' import { sync } from '@renderer/core/share' co...
from keras.preprocessing.image import img_to_array, load_img import numpy as np from ast import literal_eval import traceback def make_image_sample(photo_id_file,image_array_file): images_root = "data/images_150X150/" x_train = [] count = 0 means = None stds = None with open(ph...
/** * @license * Visual Blocks Editor * * Copyright 2011 Google Inc. * https://developers.google.com/blockly/ * * 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.apach...
# Copyright 2017 NEC Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
""" WSGI config for zqxt_admin 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/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zqxt_admin.settings") from django....
import Axios from '@/tool/axios.js'; import {dateFormat} from '@/tool/transform.js'; export default class Postage { constructor(options) { options = options || {}; for (let attr in options) { this[attr] = options[attr]; } } add(data) { return Axios({ ...
from django.apps import AppConfig class StockAnalyticsConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'stock_analytics'
// @flow import type { Action } from './types'; import { TASKSTATE_START, TASKSTATE_STOP } from '../actions/task-state.actions'; export default function formData(state = {}, action: Action) { switch (action.type) { case TASKSTATE_START: return { ...state, [action...
E2.p = E2.plugins["multiply_modulator"] = function(core, node) { this.desc = 'Multiplies the two supplied values and emits the result.'; this.input_slots = [ { name: 'value', dt: core.datatypes.FLOAT, desc: 'The first operand.', def: 0.0 }, { name: 'value', dt: core.datatypes.FLOAT, desc: 'The first operand.',...
"use strict"; exports.__esModule = true; exports.renderMetaTagsToString = void 0; function renderMetaTagsToString(data) { return data .map(function (tag) { if (tag.tag === 'title') { return "<title>".concat(tag.content, "</title>"); } var serializedAttrs = []; for...
function digitalClock(){ let date = new Date() let hours = date.getHours() + '' let minutes = date.getMinutes() + '' let seconds = date.getSeconds() + '' let day = date.getDay() let year = date.getFullYear() let month = date.getMonth() if(hours < 2){ hours = '0' + hours } ...
module.exports = analytics; module.exports.single = postAnalytics; const snyk = require('../lib'); const config = require('./config'); const version = require('./version'); const request = require('./request'); const isCI = require('./is-ci').isCI; const debug = require('debug')('snyk'); const os = require('os'); cons...
module.exports = { future: { removeDeprecatedGapUtilities: true, }, purge: ['./components/**/*.{js,ts,jsx,tsx}', './pages/**/*.{js,ts,jsx,tsx}'], theme: { extend: { colors: { 'accent-1': '#333', }, }, colors: { transparent: 'transparent', current: 'currentColor', ...
(function(mod) { mod(CodeMirror); })(function(CodeMirror) { "use strict"; CodeMirror.registerHelper("hint", "go", function(editor, options) { var cur = editor.getCursor(); var request = { code: editor.getValue(), cursorLine: editor.getCursor().line, cursorCh: editor.getCursor().ch }; ...
angular.module('schemaForm-take-photo', ['schemaForm']).config( ['schemaFormProvider', 'schemaFormDecoratorsProvider', 'sfPathProvider', function(schemaFormProvider, schemaFormDecoratorsProvider, sfPathProvider, $scope) { var take_photo = function(name, schema, options) { if (schema.type === 'object' && s...
import argparse from smart_queue.db.database import get_all_conditions parser = argparse.ArgumentParser( description="Get priority of conditions with given time" ) parser.add_argument( "-t", "--time", dest="wait_time", required=True, help="Wait time in minutes", ) args = parser.parse_args() ...
# encoding: utf-8 from django import forms from django_popup_view_field.fields import PopupViewField from .popups import PopupView1 class Form1(forms.Form): field = PopupViewField(view_class=PopupView1, popup_dialog_title='Test PopupView1 Title')
// Evento para adicionar linhas para grid de taxas $('#btnAddBeneficio').on( 'click', function () { // Recuperando o valor do conteúdo var beneficio = $('#beneficio_id_debito').val(); // Verificando se foi passado valor válido if (!beneficio) { swal('Você deve criar escolher um benefício!', "Cl...
""" Invitation Handlers for Watchtower News """ from handlers.base import JsonAuthHandler from logic.invitation import get_invitation, get_invitations, post_invitation_is_active, delete_invitation, \ post_invitation __author__ = 'Enis Simsar' class InvitationsHandler(JsonAuthHandler): def get(self): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipaySecurityProdHaiguanNolabelCreateResponse(AlipayResponse): def __init__(self): super(AlipaySecurityProdHaiguanNolabelCreateResponse, self).__init__() self._out_o...
from functools import wraps from python2latex import TexObject, TexCommand, build class begin(TexCommand): """ 'begin' tex command wrapper. """ def __init__(self, environment, *parameters, options=list(), options_pos='second', **kwoptions): super().__init__('begin', e...
/*! * Font Awesome Pro 5.10.1 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license (Commercial License) */ !function(){"use strict";var c={},h={};try{"undefined"!=typeof window&&(c=window),"undefined"!=typeof document&&(h=document)}catch(c){}var l=(c.navigator||{}).userAgent,v=void 0...
import React, { useState, useEffect } from 'react'; import ModalWrapper from '../../Modal'; import ShareModal from '../../ShareModal'; import { func } from 'prop-types'; import { joinGroup, getGroupMembers } from '../../../utils/backendUtils'; import { useSelector } from 'react-redux'; import useResizeAware from 'react...
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license //@ sourceMappingURL=jquery-1.10.2.min.map */ (function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b...
# Copyright 2017 Rackspace, US 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 writin...
'use strict' const acorn = require('acorn') const Highlights = require('highlights') const highlighter = new Highlights() const util = require('util') const http = require('http') const fs = require('fs') const path = require('path') const url = require('url') const files = new Map() const htmlfp = path.join(__dirnam...
import { ThemeProvider } from '@live/web-ui'; export default ({ children }) => <ThemeProvider>{children}</ThemeProvider>;
# This script updates package version while deploying import sys new_version = str(sys.argv[1]) with open("setup.py") as f: lines = f.readlines() lines[4] = "version = '" + new_version[1:] + "'\n" with open("setup.py", "w") as f: f.writelines(lines)
/*global jQuery */ /*! * FitText.js 1.2 * * Copyright 2011, Dave Rupert http://daverupert.com * Released under the WTFPL license * http://sam.zoy.org/wtfpl/ * * Date: Thu May 05 14:23:00 2011 -0600 */ (function( $ ){ $.fn.fitText = function( kompressor, options ) { // Setup options var compressor = kompres...
import React from "react" import ReactDOM from "react-dom" import App from "./components/app" import "./style/app.scss" function main() { ReactDOM.render(<App />, document.querySelector(".app-wrapper")) } document.addEventListener("DOMContentLoaded", main)
var config = { // Refer to http://knexjs.org to configure other DB System CONNECTION: {filename: "./data.db"}, CLIENT: 'sqlite3', CONTENT_LIMIT: 50000000, PORT: 5000, LOGS: true, JSON_SPACING: 10, // set to 0 to disable completly WELCOME: "Hey there. You can receive things at /ricevi and send at /send...
// We need to figure out how to pass a webex logger instance to these util files /* globals RTCSessionDescription */ import window from 'global/window'; import sdpTransform from 'sdp-transform'; // https://github.com/clux/sdp-transform import Metrics from '../metrics'; import LoggerProxy from '../common/logs/logger...
from app.utilities.data import Data from app.data.components import Type from app.data.item_components import ItemComponent, tags def get_item_components(): # Necessary for get_item_components to find all the # item components defined in item_components folder from app.engine import item_components s...
# Generated by Django 3.0.5 on 2020-11-18 17:58 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('home', '0022_delete_orderbaby'), ] operations = [ migrations.CreateModel( name='C...
module.exports = v => typeof v ==="object" && v !== null && !Array.isArray( v );
#!/usr/bin/env python __author__ = "Gregory M Chen" __copyright__ = "Copyright 2013, Gregory M Chen" import urllib import lxml.html import re # Get coauthor names from Google Scholar connections = [ urllib.urlopen('http://scholar.google.ca/citations?hl=en&user=B7vSqZsAAAAJ&view_op=list_works&pagesize=100'), urllib.ur...
import request from 'supertest'; import { app } from '../src/app.js'; describe('test our endpoints with HTTP-requests', () => { let token; let playlistId; let songId; let userId; it('should return an access token', async (done) => { const response = await request(app) .post('/auth/login') .s...
// CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: http://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror")); else if (typeof define == "function" && define.amd) // A...
// Automatically copied from StringPropNativeComponent.js // (/react-native/packages/react-native-codegen/e2e/__test_fixtures__) /** * 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. * *...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true, }); exports.default = slugify; function toSlug(str) { return str .toLowerCase() .replace(/[^\w\s\-]/g, " ") .split(" ") .filter(function(substr) { return substr.length > 0; }) .join("-"); } function slugify(Mod...
# Copyright (C) 2003 Python Software Foundation import unittest import macostools import Carbon.File import MacOS import os import sys from test import test_support import struct import applesingle AS_MAGIC=0x00051600 AS_VERSION=0x00020000 dataforkdata = 'hello\r\0world\n' resourceforkdata = 'goodbye\n...
const parsePPM = data => { const NUM_CHANNELS = 3; const NUM_HEADERS = 12; const DEFAULT_ALPHA = 255; data = new Uint8Array(data); console.log('parse data'); const headers = []; let headerSize = 0; let buf = ''; let ch; for (let i = 0; headers.length < NUM_HEADERS; i++, headerSize++) { // con...
import React from "react" import layoutStyles from "./styles/Header.module.scss" const Header = () => { return <header className={layoutStyles.ourwork__header}></header> } export default Header
"""Unit tests helper functions for lift file.""" import getl.lift_definition as liftdef # TESTS def test_retrive_yaml_from_s3(helpers): """Get the yaml file from s3.""" # Arrange path = "s3://tmp-bucket/raw_to_trusted.yaml" with open("tests/getl/data/lift/test.yaml") as yaml_file: yaml_file = ...
#!c:\projects\maker-flaskbb\venv\scripts\python.exe # # The Python Imaging Library # $Id$ # # convert sequence format to GIF animation # # history: # 97-01-03 fl created # # Copyright (c) Secret Labs AB 1997. All rights reserved. # Copyright (c) Fredrik Lundh 1997. # # See the README file for information on ...
from operator import itemgetter import pytest async def test_find(snapshot, spawn_client, test_changes, static_time): """ Test that a list of processed change documents are returned with a ``200`` status. """ client = await spawn_client(authorize=True) await client.db.history.insert_many(test_c...
line = input().split() a = int(line[0]) b = int(line[1]) year = 0 while(a<=b): year += 1 a *= 3 b *= 2 print(str(year))
"use strict"; var __importDefault = (this && this.__importDefault) || function(mod) { return mod && mod.__esModule ? mod : { default: mod }; }; var __importStar = (this && this.__importStar) || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (...
(this["webpackJsonpsimple-app-gui"]=this["webpackJsonpsimple-app-gui"]||[]).push([[0],{35:function(e,t,n){"use strict";n.r(t),n.d(t,"get",(function(){return i})),n.d(t,"post",(function(){return s})),n.d(t,"put",(function(){return l})),n.d(t,"remove",(function(){return u})),n.d(t,"login",(function(){return o})),n.d(t,"l...
# -*- coding: utf-8 -*- """ Created on Fri Jul 11 11:07:07 2014 @author: Mark """ # find the lowest number abov which all numbers can be # expressed as a sum of the McNugget numbers 6, 9, and 20 # Answers question 1 problem set 2 for x in range (56): max_a = x/6+1 max_b = x/9+1 max_c = x/20+1 for c...