text stringlengths 3 1.05M |
|---|
# coding: utf-8
"""
NiFi Rest API
The Rest API provides programmatic access to command and control a NiFi instance in real time. Start and stop processors, monitor queues, query provenance data, and more. Each endpoint below includes a description, ... |
import React from 'react';
import SmileIcon from './SmileIcon';
describe('Smile Icon', () => {
it('renders without crash', () => {
const smileIcon = shallow(<SmileIcon />);
expect(smileIcon).toMatchSnapshot();
});
});
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromStream = exports.fromBuffer = exports.EndOfStreamError = exports.fromFile = void 0;
const fs = require("./FsPromise");
const core = require("./core");
var FileTokenizer_1 = require("./FileTokenizer");
Object.defineProperty(exports,... |
import React from 'react';
import styled from 'styled-components';
const PageStyle = styled.div`
background-color: #FF7600;
padding:2em;
width:90%;
height:90%;
margin: auto;
`;
export default PageStyle;
|
import React, { Component } from 'react';
import axios from 'axios';
import Modal from 'react-responsive-modal';
import Item from './Item';
import Upload from './Upload';
import Loader from 'react-loader-spinner';
import ReactPaginate from 'react-paginate';
import "react-loader-spinner/dist/loader/css/react-spinner-loa... |
# Copyright 2015 The TensorFlow 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 applica... |
import "./data.json";
import mod1 from "./module1";
import mod2 from "./module2";
import { value1, value2 } from "./store";
it("should invalidate a self-accepted module", function(done) {
expect(mod1).toBe(1);
expect(mod2).toBe(1);
expect(value1).toBe(1);
expect(value2).toBe(1);
let step = 0;
module.hot.accept("... |
export function getFileTypeAndName(fileName) {
let [ fileType, ...rest ] = decodeURIComponent(fileName).split('/');
console.log('file type name', fileType, rest);
return {
fileType,
fileName: rest && rest.length ? rest.join('/') : ''
};
}
|
/**
* Created by vaibhav on 1/4/18
*/
import React from 'react'
import PropTypes from 'prop-types'
import { TermsPageTemplate } from '../../templates/terms-page'
const TermsPagePreview = ({ entry, getAsset }) => {
const entryBlurbs = entry.getIn(['data', 'offerings', 'blurbs'])
const blurbs = entryBlurbs ? entry... |
const token = require('../../../auth/token')
const responses = require('../../responses')
const moment = require('moment')
module.exports = {
method: 'PATCH',
path: '/token',
handler: (request, reply) => {
const payload = request.auth.credentials.token
payload.exp = moment().add(1, 'hour').unix()
r... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = require("react");
var Async_1 = require("./Async");
var EventGroup_1 = require("./EventGroup");
var warnConditionallyRequiredProps_1 = require("./warn/warnConditionallyRequiredProps");
var warnMutual... |
(function(scope){
'use strict';
function F(arity, fun, wrapper) {
wrapper.a = arity;
wrapper.f = fun;
return wrapper;
}
function F2(fun) {
return F(2, fun, function(a) { return function(b) { return fun(a,b); }; })
}
function F3(fun) {
return F(3, fun, function(a) {
return function(b) { return function(c... |
export default (state = [], action) => {
switch(action.type){
case 'GET_BOOKS_SUCCESS':
return action.books;
case 'CREATE_BOOK_SUCCESS':
return state.concat(action.book);
default:
return state;
}
}
|
"""
Dummy conftest.py for proyectoequipo1.
If you don't know what this is for, just leave it empty.
Read more about conftest.py under:
- https://docs.pytest.org/en/stable/fixture.html
- https://docs.pytest.org/en/stable/writing_plugins.html
"""
# import pytest
|
const fs = require('fs')
const ApplicationController = require('./ApplicationController')
const { AttachmentsService } = require('../Services')
const { FileUploader } = require('../Uploaders')
const { middleware } = require('@tetrajs/app')
module.exports = class AttachmentsController extends ApplicationController {
... |
import domdiv
import domdiv.main
from zipfile import ZipFile, ZIP_DEFLATED
prefix = 'generated/sumpfork_dominion_tabs_'
postfix = 'v' + domdiv.__version__ + '.pdf'
def doit(args, main):
args = args + ' --outfile ' + prefix + main + postfix
args = args.split()
fname = args[-1]
print(args)
print(':... |
/**
* Header
*/
var React = require('react');
var Header = React.createClass({
render: function() {
return (
<header>
<h2>Shinto</h2>
</header>
);
},
});
module.exports = Header; |
const axios = require("axios");
const http = axios.create({
headers: {
"Content-Type": "application/json",
authorization: `APIKEY ${process.env.API_KEY}`,
},
});
module.exports = http;
|
import React from "react"
import { Row, Col, Container } from "react-bootstrap"
import PropTypes from "prop-types"
import { Parallax } from "react-parallax"
const CtaTextRight = ({ cssClassName, text, image }) => (
<div className={cssClassName}>
<Row noGutters={true} className="align-items-center grayBg">
... |
/* global vars */
var result = 0;
var displayVal = 0;
/* assign actions to buttons and init calc */
{
initClearEverything();
initDigits();
display();
function initDigits() {
let digitButtons = document.getElementsByClassName("digit");
let len = digitButtons.length;
//cons... |
import React from 'react';
import { Layout } from 'components/theme/Layout';
const Page404 = () => (
<Layout>
<h1>NOT FOUND</h1>
<p>You just hit a route that doesn't exist... the sadness.</p>
</Layout>
);
export default Page404;
|
import React from 'react';
import PropTypes from 'prop-types';
import { makeStyles } from '@material-ui/core/styles';
import cx from 'classnames';
import { providePageContext, usePageContext } from './PageContext';
import InfoBar from './InfoBar';
import Header from './Header';
import Sidebar from './Sidebar';
import B... |
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
'airbnb-base',
'prettier/@typescript-eslint', // Uses eslint-config-prettier t... |
from math import hypot
from ..Qt import QtCore, QtGui, QtWidgets, mkQApp
__all__ = ['JoystickButton']
class JoystickButton(QtWidgets.QPushButton):
sigStateChanged = QtCore.Signal(object, object) ## self, state
def __init__(self, parent=None):
QtWidgets.QPushButton.__init__(self, parent)
... |
import SubMenu from './SubMenu';
import SubMenuItem from './SubMenuItem';
export { SubMenuItem };
export default SubMenu;
|
if (typeof process !== 'undefined' && parseInt(process.versions.node.split('.')[0]) < 14) {
console.error('Your node version is currently', process.versions.node)
console.error('Please update it to a version >= 14.x.x from https://nodejs.org/')
process.exit(1)
}
module.exports = require('./lib/loader.js')
|
var gitblog = function(config) {
var self = this;
self.getUrlParam = function(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return decodeURI(r[2]);
return null;
}
self.options = {
... |
#!/usr/bin/env python3
'''Benchmark Astropy's LS fast_impl versus a baseline C++ implementation
'''
import timeit
import numpy as np
from astropy.timeseries.periodograms.lombscargle.implementations import fast_impl
import threadpoolctl
# don't let numpy do multithreading behind our back!
_limiter = threadpoolctl.thr... |
import Icon from 'vue-awesome/components/Icon'
Icon.register({
notifications_off_outlined: {
paths: [
{
d: 'M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm0-15.5c2.49 0 4 2.02 4 4.5v.1l2 2V11c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68c-.24.06-.47.15-.69.23l1.64 1.64c.18-.02.36-.... |
qtd_km = float(input('Quantos KM vc percorreu? '))
qtd_dias = int(input("Quantos dias vc passou com o carro? "))
custo = 60*qtd_dias + 0.15*qtd_km
print('O valor total a ser pago é de R${:.2f}'.format(custo)) |
// app.settings.js
// node modules
require('dotenv').config();
const path = require('path');
// settings
module.exports = {
alias: {
'@': path.resolve('../src/assetbundles/seomatic/src'),
},
copyright: '©2020 nystudio107.com',
entry: {
'dashboard': '@/js/dashboard.js',
'content... |
import pygame
import sys
from pygame.locals import *
pygame.init()
screen = pygame.display.set_mode((640, 480))
pygame.mouse.set_visible(0)
while True:
for event in pygame.event.get():
if event.type == QUIT:
sys.exit()
if event.type == MOUSEMOTION:
print("Mouse: (%d, %d)" %... |
import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View,Button,WebView} from 'react-native';
import PublicDefine from "./PublicDefine";
export default class Job extends Component {
constructor(props) {
super(props);
this.state = {
url: 'https://www.qq.com/',... |
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not u... |
module.exports = require('@spryker/frontend-config.prettier/.prettierrc.json');
|
// http://eslint.org/docs/user-guide/configuring
module.exports = {
"root": true,
extends: [
// 'eslint:recommended',
'plugin:vue/recommended' // or 'plugin:vue/base'
],
rules: {
// override/add rules' settings here
// 'vue/valid-v-if': 'error'
}
}
//
// module.exports = {
// root: true,
/... |
import React from "react"
import { Link, graphql } from 'gatsby'
export default function Home(props) {
const { data } = props
return <div>
Hello world!
<Link to="/person/1">toPerson</Link>
<Link to="/person/2">toPerson</Link>
<p>{data.site.siteMetadata.title}</p>
<p>{data.site.siteMetadata.auth... |
import { NotImplementedError } from '../extensions/index.js';
/**
* Extract season from given date and expose the enemy scout!
*
* @param {Date | FakeDate} date real or fake date
* @returns {String} time of the year
*
* @example
*
* getSeason(new Date(2020, 02, 31)) => 'spring'
*
*/
export default functi... |
goog.provide('goog.i18n.currency');
goog.i18n.currency.PRECISION_MASK_ = 0x07;
goog.i18n.currency.POSITION_FLAG_ = 0x08;
goog.i18n.currency.SPACE_FLAG_ = 0x20;
goog.i18n.currency.addTier2Support = function() {
for(var key in goog.i18n.currency.CurrencyInfoTier2) {
goog.i18n.currency.CurrencyInfo[key]= goog... |
import { Component } from "react";
import PropTypes from "prop-types";
import schema from "@times-components-native/schema/schema.json";
import { graphql } from "graphql";
import { print } from "graphql/language/printer";
import mm from "./make-mocks";
const makeMocks = mm(schema);
const makeQuery = ({ defaults, dela... |
'use strict';
const AuthProvider = require('./auth_provider').AuthProvider;
const retrieveKerberos = require('../utils').retrieveKerberos;
let kerberos;
/**
* Creates a new GSSAPI authentication mechanism
* @class
* @extends AuthProvider
*/
class GSSAPI extends AuthProvider {
/**
* Implementation of authenti... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon( /*#__PURE__*/_jsx("path", {
d: "M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11zM8 15.01l1.41 1.41L11 14.84V... |
import PropTypes from 'prop-types';
// @mui
import { Card, CardHeader, Typography, Stack, LinearProgress } from '@mui/material';
// utils
import { fCurrency } from '../../utils/formatNumber';
// _mock_
import { _appCost } from '../../_mock';
// ----------------------------------------------------------------------
ex... |
/*=========================================================================================
File Name: store.js
Description: Vuex store
----------------------------------------------------------------------------------------
Item Name: Tripcarte.Asia Dashboard Management Portal
Author: Tripcarte.Asia
Stag... |
import { hypot } from 'dummy/helpers/hypot';
import { module, test } from 'qunit';
module('Unit | Helper | hypot', function () {
test('hypot works', function (assert) {
const result = hypot([3, 4, 5]);
assert.strictEqual(result, 7.0710678118654755);
});
});
|
(function(a){a.jqplot.CanvasAxisLabelRenderer=function(b){this.angle=0;this.axis;this.show=true;this.showLabel=true;this.label="";this.fontFamily='"Trebuchet MS", Arial, Helvetica, sans-serif';this.fontSize="11pt";this.fontWeight="normal";this.fontStretch=1;this.textColor="#666666";this.enableFontSupport=true;this.pt2p... |
import os
import warnings
import re
from timeit import default_timer as timer
from numpy import unique
from skmultiflow.evaluation.base_evaluator import StreamEvaluator
from skmultiflow.utils import constants
class EvaluatePrequential(StreamEvaluator):
""" The prequential evaluation method or interleaved test-t... |
import * as React from 'react';
import * as Scrivito from 'scrivito';
import placeholderCss from '../utils/placeholderCss';
const InPlaceEditingPlaceholder = ({ children, center, block }) => {
if (!Scrivito.isInPlaceEditingActive()) {
return null;
}
const innerSpan = <span style={ placeholderCss }>{ childre... |
# Description
# 中文
# English
# Give a string, you can choose to split the string after one character or two adjacent characters, and make the string to be composed of only one character or two characters. Output all possible results.
# Have you met this question in a real interview?
# Example
# Example1
# Input: "1... |
import sys
while True:
N1=format(int(input()),'02') # start : 26
print(N1)
N2=N1//10 + N1%10 # new : 2+6 = 8
N3=(N1%10)*10+(N1%10) # new1 : 60+8 = 68
new2=new1//10 + new1%10 # new2 : 6+8 = 14
new3=(new1%10)*10+(new2%10) # new3 : 80+4 = 84
|
var Helper = require("@kaoscript/runtime").Helper;
module.exports = function() {
let Space = Helper.enum(String, {
RGB: "rgb",
SRGB: "srgb"
});
return {
Space: Space
};
}; |
/*
Copyright 2021 Expedia, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distr... |
/**
* @fileoverview Forbid target='_blank' attribute
* @author Kevin Miller
*/
'use strict';
const docsUrl = require('../util/docsUrl');
const linkComponentsUtil = require('../util/linkComponents');
// ------------------------------------------------------------------------------
// Rule Definition
// -----------... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2013 UnitedStack, Inc.
# 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.... |
"""
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 1.10.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import os
... |
import React, { Component } from "react";
import AutoComplete from 'material-ui/AutoComplete';
export default class Search extends Component{
render(){
const { mangas } = this.props;
return (<div>
<AutoComplete
hintText="Search a manga"
dataSource={mangas}
dataSourceConfig={{tex... |
# Copyright 2012 Managed I.T.
#
# Author: Kiall Mac Innes <kiall@managedit.ie>
#
# 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... |
'use strict';
describe('weather.dash module', function() {
describe('weather controller', function(){
var scope, dashCtrl, $httpBackend;
beforeEach(module('weather.dash', 'mockedFeed'));
beforeEach(inject(function(_$httpBackend_, $rootScope, $controller, mockedJSON) {
$httpBackend = _$httpBackend... |
import React from 'react';
import Up from 'grommet/components/icons/base/Up';
import Button from 'grommet/components/Button';
import Box from 'grommet/components/Box';
const CLASS_ROOT = 'infographic__button';
export default function EndButton (props) {
return (
<Button plain={true} className={`${CLASS_ROOT} ${... |
/**
* Created by zhengxiaoyong on 16/4/18.
*
* native结果数据返回格式:
* var resultData = {
status: {
code: 0,//0成功,1失败
msg: '请求超时'//失败时候的提示,成功可为空
},
data: {}//数据,无数据可以为空
};
协定协议:rainbow://class:port/method?params;
params是一串json字符串
*/
(function () {
var doc = document;
var win = windo... |
import React from "react";
import { useSelector, useDispatch } from "react-redux";
import { fetchAsync, prayerCard, comingPrayer } from "./prayersSlice";
import PrayerCard from "./PrayerCard";
import useRemaining from "../hooks/useRemaining";
export default function Prayers() {
const dispatch = useDispatch();
co... |
from datetime import timedelta
import pytest
from django.urls import reverse
from django.utils import timezone
from rest_framework import status
from saec.core.models import ComunicacaoAgendada
URL = reverse('agendamento-list')
UMA_DATA_FUTURA = (timezone.now() + timedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S.%f')
... |
// jslint.js
// 2009-10-04
/*
Copyright (c) 2002 Douglas Crockford (www.JSLint.com)
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 rights t... |
/** ******************************************************************************************************************
* @file Describe what graph does.
* @author Julian Jensen <jjdanois@gmail.com>
* @since 1.0.0
* @date 19-Nov-2017
**********************************************************************************... |
/* nagenawa.js */
ui.debug.addDebugData("nagenawa", {
url: "6/6/alrrlafbaaqu3011314g223h",
failcheck: [
[
"brNoLine",
"pzprv3/nagenawa/6/6/13/0 0 1 1 2 2 /0 3 3 4 4 2 /5 3 6 6 4 7 /5 8 6 6 9 7 /10 8 8 9 9 11 /10 10 12 12 11 11 /3 . 0 . 1 . /. 1 . 3 . . /1 . 4 . . . /. 2 . . . . /3 . . 2 . . /. . . . . . /0 0... |
/* Rather than manage one giant configuration file responsible for creating multiple gulp tasks, each task has been broken out into
its own file. Any files in that directory get automatically required below.
To add a new task, simply add a new task file that directory.
gulp/tasks/default.js specifies the default se... |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... |
"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 = _interopRequireWildcar... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# PennyLane documentation build configuration file, created by
# sphinx-quickstart on Tue Apr 17 11:43:51 2018.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# ... |
/* Open a dialog for quickly changing vision and lighting parameters of the selected token(s).
* This macro is adapted for WFRP4e from Token Vision Configuration by @Sky#9453
* https://github.com/Sky-Captain-13/foundry/tree/master/scriptMacros
*/
setTokenVisionLight();
async function setTokenVisionLight() {
if ... |
import argparse, shelve
def renameDictKeys(storageDict):
for key in storageDict.iterkeys():
if isinstance(storageDict[key], dict):
renameDictKeys(storageDict[key])
if key == options.oldnetwork:
storageDict[options.newnetwork] = storageDict[options.oldnetwork]
del... |
// Mouse events
const clearBtn = document.querySelector(".clear-tasks");
const card = document.querySelector(".card");
const heading = document.querySelector("h5");
console.log(clearBtn);
console.log(card);
console.log(heading);
/*
// Click
clearBtn.addEventListener("click", runEvent);
//Double click
clearBtn.addEve... |
!function(e){function r(r){for(var n,u,c=r[0],i=r[1],f=r[2],s=0,p=[];s<c.length;s++)u=c[s],Object.prototype.hasOwnProperty.call(o,u)&&o[u]&&p.push(o[u][0]),o[u]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(l&&l(r);p.length;)p.shift()();return a.push.apply(a,f||[]),t()}function t(){for(var e,r... |
const Discord = require("discord.js");
const canvacord = require("canvacord");
module.exports.run = async (client, message, args) => {
const notice3 = new Discord.MessageEmbed()
.setDescription(
"<:cross1:747728200691482746> **Please type the text to clyde!**"
)
.setColor("RED");
const mindtxt = args.slice(... |
import React from "react";
import {render} from 'react-dom';
import { Answer } from './Answer';
import { Banner } from './Banner';
import { Button } from './Button';
import { Numbers } from './Numbers';
import { Star } from './Star';
import { Start } from './Start';
export class App extends React.Component {
c... |
import DisplayGraphNode from 'osgUtil/DisplayGraphNode';
import RenderBin from 'osg/RenderBin';
var DisplayGraphRenderer = function(selectables) {
this._selectables = selectables;
this._nodeList = [];
this._linkList = [];
this._renderBinMap = new window.Map();
this._renderBinStack = [];
this.... |
var settings = hammerhead.get('./settings');
var urlUtils = hammerhead.get('./utils/url');
var sharedUrlUtils = hammerhead.get('../utils/url');
var destLocation = hammerhead.get('./utils/destination-location');
var browserUtils = hammerhead.utils.browser;
var nativeMethods = hammerhead.nativeMethods;
va... |
import time
import logging
import tensorflow as tf
s = tf.Session()
x = tf.constant([1.0, 2.0])
y = x * 2
logging.basicConfig()
logger = logging.getLogger('helloworld')
logger.setLevel(10)
while True:
logger.info(s.run(y))
time.sleep(10)
|
'use strict';
import { ret, mat4, mul, sub, add } from '../utils';
export default function (funcName = 'rotate', x = 0.0, y = 0.0, z = 1.0) {
return [
`mat4 ${funcName}(float angle) {`,
'float s = sin(angle);',
'float c = cos(angle);',
'float oc = 1.0 - c;',
ret(
... |
import React from 'react';
import { Badge, Tooltip } from '@patternfly/react-core';
export const TEXT_FILTER = 'hostname_or_id';
export const TEXTUAL_CHIP = 'textual';
export const TAG_CHIP = 'tags';
export const STALE_CHIP = 'staleness';
export const REGISTERED_CHIP = 'registered_with';
export function constructValu... |
import pytest
import stk
from ..case_data import GenericCaseData
@pytest.fixture
def primary_amino(get_atom_ids):
a, b, c, d = get_atom_ids(4)
return _primary_amino(stk.N(a), stk.H(b), stk.H(c), stk.C(d))
def _primary_amino(nitrogen, hydrogen1, hydrogen2, atom):
bonders = (nitrogen, )
deleters = (... |
import typescript from "rollup-plugin-typescript2";
export default {
input: "HelloWorld.ts",
output: {
file: "../dist/box2d-helloworld.umd.js",
name: "helloworld",
format: "umd"
},
plugins: [
typescript({ clean: true, tsconfigOverride: { compilerOptions: { target: "ES2015", module: "ES2015" } }... |
const theme_settings = {
'10-31': 'theme-halloween.css',
'11-1': 'theme-halloween.css',
'12-24': 'theme-christmas.css',
'12-25': 'theme-christmas.css',
'12-26': 'theme-christmas.css',
}
const theme_date = new Date();
const date_key = (theme_date.getMonth()+1) + '-' + theme_date.getDate();
... |
RocketChat.Migrations.add({
version: 105,
up() {
if (RocketChat && RocketChat.models) {
if (RocketChat.models.Users) {
RocketChat.models.Users.find({ 'settings.preferences.unreadRoomsMode': { $exists: 1 } }).forEach(function(user) {
const newPreference = user.settings.preferences.unreadRoomsMode ? 'unre... |
# -*- coding: utf-8 -*-
"""
@object: PHEME
@task: Main function of GAN-RNN: both Generater & discriminator are RNN (2 classes)
@author: ma jing
@module: sequence words input, GAN
@variable: Nepoch, lr_g, lr_d
@time: May 20, 2019
"""
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
import os
from ... |
module.exports = {
module: {
rules: [
{
test: /\.coffee$/,
loader: 'coffee-loader',
},
],
},
}; |
#!/usr/bin/env python3
# pylint: disable=E1101
import os
import importlib
import unittest
from collections import defaultdict, Counter
from typing import List, Optional, Tuple
from parameterized import parameterized_class
from cereal import log, car
from common.realtime import DT_CTRL
from selfdrive.boardd.boardd impo... |
import { getAttributes } from '@carbon/icon-helpers';
import PropTypes from 'prop-types';
import React from 'react';
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { retu... |
import express from "express";
import PostController from "../controllers/postController";
const router = express.Router();
// router.param('id', PostController.findById);
// api/v1/posts
router.route("/posts").get(PostController.get).post(PostController.create);
router
.route("/posts/:id")
.get(PostController.... |
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"AM",
"PM"
],
"DAY": [
"igandea",
... |
__all__ = ['editor.Editor','editorcontainer.EditorContainer']
|
// The Module object: Our interface to the outside world. We import
// and export values on it, and do the work to get that through
// closure compiler if necessary. There are various ways Module can be used:
// 1. Not defined. We create it here
// 2. A function parameter, function(Module) { ..generated code.. }
// 3. ... |
'use strict';
module.exports = {
conditions: [''],
name: 'RegularExpressionClassChars',
rules: ['RegularExpressionClassChar', 'RegularExpressionClassChars RegularExpressionClassChar'],
handlers: ['$$ = $1', '$$ = $1 + $2'],
subRules: [require('./RegularExpressionClassChar')]
}; |
const user = require("./models/User");
user
.findAll()
.then(data => console.log(data))
.catch(err => console.log(err));
user.create() |
"use strict";
require('./queryBuilder.service');
var orchestratorObject_1 = require('./core/orchestratorObject');
var queryTranspiler_1 = require('./core/queryTranspiler');
var objects_1 = require('./models/objects');
var widgets;
(function (widgets) {
'use strict';
var QueryBuilderController = (function () {
... |
import * as React from 'react'
export default function Button() {
return <button>button</button>
}
|
import React, { Component } from 'react'
import Cropper from 'cropperjs'
import './style.scss'
class Editor extends Component {
constructor(props) {
super(props)
this.image = React.createRef()
}
start = () => {
const { data, update } = this.props
if (data.cropped || this.cropper) {
retur... |
/*!
* ws: a node.js websocket client
* Copyright(c) 2011 Einar Otto Stangvik <einaros@gmail.com>
* MIT Licensed
*/
var events = require('events')
, util = require('util')
, EventEmitter = events.EventEmitter;
/**
* Hixie Sender implementation
*/
function Sender(socket) {
if (this instanceo... |
'use strict';
var path = require('path')
var webpack = require('webpack')
var env = process.env.NODE_ENV
var node_modules_dir = path.resolve(__dirname, 'node_modules');
var config = {
output: {
path: path.join(__dirname, 'dist/'),
// filename: '[name].js',
library: 'RedaxtorSeo',
l... |
from flask_wtf import FlaskForm
from wtforms import StringField, validators
# Lomake roolia varten
class RooliForm(FlaskForm):
name = StringField("Nimi:", [validators.Length(min=2, max=20)])
class Meta:
csrf = False |