text stringlengths 3 1.05M |
|---|
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var React = _interopRequireWildcard(r... |
// Date and time picker setup
const datePicker = $('#date').pickadate({
editable: true,
format: 'ddd d mmmm, yyyy'
}).pickadate('picker');
const timeOption = {
editable: true,
min: [7, 0], // min = 7 AM
max: [22, 0] // max = 10PM
};
let startPicker = $('#start-time').pickatime(timeOption).pickatime('picker'... |
var reduce = document.querySelector(".chat-reduce");
reduce.addEventListener('click',function(){
{
document.querySelector("#chat-box").style.visibility = 'hidden'
document.querySelector(".user-preview").style.visibility = 'visible'
/*
document.querySelector("#chat-box").style.... |
/*
instruction:
op,from1,from2,dest
opcodes:
1 = [dest] = [from1] + [from2]
2 = [dest] = [from1] * [from2]
99 = normal termination
else = abnormal termination
code and data share the same memory
*/
import * as manager from '../../lib/dayManager.js';
(function(){
manager.day(2, '12... |
function hsr(s, sp) {
return function (x) { return [function (_) { return _; }, function (_) { return _.split("").join("."); }]
.reduce(function (acc, f) { return hsr0(f(s), f(sp), acc); }, x); };
}
function hsr0(s, sp, original) {
var lo = original.toLowerCase();
var i = 0;
var r = "";
whil... |
import logging
from concurrent.futures import ThreadPoolExecutor
import pytest
from functools import partial
from ocs_ci.framework.testlib import ManageTest, tier4, tier4b
from ocs_ci.framework import config
from ocs_ci.ocs import constants
from ocs_ci.ocs.resources.pvc import get_all_pvcs
from ocs_ci.ocs.resources im... |
/* global artifacts:true, web3: true, contract: true */
import chai from 'chai'
import { expectRevert } from '../scripts/helpers.js'
import { ether } from '../scripts/constants.js'
chai.use(require('chai-bignumber')(web3.BigNumber)).should()
const RewardsStorageProxy = artifacts.require('./libraries/RewardsStoragePr... |
const { assert } = require('chai');
// Because truffle does not support overloading
const SimpleAuthorization = artifacts.require('ExtendedSimpleAuthorization'); // eslint-disable-line no-undef
contract('SimpleAuthorization', (accounts) => { // eslint-disable-line no-undef
let simpleAuthorization;
beforeEach(asy... |
import path from 'path'
import runHook from './utils/runHook'
import { TMP_FOLDER, PROJECT } from './constants'
export default function runBeforeCreateProjects() {
runHook('beforeCreateProjects', path.resolve(TMP_FOLDER, PROJECT))
}
|
from __future__ import print_function
import sys
import os
import timeit
import math
import argparse
import fnmatch
import json
parser = argparse.ArgumentParser(description="Python protobuf benchmark")
parser.add_argument("data_files", metavar="dataFile", nargs="+",
help="testing data files.")
par... |
/**
* 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.
*
* @emails oncall+relay
* @flow strict-local
* @format
*/
// flowlint ambiguous-object-type:error
'use strict';
const Profiler... |
#!/usr/bin/env python
"""
Copyright (C) 2012 Bo Zhu http://about.bozhu.me
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 limitation
the... |
import os
import typing
ENCODING = 'utf-8'
CLUSTER_IPS = [cluster_ip for cluster_ip in os.environ['CLUSTER_IPS'].split(',') if cluster_ip]
if len(CLUSTER_IPS) < 1:
raise NotImplementedError('CLUSTER_IPS ENVVar required')
CLUSTER_PORT = int(os.environ.get('CLUSTER_PORT', 9042))
CLUSTER_USERNAME = os.environ.get('CL... |
#coding: utf-8
'''
Univesidade Federal de Pernambuco -- UFPE (http://www.ufpe.br)
Centro de Informatica -- CIn (http://www.cin.ufpe.br)
Bacharelado em Sistemas de Informacao
IF969 -- Algoritmos e Estruturas de Dados
Autor: Marcos Antonio Tavares Galvão
Email: matg@cin.ufpe.br
Licenca: The MIT License (MIT)
C... |
webpackJsonp([62],{59:function(n,e){n.exports="## What's Omiu ?\n\nOmiu is a cross framework UI component library developed based on [OMI](https://github.com/tencent/omi), which outputs custom elements of standard web components. Any component can be used in any framework or frameless environment such as react, Vue, pr... |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-10-19 05:54
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('myInstagram', '0003_auto_20201019_0735'),
]
operations = [
migrations.Alte... |
import React from 'react';
export default function PosterGuidelines() {
return (
<div className="section section-3">
<span className="subtitle">
Poster & Talk Guidelines
{/* <div className="green-ball-1 green-ball-2"></div> */}
</span>
<div className="call">
<p>Proposals... |
import React, { useState, useEffect, useContext } from "react";
import {
Container,
Grid,
Typography,
TextField,
Button,
Dialog,
Select,
Chip,
Divider,
} from "@material-ui/core";
import FaceIcon from "@material-ui/icons/Face";
import GroupIcon from "@material-ui/icons/Group";
import NoteAddIcon from ... |
"""Get the thumbnail stored on the system.
Should work on any linux system following the desktop standards"""
import hashlib
import os
def get_thumbnailfile(filename):
"""Given the filename for an image,
return the path to the thumbnail file.
Returns None if there is no thumbnail file.
"""
# Gener... |
var searchData=
[
['randomstring',['RandomString',['../a00153.html#a83f53ca5c90f0d5a0dbde06fc39d0a42',1,'com.fermod.util.RandomString.RandomString(int length, Random random, String symbols)'],['../a00153.html#ab84d078a3a682a73ebed244f0a2aab5e',1,'com.fermod.util.RandomString.RandomString(int length, Random random)'],... |
import React from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
// import ChartMonitor from 'redux-devtools-chart-monitor';
// Enable LogMonitor to view the tabular debugging output for the sto... |
import path from 'path';
import Case from 'case';
import { storiesOf } from '@storybook/html';
import * as KNOBS from '@storybook/addon-knobs';
/*******************************************************************************
* You should not need to edit anything within this file unless you really *
* want to ge... |
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('info-graph', 'Integration | Component | info graph', {
integration: true
});
test('it renders', function(assert) {
// Set any properties with this.set('myProperty', 'value');
// Handle any a... |
import Image from './';
import ThemeProvider from '../ThemeProvider';
import theme from '../theme';
describe('Image component sanity', () => {
it('has name', () => {
expect(Image.displayName).toBe('Image');
});
it('matches default snapshot', () => {
const component = render(<Image src="test.jpg" />);
... |
import React from "react";
import {
Redirect,
Route,
Switch as MainRoute
} from "react-router-dom";
import DashBoard from "./views/dashboard2";
import Login from "./views/login";
const admin = localStorage.getItem("admin");
export default function App() {
if (!admin) {
return (
<MainRoute>
<R... |
if (!process.env.WCD_APIKEY)
{
console.error("env for Weather Company Data not found");
process.exit(1);
} else
{
console.log(`${WCD_APIKEY}`);
}
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).RevealSearch=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"... |
const reverseWords = (s) => {
return s.split(' ').filter(element => {
if(element) return element;
}).reverse().join(' ');
}
const s = "a good example";
reverseWords(s); |
from pathlib import Path
import pytest
from haystack.document_store.elasticsearch import ElasticsearchDocumentStore
from haystack.pipeline import TranslationWrapperPipeline, JoinDocuments, ExtractiveQAPipeline, Pipeline, FAQPipeline, \
DocumentSearchPipeline, RootNode
from haystack.retriever.dense import DensePas... |
/**
* This class exposes a number of formatting methods for adding specific markup to code text and mutation results
*
* Created by Martin Koster on 06/03/15.
*/
var HandleBars = require('handlebars'),
HtmlParser = require('htmlparser2'),
log4js = require('log4js'),
Q = require('q'),
_ = require('lo... |
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[56],{
/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/CardImage.vue?vue&type=script&lang=js&":
/*!*******************************************************************************************... |
//
// This script generates default templates of the configurations using the base schema.
// The schema is assumed to have been validated using the schema validator script.
//
// If no user input, other than the make message, has been given, then the script should
// create a config file based solely on the required k... |
import { Set } from 'immutable';
import M from "materialize-css";
import React from "react";
import { Highlight } from '../../components/Highlight';
import { ShowMeta } from '../../components/ShowMeta';
import { fetch_data } from "../../util/fetch/data";
import { fetch_meta, fetch_meta_post } from "../../util/fetch/met... |
"""Tests for load vcf functionality"""
from pathlib import Path
from typing import List
from genotype.load import vcf as vcf_mod
from genotype.store.models import SNP, Analysis
def test_load_vcf(bcf_path: Path, snps: List[SNP], sample_id: str):
"""Test to load a vcf"""
# GIVEN a BCF file with one sample and... |
module.exports = {
'extends': '@debitoor/eslint-config-debitoor',
'parser': 'babel-eslint'
}; |
/*
* Copyright © 2016-2018 The ET-iLink 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 applicable l... |
module.exports = {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-typescript',
],
ignore: ['*.js'],
};
|
/* eslint-env mocha */
import React from 'react';
import {spy} from 'sinon';
import {shallow} from 'enzyme';
import {assert} from 'chai';
import AppBar, {getStyles} from './AppBar';
import getMuiTheme from '../styles/getMuiTheme';
import IconButton from '../IconButton';
import FlatButton from '../FlatButton';
describe... |
const crypto = require('crypto');
const { KMSClient, DecryptCommand } = require('@aws-sdk/client-kms');
const meow = require('meow');
const getStdin = require('get-stdin');
(async () => {
const noStdin = process.stdin.isTTY;
const cli = meow({
flags: {
key: {
alias: 'k',
isRequired: true... |
allUsersData = {
color: '#FF9D00',
name: 'All Users',
data: [
[1435769696344,17],[1435769697344,44],[1435769698344,45],[1435769699344,43],[1435769700344,45],[1435769701344,44],[1435769702344,46],[1435769703344,45],[1435769704344,44],[1435769705344,44],[1435769706344,45],[1435769707344,47],[1435769708344,44],[143... |
/*!
* parser-cache <https://github.com/jonschlinkert/parser-cache>
*
* Copyright (c) 2014 Jon Schlinkert, Brian Woodward, contributors.
* Licensed under the MIT license.
*/
'use strict';
var assert = require('assert');
var should = require('should');
var matter = require('gray-matter');
var utils = require('pars... |
const config = require('../../config');
module.exports = function (bunyan) {
const streams = [
{
level: 'info',
stream: process.stdout,
},
];
const logger = bunyan.createLogger({
name: config.logger.loggerName,
streams,
});
return {
/**
* debug logs
* @param {LogFo... |
memberSearchIndex = [{"p":"open.java.toolkit.arrays.lists","c":"EfficientList","l":"add(E)"},{"p":"open.java.toolkit.arrays.lists","c":"InterfaceList","l":"add(E)"},{"p":"open.java.toolkit.swing","c":"SwingHelper","l":"addButton(Window, String, int, int, int, int)","url":"addButton(java.awt.Window,java.lang.String,int,... |
export const SET_USER = "SET_USER"
export const IS_AUTHENTICATED = "IS_AUTHENTICATED" |
/**
* Module dependencies.
*/
var passport = require('passport-strategy')
, url = require('url')
, querystring= require('querystring')
, util = require('util')
, utils = require('./utils')
, OAuth2 = require('oauth').OAuth2
, SessionStateStore = require('./state/session')
//, setup = require('./setup')
... |
import { Filters } from "../../model/filters/Filters";
export let filter = new Filters('.filter-categories-list-item')
filter.filterClick()
|
// @flow
const a = require('../a');
const g = require ('../folder/g')
let m = a + g;
|
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { css } from '@emotion/core';
import { Button } from 'reactstrap';
import { Modal, Form, Card, Container, Row, Col, ListGroup, Table, Tabs, Tab, InputGroup } from 'react-bootstrap';
import { ForceGraph3D, ForceGraph2D, ForceGraphVR } fro... |
// file: src/pages/index/client.js
/* eslint-env browser */
//
import { html, render } from 'uhtml';
import { define } from 'wicked-elements';
import { getRandomValues } from '../../lib/randomClient.js';
import { patchProperty } from '../../lib/shame.js';
import { makeTransfer } from '../../lib/transfer.js';
import { g... |
from setuptools import setup, find_packages
setup(
name="WeatherBeacon",
version="0.1",
packages=find_packages(),
entry_points={
"console_scripts": [
"beacon = beacon.app:run",
"light_control = beacon.light_control:main"
]
}
)
|
// Copyright 2015 Richard Lee
//
// 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 wr... |
/**
* @fileoverview Library Translation file (French).
*
* @license Copyright 2018 The Coding with Chrome 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.ap... |
// flow-typed signature: a9e08adf237618765122d855d06d448d
// flow-typed version: <<STUB>>/babel-jest_v^18.0.0/flow_v0.83.0
/**
* This is an autogenerated libdef stub for:
*
* 'babel-jest'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the... |
const path = require('path');
const chai = require('chai');
const mockdate = require('mockdate');
const { Certificate, Validator } = require('../src');
chai.use(require('chai-as-promised'));
chai.use(require('chai-match'));
const verifyRulesFromCertificate = (dcc, expectedResult, expectedCode, expectedMessageReg = nu... |
// get successful control from form and assemble into object
// http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2
// types which indicate a submit action and are not successful controls
// these will be ignored
var k_r_submitter = /^(?:submit|button|image|reset|file)$/i;
// node names which could be successf... |
// Copyright 2015 Cubane Canada, Inc. All rights reserved.
// See LICENSE for details.
/*---
info: >
GeneratorMethod can reference SuperProperty in arg
features: [generators]
es6id: 14.4.1
author: Sam Mikes
description: GeneratorMethod uses SuperProperty (allowed)
features: [ default-arg, generator, super ]
---*/
v... |
# Copyright (c) 2020 PaddlePaddle Authors. 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 app... |
# Copyright (c) 2014 OpenStack Foundation.
#
# 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 ... |
/* ==========================================================================
* bootstrap-tab-history.js
* Author: Michael Narayan <mnarayan01@gmail.com>
* Repository: https://github.com/mnarayan01/bootstrap-tab-history/
* ==========================================================================
* Licensed under ... |
# Generated by Django 2.1.4 on 2018-12-21 14:58
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('product', '0006_product_accessories'),
]
operations = [
migrations.AlterField(
model_name='cate... |
import { helper } from '@appbaseio/reactivecore';
const { getAggsOrder } = helper;
const extractQuery = (defaultQuery) => {
const queryToBeReturned = {};
if (defaultQuery) {
const evaluateQuery = defaultQuery();
if (evaluateQuery) {
if (evaluateQuery.query) {
queryToBeReturned.query = evaluateQuery.query... |
//--------------------------------------------------
//
// Controller
//
//--------------------------------------------------
import Base from "@BALANCeLibs/Base.js";
import * as m from "@BALANCeLibs/Util/Math.js";
import { Conf } from "@/Conf";
import * as THREE from "three";
import { SVGLoader } from "three/exampl... |
"""
Copyright (c) 2020 Intel Corporation
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... |
$(document).ready(onReady);
function onReady() {
//$("#deleteMod").click(function(){deleteMod();return false;});
};
function deleteMod($id) {
$.post(
'../api/delete_mods.php',
{
"functionName": 'deleteMod',
"id": $id
},
function(data) {
var response = data["deleteMod"];
switch(response) {
cas... |
/*
* grunt-contrib-jshint
* http://gruntjs.com/
*
* Copyright (c) 2012 "Cowboy" Ben Alman, contributors
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all_files: [
'Gruntfile.js',
'tasks/... |
var myTumble = angular.module('myTumble', []);
myTumble.factory('MyBackend', [ '$http', function($http) {
var MyBackend = {};
MyBackend.getUsers = function(filter) {
return $http.get('/api/users' + filter);
};
MyBackend.processedUsers = function(filter) {
return $http.get('/api/processe... |
webpackJsonp([0],{108:function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e... |
bart_large_mnli = {
"description": "Large version of Facebook AI's BART, finetuned on the Multi-Genre Natural Language Inference dataset for zero-shot text classification.",
"tasks": ["text-classification"],
"init_kwargs": {
"model_path": "facebook/bart-large-mnli"
},
"details": {
"n... |
/**
* @param {string} secret
* @param {string} guess
* @return {string}
*/
const getHint = function (secret, guess) {
let bulls = 0;
let secretMap = new Map(), guessMap = new Map();
for (let i = 0; i < secret.length; ++i) {
if (secret[i] === guess[i]) {
++bulls;
continue;... |
'use strict';
var debug = require('debug')('stare.js:server/metrics/');
/* Sets all the available feature extractors/metrics, stare metrics + personal metrics */
const availableMetrics = {
language: require('./language'),
length: require('./length'),
perspicuity: require('./perspicuity'),
ranking: require('.... |
/*
* Copyright (C) 2010 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of ... |
/**
* Module dependencies.
*/
var express = require('../../');
var app = module.exports = express();
// Ad-hoc example resource method
app.resource = function(path, obj) {
this.get(path, obj.index);
this.get(path + '/:a..:b.:format?', function(req, res){
var a = parseInt(req.params.a, 10)
, b = par... |
import importlib
import logging
import os
import sys
from sqlalchemy import create_engine, exc
from sqlalchemy.orm import Session
from moa.helpers import FORMAT
from moa.models import Bridge, Mapping, WorkerStat, BridgeMetadata
moa_config = os.environ.get('MOA_CONFIG', 'DevelopmentConfig')
c = getattr(importlib.impo... |
import React from 'react';
import { Router, Route, Switch } from 'dva/router';
import DexRoutes from './dex/routes';
import AuthRoutes from './auth/routes';
import Face2FaceRoutes from './face2face/routes';
import SocketProvider from 'modules/sockets/Provider';
import Locales from './modules/locales/container'
import T... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module tests model set evaluation and fitting for some common use cases.
"""
# pylint: disable=invalid-name
import pytest
import numpy as np
from numpy.testing import assert_allclose
from astropy.modeling.models import (Polynomial1D, Polynomial2D... |
import datetime
import os
import pytz
import time
from configobj import ConfigObj
from pathlib import Path
import mysql.connector
#
# Functions to get various locations
#
def getKratosHome():
return str(Path(os.path.dirname(os.path.abspath(__file__))))
def getYrSymbolFolder():
return os.path.join(getKratosH... |
export * from '@styled-icons/icomoon/BoxAdd';
|
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* @name: S11.5.1_A3_T1.4;
* @section: 11.5.1;
* @assertion: Operator x * y returns ToNumber(x) * ToNumber(y);
* @description: Type(x) and Type(y) vary between Null and Und... |
#!/usr/bin/python2
# encoding: utf-8
'''
search_nearest.py
@author: Bingqing Qu
@license: GPL
@contact: sylar.qu@gmail.com
'''
from sklearn.neighbors import NearestNeighbors
import numpy as np
import time,sys
try:
import cv2
except:
print("no cv2 found")
# edit root for absolute if any path problem encounte... |
import filterFromObject from './private/filter_from_object';
/**
* Similar to lodash's _.pick(), this returns a copy of the given object's
* own and inherited enumerable properties, selecting only the keys in
* the given array or whose value pass the given filter function.
* @param {object} obj Source ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
import sys
from common import find_mapping, load_mapping
filename = find_mapping()
error = False
with open(filename) as handle:
for line in handle.readlines():
if not re.match('^"\^[^"]*\$",[0-9a-z/_-]*,(.*)?$', line):
print("Line does... |
import { imgSnapshotTest, renderGraph } from '../../helpers/util.js';
describe('Requirement diagram', () => {
it('sample', () => {
imgSnapshotTest(
`
requirementDiagram
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
functionalRequirement ... |
class Solution(object):
def maxDistance(self, nums):
"""
:type arrays: List[List[int]]
:rtype: int
"""
low = float('inf')
high = float('-inf')
res = 0
for num in nums:
# We can use num[0] && num[-1] only because these lists are sorted
... |
/**
*
* Reldens - Actions Server Plugin
*
* This plugin will append to the config processor all the information required by both the server and the client.
* This will also create an instance of each skill to be called and used on the players later.
*
*/
const { SkillConst, SkillsEvents } = require('@reldens/sk... |
const os = require('os');
const path = require('path');
const {app, shell, dialog} = require('electron');
const isMac = process.platform === 'darwin';
const appName = app.getName();
// based on and inspired by
// https://github.com/sindresorhus/anatine/blob/master/menu.js
module.exports = ({createWindow, updatePlugi... |
if(process.env.NODE_ENV !== 'production') {
return
}
var fs = require('fs')
fs.renameSync('public/manifest.json', `public/manifest.${process.argv[2]}.json`)
fs.readFile('public/index.html', 'utf8', function (
err,
contents
) {
contents = contents.replace('<meta name="viewport"',
`<link rel="manifest" href="man... |
import pyombi
import requests
import json
from utils import set_logger
logger = set_logger('ombi')
def get_all_users(config):
headers = {
'accept': 'application/json',
'apiKey': config.ombi_token
}
url = 'http%s://%s:%s%sapi/v1/Identity/Users' % (
's' if config.ombi_ssl else ... |
import React, { createContext, useState, useEffect } from 'react';
import { auth, providerGoogle } from '../firebase';
export const IsAuthContext = createContext([]);
export const IsAuthProv = (props) => {
const [isAuth, setIsAuth] = useState({});
useEffect(() => {
auth.onAuthStateChanged(user => {
... |
"""
usage:
base:
"""
import argparse
import os
from pathlib import Path
import torch
from torchvision import utils
from tqdm import tqdm
from model_stylegan2 import Generator
def load_network(network, network_label, epoch_label, path_log):
# path to files
load_filename = '{}_net_{}.pth'.format(network... |
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2020, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version ... |
import React from "react";
import { connect } from "react-redux";
// import { authenticate } from "../store";
const Login = (props) => {
return (
<div className="login-wrapper">
<div className="content-wrapper" id="login-page-wrapper">
<div id="login-container">
<br />
<br />
... |
define(['./jquery-ui-widget-support', './jquery.childUpdate', './jquery.pjstApply', 'jquery/jquery.xml2json'], function($) {
function clearPreviousTimeout(awsElement) {
awsElement._timerId && clearTimeout(awsElement._timerId);
}
function resetTimeout(awsElement) {
clearPreviousTimeout... |
class Foo {
#tag() {
return this;
}
#tag2 = function() { return this; };
constructor() {
const receiver = this.#tag`tagged template`;
expect(receiver).toBe(this);
const receiver2 = this.#tag2`tagged template`;
expect(receiver2).toBe(this);
}
}
new Foo(); |
"use strict";
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
_Object$defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _classCal... |
"""
python wechaty - https://github.com/wj-Mcat/python-wechaty-puppet-mock
Authors: Jingjing WU (吴京京) <https://github.com/wj-Mcat>
2020-now @ Copyright wj-Mcat
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 ... |
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t \xA0a-gi-z0-9]+/,null,"\t \u00a0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[=*~\^\[\]]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^(?:[A-Z][a-z][a-z0-9]+[A-Z][a-z][a-zA-Z0-9]+)\b/],["lang-",/^\{\{\{([\s\S]+?)\}\}\}/],["lang-",... |
/*
* HomePage
*
* This is the first thing users see of our App, at the '/' route
*/
import React from 'react';
import PropTypes from 'prop-types';
import { Helmet } from 'react-helmet';
import { FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import { compose } from 'redux';
import { c... |
/**
* An event listener is added to listen to tap events on the map.
* Clicking on the map displays an alert box containing the latitude and longitude
* of the location pressed.
* @param {H.Map} map A HERE Map instance within the application
*/
function setUpClickListener(map) {
// Attach an event listene... |
/**
*
* DynamicLandingPage
*
*/
import React, { memo } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { compose } from 'redux';
import ErrorPage from 'next/error';
import { useInjectSaga } from 'utils/injectSaga'... |
# Copyright 2021 Huawei Technologies Co., Ltd
#
# 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... |