text stringlengths 3 1.05M |
|---|
/**
* Maps an array of Formulate fields into an associative array, with the field
* ID as the key and the field as the value.
* @param fields The array of fields to map.
* @returns {{}} The associative array of fields.
*/
function mapFields(fields) {
// Variables.
let i, fieldMap, field, fieldId;
// ... |
module.exports = [
'0.1.0',
'0.1.1',
'0.2.0',
'0.2.1',
'0.2.2',
'0.2.3',
'0.2.4',
'0.2.5',
'0.2.6',
'0.2.7',
'0.2.8',
'0.2.9',
'0.2.10',
'0.2.11',
'0.2.12',
'0.2.13',
'0.2.14',
'0.3.0',
'0.3.1',
'0.3.2',
'0.3.3',
'0.4.0',
'0.4.1',
'0.9.9',
'0.9.10',
'0.9.11',
'1.0.0... |
from sardine.exceptions.lang.lang_exception import SardineLangException
class CannotRedefineAlias(SardineLangException):
def __init__(self, alias: str):
super().__init__(f"Tried redefining alias '{alias}'")
|
import React from 'react'
class Footer extends React.Component {
render() {
return (
<section className='mt6'>
<footer className="pv4 ph3 ph5-ns tc">
<small className="f6 db hint-text pv3 tc">© 2019 <b className="ttu">Ahmer Malik</b>, ALL RIGHTS RESERVED.</small>
</footer>
</section>
)
}
}
export defau... |
const helpers = require('../../../test/test-helper');
// Filled in after mocking occurs
let checkStatusFunction;
let token;
const baseContext = {
ACCOUNT_SID: 'ACXXX',
AUTH_TOKEN: 'abcdef',
getTwilioClient: jest.fn(),
};
const mockStatuses = {
statuses: [
async () => 'good one',
async () => {
th... |
/**
* Created by bln on 16-6-28.
*/
var bunyan = require('bunyan');
var path = require('path');
var fs = require('fs');
var globalConfig = require('./config.js');
var logConfig = globalConfig.log,
accessPath = logConfig.access(),
errorPath = logConfig.error();
if (!fs.existsSync(logConfig.dir())) {
fs.m... |
import numpy as np
def sigmoid(x):
return 1.0 / (1 + np.exp(-x))
def y_hat(weights, bias, x):
return np.dot(weights, x) + bias
def cost(y, output):
return -(y*np.log(output) - (1-y)*np.log(1-output))
def gradient_descent(x, y, weights, bias, learnrate):
y_h = y_hat(weights, bias, x)
weights += learnrate * (y-y... |
import React from 'react'
const ServicesPage = () => {
return (
<div>
<h1>Our Services</h1>
<p>
Doctrina legam an proident exquisitaque, singulis enim ingeniis, malis
et mentitum, iudicem si illum appellat id dolore e singulis, pariatur eu
probant ad possumus sunt probant, iru... |
/**
* Copyright 2013-present, Facebook, Inc.
* 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. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModu... |
(function () {
'use strict';
angular
.module('app.admin')
.controller('adminController', adminController);
adminController.$inject = ['User', 'TaskService'];
/* @ngInject */
function adminController(User, TaskService) {
var vm = this;
vm.title = 'adminController';
... |
import Axios from "axios";
import { server } from "../util/Env.util";
export function registerUser(user) {
return Axios.post(`${server}/auth/local/register`, user);
}
export function loginUser(user) {
return Axios.post(`${server}/auth/local`, user);
}
export function userRoles() {
return Axios.get(... |
import { live, checked, removeValues, resetValues, prop, addClass, removeClass } from 'components/utils';
document.addEventListener('turbolinks:load', () => {
live("#member_waiting_basket_size_input input[type='radio']", 'change', event => {
const extraPrice = '#member_waiting_basket_price_extra_input';
cons... |
//// [unusedLocalsOnFunctionDeclarationWithinFunctionExpression2.ts]
var greeter = function (person: string, person2: string) {
var unused = 20;
function maker(child: string): void {
var unused2 = 22;
}
function maker2(child2: string): void {
var unused3 = 23;
}
maker2(person2)... |
// DETAILS: This class just routes things to the right component so the component can deal with it
// Constants (self-made)
const Debug = require("./../../Debug"),
MimeTypes = require("./MimeTypes"),
HttpTemplates = require("./Templates"),
GenericResponses = require("./GenericResponses"),
... |
"""Get information about an user on GitHub
Syntax: .github USERNAME"""
from telethon import events
import requests
from userbot.utils import admin_cmd
@borg.on(admin_cmd("github (.*)"))
async def _(event):
if event.fwd_from:
return
input_str = event.pattern_match.group(1)
url = "https://api.github... |
const R = require('ramda')
const { log } = console
const { map, compose, equals } = R
const prompt = require('readline-sync')
class IO {
// of :: (IO f) => a -> f a
static of (value) {
return new IO(value)
}
constructor (value) {
if (typeof value !== 'function') {
throw new Error('IO Monad re... |
var UniJSnodeReq = require;
var requireTags, require = function(req) {
requireTags = req.split('!');
return UniJSnodeReq(requireTags.pop());
};
require.resolve = UniJSnodeReq.resolve;
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && ob... |
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_pre... |
/**
* Original Work Copyright 2014 IBM Corp.
*
* Copyright (c) 2016, Klaus Landsdorf (http://bianco-royal.de/)
* All rights reserved.
* node-red-contrib-modbus
*
* 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... |
"""Weight of Evidence"""
import numpy as np
import pandas as pd
from sklearn.base import BaseEstimator, TransformerMixin
import category_encoders.utils as util
from sklearn.utils.random import check_random_state
__author__ = 'Jan Motl'
class WOEEncoder(BaseEstimator, TransformerMixin):
"""Weight of Evidence codin... |
/**
* Copyright IBM Corp. 2016, 2021
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*
* Code generated by @carbon/icon-build-helpers. DO NOT EDIT.
*/
'use strict';
var iconPropTypes = require('./iconPropTypes-b9203099.js');
va... |
const config = {
projectName: 'taro-demos',
date: '2018-11-20',
designWidth: 750,
deviceRatio: {
'640': 2.34 / 2,
'750': 1,
'828': 1.81 / 2
},
sourceRoot: 'src',
outputRoot: 'dist',
plugins: {
babel: {
sourceMap: true,
presets: [
'env'
],
plugins: [
... |
'use strict'
const dependencies = require('electron-installer-common/src/dependencies')
const spawn = require('./spawn')
const dependencyMap = {
gconf: 'GConf2',
glib2: 'glib2',
gtk2: 'gtk2',
gtk3: 'gtk3',
gvfs: 'gvfs-client',
kdeCliTools: 'kde-cli-tools',
kdeRuntime: 'kde-runtime',
notify: 'libnotify... |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2014-2019, Lars Asplund lars.anders.asplund@gmail.com
"""
UI class Results
"""
class Results(object)... |
module.exports = {
singleQuote: true,
trailingComma: 'all',
overrides: [
{
files: '*.json',
options: { trailingComma: 'none' },
},
],
};
|
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("codesnippet","th",{button:"แทรกชิ้นส่วนของรหัสหรือโค้ด",codeContents:"Code content",emptySnippetError:"A code snippet cannot be empty.",langu... |
/**
* Copyright 2020 Dhiego Cassiano Fogaça Barbosa
* 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... |
/* global define: false */
define(['../TrackingInfo'], function(TrackingInfo) {
'use strict';
/**
* Sets metadata applicable to all {@link TrackingInfo} instances.
* This metadata will be added to any TrackingInfo instance prior
* to being persisted to registered collectors.
* @cla... |
def pad(s,l,c=" "):
return (s+(c*l))[:l]
class LineBuffer:
def __init__(self,s,l=None):
if l is None:
l = len(s)
self.s = s
self.l = l
self.draw()
def set(self,s):
self.s = s
if len(self.s)>self.l:
self.l = len(self.s)
elif len(self.s)<self.l:
self.s = pad(self.s,self.l)
def get(self):
r... |
import React from 'react'
import Link from 'gatsby-link'
import styles from './Projects.module.css'
import Container from './'
import { evoHaxMockup, sweshareMockup, theListeningRoomMockup, websiteMockup } from '../images/projects'
import { chevronBlack } from '../images'
import {
reactImg,
bootstrapImg,
fireb... |
from .body_types import Transaction, Block
|
var request = require('request'),
log = require('bole')('npme-verify-trial');
module.exports = function(verificationKey, callback) {
var trialEndpoint = process.env.LICENSE_API + '/trial';
// check if a trial with this verification key exists already
request.get({
url: trialEndpoint + '/' + verificationK... |
import React from "react"
import styled from 'styled-components'
const VideoWrapper = styled.div `
background-color: #000;
color: #fff;
font-family: 'Roboto', sans-serif;
font-weight: 700;
max-height: 70rem;
position: relative;
overflow: hidden;
text-align: center;
text-transform: u... |
module.exports = {
total: 552,
directives: 15,
tags: 133,
attributes: 79,
css: 75,
scripts: 38,
comments: 60,
text: 49,
spaces: 103,
rawTotal: 552
};
|
#!/usr/bin/env python
import glob
import os
import re
import shutil
import subprocess
import sys
import stat
from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, PLATFORM, \
get_target_arch, get_chromedriver_version, \
get_platform_key
from lib.util import scoped_c... |
export default {
// API *** you have to run Co2VisualBackEnd to access this api ***
BASE_URL : "api/v1"
} |
import React, {Component} from 'react';
import GreetingView from '../views/GreetingView';
import PropTypes from 'prop-types';
class Greeting extends Component {
constructor(props) {
super(props);
this.state = {status: {}};
}
showMainScreen() {
this.props.identityService.emitter.emit('setView', 'Main... |
class SteamInventory: pass |
/*jshint node:true, mocha:true*/
/**
* @author kecso / https://github.com/kecso
*/
var testFixture = require('../../_globals.js');
describe('core.intrapersist', function () {
'use strict';
var gmeConfig = testFixture.getGmeConfig(),
logger = testFixture.logger.fork('core.intrapersist'),
Q = t... |
import typing as t
from .baseobject import BaseObject
__all__ = ("UlistLabels",)
class UlistLabels(BaseObject):
"""
A class representing a ulist.
Note:
This class is not meant to be instantiated directly.
Note:
Every Attribute is optional and may return `None`.
## FLAG: NONE
... |
import{r,c as t,h as e,H as s,g as a}from"./p-856de026.js";import{d as o,e as i}from"./p-c2089e63.js";import{s as n,h}from"./p-c50c697b.js";const d=class{constructor(e){r(this,e),this.bkkrChange=t(this,"bkkrChange",7),this.bkkrFocus=t(this,"bkkrFocus",7),this.bkkrBlur=t(this,"bkkrBlur",7),this.bkkrStyle=t(this,"bkkrSty... |
const path = require('path');
/**
* NOTE:
* We are using http://localhost:2000 as a mock dev environment
*
* If you wanted make the URL slightly more realistic and use http://dev.localhost:2000, make the following changes
*
* Set this below
* `host: 'dev.localhost'`
*
* Also, run
* `sudo nano /etc/hosts`... |
# **** Es nececario guardar el Proyecto de QGIS antes de ejecutar el script! ****
# **** You must save the QGIS Project before executing this script! ****
# Script para descargar el WRF (Puerto Rico), importarlo en QGIS, y procesar
# Script to download WRF, import into QGIS,and process
# © Feb 18, 2019 - Chris Edwards... |
import React, { Component } from 'react';
import { Switch, Route } from 'react-router-dom';
import IpfsRouter from 'ipfs-react-router';
import Leftnav from './components/leftnav/leftnav';
import Header from './components/header/header';
import Exchange from './components/exchange/exchange';
import './i18n';
import A... |
import sys
from os import path
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand
README = path.abspath(path.join(path.dirname(__file__), 'README.md'))
classifiers = [
'License :: OSI Approved :: Apache Software License',
'Intended Audience :: Developers',
... |
/**
* Takes elements for the specified duration from the start of the observable source sequence, using the specified scheduler to run timers.
*
* @example
* 1 - res = source.takeWithTime(5000, [optional scheduler]);
* @description
* This operator accumulates a queue with a length enough to stor... |
var app = angular.module("DemoApp", [])
app.controller("MainController", function ($scope, $q) {
function add(a, b) {
var d = $q.defer()
// takes some time to get result
setTimeout(function () {
var r = a + b;
if (0 > r) {
d.reject("negative value")
... |
"""
Unit tests for the basin hopping global minimization algorithm.
"""
from __future__ import division, print_function, absolute_import
import copy
from numpy.testing import TestCase, run_module_suite, \
assert_almost_equal, assert_
import numpy as np
from numpy import cos, sin
from scipy.optimize import basinho... |
/**
* Popup Component
* @author ryan.bian
*/
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import renderTo from '../../enhancer/render-to';
import styles from './Trigger.css';
import Animation from '../animation';
@renderTo()
export default cl... |
const path = require("path");
const mode = process.env.NODE_ENV === "production" ? "production" : "development";
const base = mode === "production" ? "/" + path.basename(process.cwd()) + "/" : "/";
module.exports = {
root: "src",
base,
mode,
publicDir: "../public",
build: {
outDir: "../dist",
assetsD... |
import React, { Component } from "react";
import PropTypes from "prop-types";
// import Button from "@reactioncommerce/components/Button/v1";
import Router from "translations/i18nRouter";
import { Button } from "@material-ui/core";
import styled from "styled-components";
import { withStyles } from "@material-ui/core/st... |
import { combineReducers } from 'redux';
import {reducer as FormReducer} from 'redux-form';
import PostsReducer from './reducer_posts';
const rootReducer = combineReducers({
posts: PostsReducer,
form: FormReducer
});
export default rootReducer;
|
# Copyright (c) 2010-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 agre... |
/*
Template Name: Color Admin - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.3.5
Version: 1.9.0
Author: Sean Ngu
Website: http://www.seantheme.com/color-admin-v1.9/admin/
*/var blue="#348fe2",blueLight="#5da5e8",blueDark="#1993E4",aqua="#49b6d6",aquaLight="#6dc5de",aquaDark="#3a92ab",green="#00... |
import { select } from 'd3';
import dagre from 'dagre';
import graphlib from 'graphlib';
import { logger } from '../../logger';
import classDb, { lookUpDomId } from './classDb';
import { parser } from './parser/classDiagram';
import svgDraw from './svgDraw';
import { getConfig } from '../../config';
import { render } f... |
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', process.cwd()+'/src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.... |
requirejs(['./WorldWindShim',
'./LayerManager'],
function (WorldWind,
LayerManager) {
"use strict";
// Tell WorldWind to log only warnings and errors.
WorldWind.Logger.setLoggingLevel(WorldWind.Logger.LEVEL_WARNING);
// Create the WorldWindow.
var wwd ... |
'use strict';
//Usuarios service used for communicating with the usuarios REST endpoints
angular.module('usuarios').factory('Usuarios', ['$resource',
function ($resource) {
return $resource('api/usuarios/:usuarioId', {
usuarioId: '@_id'
}, {
update: {
method: 'PUT'
}
});
}
]);... |
/*
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'preview', 'th', {
preview: 'ดูหน้าเอกสารตัวอย่าง'
} );
|
import datetime
from django import template
register = template.Library()
@register.filter
def is_not_past_due(lesson):
today = datetime.date.today()
day = today - datetime.timedelta(days=today.weekday()) + datetime.timedelta(days=lesson.day + (lesson.week-1)*7)
if lesson.date_end > day:
return... |
"""Test app signals
"""
import factory
import pytest
|
// @flow
import produce from "immer";
import * as common from "../common";
/**
* Let this declare the way for well typed records for outputs
*
* General organization is:
*
* - Declare the in-memory type
* - Declare the nbformat type (exactly matching nbformat.v4.schema.json)
* - Create a "record maker", ... |
import '../css/style.css';
import Game from './classes/Game.js';
{
console.log('initialising...');
document.querySelector('.sound').addEventListener('sound-loaded', ({currentTarget}) => {
currentTarget.components.sound.playSound();
});
if (window.confirm('Are you on Google Chrome and do you have a PS4 cont... |
import React from 'react'
import Link from 'gatsby-link'
import Content, { HTMLContent } from '../components/Content'
import Logo from '../assets/imgs/logo_small.png'
import HelloRobot from '../assets/imgs/hello_robot.jpg'
import FutureRobot from '../assets/imgs/future-robot.jpg'
import PlayingWRobot from '../assets/im... |
import logging
from threading import Event, Lock, Thread
from playback.recording import Recording
from playback.tape_cassette import TapeCassette
_logger = logging.getLogger(__name__)
class AsyncRecordOnlyTapeCassette(TapeCassette):
# pylint: disable=too-many-instance-attributes
"""
Wraps TapeCassette wi... |
import sys
import matplotlib.pyplot as plt
import numpy as np
from collections import defaultdict
import pandas as pd
import statistics
from data_utils import DatasetBuilder
from metrics_utils import compute_metrics, describe_metrics, get_test_metrics, test
from plot_utils import plot
from mitigators import NullMitigat... |
// test
// init first mock
MockDataPool.when("POST", "/test1.do")
.withExpectedHeader("content-type", "application/json;charset=utf-8")
.responseWith({status: 200, body: JSON.stringify({message: "保存成功!"})});
MockDataPool.when("POST", "/test.do")
.withExpectedHeader("content-type", "application/json;charset=u... |
var searchData=
[
['labeldatathread',['LabelDataThread',['../structstp_1_1_label_data_thread.html',1,'stp']]],
['linearspline',['linearspline',['../classtk_1_1linearspline.html',1,'tk']]]
];
|
/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2017 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define(['jquery.sap.global','../base/Object','../base/ManagedObject','./ElementMetadata','../Device','jquery.sap.strings','jque... |
var attachCSS = require('../index.js')
var test = require('tape')
var createElement = require('base-element')
var document = require('global/document')
test('button -> button.my-button', function (t) {
t.plan(2)
var result
setUp(function (fixture) {
var button = createButton(fixture)
result = attachCS... |
import React, {useState} from 'react';
import TextField from '@material-ui/core/TextField';
//import { makeStyles } from '@material-ui/core/styles';
import {useDispatch} from 'react-redux'
import { joinChat } from '../actions/actions';
/*
const useStyles = makeStyles({
root: {
position: 'inherit',
... |
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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... |
const hamburger = document.querySelector(".navbar-mobile");
const navsub = document.querySelector(".navbar-item");
hamburger.addEventListener('click', () => {
hamburger.classList.toggle("change")
navsub.classList.toggle("nav-change")
}); |
import numpy as np
import cv2
import pickle
face_cascade = cv2.CascadeClassifier('cascades/data/haarcascade_frontalface_alt2.xml')
recognizer = cv2.face.LBPHFaceRecognizer_create()
recognizer.read("trainer.yml")
labels = {0}
with open("labels.pickle", 'rb') as f:
og_labels = pickle.load(f)
labels = {v:k for k... |
import React from 'react';
import { connect } from 'react-redux';
import Navbar from './Navbar';
import Webpage from './Webpage';
import { IconContext } from 'react-icons';
import '../styles/App.sass';
const App = (props) => {
// @TODO 1. Get logo
// @TODO 3. Update URL Bar and Title on update
// @TODO 5. Config
... |
import numpy as np
from ..utils.np_utils import split_dataset
import itertools
def load_data(n_train=32 * 50, n_val=32*5, n_test=32*5):
# input_dim = np.random.randint(5, 10)
input_dim = 3
max_power = 2
dropout = 0.5
noise_sigma = 1e-8
total_n = n_train + n_val + n_test
x = np.random.unif... |
#!/usr/bin/env node
// Api sub-module (server)
const fs = require('fs'),
multer = require('multer');
const { Core, Flux, Logger, Files, Utils } = require('./../../../api');
const log = new Logger(__filename);
const admin = require(Core._SECURITY + 'admin.js').init(Core._SECURITY);
const FILE_REQUEST_HISTORY = C... |
#测试转化格式,可以查看affine,hdr,data等是否有改变
import SimpleITK as sitk
import glob
from tqdm import tqdm
#转化数据
mhd_list = glob.glob('mask/LNDb*.mhd')
print(mhd_list)
for i in tqdm(range(len(mhd_list))): #tqdm
img = sitk.ReadImage(mhd_list[i])
sitk.WriteImage(img, 'mask/nii/'+mhd_list[i][5:19]+'.nii.gz')
nii_list = g... |
load("0d8683db8b3792521a65ad1edba9cf82.js");
load("dada5190587903f93a3604016a6099ce.js");
load("01e0ec3a9a01836764c05319def52ae3.js");
load("762f4c20b6c2bf79dcf92be3017eef40.js");
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2... |
define({"topics" : [{"title":"Database Vendors and Drivers","shortdesc":"\n <p class=\"shortdesc\">The JDBC Tee processor can write data to a MySQL or PostgreSQL database.</p>\n ","href":"datacollector\/UserGuide\/Processors\/JDBCTee.html#concept_fd2_3rj_bhb","attributes": {"data-id":"concept_f... |
window.onload = function() {
var socket = io.connect();
socket.on('connect', function() {
socket.emit('join', prompt('What is your nickname?'));
});
}; |
import multiprocessing
import platform
from abc import ABC, abstractmethod
from distutils.version import LooseVersion
from typing import Union, List, Tuple, Callable, Optional
import torch
import torch.distributed as torch_distrib
from torch.utils.data import DataLoader, RandomSampler, SequentialSampler
from torch.uti... |
# coding=utf-8
# 这是为 codeforces.com 配置文件
#
# 使用方法:
# 1. 复制本文件到 zmirror 根目录(wsgi.py所在目录), 并重命名为 config.py
# 2. 修改 my_host_name 为你自己的域名
#
# 各项设置选项的详细介绍请看 config_default.py 中对应的部分
# 本配置文件假定你的服务器本身在墙外
# 如果服务器本身在墙内(或者在本地环境下测试, 请修改`Proxy Settings`中的设置
#
# 基本全功能完整
# Github: https://github.com/aploium/zmirror
# #########... |
#!/usr/bin/env python3
# Copyright 2017-present, The Visdom Authors
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
"""Server"""
import argparse
import copy
import getpass
import hashlib
import inspect
import json
import... |
import os
import yaml
from yacs.config import CfgNode as CN
_C = CN()
# Base config files
_C.BASE = ['']
# -----------------------------------------------------------------------------
# Data settings
# -----------------------------------------------------------------------------
_C.DATA = CN()
# Batch size for a si... |
module.exports = {
purge: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [require("@tailwindcss/forms")],
};
|
/**
* Copyright (c) 2006-2012, JGraph Ltd
*/
/**
* Construcs a new toolbar for the given editor.
* @class
*/
function Toolbar(editorUi, container) {
this.editorUi = editorUi;
this.container = container;
this.staticElements = [];
this.init();
// Global handler to hide the current menu
this.gestureHandl... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
/*!
* kontext
* http://lab.hakim.se/kontext
* MIT licensed
*
* Copyright (C) 2013 Hakim El Hattab, http://hakim.se
*/
window.kontext = function( container ) {
// Dispatched when the current layer changes
var changed = new kontext.Signal();
// All layers in this instance of kontext
var layers = A... |
// 配置基本设置
var HOST_URL = $("meta[name='website-url']").attr('content'), ENABLE_ASIDE = $("meta[name='enable_aside']").attr('content'), ROUTE_NAME = $("meta[name='current_route_name']").attr('content'), MOBILE_DEVICE = $("meta[name='mobile_device']").attr('content'), AES_IV = $("meta[name='aes-iv']").attr('content'), AE... |
var builder = require('botbuilder');
module.exports = [
function (session, args, next) {
builder.Prompts.text(session, "Please input change Ids or numbers. Separate by space. Max count is 4");
},
function (session, results) {
session.send("Start to trigger build with change id = " + results... |
// @flow
/**
* This file handles all logic for converting string-based configuration references into loaded objects.
*/
import buildDebug from "debug";
import resolve from "resolve";
import path from "path";
const debug = buildDebug("babel:config:loading:files:plugins");
const EXACT_RE = /^module:/;
const BABEL_P... |
import React from 'react';
import Helmet from 'react-helmet';
// import { Link, graphql } from 'gatsby'
import '../styles/blogpost.css';
import Layout from '../components/shared/Layout';
const BlogPosts = ({ data }) => {
const blogPosts = data.allContentfulSingleBlogPost.edges;
const formatDateTime = (dateTime) =>... |
window.onload = function () {
var wkUserData = JSON.parse(localStorage.wkUserData);
fullfillUserData();
// display info message if the user is coming for the first time
if (
wkUserData.userPublicKey === undefined ||
wkUserData.userPublicKey == ""
) {
document.querySelector(".info").style.display ... |
import React from 'react'
import PropTypes from 'prop-types'
import EngIqVideo from "../../static/videos/eng-iq.mp4"
function NewlineText(props) {
const text = props.text;
return text.split('\n').map(str => <p>{str}</p>);
}
const AboutGrid = ({ gridItems }) => (
<div className="columns is-multiline">
{grid... |
"""LintError type for use in linting."""
# Copyright 2015-2016 Capstone Team G
#
# 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 r... |
from __future__ import absolute_import
import os
from django.db import connections
from django.test import TestCase
from django.contrib.gis.gdal import Driver
from django.contrib.gis.geometry.test_data import TEST_DATA
from django.contrib.gis.utils.ogrinspect import ogrinspect
from .models import AllOGRFields
clas... |
const mongoose = require("mongoose");
const { Schema } = require("mongoose");
const Follows = new Schema({
_displayName: String,
_owner: { type: Schema.Types.ObjectId, ref: "User" },
follows: [{ type: Schema.Types.ObjectId, ref: "User" }]
});
mongoose.model("Follows", Follows);
|
const { v4: uuid } = require('uuid');
const domain = require('domain');
const Logger = require('@naturacosmeticos/clio-nodejs-logger');
const AsyncHooksStorage = require('@naturacosmeticos/async-hooks-storage');
const logAllPattern = '*';
const logLevelDebug = 'debug';
const grayLogFormat = 'graylog';
/** @private */... |
/**
* dashboard.js
* It contains scripts for dashboard.html
*/ |