text stringlengths 3 1.05M |
|---|
'use strict';
var _require = require('./util'),
is = _require.is,
idx = _require.idx,
arr = _require.arr,
num = _require.num,
px = _require.px,
breaks = _require.breaks,
dec = _require.dec,
media = _require.media,
merge = _require.merge;
var _require2 = require('./constants'),
... |
/*
* PukForm Messages
*
* This contains all the text for the PukForm component.
*/
import { defineMessages } from 'react-intl';
export const scope = 'app.components.PukForm';
export default defineMessages({
header: {
id: `${scope}.header`,
defaultMessage: 'This is the PukForm component!',
},
});
|
import json
import os
from functools import partial
from typing import Any, List, Tuple, cast
from ethereum.base_types import U256
from ethereum.frontier import rlp
from ethereum.frontier.eth_types import (
Account,
Block,
Header,
State,
Transaction,
)
from ethereum.frontier.spec import BlockChain,... |
/**
* EasyUI for jQuery 1.7.1
*
* Copyright (c) 2009-2019 www.jeasyui.com. All rights reserved.
*
* Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php
* To use it on other terms please contact us: info@jeasyui.com
*
*/
/**
* droppable - EasyUI for jQuery
*
*/
(fun... |
export { default as theme } from "./theme"
export { default as Card } from "./Card"
export { default as Flex } from "./Flex"
export { default as Link } from "./Link"
export { default as Span } from "./Span"
export { default as List } from "./List"
|
define(['ui-utils'], function($) {
return {
'object-to-dataset': {
process: function(obj) {
if (!Array.isArray(obj)) obj = [obj];
var labels = Object.keys(obj[0]),
cols = labels.map(function(label) {
return {label: labe... |
#!/usr/bin/env python
#
# Copyright 2015 clowwindy
#
# 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 ... |
'use strict';
customElements.define('compodoc-menu', class extends HTMLElement {
constructor() {
super();
this.isNormalMode = this.getAttribute('mode') === 'normal';
}
connectedCallback() {
this.render(this.isNormalMode);
}
render(isNormalMode) {
let tp = lithtml.... |
/**
* Copyright 2017, Google, 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 i... |
import setuptools
with open("README.md", "r") as fh:
README = fh.read()
setuptools.setup(
name="BackpackTF",
version="1.0.0",
author="danocmx",
description="Backpack.tf api wrapper",
long_description=README,
long_description_content_type="text/markdown",
url="https://github.com/danocm... |
# Copyright 2022 The Cirq Developers
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var lodash_1 = require("lodash");
var shallowEqual = require("shallowequal");
function combineReducers(reducers, options) {
var _a = (options || {}).equalityCheck, equalityCheck = _a === void 0 ? shallowEqual : _a;
return function (sta... |
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as pl
import tensorsim as ts
""" Model
dX = (a*X - B*X*Y)dt #Prey
dY = (B*X*Y - mu*Y)dt #Predator
"""
n_reps = 100
X_t0, Y_t0 = 300., 300.
a, B, mu = 0.1, 0.0005, 0.2
with tf.Graph().as_default():
# initial conditions
ics = tf.const... |
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import classNames from 'classnames';
import PropTypes from 'prop-types';
import Draggable from 'react-draggable';
import { noop, isSameCoordinate } from '../utils/commonUtil';
import { generateKey, stopPropagation } from '../utils/LineUti... |
# coding: utf-8
"""
UltraCart Rest API V2
UltraCart REST API Version 2 # noqa: E501
OpenAPI spec version: 2.0.0
Contact: support@ultracart.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class OrderPaymentCreditCard(o... |
import { duplicateHcaAgent } from "../duplicate/hca/duplicate_hca_agent";
import { duplicateHcaQueue } from "../duplicate/hca/duplicate_hca_queue";
let input_start_date = process.argv[2];
let input_request = process.argv[3];
let input_destiny_date = process.argv[4];
async function loadHca ( input_date, input_request... |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... |
// Generated by IcedCoffeeScript 1.7.1-c
(function() {
exports.KeyMaterial = require('./keymaterial').KeyMaterial;
exports.Signature = require('./signature').Signature;
exports.UserID = require('./userid').UserID;
}).call(this);
|
/**
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
/**
* @fileOverview Defines the {@link CKEDITOR.lang} object, for the
* Korean language.
*/
/**#@+
@type String
@example
*/
/**
... |
exports.template = (useSCSS) => {
// Work out style extension
let styleExtension = 'less';
if (useSCSS) {
styleExtension = 'scss';
}
return `// Styles
import styles from './container.${styleExtension}';
// Packages
import React from 'react';
import { Switch, Route } from 'react-router-dom';
// Views
import H... |
import Joi from 'joi';
import Boom from 'boom';
import logger from '../../../logger';
import DbOrderService from '../../../service/OrderService';
export default () => ({
method: 'GET',
path: '/api/orders',
config: {
auth: {
strategies: ['jwt'],
scope: ['read:orders']
},
description: 'Get ... |
/**
* AngularUI - The companion suite for AngularJS
* @version v0.2.0 - 2012-08-06
* @link http://angular-ui.github.com
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
angular.module('ui.config', []).value('ui.config', {});
angular.module('ui.filters', ['ui.config']);
angular.module('ui.directi... |
import Ember from 'ember';
import { test } from 'qunit';
import moduleForAcceptance from '../../tests/helpers/module-for-acceptance';
import { $hook } from 'ember-hook';
moduleForAcceptance('Acceptance | standard preload');
test('visiting /standard-preload', function(assert) {
assert.expect(5);
visit('/standard-... |
# Logistic Regression Predictions
# ==============================================================================
import pandas as pd
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
from sklearn import metrics
from sklearn import linear_model
# Data e... |
const { AuthenticationError } = require('apollo-server');
const jwt = require('jsonwebtoken');
const { JWT_SECRET } = require('./config');
const authChecker = ({ req, connection }) => {
let token;
if (req && req.headers.authorization) {
token = req.headers.authorization;
} else if (connection && conn... |
/**
* Created by inspoy on 2017/4/6.
*/
"use strict";
class OnlineUser {
constructor(uid) {
// uid
this.uid = uid;
// 登陆时间,以毫秒为单位的unix时间戳
this.loginTime = new Date().getTime();
// 加入的战场id
this.battleId = "";
}
}
module.exports = {
OnlineUser: OnlineUser,
... |
'''
python implementation of breadth first search, returns visited set
'''
from collections import deque
def breadth_first_search(adj_list, entry_node=None, visited=set()):
if entry_node is None:
entry_node = 1
queue = deque()
queue.append(entry_node)
while queue:
current = queue.popl... |
var Title = require('../../core/title.js');
// <title
// base="POINT(0,1)"
// anchor="POINT(0,1)"
// position="POINT(0,0)"
// frame="FRAME(padding)"
// color="COLOR(white)"
// opacity="DOUBLE(1.0)"
// border="INTEGER(0)"
// bordercolor="COLOR(black)"
// padding="INTEGER(0)... |
var array = {
toIndex: function (arr, indices) {
if (indices.length !== (arr.$s ? arr.$s.length : 1)) {
throw new System.ArgumentException.$ctor1("Invalid number of indices");
}
if (indices[0] < 0 || indices[0] >= (arr.$s ? arr.$s[0] : arr.length)) {
... |
const Movie = require('./model');
/*Todas las películas y búsqueda en Movies por género, título, director e intérpretes*/
module.exports.getMovies = async (req, res) => {
const query = {};
if (req.query.genero) query.genero = req.query.genero;
if (req.query.titulo) query.titulo = req.query.titulo;
if (... |
import numpy as np
import pymc3 as pm
from banditry.base import HasFittableParams
from banditry.experiment import ExperimentMetrics
class BESTPairedT(HasFittableParams):
"""Kruschke's BEST (Bayesian Estimation Superseded t-Test) model."""
def __init__(self, num_samples=1000):
self.num_samples = num_... |
angular.module("OpenHq").directive("errorList", function() {
return {
restrict: "E",
scope: {
errors: '='
},
template: JST['templates/directives/error_list']
}
}); |
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 24 21:15:38 2021
@author: pi_na
"""
def fibo(n):
if n==0:
return 0
elif n==1:
return 1
return fibo(n-1)+fibo(n-2)
for i in range(40):
print(fibo(i)) |
// Main Entry Point:
document.addEventListener("DOMContentLoaded", function(event) {
// COPYPASTA:
var search = location.search.substring(1);
let searchObj = JSON.parse('{"' + search.replace(/&/g, '","').replace(/=/g,'":"') + '"}', function(key, value) { return key===""?value:decodeURIComponent(value) });
let {... |
"use strict";
var vsc = require("vscode");
var x12 = require("../x12.module");
var EditDocumentButton = /** @class */ (function () {
function EditDocumentButton() {
this._baseItem = null;
}
EditDocumentButton.prototype.activate = function (baseItem) {
var _this = this;
this._baseItem = baseItem;
t... |
import { __rest } from "tslib";
import * as React from 'react';
import Dropzone from 'react-dropzone';
import { FileUploadField } from './FileUploadField';
import { readFile, fileReaderType } from '../../helpers/fileUtils';
export const FileUpload = (_a) => {
var { id, type, value = type === fileReaderType.text || ... |
from django.contrib import admin
# Register your models here.
from payments.models import Transactions
admin.site.register(Transactions) |
/**
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generato... |
var parent = require('../../stable/array/find-index');
module.exports = parent;
|
define(['knockout', 'text!./CohortConceptSetBrowserTemplate.html', 'vocabularyprovider', 'appConfig', 'conceptsetbuilder/InputTypes/ConceptSet', 'webapi/AuthAPI', 'webapi/MomentAPI', 'access-denied', 'databindings'], function (ko, template, VocabularyProvider, appConfig, ConceptSet, authApi, momentApi) {
function Coho... |
// Be sure to add these ENV variables!
const {
GUMROAD_ACCESS_TOKEN,
KEYGEN_PRODUCT_TOKEN,
KEYGEN_ACCOUNT_ID,
KEYGEN_PRODUCT_ID,
KEYGEN_POLICY_ID,
PORT = 8080
} = process.env
const fetch = require('node-fetch')
const crypto = require('crypto')
const express = require('express')
const bodyParser = require('... |
import { render } from '@redwoodjs/testing'
import CourseContentPage from './CourseContentPage'
describe('CourseContentPage', () => {
it('renders successfully', () => {
expect(() => {
render(<CourseContentPage />)
}).not.toThrow()
})
})
|
macDetailCallback("98473c000000/24",[{"d":"2012-08-22","t":"add","a":"Suite 604-605,Xing Yuan Technology Plaza\n418 Gui Ping Road\nShanghai 200233\n","c":"CHINA","o":"SHANGHAI SUNMON COMMUNICATION TECHNOGY CO.,LTD"},{"d":"2015-08-27","t":"change","a":"Suite 604-605,Xing Yuan Technology Plaza 418 Gui Ping Road ShangHA... |
import Intact from 'intact';
import template from './index.vdt';
import '../../styles/kpc.styl';
import './index.styl';
export default class Badge extends Intact {
@Intact.template()
static template = template;
static propTypes = {
disabled: Boolean,
text: [String, Number, Intact.VNode, Ob... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields.json
class Migration(migrations.Migration):
dependencies = [
("nsot", "0035_fix_interface_na... |
import request from '@/plugin/axios'
function toData (functionNo, param) {
const data = {
head: {
appVerNo: process.env.VUE_APP_VER_NO,
functionNo: functionNo
},
param: param
}
return data
}
export function SearchRoleClass (param) {
const data = toData('SearchRoleClass', param)
retur... |
deepmacDetailCallback("e0189f000000/24",[{"a":"Rue des Sors 3 Marin-Epagnier Neuchatel CH 2074","o":"EM Microelectronic","d":"2018-09-07","t":"add","s":"ieee","c":"CH"}]);
|
'use strict';
var util = require('../../lib/util'),
suggestion = require('../../lib/suggestion'),
period = require('../../lib/period'),
config = require('../../lib/config'),
Day = period.Day,
Period = period.Period;
function createSingleDateInPeriod(period) {
// Shortcut to picking the middle ... |
from assertpy import assert_that
import year2020.day12.reader as reader
def test_example(tmp_path):
in_file = tmp_path / 'in'
in_file.write_text('F10\nN3\nF7\nR90\nF11\n')
result = reader.read(in_file)
assert_that(result).is_equal_to([('F', 10), ('N', 3), ('F', 7), ('R', 90), ('F', 11)])
|
# -*- coding: utf-8 -*-
# Copyright (C) 2012 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import absolute_import, division, print_function, unicode_literals
from logging import getLogger
import os
from os.path import abspath, basename, exists, isdir, isfile, join
from . import common
from .co... |
import docker
import functools
import requests.adapters
_orig_adapter_send = requests.adapters.HTTPAdapter.send
class DockerModel:
def __init__(self):
self.__docker_client = None
@property
def docker_client(self):
if self.__docker_client is None:
# We should only initiate th... |
var _ = require('underscore'),
stock = require('kujua-reporting/shows'),
moment = require('moment');
(function () {
'use strict';
var inboxServices = angular.module('inboxServices');
inboxServices.factory('AnalyticsModules',
['$resource', 'translateFilter', 'UserDistrict',
function($resource, ... |
import fsExtra from 'fs-extra'
import path from 'path'
import webpack from 'webpack'
import getWebpackConfigs from './get_webpack_configs'
import writePackageJsonsForAssemblies from './write_package_jsons_for_assemblies'
import getPeerDependencies from './get_peer_dependencies'
import showBuildInfo from './show_build_... |
import React from 'react'
import { func, object, shape, string } from 'prop-types'
import { th } from '@xstyled/system'
import styled, { css } from '@xstyled/styled-components'
import { cardStyles } from '@welcome-ui/utils'
import { datePickerStyles } from './datePickerStyles'
export const CustomPopper = ({ children ... |
(function(){
const fs = require('fs');
const Git = require("nodegit");
const octokit = require('@octokit/rest')();
const gmaps = require('@google/maps');
const GITHUB_TOKEN = process.env.GITHUB_TOKEN;
const GMAPS_API_KEY = process.env.GMAPS_API_KEY;
const args = process.argv.slice(2);
i... |
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Youssef Restom and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
def get_notification_config():
notifications = { "for_doctype":
{
"Support Issue": {"status": ("in", ("Open", "Assigned"))},
},... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayEbppCommonBillkeyQueryModel import AlipayEbppCommonBillkeyQueryModel
class AlipayEbppCommonBillkeyQueryRequest(object):
d... |
/*
* tabs_defaults.js
*/
var tabs_defaults = {
add: null,
ajaxOptions: null,
cache: false,
collapsible: false,
cookie: null,
disable: null,
disabled: [],
enable: null,
event: 'click',
fx: null,
idPrefix: 'ui-tabs-',
load: null,
panelTemplate: '<div></div>',
remove: null,
select: null,
show: null,
sp... |
from django.core.urlresolvers import reverse
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse, HttpResponseRedirect, HttpResponseForbidden, HttpResponseServerError
from django.shortcuts import render
from django.template import RequestContext
import json
import datetime
... |
const fs = require('fs'),
path = require('path'),
process = require('process'),
readline = require('readline'),
rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
prompt: '> '
}),
exit=()=>process.exit(0),
fpath = path.join(__dirname, 'text.txt')
console.log('< Hi!')
rl.prompt(... |
!
function(a) {
if ("object" == typeof exports && "undefined" != typeof module) module.exports = a();
else if ("function" == typeof define && define.amd) define([], a);
else {
var b;
b = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof sel... |
function bccomp(left_operand, right_operand, scale) {
// discuss at: http://phpjs.org/functions/bccomp/
// original by: lmeyrick (https://sourceforge.net/projects/bcmath-js/)
// depends on: _phpjs_shared_bc
// example 1: bccomp(1, 2);
// returns 1: 3
// todo: implement these testcases
var li... |
module.exports = {
db: 'mongodb://localhost/UserDB',
sessionSecret: 'developmentSessionSecret',
google: {
clientID: '401637428460-vsamojb5lqciiq5m1k7s4d5sh9c2gk1e.apps.googleusercontent.com',
clientSecret: 'N2dGszmxN5Lvmyh7MJJc8Y9K',
callbackURL: 'http://localhost:3000/oauth/google/callback'
},
fa... |
import axios from 'axios'
import * as CSV from 'csv-string'
import { columnProperties } from '~/constants/aesthetics'
import {
getCsvFiles,
getTopojsonFiles,
getGeojsonFiles,
getDatasets,
} from '~/plugins/dataInput'
export const state = () => {
return {
mode: 'csv',
csvIndex: 0,
csvFiles: getCsv... |
import React, { Component } from "react";
import AdministracaoTemplate from "components/templates/administracao.template";
import Cursos from "components/ui/card/paginaCursos.component";
export default class HomeAdministradorScreen extends Component {
componentDidMount() {
document.title = "Sistema Adminis... |
/**
* Kendo UI v2020.1.114 (http://www.telerik.com/kendo-ui)
* Copyright 2020 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.... |
import VueRouter from 'vue-router'
export default new VueRouter({
mode:"history",
routes:[
{path:'/',name : 'Home',component: () => import("../components/AppLogin.vue")},
{path:'/dashboard',name : 'Dashboard',component: () => import("../components/Dashboard.vue")},
{
path:'/... |
/**
* v5
*
* @url https://github.com/SeydX/homebridge-fritz-platform
* @author SeydX <seyd55@outlook.de>
*
**/
'use strict';
module.exports = function (homebridge) {
let FritzPlatform = require('./src/platform.js')(homebridge);
homebridge.registerPlatform('homebridge-fritz-platform', 'FritzPlatform', FritzP... |
import { createRequestService } from 'redux-create-request';
const regionURL = 'https://servicodados.ibge.gov.br/api/v1/localidades/mesorregioes';
export const regionsService = createRequestService({
type: 'GET_REGIONS_REQUEST',
request: () => fetch(regionURL, { method: 'GET' }),
});
|
from microbit import *
import time
pin1.write_digital(0)
pin0.write_digital(0)
while True:
if button_a.was_pressed():
display.show("W")
pin1.write_digital(1)
#time.sleep(10)
#pin1.write_digital(0)
if button_b.was_pressed():
display.show("B")
pin0.write_digital(1)
... |
define(['backbone', 'mu/cache', 'enquire', 'store'],
function (Backbone, cache, enquire, store) {
var view = Backbone.View.extend({
id: 'side-menu',
tagName: 'ul',
className: 'nav',
events: {
'click .dropdown': 'dropdown',
'cl... |
"""
Django settings for Ratable project.
Generated by 'django-admin startproject' using Django 2.2.4.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
fr... |
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import {
Image,
Text,
View,
ScrollView,
FlatList,
Dimensions,
StyleSheet,
StatusBar,
TouchableOpacity,
TextInput,
TouchableHighlight,
Linking
} from 'react-native';
var { width, height } = Dime... |
// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... |
/* eslint-disable */
/**
* Copyright (c) 2015-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.
*/
'use strict';
var chalk = require('chalk');
var execSync = require('child_process').execSync;
var spawn = require... |
from o3seespy.command.uniaxial_material.base_material import UniaxialMaterialBase
class Concrete01(UniaxialMaterialBase):
"""
The Concrete01 UniaxialMaterial Class
This command is used to construct a uniaxial Kent-Scott-Park concrete material object with degraded linear
unloading/reloading stiff... |
/*
* Author: Abdullah A Almsaeed
* Date: 4 Jan 2014
* Description:
* This is a demo file used only for the main dashboard (index.html)
**/
$(function () {
"use strict";
//Make the dashboard widgets sortable Using jquery UI
$(".connectedSortable").sortable({
placeholder: "sort-highlight",
conn... |
/*!
* Start Bootstrap - Agency v5.0.7 (https://startbootstrap.com/template-overviews/agency)
* Copyright 2013-2019 Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-agency/blob/master/LICENSE)
*/
!function(o){"use strict";o('a.js-scroll-trigger[href*="#"]:not([href="#"])').cl... |
import React, { Component } from 'react';
import { Link } from 'react-router';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from './Footer.scss';
class Footer extends Component {
render() {
return (
<div className='container-fluid'>
<div className={s.footer}>
... |
const express = require('express');
const router = express.Router();
const passport = require('passport');
/* GET home page. */
router.get('/', function(_, res) {
res.render('index');
});
module.exports = router;
|
"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... |
/**
* Quatrix API
* Download and upload files or folders, share them with predefined security options, manage your account and profile settings and a lot more functionalities can be easily integrated into your application using our Quatrix APIs. Learn more how to authenticate the Quatrix session, how to construct JSO... |
import numpy as np
import pickle as pickle
from .reader import sessionizer
from .featurizer import extract_features
from sklearn.model_selection import train_test_split
from sklearn.neural_network import MLPClassifier
from sklearn.metrics import f1_score
from .training_utils import read_data
from .training_utils impo... |
import { useContext, useState, useRef, useEffect } from "react"
import { useHistory } from "react-router"
import {UserContext} from "./UserContext"
import FactFilter from "./FactFilter"
import NumberSquare from "./NumberSquare"
import LoadScreen from "./LoadScreen";
function Quizzes () {
let history = useHistory()
... |
/* jshint indent: 2 */
module.exports = function(sequelize, DataTypes) {
return sequelize.define('DataEntryBackups', {
id: {
type: DataTypes.BIGINT,
allowNull: false,
primaryKey: true,
autoIncrement: true
},
tableType: {
type: DataTypes.STRING(200),
allowNull: true
... |
import React from "react"
import { graphql } from "gatsby"
import Layout from "../components/Layout"
import QuickPossession from "../components/Home/QuickPossession"
const quickPossession = props => {
const { quickPossession } = props.data
// const prevPlan = props.pageContext.prev
// const nextPlan = props.pag... |
var _keyCodes = {
0: "\\",
8: "backspace",
9: "tab",
12: "num",
13: "enter",
16: "shift",
17: "ctrl",
18: "alt",
19: "pause",
20: "caps",
27: "esc",
32: "space",
33: "pageup",
34: "pagedown",
35: "end",
36: "home",
37: "left",
38: "up",
39: "right",
40: "down",
44: "print",
45: "insert",
46: "del... |
'use strict';
// Do this as the first thing so that any code reading it knows the right env.
process.env.BABEL_ENV = 'production';
process.env.NODE_ENV = 'production';
// Makes the script crash on unhandled rejections instead of silently
// ignoring them. In the future, promise rejections that are not handled will
//... |
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(async function() {
TestRunner.addResult(
`Tests that editing sourcecode which is referred by multiple stylesheets (via sourceURL comment) updates... |
# -*- coding: utf-8 -*-
import PyV8
import base64
params = [
'NC19FwABclwtGQ5VEEYOVBMFPFEVD3ZYdTh7TSIhBSEYXhZ+DlpRGCAEOEsOFGE9AS4eGQZMAAIrAmYBFjN8FlAAHngOBCkBdwpKRTFXEzsqNRtTHycccD06BEAHPwwmHTgYEDkLbSFoe3UIHhF5LTQGKT0iGWU3MwEAU1AQGUASejBJG3U4PRtEVScqJlBK',
'de3adY86wJL/s+CmY7TaqG7n9AC5mubTU4COB06alnS3BmXIbjOc... |
import React, {PropTypes} from 'react';
import {ListGroupItem} from 'react-bootstrap';
const AnswersList = React.createClass({
render() {
const {answers} = this.props;
let template;
if (answers && answers.length > 0) {
template = answers.map((item) => {
return ... |
export default anims => {
anims.create({
key: 'potionFront',
frames: anims.generateFrameNames('potionFront'),
repeat: -1,
frameRate: 36
})
anims.create({
key: 'potionSide',
frames: anims.generateFrameNames('potionSide'),
repeat: -1,
frameRate: 36
})
anims.create({
key: 'potionSideBlue',
frame... |
import tools from './shared/tools';
/**
*
* @param edge
* @returns {string}
* @private
*/
const getConnectionSchema = (edge) => `
# Connection for ${edge.label.toCamelCase()}
type ${tools.getName(edge, 'Connection')} implements Connection {
nodes: [${edge.startNode.label.toCamelCase()}]
edges: [${tools.getN... |
<Animated.View style={[styles.mask, {
opacity: this.state.opacity.interpolate({
inputRange: [0, 1],
outputRange: [0, 0.8]
})
}]} >
</Animated.View> |
'use strict';
module.exports = function compactArray(array) {
return array.filter(Boolean);
};
|
module.exports = {
extends: ["airbnb-base"],
rules: {
"class-methods-use-this": ["off"],
curly: ["error"],
"lines-between-class-members": ["error", "always", { exceptAfterSingleLine: true }],
"max-classes-per-file": ["off"],
"no-console": ["off"],
"no-constant-condition": ["off"],
"no-co... |
from django.contrib import admin
from apps.question import models
@admin.register(models.Question)
class QuestionAdmin(admin.ModelAdmin):
list_display = ['id', 'code', 'task_id', 'name', 'status', 'content', 'question_type', 'has_known_answer',
'created', 'updated']
search_fields = ['id']
... |
# Copyright 2016 Capital One Services, 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 agreed to in... |
# -*- coding: utf-8 -*-
import pytest
from six import PY3
from ruamel.yaml import YAML
yaml = YAML(typ='safe')
import os
import shutil
import pandas as pd
import sqlalchemy as sa
from great_expectations.exceptions import BatchKwargsError
from great_expectations.data_context import DataContext
from great_expectation... |
###########################################################################
#
# 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
#
# https://www.apache.org/l... |