text stringlengths 3 1.05M |
|---|
import {
expect,
} from 'chai';
import wrapWord from '../src/wrapWord';
describe('wrapWord', () => {
it('wraps a string at a nearest whitespace', () => {
expect(wrapWord('aaa bbb', 5)).to.deep.equal(['aaa', 'bbb']);
expect(wrapWord('a a a bbb', 5)).to.deep.equal(['a a a', 'bbb']);
});
context('a single... |
import React from "react";
import Layout from "../../components/layout";
import PPCLLCLayout from "../../atomic/partials/ppc/ppc-llc-layout";
const FormALLLC = () => {
return (
<Layout>
<PPCLLCLayout stateCode="DE" videoID="imnAJolDWoU" vimeo={false} />
</Layout>
);
};
export default FormALLLC;
|
jest.dontMock('../file_helper');
var fileHelper = require('../file_helper');
describe('File Helper readdirRecursSync()', function () {
it('reads a directory recursively', function () {
var files = fileHelper.readdirRecursSync(__dirname + '/../');
var hasFileHelperTest = files.indexOf(__filename) > -1;
... |
'use strict';
/**
* Dependencies
*/
var fs = require('fs');
/**
* Expose `copy`
*/
module.exports = copy;
/**
* Synchronously copy file
*/
function copy(src, dest) {
try {
var source = fs.readFileSync(src);
fs.writeFileSync(dest, source);
} catch (err) {
}
}
|
const handle = "annette"
const links = [
{
label: "Github",
url: `https://github.com/${handle}`,
},
{
label: "Twitter",
url: `https://twitter.com/${handle}`,
},
{
label: "Youtube",
url: `https://www.youtube.com/${handle}`,
},
{
label: "Instagram",
url: `https://www.instagr... |
# Copyright 2020 StreamSets 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 writi... |
from django.contrib import admin
from .models import Board
admin.site.register(Board)
# Register your models here.
|
// state argument is not application state, only the state this reducer is responsible for.
export default function (state = null, action) {
switch (action.type){
case 'BOOK_SELECTED':
return action.payload;
}
return state;
} |
import typing
import sys
import subprocess
import pathlib
import os.path
from datetime import datetime
import math
import unittest
from enum import IntEnum
p = sys.path
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
p = sys.path
from buph.config import Config
from buph.d... |
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Terminal = f()... |
import styled from 'styled-components/native';
import LinearGradient from 'react-native-linear-gradient';
import { getStatusBarHeight } from 'react-native-status-bar-height';
export const Container = styled(LinearGradient).attrs({
colors: ['#7159c1', '#9B49c1'],
start: { x: 0, y: 0 },
end: { x: 1, y: 1 },
})`
... |
import Head from 'head';
import Footer from 'footer';
export default function Home() {
return (
<div
style={{
textAlign: 'center',
padding: '20px 0 40px 0',
}}
>
<Head />
<p style={{ margin: '16px 0' }}>
🍙 Extensible enterprise-level front-end application fram... |
exports.handler = async (context, event, callback) => {
try {
const twilioClient = context.getTwilioClient();
const result = await driver(context, event, twilioClient);
return callback(null, result);
} catch (e) {
return callback(e);
}
};
const driver = async (serverlessContext, serverlessEvent, ... |
import express from 'express';
import path from 'path';
import open from 'open';
import webpack from 'webpack';
import config from '../webpack.config';
const port = 3000;
const app = express();
const compiler = webpack(config);
app.use(require('webpack-dev-middleware')(compiler, {
noInfo: true,
publicPath: config... |
!function(h){var c,e='<svg><symbol id="iconsocial-wechat" viewBox="0 0 1024 1024"><path d="M712.149333 352.234667c5.184 0 10.282667 0.064 15.381334 0.341333-26.944-146.837333-178.602667-259.2-361.642667-259.2-202.090667 0-365.888 137.002667-365.888 306.005333 0 99.093333 56.298667 187.178667 143.637333 243.093334l3.349... |
from flask import Flask, request
import pandas as pd
import numpy as np
import json
import pickle
import os
app = Flask(__name__)
# load model and scaler files
model_path = os.path.join('models')
model_file_path = os.path.join(model_path, 'lr_model.pkl')
scaler_file_path = os.path.join(model_path, 'lr_scaler.pkl')
s... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.iosCropStrong = void 0;
var iosCropStrong = {
"viewBox": "0 0 512 512",
"children": [{
"name": "g",
"attribs": {},
"children": [{
"name": "rect",
"attribs": {
"x": "128",
"y": "64",
... |
#!/usr/bin/env python
#
#___INFO__MARK_BEGIN__
##########################################################################
# Copyright 2016,2017 Univa 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 ... |
const Joi = require("joi");
const mongoose = require("mongoose");
const AddressSchema = Joi.object({
OwnerID: Joi.string().required(),
Name: Joi.string().required(),
Address: Joi.string().required(),
City: Joi.string().required(),
State: Joi.string().required(),
Pincode: Joi.number().required(),
Phone: J... |
;(function(){
var angulo=function(x1,y1,x2,y2){
var y=y2-y1,x=x2-x1
var res=(Math.atan(y/x)*(180/Math.PI));
if(x<0){res+=180;}
if(res<0){res+=360;}
return res;
}
var minDistAlign=0.4;
var minDistNear=2;
var markers=[];
for(var i=0;i<scene.children.length;i++){
if(scene.children[i].isMarker){
marke... |
"use strict";
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.13.9
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator... |
#! python3
# wildDotStar.py - Looking at the wildcard char and matching w/ dot-star
# Import libraries
import re
# . char is a wild card that matches any char except for a \n
wildText = 'The cat in the hat sat on the flat mat.'
atRegex = re.compile(r'.at')
print(atRegex.findall(wildText))
# The . char will match just... |
window.___browserSync___ = {};
___browserSync___.socketConfig = {"reconnectionAttempts":50,"path":"/browser-sync/socket.io"};
___browserSync___.socketUrl = '' + location.host + '/browser-sync';
___browserSync___.options = {"logLevel":"info","plugins":[],"port":3000,"snippetOptions":{"async":true,"whitelist":[],"blackli... |
import {
ActivityIndicator,
Dimensions,
FlatList,
View,
} from 'react-native';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Pagination, Slide } from './src';
export default class Gallery extends Component {
constructor(props) {
super(props);
this.state = { in... |
/**
* angular-strap
* @version v2.0.1 - 2014-04-10
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
'use strict';
angular.module('mgcrea.ngStrap.helpers.dateParser', []).provider('$dateParser', [
'$l... |
/*
* Copyright (c) 2013 Google, Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
* Permission is granted to anyone to use this software for any purpose,
* including commerci... |
function monkeyPatcher(input) {
switch (input) {
case 'upvote':
this.upvotes++;
break;
case 'downvote':
this.downvotes++;
break;
case 'score':
let currentUpvotes = this.upvotes;
let currentDownvotes = this.downvotes;
... |
import React from "react";
// reactstrap components
import {
Button,
Input,
InputGroupAddon,
InputGroupText,
InputGroup,
Container,
Row,
Col
} from "reactstrap";
// core components
import ExamplesNavbar from "components/Navbars/ExamplesNavbar.js";
import LandingPageHeader from "components/Headers/Land... |
import React from 'react';
import Radium from 'radium';
import Knob from 'components/knob';
import Guides from 'components/guides';
import SelectorKnobInner from 'components/selectorKnobInner';
import {
fontFamily, normalSize, letterSpacing, smallSize, fontWeight,
darkGrey, drumLabel, stencilOrange
} from 'theme/... |
'use strict';
var assign = require('lodash/assign');
var base = require('../mixins/base');
/**
* Creates a Country instance.
*
* @param {Shopify} shopify Reference to the Shopify instance
* @constructor
* @public
*/
function Country(shopify) {
this.shopify = shopify;
this.name = 'countries';
this.key = ... |
'use strict';
require('../../base/style/css.js');
require('element-plus/theme-chalk/el-option-group.css');
//# sourceMappingURL=css.js.map
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
if __name__ == "__main__":
# plot EEG
EEGNet_dict = {
'elu': 'elu_5e-3_amsgrad',
'relu': 'relu_1e-3',
'leaky_relu': 'leaky_relu_1e-2_init_amsgrad'
}
plt.figure()
plt.rcParams["font.family"] = "serif"
... |
"""A library that provides a Python interface to the Zillow API."""
from __future__ import absolute_import
import os as _os
import pkg_resources as _pkg_resources
from .error import ZillowError # noqa: F401
from .place import Place # noqa: F401
from .api import ValuationApi # noqa: F401
__author__ = 'python-zil... |
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
class EnrichClient(NamespacedClient):
@query_params()
def delete_policy(self, name, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-delete-policy.html>`_
:arg name: T... |
(function() {
'use strict';
angular
.module('login')
.controller('LoginCtrl', LoginCtrl);
LoginCtrl.$inject = ['$auth', '$state', 'toastService'];
function LoginCtrl($auth, $state, toastService) {
var vm = this;
vm.login = login;
function login() {
... |
/*!
* # Semantic UI 2.7.4 - Tab
* http://github.com/semantic-org/semantic-ui/
*
*
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
;(function ($, window, document, undefined) {
'use strict';
$.isWindow = $.isWindow || function(obj) {
return obj != null && obj === obj.window;
};
$.... |
from __future__ import unicode_literals
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from .views import CsvView
class CsvExportAdminMixin(object):
"""
Adds an Export to CSV action for ModelAdmins. You can specify which
columns to display in the CSV with the c... |
import pytest
@pytest.mark.skip("skip until migrated to snappi")
@pytest.mark.e2e
def test_udp_header_with_fixed_length_checksum_e2e(api, b2b_raw_config):
"""
Configure a raw udp flow with,
- fixed src and dst Port address, length, checksum
- 1000 frames of 74B size each
- 10% line rate
Valid... |
'use strict';
var React = require('react/addons');
var PureRenderMixin = React.addons.PureRenderMixin;
var SvgIcon = require('../../svg-icon');
var ActionHourglassFull = React.createClass({
displayName: 'ActionHourglassFull',
mixins: [PureRenderMixin],
render: function render() {
return React.createElemen... |
# Copyright 2018 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 agreed to in writing, s... |
export const SIGN_IN_STATUS = 'SIGNED_IN_SATATUS';
export const SIGN_OUT_STATUS = 'SIGN_OUT_STATUS';
|
import VueRouter from 'vue-router';
import Home from './views/main/Home';
import Characters from './views/main/Characters';
import Handbook from './views/main/Handbook';
import Forums from './views/main/Forums';
import News from './views/main/News';
import Login from './views/users/Login';
import Register from './views... |
!function(e){function i(e,i){var n=e.x-i.x,r=e.y-i.y;return t>n*n+r*r}function n(e){for(var t=e.head;t;){var i=t.next;t.next=t.prev,t.prev=i,t=i}var i=e.head;e.head=e.tail,e.tail=i}function r(e){this.level=e,this.s=null,this.count=0}function a(e){if(e)this.drawContour=e;else{var t=this;t.contours={},this.drawContour=fu... |
/*
* @Description:
* @Date: 2019-10-08 22:27:09
* @LastEditors: Please set LastEditors
* @LastEditTime: 2020-05-26 10:50:11
*/
// 引入mockjs
import {
GET
} from './types/get'
import {
POST
} from './types/post'
import {
DELETE
} from './types/delete'
const Mock = require('mockjs')
Mock.setup({
timeout: '200... |
const assert = require('http-assert')
const _ = require('lodash')
const ac = require('../../lib/active-campaign')
async function subscribeContact (contactId, course) {
assert(contactId, 400, 'contactId is required')
assert(course, 400, 'course is required')
course = course.toLowerCase()
const currentJSGener... |
export default class AppMatchPassword {
constructor() {
this.require = 'ngModel';
this.restrict = 'A';
this.scope = {
password: '='
};
}
link(scope, element, attributes, ngModel) {
ngModel.$validators.matchPassword = (modelValue) => {
return m... |
const EventEmitter = require('events');
const ST_INITED = 0;
const ST_CLOSED = 1;
/**
* Encode batch msg to client
*/
function encodeBatch(msgs) {
let res = '[';
let msg;
for (let i = 0, l = msgs.length; i < l; i++) {
if (i > 0) {
res += ',';
}
msg = msgs[i];
... |
const { decodeJwt } = require("./helpers/jwt-helpers.js");
const { unbanUser } = require("./helpers/user-helpers.js");
exports.handler = async function (event, context) {
if (event.httpMethod !== "GET") {
return {
statusCode: 405
};
}
if (event.queryStringParameters.token !== u... |
from unittest import mock
from briefcase.config import AppConfig
def test_no_resources(create_command):
"If the template defines no extra targets, none are installed"
myapp = AppConfig(
app_name='my-app',
formal_name='My App',
bundle='com.example',
version='1.2.3',
des... |
import { Provider } from 'react-redux';
import React from 'react';
import { View, ActivityIndicator, StyleSheet } from 'react-native';
import { PersistGate } from 'redux-persist/integration/react';
import { NavigationContainer } from '@react-navigation/native';
import { colors } from './src/styles';
import { store, per... |
var admin = require('firebase-admin')
var serviceAccount = require('../../service_account.json')
module.exports = admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: 'https://arsenic-374f3.firebaseio.com'
}, 'server')
|
// show-in-doc
// Accessor to sub-ranges of arrays. This is used, for example, for rendering
// large lists or tables in which only a part of the items should be used for
// processing or rendering. An array projection provides convenient access and
// can apply operations to sub-ranges.
function create(array, length,... |
#
# Install helper code to manage inserting the correct version for the GUI
# Gets the version from the result of "profit version"
# Converts to proper symver format so NPM doesn't complain
# Adds the version info to the package.json file
#
import json
import os
import subprocess
from pkg_resources import parse_version... |
import{_ as e}from"./TableImg.96b6e2f6.js";import{f as o}from"./BasicForm.99631a91.js";import{u as i}from"./useTable.ee2b6f63.js";import{g as n,d as t}from"./account.c0adc700.js";import{P as s}from"./index.52d50d5a.js";import{b as r}from"./index.08cdb95c.js";import a from"./AccountModal.c768cfe0.js";import d from"./Pas... |
import React from 'react'
import Input from '@material-ui/core/Input';
import Button from '@material-ui/core/Input';
import Notifier, { openSnackbar } from '../BetNotifications';
import { withStyles } from '@material-ui/core/styles';
import bg from '../../images/bg.png';
import { Trans } from 'react-i18next';
const st... |
import idc
import ida_kernwin
import idautils
import ida_bytes
import ida_name
import ida_search
from bip.py3compat.py3compat import *
import bip.base.xref
from .biperror import BipError
from .bipidb import BipIdb
class BipBaseElt(object):
"""
Base class for representing an element in IDA which is identi... |
module.exports={title:"Monogram",slug:"monogram",svg:'<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Monogram icon</title><path d="M23.158 0v23.503c0 .451-.533.668-.83.338L12 12.38 3.301 2.73.842 0h22.316zM11.029 13.46L1.672 23.841c-.297.33-.83.111-.83-.338V0l10.187 13.46z"/></svg>',get p... |
// Look for sections that have a fullscreen-img attribute and set this image as
// the body background image whenever this section is displayed.
// TODO insert image with reveal transition
var BGR;
$(document).ready(function() {
// Hide all our fullscreen markdown images
$("img[alt='']").hide();
$('section img[a... |
from abc import ABC, abstractmethod
from math import pi
class Shape(ABC):
@abstractmethod
def calculate_area(self):
pass
@abstractmethod
def calculate_perimeter(self):
pass
class Circle(Shape):
def __init__(self, r):
self.__radius = r
def calculate... |
"""
构建CycleGAN需要的各个模块
"""
import tensorflow as tf
import os
import sys
base = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.join(base, '../../'))
# import basemodels.BaseLayers_UnMixed as BaseLayers
import basemodels.BaseLayers_Mixed as BaseLayers
##################################################... |
'use strict';
module.exports = {
up: function up(queryInterface, Sequelize) {
return queryInterface.createTable('users', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
email: {
type: Sequelize.STRING
},
... |
#!/usr/bin/env python3
class Engines:
"""Get informations about engines preferences."""
def __init__(self, html: str):
self.full_names, self.shortcuts = [], []
for name in html.find_all("th", {"class": None}):
self.full_names.append(name.get_text())
to_remove = [
... |
(function() {
var Idle;
if (!document.addEventListener) {
if (document.attachEvent) {
document.addEventListener = function(event, callback, useCapture) {
return document.attachEvent("on" + event, callback, useCapture);
};
} else {
document.addEventListener = function() {
r... |
import pytest
import numpy as np
from numpy.testing import assert_array_almost_equal_nulp
from ..interpolate import *
DTYPES = ['<f4', '>f4', '<f8', '>f8', '<i4', '>i4', '<i8', '>i8']
class GenericTests(object):
def setup_class(self):
raise Exception("This class should not be used directly")
def ... |
import React from 'react';
import {get, compose} from 'lodash/fp';
import {setPayment} from './Model';
const getValueAnd = f => compose(f, get('target.value'));
export default function PaymentDetails({_localstate}) {
const {notify2, model} = _localstate;
const handlePaymentMethod = getValueAnd(notify2(setPay... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var _extends = require('./extends-5150c1f4.js');
var React = require('react');
var IconPropTypes = require('./IconPropTypes-19476a71.js');
require('./_commonjsHelpers-1b94f6bc.js');
require('./index-c33eeeef.js');
require('./index-37353731.j... |
let num = document.querySelector('input#fnum')
let lista = document.querySelector('select#flista')
let res = document.querySelector('div#res')
let valores = []
function isNumero(n) {
if(Number(n) >= 1 && Number(n) <= 100) {
return true
} else {
return false
}
}
function inLista(n, l) {
... |
# Copyright 2020 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... |
/* COPYRIGHT 2012 SUPERMAP
* 本程序只能在有效的授权许可下使用。
* 未经许可,不得以任何手段擅自使用或传播。*/
/**
* @requires SuperMap/Util.js
*/
/**
* Class: SuperMap.REST.FacilityAnalystSinks3DResult
* 最近设施分析服务结果类(汇查找资源)
* 该类包含了分析得到的最近设施点、设施点与事件点间的弧段、结点等信息。
*/
SuperMap.REST.FacilityAnalystSinks3DResult = SuperMap.Class({
/**
* ... |
import discord
from discord.ext import commands
from random import choice
from cogs.commands import commands_names
from cogs.config import *
"""
------------------------------------------------------------------------------------THIS CODE WILL BE REWRITTEN SOON---------------------------------------------------------... |
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var __decorate = (this && this.__decorate) || fu... |
"""Subprocess specification and related utilities."""
import os
import io
import re
import sys
import shlex
import signal
import inspect
import pathlib
import builtins
import subprocess
import contextlib
import xonsh.tools as xt
import xonsh.lazyasd as xl
import xonsh.platform as xp
import xonsh.environ as xenv
import... |
/*
Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
if(!dojo._hasResource["dojox.dtl.dom"]){dojo._hasResource["dojox.dtl.dom"]=true;dojo.provide("dojox.dtl.dom");dojo.require(... |
(function($){
$(document).ready(function(){
$(".banner-image").backstretch('images/banner.JPG');
// Fixed header -----------------------------------------------
$(window).scroll(function() {
if (($(".header.fixed").length > 0)) {
if(($(this).scrollTop() > 0) && ($(window).width() > 767)) {
$("body"... |
// Knockout Mapping plugin v1.0
// (c) 2011 Steven Sanderson, Roy Jacobs - http://knockoutjs.com/
// License: Ms-Pl (http://www.opensource.org/licenses/ms-pl.html)
ko.exportSymbol=function(i,p){for(var j=i.split("."),r=window,k=0;k<j.length-1;k++)r=r[j[k]];r[j[j.length-1]]=p};ko.exportProperty=function(i,p,j){i[p]=j};... |
/*
Postfix-Notation Calculator
Postfix notation (also known as Reverse Polish notation) is an alternative way of representing algebra expressions. For example, take the following expression:
2 + 5 * 8
This “normal” notation that we see everyday is called infix notation. Infix notation places its math operators in-betw... |
from accounts.util import find_users, user_json
from collections import defaultdict
from datetime import timedelta
from django.conf import settings
from django.contrib.auth.models import User
from django.db.models import Q, Sum, When, Case, IntegerField
from django.http import Http404, HttpResponse
from django.template... |
// Client-side JavaScript, bundled and sent to client.
// Define Minimongo collections to match server/publish.js.
Lists = new Mongo.Collection("lists");
Todos = new Mongo.Collection("todos");
// ID of currently selected list
Session.setDefault('list_id', null);
// Name of currently selected tag for filtering
Sessio... |
import ListenerGenerator from './listeners';
import { getScope, isObject, find, getRules } from './utils';
const listenersInstances = [];
export default (options) => ({
inserted(el, binding, vnode) {
const listener = new ListenerGenerator(el, binding, vnode, options);
listener.attach();
listenersInstanc... |
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel appli... |
import React from "react";
import { useProvidedData } from "../../context/ProvidedData/ProvidedData";
const Separator = ({ Icon, children }) => {
const { components, utils } = useProvidedData();
const { Typography } = components;
const { makeStyles } = utils;
const useStyles = makeStyles(() => ({
separa... |
/** @jsx h */
import React from 'react'
import h from '../helpers/h'
export const rules = [
{
serialize(obj, children) {
if (obj.object === 'block' && obj.type === 'paragraph') {
return React.createElement('p', {}, children)
}
if (obj.object === 'annotation' && obj.type === 'highlight... |
module.exports = {
init:async ()=>{
common.tell("changing main script in package.json");
let app_data;
if(true){
let process_package = await edit_package();
if(!process_package){return false;}
app_data = process_package;
}
if(true){
if(!edit_builder(app_data)){return ... |
import unittest
from unittest import mock
from datetime import datetime
from knosk.core import HistoryManager
from tests.util import SimpleForm
# stub for django model used previously
class DialogContext:
pass
class HistoryManagerTest(unittest.TestCase):
def test_empty_history_from_json(self):
jso... |
""" check internal version consistency
these should be quick to run (not invoke any other process)
"""
# pylint: disable=redefined-outer-name,unused-variable
import json
import pathlib
import re
import sys
import tempfile
import jsonschema
import pytest
try:
import ruamel.yaml as yaml
except ImportError:
... |
"use strict";
(function() {
angular.module("projecto").service("toast", [function() {
// This module is mainly used so there is a consistent style of messages.
var AUTOCLOSE_TIME = 2000; // 2 seconds for default
/*
* This has no closing button and will close automatically in 2 seconds.
* The ... |
# -*- coding: utf-8 -*-
"""
util.py
Created by Stephan Hügel on 2019-06-28
This file is part of hexcover.
Copyright (c) 2019 Stephan Hügel
Blue Oak Model License Version 1.0.0
Purpose
This license gives everyone as much permission to work with this
software as possible, while protecting contributors from liability... |
!function(n){"function"==typeof define&&define.amd?define(["jquery","underscore"],n):"object"==typeof exports?n(require("jquery")):n(jQuery)}(function(l,t){function e(n,e){if(0<=n.indexOf(e))return 1;for(var t=0;t<a.length;t++){var o=a[t];if(e>=o[0]&&e<=o[1])return 1}}function n(n){!isNaN(n.val())&&0!=n.val().length||n... |
import warnings
import numpy as np
from sklearn.base import ClassifierMixin, clone
from sklearn.model_selection import StratifiedKFold
from sklearn.utils import shuffle, check_random_state
from .base import BaseHandler
class Filter(BaseHandler, ClassifierMixin):
"""
Removes from dataset samples most likely t... |
'use strict';
/* global contacts */
/* global Contacts */
/* global MockImportStatusData */
/* global MockCookie */
/* global MockContactsIndexHtml */
/* global MockgetDeviceStorage */
/* global MocksHelper */
/* global MockIccManager */
/* global MockMozContacts */
/* global MockNavigatorMozMobileConnections */
/* glo... |
jQuery(document).ready(function($) {
$.fn.editable.defaults.mode = 'inline';
$('.editable').editable();
}); |
/* global describe, it, beforeEach, afterEach */
'use strict';
const FoxxManager = require('@arangodb/foxx/manager');
const ArangoCollection = require('@arangodb').ArangoCollection;
const fs = require('fs');
const db = require('internal').db;
const arangodb = require('@arangodb');
const arango = require('@arangodb').a... |
$( document ).ready(function() {
$('#addCategory').hide();
$('#addOneItem').click(function() {
$('#message').text('Prvo završite sa ažuriranjem');
$('.aside').css('border', '2px solid red');
$('.aside').css('background-color', 'gray');
$('.aside').css('padding', '20px');
... |
i=0
k=1
def setup():
size(500,500)
smooth()
strokeWeight(1)
background(0)
def draw():
global i
global k
stroke(i,20)
line(mouseX, mouseY,random(0,500),random(0,500))
i=i+k
if(i==255):
k=-1
if(i==0):
k=1
def keyPressed():
if(key=='s'):
SaveFrame(" m... |
import styled from 'styled-components';
export const Card = styled.div`
max-width: ${(props) => (props.mobile ? '19rem' : '10rem')};
height: ${(props) => (props.mobile ? '12rem' : '19rem')};
${(props) => (props.mobile ? '' : 'flex-direction: column;')}
background-color: var(--white);
border-radius: var(--rad... |
const initialState = {
cardJson: {},
record: {}
};
function reducer(state, action) {
switch (action.type) {
case "UpdateSchema":
return {
...state,
cardJson: action.cardJson,
record: action.record,
};
default:
return state === undefined ? initialState :
Object.keys(state).length === 0 ?... |
import mechanize
import urllib2
from bs4 import BeautifulSoup
# Create a Browser
browser = mechanize.Browser()
# Disable loading robots.txt
browser.set_handle_robots(False)
browser.addheaders = [('User-agent',
'Mozilla/4.0 (compatible; MSIE 5.0; Windows 98;)')]
movie_title = raw_input("Enter ... |
export default {
key: 'G#',
suffix: '9',
positions: [
{
frets: '3323',
fingers: '2314',
},
{
frets: '5666',
fingers: '1234',
},
{
frets: '8a89',
fingers: '1312',
barres: 8,
capo: true,
},
{
frets: 'bcbd',
fingers: '1213',
... |
var facebookStrategy = require('passport-facebook').Strategy;
var randomstring = require("randomstring");
var User = require('../model/user');
var Role = require('../model/role');
var conf = require('../conf.json');
module.exports = function(passport, mongoose){
passport.use(new facebookStrategy({
clientID: con... |