text stringlengths 3 1.05M |
|---|
import angular from 'angular';
import angularMeteor from 'angular-meteor';
import { Meteor } from 'meteor/meteor';
import { Tasks } from '../../../api/tasks/tasks.js';
import template from './todosList.html';
class TodosListCtrl {
constructor($scope) {
$scope.viewModel(this);
this.subscribe('tasks');
... |
var bs = require('./bs/bsnode');
bs.$route( require('./noderoot/lab/route').route );
/*
var http = require("http");
http.createServer(function(request, response) {
response.writeHead(200, {"Content-Type": "text/html"});
response.write("Hello, World~!!");
response.end();
}).listen(8001);
*/ |
from collections import defaultdict
from copy import deepcopy
from itertools import permutations
from typing import List
from transformers import (AutoTokenizer,
AutoModelForSequenceClassification,
AutoModelForSeq2SeqLM,
PreTrainedModel,
... |
import React from "react"
import { StaticQuery, graphql } from "gatsby"
import Img from "gatsby-image"
/*
* This component is built using `gatsby-image` to automatically serve optimized
* images with lazy loading and reduced file sizes. The image is loaded using a
* `StaticQuery`, which allows us to load the image ... |
const zlib = require("zlib");
const JSZip = require("jszip");
const tar = require("tar-stream");
const isGzip = data => {
return data.slice(0, 3).toString("hex") === "1f8b08";
};
const isBzip2 = data => {
return data.slice(0, 3).toString("hex") === "425a68";
};
const isTar = data => {
return data.slice(257, 26... |
"""Initial Migration
Revision ID: 23934db79551
Revises:
Create Date: 2020-12-17 15:50:59.775119
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '23934db79551'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto ... |
/**
* Created by Pravin on 3/17/2016.
*/
(function() {
'use strict';
angular
.module('io.egen.proteus')
.controller('RatingsController',RatingsController);
function RatingsController($routeParams,ratingService) {
var ratingsVm = this;
ratingsVm.submitRating = submitRating;... |
const electron = require('electron')
const { app, BrowserWindow, ipcMain, Menu, globalShortcut } = require('electron')
const methods = require('./methods/methods')
const wallpaper = require('wallpaper')
const express = require('express')
const server = express()
const http = require('http').Server(server)
const io = re... |
/**
* Copyright 2019 The Pennsylvania State University
* @license Apache-2.0, see License.md for full text.
*/
import { html, PolymerElement } from "../../../../../@polymer/polymer/polymer-element.js";
import { MutableData } from "../../../../../@polymer/polymer/lib/mixins/mutable-data.js";
import { store } from "..... |
from fastapi import APIRouter, Depends
from fastapi.openapi.models import APIKey
from sqlalchemy.orm import Session
from nonbonded.backend.api import depends
from nonbonded.backend.api.base import BaseCRUDEndpoint
from nonbonded.backend.core.security import check_access_token
from nonbonded.backend.database import mod... |
import React from "react";
import PropTypes from "prop-types";
import { format } from "d3-format";
import { timeFormat } from "d3-time-format";
import { ChartCanvas, Chart } from "react-stockcharts";
import {
BarSeries,
AreaSeries,
CandlestickSeries,
LineSeries,
MACDSeries,
} from "react-stockcharts/lib/series"... |
// 小程序富文本插件 https://github.com/jin-yufeng/Parser
"use strict";function _classCallCheck(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function t(t,i){for(var s=0;s<i.length;s++){var e=i[s];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.wr... |
################################################################################
'''
File: default.py
Author: Ching-Yu Chen
Description:
default.py contains Default class, which is a program object of the "/default"
command. Default pgm provides the bike station information by the given current
location or favorite ... |
'use strict'
const waterfall = require('async/waterfall')
const fs = require('fs')
const path = require('path')
const safeParse = require('safe-json-parse/callback')
module.exports = (configPath, callback) => {
waterfall([
(cb) => fs.readFile(path.join(configPath, 'config'), cb),
(file, cb) => safeParse(fil... |
/**
* @type Neatness
*/
var Neatness = require('neatness').newContext(true);
/**
* @namespace
* @name mylib
* @global mylib
*/
var mylib = module.exports = window.mylib = Neatness.namespace('mylib');
/**
* @type Neatness
*/
mylib.Neatness = Neatness;
// Load files
require('./base/Model');
require('./models/I... |
const reviewform = document.getElementById('review-form')
const csrf = document.getElementsByName('csrfmiddlewaretoken')
reviewform.addEventListener('submit', function(event){
console.log("Review Submitted");
event.preventDefault();
submitreviewform();
}, false);
function submitreviewform(){
const... |
import discord
clint = discord.Client()
print("starts!")
@clint.event
async def on_message(message):
Msg = message.content
if Msg.startswith("/sys-sendit"):
Msg.remove("/sys-sendit text:")
await message.channel.send(Msg)
Clint.run("OTc1MzcyOTYzMjU3OTE3NDQw.G8TAMj.kItBHdsUwBv9NcnAuw-NXnsP7Wv2... |
import React from "react";
import styles from "./Brand.module.css";
import dellImage from "../../assets/dell.png";
import facebookImage from "../../assets/facebook.png";
import forbesImage from "../../assets/forbes.png";
import linkedinImage from "../../assets/linkedin.png";
import acerImage from "../../assets/acer.svg... |
const runApplescript = require('run-applescript');
const path = require("path");
const jsxPath = path.resolve("./readMap.jsx");
const csv = require("fast-csv");
const fs = require('fs');
console.log(`배열 생성 시작`);
var stationsCor = [];
var dirNow = path.dirname(require.main.filename);
var fastCsv = csv.createWriteStrea... |
# coding: utf-8
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from anchore_engine.services.policy_engine.api.models.base_model_ import Model
from anchore_engine.services.policy_engine.api import util
class ImageRef(Model):
"""NOTE: This class is auto generated b... |
/**
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
/* globals console, window, document */
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
import ArticleP... |
//= require plugins |
/*
* Created by Dyan at 2019/3/19 16:35
*/
// var ctx = document.getElementById('myChart').getContext('2d');
// let chart = new Chart(ctx, {
// type: 'line',
// data: {
// datasets: [{
// label: 'First dataset',
// data: [0, 20, 40, 50, 67, 12, 24]
// }],
// la... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.tr = exports.translate = void 0;
const tslib_1 = require("tslib");
var hoc_1 = require("./hoc");
Object.defineProperty(exports, "translate", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(hoc_1).default; } }... |
import React, { Component } from "react";
import PropTypes from "prop-types";
import NodeEditor from "./NodeEditor";
import { StreetView } from "styled-icons/fa-solid/StreetView";
export default class SpawnPointNodeEditor extends Component {
static propTypes = {
editor: PropTypes.object,
node: PropTypes.obje... |
/*!
* SAP UI development toolkit for HTML5 (SAPUI5/OpenUI5)
* (c) Copyright 2009-2014 SAP AG or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
jQuery.sap.declare("sap.ui.unified.CurrencyRenderer");sap.ui.unified.CurrencyRenderer={};
sap.ui.unified.CurrencyRenderer.... |
const express = require('express');
const agentController = require('../controllers/agent.controller');
const router = express();
router.get('/agents', agentController.getAgents);
router.post('/agent', agentController.addAgent);
router.get('/agent/:id', agentController.getAgent);
router.put('/agent/:id', agentContro... |
'use strict';
var ajax = require('../lib/ajax');
var UI = require('../ui');
var moment = require('../vendor/moment');
var current_watch = require('../WatchInfo.js');
function showLineup(lineups, name) {
var items = [];
lineups.forEach(function(item) {
items.push({
title: item.artist.name,
subtitle... |
(() => {
var errorBoxElement = false;
var showError = (error) => {
if (!errorBoxElement) {
errorBoxElement = document.createElement('div');
errorBoxElement.style.position = 'absolute';
errorBoxElement.style.top = '0';
errorBoxElement.style.bottom = '0';
... |
"""
*Denary Fractional*
The base 10 fractional measure.
"""
from abc import ABCMeta
from .._fractional import Fractional
__all__ = ["DenaryFractional"]
class DenaryFractional(
Fractional,
):
__metaclass__ = ABCMeta
def __init__(
self,
denominator: int,
):
super(Den... |
# Django
from django.urls import path
# SquareletAuth
from squarelet_auth.organizations import views
app_name = "squarelet_auth_organizations"
urlpatterns = [
path("activate/", views.activate, name="activate"),
path("profile/<slug:slug>/", views.profile, name="profile"),
]
|
var num = 0;
var shuffle = document.querySelector(".shuffle");
var div = document.querySelector("#card");
var eng = document.querySelector("#trans");
document.addEventListener("keydown", event => {
const keyName = event.key;
if (keyName === "ArrowRight") {
checkAnswer();
} else if (keyName === "ArrowLeft") {... |
# Python - 3.6.0
from operator import mul
from functools import reduce
grow = lambda arr: reduce(mul, arr)
|
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from time import sleep
import os
# Set chrome options for working with headless mode (no screen)
chrome_options = webdriver... |
var express = require('express');
var router = express.Router();
/* GET reviews */
router.get('/', function(req, res, next) {
res.json({ title: 'Reviews' });
});
module.exports = router;
|
import gym
import numpy as np
import time
import os
import cv2
import matplotlib.pyplot as plt
from IPython.display import clear_output
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from qnetwork import QNetwork
from replay_buffer import ReplayBuffer
import wandb
... |
Search.setIndex({docnames:["appendix","bind_paths_and_mounts","build_a_container","build_env","cgroups","checkpoint","cli","cli/apptainer","cli/apptainer_build","cli/apptainer_cache","cli/apptainer_cache_clean","cli/apptainer_cache_list","cli/apptainer_capability","cli/apptainer_capability_add","cli/apptainer_capabilit... |
import React, { Component, Fragment } from 'react';
import { createPortal } from 'react-dom';
import styled from 'styled-components';
import { CloseBtn } from './CloseBtn';
import { variables } from '../styledComponents/styleUtils';
import { MODAL_ID } from '../config';
const ModalOverlay = styled.div`
top: 0;
le... |
from flask import Blueprint, redirect, url_for
# This is the blueprint object that gets registered into the app in blueprints.py.
index = Blueprint('index', __name__)
@index.route("/")
def index_page():
return redirect(url_for('conveyancer_admin.case_list'))
|
/**
* Base classes in node-js for storm Bolt and Spout.
* Implements the storm multilang protocol for nodejs.
*/
var fs = require('fs');
function Storm() {
this.messagePart = "";
this.taskIdsCallbacks = [];
this.isFirstMessage = true;
this.separator = '\nend\n';
}
Storm.prototype.sendMsgToParent ... |
const config = require('./development')
config.output.publicPath = '/public'
module.exports = config
|
#!/usr/bin/env python
#
# Copyright (c) 2018 Valve Corporation
# Copyright (c) 2018 LunarG, Inc.
#
# 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 limit... |
import sys
from os.path import abspath, dirname, basename, join
#try:
#import social_auth
#social_auth # pyflakes
#except ImportError:
#import sys
# sys.path.insert(0, '..')
sys.path.insert(0, '..')
sys.path.insert(0, '../../python-social-auth')
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ROOT_PATH = absp... |
var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t,r,e){return t(e={path:r,exports:{},require:function(t,r){return function commonjsRequire(){throw new Error("Dynamic requires are not curren... |
const SubWrap = function SubWrap(name, cb, set) {
this.name = name;
this.cb = cb;
this.set = set;
};
SubWrap.prototype.execute = function execute(ev) {
this.cb(ev);
};
SubWrap.prototype.release = function release() {
this.cb = null;
this.set.clear(this);
};
function Stream() {
const streamHandlers = {};
... |
/* @flow */
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import { Dimensions } from 'react-native';
import NativeBaseComponent from '../Base/NativeBaseComponent';
import computeProps from '../../Utils/computeProps';
import ScrollableTabView from './../vendor/react-native-scrollable-tab-... |
__NUXT_JSONP__("/39/26", (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){return {data:[{metaTitle:d,metaDesc:e,verseId:26,surahId:39,currentSurah:{number:"39",name:"الزمر",name_latin:"Az-Zumar",number_of_ayah:"75",text:{"1":" تَنْزِيْلُ الْكِتٰبِ مِنَ اللّٰهِ الْعَزِيْزِ الْحَكِيْمِ ","2":"اِنَّآ اَنْزَلْنَآ اِلَيْكَ الْكِت... |
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/template/mall/nickname/nickname"],{
/***/ 1002:
/*!**************************************************************************************************!*\
!*** D:/work/uniapp/ThorUI-uni/main.js?{"page":"pages%2Ftemplate%2Fmall%2Fnickname%2Fnickname"... |
from finance.ext.search.naver_finance import search_naver_listings
def search_listings(provider: str, query: str):
"""Searches for listings.
Usage:
>>> results = search_listings("naver", "KODEX")
>>> next(results)
Listing(069500, KODEX 200, https://finance.naver.com/item/main.nhn?cod... |
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
import time
import re
import os.path
from os import path
im... |
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
requir... |
#-------------------------------------------------------------------------------
#Navi
#-------------------------------------------------------------------------------
altri_nomi = {
# Specialized Bulin Custom MKIII
"specialized bulin": "specialized bulin custom mkiii",
"ur bulin": "... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
import torchvision.models as models
from core.config import cfg
from model.roi_crop.functions.roi_crop import RoICropFunction
import cv2
import pdb
import random
def save_net(fname, net... |
const mysql = require('../../helpers/mysql')
const crearVuelo = async (datos, aerolineaId) => {
if (!datos.vuelo || !datos.origen || !datos.destino || !datos.salida || !datos.llegada || !datos.precio_business ||
!datos.precio_optima || !datos.precio_economy || !datos.plazas_business || !datos.plazas_optima || ... |
/*
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview
*/
/**#@+
@type String
@example
*/
/**
* Contains the dictionary of language entries.
* @namespace
*/
CKEDITOR.lang['pt-br'] =
{
/**
... |
import numpy as np
import torch
import IPython
from multiprocessing import Process, Pipe
from IPython.core.debugger import set_trace
def worker(child, env):
"""
Worker function which interacts with the environment over remote
"""
try:
while True:
# wait cmd sent by parent
... |
/**
*
* (c) 2010-2020 Wojciech Chmiel
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
'use strict';
import H from '../parts/Globals.js';
import U from '../parts/Utilities.js';
var defined = U.defined, error = U.error, merge = U.merge... |
/**
* Created by PanJiaChen on 16/11/18.
*/
/**
* Parse the time to string
* @param {(Object|string|number)} time
* @param {string} cFormat
* @returns {string | null}
*/
export function parseTime(time, cFormat) {
if (arguments.length === 0 || !time) {
return null
}
const format = cFormat || '{y}-{m}-{... |
import unittest
from unittest import mock
from .variables import *
from .objects import *
from .decorators import *
|
"""All the types that are used in the API."""
import datetime
from typing import List, Optional
import deserialize
from libtvdb.model.parsers import date_parser
from libtvdb.model.company import CompanyType
@deserialize.key("identifier", "id")
@deserialize.parser("active_date", date_parser)
@deserialize.parser("in... |
"use strict"; // Operate in Strict mode such that variables must be declared before used!
var gEngine = gEngine || { };
gEngine.Input = (function () {
// Key code constants
var kKeys = {
// arrows
Left: 37,
Up: 38,
Right: 39,
Down: 40,
// space bar
Spa... |
CKEDITOR.plugins.setLang("image2","km",{alt:"អត្ថបទជំនួស",btnUpload:"បញ្ជូនទៅកាន់ម៉ាស៊ីនផ្តល់សេវា",captioned:"រូបដែលមានចំណងជើង",infoTab:"ពត៌មានអំពីរូបភាព",lockRatio:"ចាក់សោផលធៀប",menu:"លក្ខណៈសម្បត្តិរូបភាព",pathName:"រូបភាព",pathNameCaption:"ចំណងជើង",resetSize:"កំណត់ទំហំឡើងវិញ",resizer:"ចុចហើយទាញដើម្បីប្ដ... |
import THREE from 'three';
import Node from './node';
import Input from './Input';
import Cube from './Cube';
import BuildAction from './BuildAction';
import MoveAction from './MoveAction';
import BuildHotBar from './ui/BuildHotBar';
import BuildMenu from './ui/BuildMenu';
import $ from './constants';
export default (... |
import rospy
import message_filters
import cv2
import numpy as np
from fcn.config import cfg
from utils.blob import im_list_to_blob, pad_im, unpad_im, add_noise
from normals import gpu_normals
from std_msgs.msg import String
from sensor_msgs.msg import Image
def test_ros(sess, network, imdb, meta_data, cfg, rgb, dept... |
# -*- coding: utf-8 -*-
"""Tests for the key interactiveshell module.
Historically the main classes in interactiveshell have been under-tested. This
module should grow as many single-method tests as possible to trap many of the
recurring bugs we seem to encounter with high-level interaction.
"""
# Copyright (c) IPyt... |
export const VIEW = Symbol('VIEW')
|
// Copyright 2020 Mathias Bynens. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
author: Mathias Bynens
esid: sec-names-and-keywords
description: |
Test that Unicode v6.1.0 ID_Continue characters are accepted as
identifier start characters.
info: |
Generated by ... |
/**
* @license Angular v8.2.9
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common/http"),require("@angular/core"),require("rxjs")):"function"==typeof define&&define.amd?define("@angular/common/http/t... |
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { Icon } from '@components/icons';
import { socialMedia } from '@config';
const StyledFooter = styled.footer`
${({ theme }) => theme.mixins.flexCenter};
flex-direction: column;
h... |
import NativeObject from '../NativeObject';
import Widget from '../Widget';
import Composite from './Composite';
import {hint, toValueString} from '../Console';
import {types} from '../property-types';
export default class CollectionView extends Composite {
/**
* @param {Partial<CollectionView>} properties
*/... |
import smartpy as sp
class CompanyStockPriceOracle(sp.Contract):
def __init__(self, admin):
self.init(stockData = sp.map(tkey = sp.TString, tvalue = sp.TRecord(price=sp.TInt,marketCap=sp.TInt)), keysset = sp.set([admin]) , owner = admin)
@sp.entry_point
def feedData(self,params):
... |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'clipboard', 'et', {
copy: 'Kopeeri',
copyError: 'Sinu veebisirvija turvaseaded ei luba redaktoril automaatselt kopeerida. Palun kasutage selleks ... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.25/esri/copyright.txt for details.
//>>built
define("esri/dijit/geoenrichment/utils/PopupUtil","dojo/_base/lang dojo/aspect esri/dijit/geoenrichment/utils/onClickTouch dojo/dom-class dojo/dom-construct dojo/do... |
// flow-typed signature: ff1f952602738738f7d9bf5657718f78
// flow-typed version: <<STUB>>/babel-core_v^7.0.0-bridge.0/flow_v0.85.0
/**
* This is an autogenerated libdef stub for:
*
* 'babel-core'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work ... |
WAF.define('kb_Component', ['waf-core/widget'], function(widget) {
var kb_Component = widget.create('kb_Component', {
init: function() {
}
});
// properties
kb_Component.addProperty('kbParent', {
type: "string",
bindable: false,
onChange: function(newValue) {
this.no... |
import axios from 'axios'
import { MessageBox, Message } from 'element-ui'
import store from '@/store'
import { getToken } from '@/utils/auth'
// create an axios instance
const service = axios.create({
// baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
// withCredentials: true, // send cooki... |
module.exports = new Date(1983, 8, 14)
|
import FirebaseTracker from './FirebaseTracker'
import CountlyTracker from './CountlyTracker'
import MultipleTrackers from './MultipleTrackers'
const tracker = new MultipleTrackers([
new FirebaseTracker(),
// Disable Countly at the the moment
// @see https://github.com/Countly/countly-sdk-react-native-bridge/iss... |
function searching(){
// window.location.href = "{% url 'display-results' %}1"
}
//FUNCTION TO GET THE ARGUMENTS IN THE URL, pass the argument you want. For seach, param = term
function ParseURLParameter(param){
var fullURL = window.location.search.substring(1);
var paramArray = fullURL.split('&');
for(var ... |
import request from '@/utils/request'
export function addMeeting (parameter) {
return request({
url: '/meeting',
method: 'post',
data: parameter
})
}
export function getList (parameter) {
return request({
url: '/meeting',
method: 'get',
params: parameter
})
}
export function delMeetin... |
"use strict";
class LivePhotoElement extends HTMLElement {
static get observedAttributes() {
return ["src"];
}
start(evt) {
this.video.style.display = "inline";
this.img.style.display = "none";
this.video.play();
evt.preventDefault();
}
stop(evt) {
this.img.style.display = "inline"... |
/**
* Copyright 2014 Telerik AD
*
* 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 ... |
import tokens from '@/tokens/tokens-etc.json';
import contracts from '@/contracts/contract-abi-etc.json';
import etc from '@/assets/images/networks/etc.svg';
export default {
name: 'ETC',
name_long: 'Ethereum Classic',
homePage: 'https://ethereumclassic.org/',
blockExplorerTX: 'https://blockscout.com/etc/mainn... |
from clipmanager.singleinstance import SingleInstance
def test_single_instance():
app = SingleInstance()
assert not app.is_running()
app.destroy()
def test_duplicate_instance():
app_a, app_b = SingleInstance(), SingleInstance()
assert not app_a.is_running()
assert app_b.is_running()
app_... |
#!/usr/bin/env python3
"""Progress.
Is Johnny Making Progress?
To train for an upcoming marathon, Johnny goes on one long-distance run
each Saturday. He wants to track how often the number of miles he runs
exceeds the previous Saturday. This is called a progress day.
Create a function that takes in a list of miles ... |
import React from 'react';
import ReactDOM from 'react-dom';
import './global.scss';
import App from './components/App';
ReactDOM.render(
<App />,
document.getElementById('root'),
);
|
from kivy_ios.toolchain import main
main()
|
const DocsJson = require('@ionic/core/dist/docs.json');
const fs = require('fs');
function generateOverlays() {
const components = [
{
tag: 'ion-action-sheet',
controller: 'actionSheetController',
name: 'IonActionSheet'
},
{
tag: 'ion-alert',
controller: 'alertController',
... |
System.registerDynamic('ng2-charts/components/charts/charts', ['@angular/core'], true, function ($__require, exports, module) {
"use strict";
var define,
global = this || self,
GLOBAL = global;
var core_1 = $__require('@angular/core');
var BaseChartComponent = function () {
func... |
(function(d){d['ca']=Object.assign(d['ca']||{},{a:"Image toolbar",b:"No es pot pujar l'arxiu:",c:"Table toolbar",d:"Negreta",e:"Insert image or file",f:"Cursiva",g:"Full size image",h:"Side image",i:"Left aligned image",j:"Centered image",k:"Right aligned image",l:"Cita de bloc",m:"image widget",n:"Escull capçalera",o:... |
import React from 'react'
import PropTypes from 'prop-types'
import Header from './Header/header'
import Footer from '../components/Footer/Footer'
import './layout.css'
const Layout = ({ children }) => (
<>
<Header siteTitle="PearCare" />
<div>{children}</div>
<Footer />
</>
)
Layout.propTypes = {
c... |
/**
* flowground :- Telekom iPaaS / azure-com-notificationhubs-connector
* Copyright © 2019, Deutsche Telekom AG
* contact: flowground@telekom.de
*
* All files of this connector are licensed under the Apache 2.0 License. For details
* see the file LICENSE on the toplevel directory.
*/
const processWrapper = req... |
'use strict';
function boldFont() { // eslint-disable-line no-unused-vars
const font = '\'Yantramanav\', sans-serif';
const url = 'https://fonts.googleapis.com/css?family=Yantramanav:900';
if (document.getElementsByName('mainFrame')[0] !== undefined) {
const frame = $(document.getElementsByName('mainFrame')[0].con... |
import re
from enum import Enum
from typing import Any, Sequence, Tuple, Union
from .datalayer import DataLayer
from .datatypes import Addon, DictEntry, Inflect, Stem, Unique
from .enums import Gender, WordType, get_enum_value
from .matcher import Matcher
class WordsException(Exception):
pass
class Inflection:... |
"""
Whitebox Baseline Word Level Attack using MLMSwap
============================================
"""
from textattack.constraints.grammaticality import PartOfSpeech
from textattack.constraints.pre_transformation import (
RepeatModification,
StopwordModification,
)
from utils.universal_sentence_encoder_de impo... |
#===========================================================================
#
# StrConverter
#
#===========================================================================
"""StrConverter module containing class StrConverter."""
#===========================================================================
# Place all... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b)... |
const webpack = require('webpack');
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const IconfontWebpackPlugin = require('iconfont-webpack... |
var userAccess = (function(){
var getUserAccess = $('input[data-id="user_access"]').val();
var hideNodes = function(){
switch(getUserAccess){
case '3' :
$('#app_users').remove();
$('#app_reports').remove();
break;
case '4' :
$('#app_messsages').remove();
$('#app_rep... |
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Ansible, Inc.
# All Rights Reserved.
from contextlib import contextmanager
from uuid import uuid4
import time
from django.conf import LazySettings
from django.core.cache.backends.locmem import LocMemCache
from django.core.exceptions import ImproperlyConfigured
from django... |