text stringlengths 3 1.05M |
|---|
var HOST = {
list: [
{
key: 'On all hosts',
value: 'ALL',
selected: false
},
{
key: 'On any host',
value: 'ANY',
selected: false
}
]
};
var component = FlowComponents.define('app.alerts.editor', function(props) {
this.set('HOST', HOST.list);
this.set('alertIn... |
"""Preprocessing with artifact detection, SSP, and ICA."""
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Matti Hamalainen <msh@nmr.mgh.harvard.edu>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Denis Engemann <denis.engemann@gmail.com>
#
# License: BSD (3-clause... |
import io
import re
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
requires = [pkg.strip() for pkg in open('requirements.txt', 'r').readlines()]
version = ''
with open('use_github3/__init__.py', 'r') as fd:
version = re.search(
r'^__version__\s*=\s*[\'"]([^\... |
//
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) Contributors to the OpenEXR Project.
//
#ifndef INCLUDED_IMF_DEEPIMAGESTATE_ATTRIBUTE_H
#define INCLUDED_IMF_DEEPIMAGESTATE_ATTRIBUTE_H
//-----------------------------------------------------------------------------
//
// class DeepImageStateAttribute
//
/... |
var nodes = new vis.DataSet([
/* {id: a, label: b, ...}, */
{id: '3273', label: 'D2\nFALSE', color: '#31b0d5', title: 'Name: D2<br>Alias: null<br>Value: FALSE<br>Type: CELL_WITH_FORMULA<br>Id: 3273<br>Formula Expression: Formula String: ISEVEN(B2 + A1); Formula Values: ISEVEN(5.0 + 10.8); F... |
import os
# print(f"TEST: {os.getcwd()}") # Print current working directory.
# os.remove("./ovid.txt") # Delete file.
with open("./ovid.txt", "w") as file:
file.write("In nova fert animus mutatas dicere formas corpora; Di, coeptis nam vos mutastis et illas\nadspirate meis primaque ab origine mundi ad mea perpetuu... |
'use strict';
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var uuidV4 = _interopDefault(require('uuid'));
var lie = _interopDefault(require('lie'));
var getArguments = _interopDefault(require('argsarray'));
var events = require('events');
var inher... |
from builtins import object
class Module(object):
def __init__(self, mainMenu, params=[]):
# metadata info about the module, not modified during runtime
self.info = {
# name for the module that will appear in module menus
'Name': 'Linux PillageUser',
# list of ... |
from django.contrib import admin
from .models import Contact
admin.site.register(Contact)
# Register your models here.
|
import React from 'react';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import TodoList from './todo/TodoList';
import s from './TaskTotal.less';
class TaskTotal extends React.Component {
componentDidMount() {
this.props.onUpdate();
}
render() {
const {service, document, dispatch, b... |
/*global require, exports*/
/**
* @module montage/ui/base/abstract-video.reel
*/
var Component = require("../component").Component,
MediaController = require("../../core/media-controller").MediaController;
/**
* @class AbstractVideo
* @extends Component
*/
var AbstractVideo = exports.AbstractVideo = Componen... |
/**
* Retrieves the translation of text.
*
* @see https://developer.wordpress.org/block-editor/packages/packages-i18n/
*/
import { __ } from '@wordpress/i18n';
/**
* React hook that is used to mark the block wrapper element.
* It provides all the necessary props like the class name.
*
* @see https://developer.... |
const runAction = require('../helpers/run-action.js')
const steps = ['pre', 'main']
module.exports = ref => async () => {
process.chdir('test')
const baseRef = process.env.GITHUB_BASE_REF
const curRef = process.env.GITHUB_REF
process.env.GITHUB_BASE_REF = ref
delete process.env.GITHUB_REF
return await runA... |
import router from "../../router";
const state = {
error: null,
entries: [],
entry: null,
current_page: 1,
length: 1
};
const mutations = {
clearEntries: state => {
state.entries = [];
},
clearEntry: state => {
state.entry = null;
},
clearCurrentPage: state => ... |
# 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, software
# distributed under the Li... |
/*
* Copyright 2017 Alexander Pustovalov
*
* 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 a... |
# test decorators
def dec(f):
print('dec')
return f
def dec_arg(x):
print(x)
return lambda f:f
# plain decorator
@dec
def f():
pass
# decorator with arg
@dec_arg('dec_arg')
def g():
pass
# decorator of class
@dec
class A:
pass
|
/**
* @file Node.js - Simple node types
* @author {@link mailto:grant.vergottini@xcential.com Grant Vergottini}
* @version 1.0
* @copyright © 2019 -- {@link http://xcential.com Xcential Corp.}
*/
exports.Node = {
ELEMENT_NODE: 1,
ATTRIBUTE_NODE: 2,
TEXT_NODE: 3,
CDATA_SECTION_NODE: 4,
PROCESSING_IN... |
from ast import *
from utils import input_int
class InterpPvar:
def interp_exp(self, e, env):
match e:
case BinOp(left, Add(), right):
l = self.interp_exp(left, env)
r = self.interp_exp(right, env)
return l + r
case UnaryOp(USub(), v):
return - self.interp_exp(v, env)
... |
def partTwo(instr: str) -> int:
joltages = sorted([int(x) for x in instr.strip().split("\n")])
route_lengths = {0: 1}
for joltage in joltages:
total_routes = 0
# Get the route lengths for the three previous joltages
for n in [1, 2, 3]:
total_routes += route_lengths.get(j... |
import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import withStyles from '../styles/withStyles';
export const styles = theme => (... |
var assert = require('assert');
var moment = require('moment');
describe('launder', function() {
var launder = require('../index.js')();
it('should exist', function() {
assert(launder);
});
describe('instantiation', function(){
it('should have default filterTag function', function(){
assert(typ... |
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import ExecutionEnvironment from 'fbjs/lib/ExecutionEnvironment';
let useHasFeature;
if (ExecutionEnvironment.canUseDOM) {
useHasFeat... |
#ifndef __FONT_H__
#define __FONT_H__
/*
* // Summary: font8x8.h
* // 8x8 monochrome bitmap fonts for rendering
* //
* // Author:
* // Marcel Sondaar
* // International Business Machines (public domain VGA fonts)
* //
* // License:
* // Public Domain
*/
const int FONT_WIDTH = 8;
const int FONT_H... |
/**
* By Evan Raskob (http://twitter.com/evanraskob),
*/
var handRotation = 0; // degrees the hand is rotated
function rotateHand()
{
var clockHand = document.getElementById("minutehand");
var rx = clockHand.getAttribute('x1');
var ry = clockHand.getAttribute('y1');
clockHand.setAttribute('transform',... |
import mongoose from "mongoose";
require("babel-core/register");
require("babel-polyfill");
import fs from "fs";
import path from "path";
import jwt from 'jsonwebtoken';
import express from "express";
import validate from 'express-validation';
import bodyParser from 'body-parser';
import passport from 'passport';
impo... |
from validateuserdata.validate_user_data import validate_user_data
|
import os
import tempfile
import unittest
import logging
from pyidf import ValidationLevel
import pyidf
from pyidf.idf import IDF
from pyidf.room_air_models import RoomAirSettingsThreeNodeDisplacementVentilation
log = logging.getLogger(__name__)
class TestRoomAirSettingsThreeNodeDisplacementVentilation(unittest.TestC... |
export default class Board {
/**
* Constructor of class Board.
*
* @param int [n] board size.
* @since 1.0.0
* @author Muhammad Umer Farooq
*
* @return void.
*/
constructor(n) {
//size of board
if (n == 3)
this.size = n
else
throw "The board size should be equal to 3."... |
// --------------------
// Account namespace controller
// index action
// --------------------
// libraries
var forms = require('../../../../../lib/forms');
// exports
// action definition
exports = module.exports = {
// vars
title: 'My Account',
// functions
init: function(defaultFn) {
// record model fie... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <memory>
#include <tensorpipe/channel/context.h>
namespace tensorpipe {
name... |
import lxml.etree
import Bcfg2.Server
import Bcfg2.Server.Plugin
import glob
import os
import socket
#manage boot symlinks
#add statistics check to do build->boot mods
#map profiles: first array is not empty we replace the -p with a determined profile.
logger = Bcfg2.Server.Plugin.logger
class BBfile(Bcfg2.Server.... |
import { __decorate } from "tslib";
import { Component, Input, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
import { regExpEscape, toString } from '../util/util';
/**
* A component that helps with text highlighting.
*
* If splits the `result` text into parts that contain the searched `term` and... |
const ShellQuote = require("shell-quote");
const execa = require("execa");
const defaultShell = require("default-shell");
const stripAnsi = require("strip-ansi");
async function getShellEnv({ cwd } = {}) {
const args = [
"-ilc",
[
...(!cwd ? [] : [ShellQuote.quote(["cd", cwd])]),
'echo -n "_SHELL... |
import random
import warnings
import numpy as np
import torch
from mmcv.parallel import MMDataParallel, MMDistributedDataParallel
from mmcv.runner import build_optimizer, build_runner
from mmseg.core import DistEvalHook, EvalHook
from mmseg.datasets import build_dataloader, build_dataset
from mmseg.utils import get_r... |
import importlib
import json
import os
import re
from copy import deepcopy
from typing import Sequence, Tuple, MutableSequence, Callable
import jsonschema
import pytest
import yaml
import util
from dresources import DResource
from external_services import ExternalServices
from manifest import Resource
from mock_exter... |
const DrawCard = require('../../../drawcard.js');
class OlennasCunning extends DrawCard {
setupCardAbilities() {
this.reaction({
when: {
afterChallenge: event => ['intrigue', 'power'].includes(event.challenge.challengeType) && event.challenge.winner === this.controller
... |
/**
* Copyright 2019-2021 the original author or authors from the JHipster project.
*
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the L... |
import { Link } from "gatsby"
import PropTypes from "prop-types"
import React, { useState } from "react"
import {
Collapse,
Navbar,
NavbarToggler,
NavbarBrand,
Nav,
NavItem,
NavLink,
} from "reactstrap"
const Header = props => {
const [isOpen, setIsOpen] = useState(false)
const toggle = () => setIsO... |
System.register(["./p-651ecf64.system.js"],function(t){"use strict";var e,n,i,u;return{setters:[function(t){e=t.r;n=t.c;i=t.h;u=t.H}],execute:function(){var s=function(){function t(t){e(this,t);this.valueChanged=n(this,"valueChanged",7);this.focusGained=n(this,"focusGained",7);this.focusLost=n(this,"focusLost",7)}t.pro... |
"""
Overview
--------
This module provides classes which can be used to create a GUI.
The central component is the UIManager. You can chose between two of them:
- :py:class:`arcade.gui.UIManager` (will be deprecated)
- Manages UIElements
- Supports hover and focus of UIElements
- :py:class:`arcade.gui.UILa... |
//
// Created by 理 傅 on 2017/1/1.
//
#ifndef KCP_REEDSOLOMON_H
#define KCP_REEDSOLOMON_H
#include "matrix.h"
#include "inversion_tree.h"
#include "galois.h"
class ReedSolomon {
public:
ReedSolomon() = default;
ReedSolomon(int dataShards, int parityShards);
// New creates a new encoder and initializes i... |
# generated by datamodel-codegen:
# filename: storage.json
from __future__ import annotations
from typing import Dict
from typing import List
from typing import Optional
from typing import Union
from pydantic import BaseModel
from pydantic import Extra
class Key(BaseModel):
class Config:
extra = Ext... |
# coding=utf-8
"""
Entrypoint module, in case you use `python -m pylicense-manager`.
Why does this file exist, and why __main__? For more info, read:
- https://www.python.org/dev/peps/pep-0338/
- https://docs.python.org/2/using/cmdline.html#cmdoption-m
- https://docs.python.org/3/using/cmdline.html#cmdoption-m
"""
f... |
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Books(models.Model):
book_name = models.CharField(max_length=200, null=True)
author_name = models.CharField(max_length=200, null=True)
category = models.CharField(max_length=200, null=True)
book_... |
import React from 'react';
import { withTheme } from 'styled-components';
const CloseIconWithBorder = withTheme(({ width, height }) => {
return (
<>
<svg
width={`${width}px`}
height={`${height}px`}
viewBox="0 0 21 21"
fill="none"
xmlns="http://www.w3.org/2000/svg">
... |
from PIL import Image
class MosaicTile(object):
def __init__(self):
pass
def createFrom(self, srcImage, width, height):
""" Create a resized tile from an image.
Args: srcImage: source image filename
width, height: size of the tile in pixels
"""
f = ope... |
import numpy as np
from dipy.tracking.distances import (bundles_distances_mam,
bundles_distances_mdf)
if __name__ == '__main__':
np.random.seed(42)
filename_idxs = [0, 1]
embeddings = ['DR', 'FLIP']
ks = [5, 20, 40, 100]
nbs_points = [20, 64]
distance_thresh... |
var hamburger = document.querySelector(".hamburger");
var menu = document.querySelector(".menu");
hamburger.addEventListener("click", function(event) {
event.preventDefault();
hamburger.classList.toggle("hamburger--open");
menu.classList.toggle("menu--open");
});
$('form#contact_form').validate({
messages: { },... |
# -*- coding: utf-8 -*-
"""Beautiful Soup bonus library: Unicode, Dammit
This library converts a bytestream to Unicode through any means
necessary. It is heavily based on code from Mark Pilgrim's Universal
Feed Parser. It works best on XML and HTML, but it does not rewrite the
XML or HTML to reflect a new encoding; th... |
from typing import List
from typing import Union
import syft
from syft.generic.frameworks.hook.hook_args import one
from syft.generic.frameworks.hook.hook_args import register_type_rule
from syft.generic.frameworks.hook.hook_args import register_forward_func
from syft.generic.frameworks.hook.hook_args import register_... |
import matplotlib
matplotlib.use('module://kivy.garden.matplotlib.backend_kivy')
from pyawl.app import PyAwlApp
app = PyAwlApp()
app.run()
|
import discord
from discord.ext import commands
# todo
# locked check
# bot admin check
# bot operator check
# make danny checks override correctly
# user_has_permissions vs bot_has_permissions vs check_permissions
# uses bot._properties now
async def global_checks(ctx):
# return await bulbe_perm_ch... |
/*
* This header is generated by classdump-dyld 1.0
* on Wednesday, March 22, 2017 at 9:09:48 AM Mountain Standard Time
* Operating System: Version 10.1 (Build 14U593)
* Image Source: /System/Library/PrivateFrameworks/PlacesKit.framework/PlacesKit
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias... |
/**
* This Field is useful for containing multiple {@link Ext.field.Radio radiofield}.
*
* It plots items into wither horizontal / vertical depending on
* {@link Ext.field.FieldGroupContainer#vertical} config properties.
*
* ## Example usage
*
* @example
* Ext.create('Ext.form.Panel', {
* t... |
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//
// Buffer Definitions:
//
// cbuffer BufferCopyParams
// {
//
// uint FirstPixelOffset; // Offset: 0 Size: 4 [unused]
// uint PixelsPerRow; // Offset: 4 Size: 4 [unused]
// uint ... |
import pathlib
DEBUG = True
SQLALCHEMY_DATABASE_URI = 'sqlite:///'+str(pathlib.Path(__file__).parent)+'/../var/test.db'
SQLALCHEMY_TRACK_MODIFICATIONS = False
MASTER_KEY = 'test'
|
import logging
import os
from subprocess import Popen, PIPE
from typing import List
from ..utils import sample_name_from_fasta_path, run_command, sample_name_from_fastq_paths
def sketch_fasta(fasta_path, mash_bin="mash", tmp_dir="/tmp", sample_name=None, k=16, s=400):
"""Create Mash sketch file
Args:
... |
#!/usr/bin/env python
# coding: utf-8
# In[1]:
get_ipython().run_line_magic('load_ext', 'autoreload')
get_ipython().run_line_magic('autoreload', '2')
import matplotlib.pyplot as plt
import numpy as np
import pickle
import os
import os.path
import scipy,scipy.spatial
import matplotlib
matplotlib.rcParams['figure.dp... |
#!/usr/bin/env python3 -u
# 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.
import argparse
import os
import os.path as osp
import numpy as np
import tqdm
import torch
import rando... |
from keras.applications.resnet50 import ResNet50
from keras.preprocessing import image
from keras.applications.resnet50 import preprocess_input, decode_predictions
import numpy as np
model = ResNet50(weights='imagenet')
img_path = 'Data/Jellyfish.jpg'
img = image.load_img(img_path, target_size=(224, 224))
x ... |
(function() {
'use strict';
angular
.module('app.layout')
.controller('Shell', Shell);
/* @ngInject */
function Shell($timeout, config, logger) {
/*jshint validthis: true */
var vm = this;
vm.title = config.appTitle;
vm.busyMessage = 'Please wait ...';
... |
#!/usr/bin/env python
#
# spyne - Copyright (C) Spyne contributors.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later ve... |
# 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, software
# d... |
import os.path
from configparser import ConfigParser
paths_section = 'PATHS'
default_path = "./cfg/config.ini"
# All options are placed here in dict with default values to be easier to configurate
default_options_dict = {
"git_bash_path": "/bin/bash",
}
class Config:
def __init__(self, path=default_path):
... |
import os
import sys
sys.path.append('/Users/apple/Documents/Projects/Self/PyPi/htmlrunner')
import unittest
from htmlrunner import Runner, HTMLRunner
from htmlrunner.loader import group_test_by_class, flatten_suite
from htmlrunner.result import Result
basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file_... |
#!/usr/bin/env python2
import Image
import sys
padding_x = 16
padding_y = 8
width = 800
if len(sys.argv) < 3:
self_name = os.path.basename(__file__)
print '* Usage: %s <images> <output>' % self_name
sys.exit(-1)
if len(sys.argv) == 3:
flist = []
import os
for filename in os.listdir(sys.argv[1]):
flist.app... |
# -*- coding: utf-8 -*-
from __future__ import print_function
import math
import random
from simanneal import Annealer
import itertools
import matplotlib.pyplot as plt
def MCA(t, k, v, printable):
'''
This function takes a strength, number of rows
and value and generates an exhaustive MCA for
... |
/*! For license information please see 9-es2015.e427e1d609a09ca5c9a1.js.LICENSE.txt */
(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{"+s0g":function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_de... |
# -*- coding: utf-8 -*-
import os
import sys
import csv
import time
import json
import datetime
import pickle as pkl
import tensorflow as tf
from tensorflow.contrib import learn
import data_utils
from rnn_classifier import rnn_clf
from cnn_classifier import cnn_clf
from clstm_classifier import clstm_clf
from sklearn.m... |
let assert = require("assert");
let kofi = require("../.bundle/kofi-queue.js");
describe("queue", function () {
it("executes all functions provided", function (done) {
let q = kofi.queue();
let e1 = false, e2 = false, e3 = false;
q.then(function (next) {
e1 = true;
r... |
#!/usr/bin/env python
# Test whether a retained PUBLISH to a topic with QoS 1 is retained.
# Subscription is made with QoS 0 so the retained message should also have QoS
# 0.
import subprocess
import socket
import time
import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-fr... |
/* istanbul instrument in package npmdoc_social_cms_backend */
/*jslint
bitwise: true,
browser: true,
maxerr: 8,
maxlen: 96,
node: true,
nomen: true,
regexp: true,
stupid: true
*/
(function () {
'use strict';
var local;
// run shared js-env code - pre-init
(function ()... |
var book = {
"name": "Galatians",
"numChapters": 6,
"chapters": {
"1": {
"1": "<sup>1</sup> Paul, an apostle (not from men nor through man, but through Jesus Christ and God the Father who raised Him from the dead),",
"2": "<sup>2</sup> and all the brethren who are with me, To the churches of Galatia:",
"3... |
"use strict";
var assert = require('assert');
const cache = require('../../services/cacheService')();
const userService = require('../../services/userService')(cache);
//Room service unit-testing
describe('User Service:', function () {
describe('Cache Service usage:', function () {
it('Create a new user'... |
#ifndef STDAFX_H
#define STDAFX_H
#include "../SDK/Core/Utils/LoggerBase.h"
#include "../SDK/Platform.h"
#include <al.h>
#include <alc.h>
#pragma comment (lib, "OpenAL32.lib")
#endif |
# whether or not to include evaluation info
INCLUDE_EVAL = True
# count threshold to include in the "count detail" graphs
GRAPH_THRESHOLD = 100
# whether to include results with no forms in the graphs.
INCLUDE_EMPTIES_IN_GRAPH = False
|
// blank controller
skin_laser_center.controller('SkinLaserCenterServiceController', SkinLaserCenterServiceController);
function SkinLaserCenterServiceController($scope, $http) {
// var hospital_id = document.getElementsByName('hospital_id')[0].value;
// console.log(hospital_id);
$http
... |
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//
#import <UIKit/UIView.h>
#import "UICollectionViewDataSource-Protocol.h"
#import "UICollectionViewDelegate-Protocol.h"
#import "UIColl... |
/* /* if(foo) {} |
import { useState, useRef, useEffect } from 'react';
import { Col, Row, Divider } from 'antd';
import { LockOutlined } from '@ant-design/icons';
import { QueryBuilder, useDryRun } from '@cubejs-client/react';
import styled from 'styled-components';
import { playgroundAction } from './events';
import MemberGroup from '... |
import webbrowser as wb
class Movie():
"""
This class provides a way to store movie information.
"""
ratings = ['G', 'PG', 'PG-13', 'R']
def __init__(self, title, storyline, poster_image_url, trailer_youtube_url):
self.title = title
self.storyline = storyline
self.... |
function innerRanges(nums, l, r) {
const result = [];
const format = function(a,b) {
if (a <= b) {
result.push(a < b ? `${a}->${b}` : `${a}`);
}
}
nums.forEach(n => {
if (l < n) {
format(l, n - 1);
}
l = 1 + n;
});
... |
# -*- coding: utf-8 -*-
# Copyright: (c) 2020, Andrew Klychkov (@Andersson007) <aaklychkov@mail.ru>
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import pytest
from ansible_collections.community.mysql.plugins.module_utils.implementations.mariadb.replication import uses_repli... |
# Copyright 2018 IBM Corp. 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 law or agreed ... |
"""
Django settings for pipeline_nanny project.
Generated by 'django-admin startproject' using Django 1.8c1.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
# Bui... |
/****************************************************************************
Copyright (c) 2009 On-Core
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (C) 2013-2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software ... |
var searchData=
[
['facebookapprequestmessage_2ecs',['FacebookAppRequestMessage.cs',['../_facebook_app_request_message_8cs.html',1,'']]],
['facebookconnectingmessage_2ecs',['FacebookConnectingMessage.cs',['../_facebook_connecting_message_8cs.html',1,'']]],
['facebookconnection_2ecs',['FacebookConnection.cs',['../... |
import unittest
# O(n*2^n) time | O(n*2^n) space
def powerset(array):
# first, we define our empty array of subsets
# we include the empty array [] also:
subsets = [[]]
# for each element in the array, we do a for loop
# and we append it to the current subset. With this, we can get
for ele in array:
fo... |
import discord
from discord.ext import commands
from discord.ext.commands import Bot
import os
import traceback
bot = commands.Bot(command_prefix='/')
token = os.environ['DISCORD_BOT_TOKEN']
@bot.event
async def on_command_error(ctx, error):
orig_error = getattr(error, "original", error)
error_msg = ''.join... |
module.exports = {
images: {
domains: ["untappd.akamaized.net"]
}
};
|
from collections import namedtuple, deque, Counter
import copy
import json
import logging
import requests
import time
from datetime import datetime as dt
import warnings
log = logging.getLogger(__name__)
class RateLimitCache(object):
def __init__(self, n, t=60):
self.n = n
self.t = t
self.... |
/**
* First we will load all of this project's JavaScript dependencies which
* includes React and other helpers. It's a great starting point while
* building robust, powerful web applications using React + Laravel.
*/
require("./bootstrap");
/**
* Next, we will create a fresh React component instance and attach ... |
# coding:utf-8
"""
@Author : b1xian
@Time : 2019/12/7
"""
import cv2
import os
import time
from Retinanet import Retinanet
import argparse
def detect_video(model, input_path, output_path, video_name, alarm_range):
fourcc = cv2.VideoWriter_fourcc('m', 'p', '4', 'v')
video_capture = cv2.VideoCapture(os.pat... |
//
// CLPlaceHolderStyleWechat.h
// TestDemo1231
//
// Created by YuanRong on 16/1/6.
// Copyright © 2016年 FelixMLians. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol CLPlaceHolderStyleWechatDelegate <NSObject>
@required
- (void)emptyOverlayClicked:(id)sender;
@end
@interface CLPlaceHolderStyleWech... |
/*
* WebGLInspector
* Visit http://createjs.com/ for documentation, updates and examples.
*
* Copyright (c) 2010 gskinner.com, 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 w... |
'use strict'
var cp = require('child_process')
var fs = require('fs')
var IncomingMessage = require('http').IncomingMessage
var os = require('os')
var path = require('path')
var util = require('util')
var isRegExp = require('core-util-is').isRegExp
var mkdirp = require('mkdirp')
var pFinally = require('p-finally')
va... |
'use strict';
const mergeSort = require('../mergeSort.js');
describe('Merge Sort Tests', () => {
let testArray;
beforeEach(() => {
testArray = [2, 4, 3, 5, 1, 7, 6];
});
it('should actually sort the array', () => {
expect(mergeSort).toBeDefined();
// Act
let answer = mergeS... |
/**
* Created by rahulguha on 17/09/14.
*/
var app = require('../audit')
, request = require('supertest');
describe('ping api', function(){
describe('requesting /ping using GET method', function(){
it('should respond with 200', function(done){
request(app)
.get('/ping')
... |
# -*- coding: utf-8 -*-
import os
from selene import browser
from selene import config
from selene.browsers import BrowserName
from selene.conditions import texts, exact_text
from selene.support.conditions import have
from selene.support.jquery_style_selectors import s, ss
start_page = 'file://' + os.path.abspath(os.... |