text stringlengths 3 1.05M |
|---|
import 'settings/service/controller';
import 'settings/add/controller';
import 'settings/notifications/controller';
import 'settings/view/controller';
import 'settings/configuration/controller';
import 'settings/directives/sidebar/sidebar';
import 'settings/directives/topnav/topnav';
import angular from 'angular';
impo... |
from logging import raiseExceptions
from django.shortcuts import render
from rest_framework.generics import CreateAPIView
from rest_framework import status
from .models import *
from .serializers import *
from rest_framework.response import Response
import sys
from .autograder.autograder.t5_autograder import *
from .a... |
/*
* Copyright (c) 2016, Globo.com (https://github.com/globocom)
*
* License: MIT
*/
export default {
base: {
backgroundColor: "transparent",
border: "none",
fontSize: "14px",
color: "#fafafa",
width: "250px",
margin: "20px",
padding: 0,
":focus": {
outline: "none"
}
... |
(function(){var loadHandler=window['sl_{969A703B-9AB9-40E7-AD41-0EA45B16039B}'];loadHandler&&loadHandler(1, '<div id="spr0_39e951"><div id="spr1_39e951" class="kern slide"><img id="img0_39e951" src="data/img0.png" width="960px" height="540px" alt="" style="left:0px;top:0px;"/></div><div id="spr2_39e951" class="kern sli... |
Cufon.replace('h3, .list-2 .item', { fontFamily: 'NewsGoth', hover:true });
Cufon.replace('.menu li a, h1 strong, .pagination strong, .banner strong', { fontFamily: 'NewsGoth bold', hover:true });
Cufon.replace('h2', { fontFamily: 'Vegur', hover:true });
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactC3js = _interopRequireDefault(require("react-c3js"));
var _ChartConstants = require("./ChartConstants");
function _interopRequireDefault(obj) ... |
import { matchFilter } from '@keystonejs/test-utils';
import Text from '../Text';
import DateTime from './';
export const name = 'DateTime';
export { DateTime as type };
export const exampleValue = '"1990-12-31T12:34:56.789+01:23"';
export const getTestFields = () => {
return {
name: { type: Text },
lastOnl... |
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import { InputLabel } from '@material-ui/core/Input';
import { MenuItem } from '@material-ui/core/Menu';
import { FormControl } from '@material-ui/core/Form';
import Select from '@material-ui/core/Selec... |
import axios from 'axios';
const api = axios.create({
baseURL: 'http://192.168.0.3:3333'
});
export default api; |
'use strict';
accountCtrl.$inject = ['$translate', '$state', '$timeout', 'auth', 'errorConstants'];
export default function accountCtrl($translate, $state, $timeout, auth, errorConstants) {
var vm = this;
vm.doNotMatch = null;
vm.error = null;
vm.errorUserExists = null;
//vm.login = LoginService.... |
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('/charts/flot', ['jquery', 'Site'], factory);
} else if (typeof exports !== "undefined") {
factory(require('jquery'), require('Site'));
} else {
var mod = {
exports: {}
};
factory(global.jQuery, global... |
from tkinter import *
window = Tk()
window.geometry("400x300+20+10")
window.title('Final Exam')
lbl1 = Label(window, text="Find the least among three numbers", fg="blue", bg="yellow")
lbl1.place(relx=0.50, y=50, anchor="center")
lbl2 = Label(window, text="Enter the first number:")
lbl2.place(x=50, y=80)
txt... |
#!/usr/bin/env python3
# MIT License
#
# 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, publish, di... |
import React, { useState, useEffect } from 'react';
import { CSSTransition, TransitionGroup } from 'react-transition-group';
import styled from 'styled-components';
import { email } from '@config';
import { navDelay, loaderDelay } from '@utils';
const StyledHeroSection = styled.section`
${({ theme }) => theme.mixins... |
const path = require("path")
exports.createPages = ({ boundActionCreators, graphql }) => {
const { createPage } = boundActionCreators
const postTemplate = path.resolve("src/templates/blog-post.js")
return graphql(`
{
allMarkdownRemark {
edges {
node {
id
frontm... |
(window.driftWebpackJsonp=window.driftWebpackJsonp||[]).push([[103],{772:function(a){a.exports={"app.async.contactPrompt":"How can we reach you?","app.async.thankYou":"Thanks for your message. We'll follow up in a bit at {email}","app.automessage.emailCaptureMessage":"Hey there! We're excited to help you out. Let us kn... |
log10 = Math.log(10);
log100 = Math.log(100);
log1000 = Math.log(1000);
NUMBER_SUFFIXES = ["K", "M", "B", "T", "Qa", "Qt", "Sx", "Sp", "Oc", "Nn",
"Dc", "UDc", "DDc", "TDc", "QaDc", "QtDc", "SxDc", "SpDc", "ODc", "NDc",
"Vi", "UVi", "DVi", "TVi", "QaVi", "QtVi", "SxVi", "SpVi", "O... |
/*
Language: HTML, XML
Website: https://www.w3.org/XML/
Category: common
*/
export default function(hljs) {
var XML_IDENT_RE = '[A-Za-z0-9\\._:-]+';
var XML_ENTITIES = {
className: 'symbol',
begin: '&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;'
};
var XML_META_KEYWORDS = {
begin: '\\s',
contains:[
{
... |
#!/usr/bin/python
# Copyright (c) 2020, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... |
### module for basic operations with ellone metric
from scipy.spatial.distance import cityblock as ellone
from scipy.spatial.distance import pdist
def get_metric(params=None):
met_func=lambda pt1,pt2: ellone(pt1,pt2) if params is None else lambda pt1,pt2: ellone(params*pt1,params*pt2)
matr_func=lambda po... |
import FilterProvider from "./FilterProvider";
import Range from "./Range";
import Fuzzy from "./Fuzzy";
import Exact from "./Exact";
import Search from "./Search";
import Filter from "./Filter";
import WithFilteredData from "./WithFilteredData";
export {
FilterProvider,
Filter,
Exact,
Range,
Fuzzy,
Search... |
const { all } = require('../../dist/cjs/index')
const RAll = require('ramda/src/all')
const fpEvery = require('lodash/fp/every')
const _every = require('lodash/every')
const Benchmark = require('benchmark')
const runSuite = require('../runSuite')
const suite = new Benchmark.Suite('all')
const array = Array(10000)
... |
function bellyButton(id) {
d3.json("samples.json").then((data) => {
let samplesFiltered = data.samples.filter(obj => obj.id == id);
let otu_ids_OTU = samplesFiltered[0].otu_ids.map(otu => "OTU " + otu);
let otu_labels = samplesFiltered[0].otu_labels;
let sample_values = samplesFiltered[0].sample... |
'use strict'
const path = require('path')
module.exports = {
webpack: {
resolve: {
alias: {
'node-forge': path.resolve(
path.dirname(require.resolve('libp2p-crypto')),
'../vendor/forge.bundle.js'
)
}
}
}
}
|
from .optimizer import Optimizer
import numpy as np
import time
from multiprocessing import Pool
class ParticleBFGS(Optimizer):
"""
BFGS
"""
def __init__(self, alpha=0.01, beta=0.0, gamma=0.9, n_epochs=1, mini_batch_size=1, verbosity=2, weight_update="sd",
cost_freq=2, position_gra... |
async function newFormHandler(event) {
event.preventDefault();
const title = document.querySelector('input[name="post-title"]').value;
const content = document.querySelector('textarea[name="content"]').value;
const response = await fetch(`/api/posts`, {
method: "POST",
body: JSON.stringify({
tit... |
import axios from 'axios'
import getconfig from 'next/config'
import SinglePost from 'components/SinglePost'
export default function Home({singleposts, allcategories, latestposts}) {
return (
<>
{ singleposts.map(singlepost =>(
<SinglePost key={singlepost.id... |
/*
* Copyright (C) 2020 Tencent Cloud.
*
* 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 ag... |
import { SEARCH_VALUE_CHANGE } from '../../_actions/search.actions'
export default (
state =
$('#search-input')
.val() || '',
{
type,
value
}
) =>
type === SEARCH_VALUE_CHANGE ?
value
: state |
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Supprimez "+t+" car... |
from ftplib import FTP_TLS
HOSTNAME = 'ftp.pureftpd.org'
USERNAME = 'anonymous'
PASSWORD = ''
with FTP_TLS(host=HOSTNAME, user=USERNAME, passwd=PASSWORD, timeout=30) as ftps:
ftps.dir()
# drwxr-xr-x 18 1000 1008 1024 Jul 21 2016 .
# drwxr-xr-x 18 1000 1008 1024 Jul 21 20... |
describe("", () => {
it("It worked!", () => {
// expect().to.be.an("");
});
});
|
var assert = require('assert');
var R = require('../source/index.js');
var eq = require('./shared/eq.js');
var Maybe = require('./shared/Maybe.js');
describe('unnest', function() {
it('only flattens one layer deep of a nested list', function() {
var nest = [1, [2], [3, [4, 5], 6, [[[7], 8]]], 9, 10];
eq(R... |
# --------------------------------------------------------
# Swin Transformer
# Copyright (c) 2021 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ze Liu
# --------------------------------------------------------
import os
import time
import random
import argparse
import datetime
impo... |
# Importing dependencies
import numpy as np
from ..necessities.activation import getActivation
from ..necessities.cost import getCostfunction
from ..necessities.serialization import array2json, json2array
# get_layer
def get_layer(name='dense'):
if name.lower() == 'base': return base
if name.lower() == 'dense'... |
from openfermion.hamiltonians import fermi_hubbard
from openfermion.transforms import get_sparse_operator, jordan_wigner
from openfermion.utils import get_ground_state
# Set model.
x_dimension = 2
y_dimension = 2
tunneling = 2.
coulomb = 1.
magnetic_field = 0.5
chemical_potential = 0.25
periodic = 1
spinless = 1
# Ge... |
// const CronJob = require('cron').CronJob;
// const cacache = require('cacache');
// const axios = require('axios');
// const Judge = require('../api/judges/judgeModel');
// const Case = require('../api/cases/caseModel');
// const Protected = require('../api/protected/protectedModel');
// const Social = require('../ap... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(10)},function(e,t,n){e.exports=n(16)},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)ret... |
const { getRedis } = require("../redisdb");
const mkdirp = require("mkdirp");
const fs = require("fs");
const path = require("path");
const inter = require("../interserver/inter").router;
const buyAi = require("./ai/buypredictor");
// Frees the room in the master database.
inter.post("/delrooms", (req, res) => {
co... |
var ViewModelVisitasDetalle = function () {
var self = this;
self.visitasDetalle = ko.observableArray();
self.ProyectosUbicaciones = ko.observableArray();
self.error = ko.observable();
self.visitaDetail = ko.observable();
self.imagenR = ko.observable();
self.Latitud = ko.observableArray();
... |
var mylist;
$(function() {
}); |
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
})... |
/**
* Copyright 2012-2022, Plotly, Inc.
* All rights reserved.
*
* 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 hovertemplateAttrs = require('../../plots/template_attributes').hovertemplateAttrs;
var texttemplateAttrs = ... |
import copy
from synapse_pay_rest.client import Client
class PublicKey():
"""Represents a Public Key record with methods for constructing Public key
instances.
"""
def __init__(self, **kwargs):
for arg, value in kwargs.items():
setattr(self, arg, value)
def __repr__(self):
... |
import { Table } from './table'
import { chart } from './chart'
function main () {
if (document.getElementById('thetable')) {
window.table = new Table()
window.table.load(document)
}
if (document.getElementById('the_graph')) {
chart.setup_page()
}
}
main()
|
import pathlib
import pkg_resources
from clvm_tools.clvmc import compile_clvm
from shamrock.types.blockchain_format.program import Program, SerializedProgram
def load_serialized_clvm(clvm_filename, package_or_requirement=__name__) -> SerializedProgram:
"""
This function takes a .clvm file in the given packa... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const popover_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/Popover/popover"));
const react_styles_1 = require("@patternfly/... |
module.exports = {
siteMetadata: {
title: `주니어 개발자의 개발 블로그`,
description: `주니어 개발자로서의 저를 표현한 블로그입니다.`,
author: `HyungjunJeon`,
siteUrl: `https://my-website-link.com/`,
},
plugins: [
{
resolve: 'gatsby-plugin-typescript',
options: {
isTSX: true,
allExtensions: true,
... |
import os
import glob
import cv2
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(
description="Resize raw images to uniformed target size."
)
parser.add_argument(
"--raw-dir",
help="Directory path to raw images.",
default="./data/raw",
... |
from rlf.policies.base_policy import BasePolicy, create_simple_action_data
import numpy as np
import torch
from abc import ABC, abstractmethod
from collections import defaultdict
class SolvePolicy(BasePolicy, ABC):
"""
Plan all actions ahead of time based on the starting state. This can be
useful for class... |
# --------------------------------------------------------
# Tensorflow ATL
# --------------------------------------------------------
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import _init_paths
import tensorflow as tf
import numpy as np
import argp... |
module.exports = {
mongoURI: process.env.KF_MONGO_URI,
secretOrKey: 'secret',
port: process.env.KF_PORT || 5000,
testMongoURL: 'mongodb://lovely-aip:lovelyaip726@ds020208.mlab.com:20208/lovely-aip-test',
testPort: 5001,
email: process.env.KF_EMAIL,
emailPwd: process.env.KF_EMAIL_PWD,
emailServiceProvide... |
import os
import re
import html
import json
import itertools
from lxml import etree
from txt2json import Txt2JSON
from media_operations import MediaCutter
EAF_TIME_MULTIPLIER = 1000 # time stamps are in milliseconds
class Eaf2JSON(Txt2JSON):
"""
Contains methods to make JSONs ready for indexing from
EL... |
/* band.js */
Timeline._Band = function (B, G, C) {
if (B.autoWidth && typeof G.width == "string") {
G.width = G.width.indexOf("%") > -1 ? 0 : parseInt(G.width);
}
this._timeline = B;
this._bandInfo = G;
this._index = C;
this._locale = ("locale" in G) ? G.locale : Timeline.getDefaultLoc... |
/*
* 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 cause incorrect behavior and will be lost if the code is
* regenerated.
*/
'... |
(function(){
var socket = io();
socket.on('refresh', function(){
console.log("getting a refresh event");
// Reload the current page, without using the cache
document.location.reload(true);
});
})(); |
const CustomError = require("../extensions/custom-error");
module.exports = function getSeason(date) {
const season = ["spring", "summer", "autumn", "winter"]
if (date == undefined || date == null) {
return "Unable to determine the time of year!";
}
if (!(date instanceof Date && !isNaN(date.valueOf()))) {... |
(function() {
var App, Models, exports,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); ch... |
// @flow
import fs from 'fs';
import path from 'path';
import _ from 'lodash';
import mkdirp from 'mkdirp';
import createError from 'http-errors';
import type { HttpError } from 'http-errors';
import { UploadTarball, ReadTarball } from '@verdaccio/streams';
import { unlockFile, readFile } from '@verdaccio/file-lockin... |
import pkgutil
from pybtex.bibtex import bst
from io import StringIO
test_data = (
'plain',
'apacite',
'jurabib',
)
def check_bst_parser(dataset_name):
module = __import__('pybtex.tests.bst_parser_test.{0}'.format(dataset_name), globals(), locals(), 'bst')
correct_result = module.bst
bst_d... |
import React, { Component } from 'react';
import { Modal, Dimensions } from 'react-native';
import PropTypes from 'prop-types';
import {
View,
Text,
Container,
Header,
Content,
ListItem,
CheckBox,
Left,
Right,
Icon,
Body,
Title,
Button,
} from 'native-base';
const deviceWidth = Dimensions.ge... |
const express = require('express');
const cors = require('cors');
const bodyParser = require('body-parser');
const DB = require('./db');
module.exports = client => {
const app = express();
const db = DB(client);
const getAllTodos = (req, res, next) => {
db.getAll((err, data) => {
if (err) return next(... |
import { useEffect } from 'react';
import { Link as RouterLink, useLocation } from 'react-router-dom';
import PropTypes from 'prop-types';
import {
Avatar,
Box,
Divider,
Drawer,
Hidden,
List,
Typography
} from '@material-ui/core';
import {
BarChart as BarChartIcon,
Lock as LockIcon,
Settings as Sett... |
import { Meteor } from 'meteor/meteor';
import { Match } from 'meteor/check';
import { Random } from 'meteor/random';
import { TAPi18n } from 'meteor/tap:i18n';
import { slashCommands } from '../../utils';
import { Notifications } from '../../notifications';
import { Users } from '../../models';
/*
* Msg is a named fu... |
var timedQueue = function(period){
var timedDoubleLinkedCell = function(item,instant){
var prev, next;
return {
next:function(){return next;},
prev:function(){return prev;},
setNext:function(n){
next = n;
},
setPrev:function... |
import { h } from '../snabbdom'
import { CLASS_OR_ID } from '../../../config'
import paragraphIcon from '../../../assets/pngicon/paragraph/2.png'
import htmlIcon from '../../../assets/pngicon/html/2.png'
import hrIcon from '../../../assets/pngicon/horizontal_line/2.png'
import frontMatterIcon from '../../../assets/pngi... |
/**
* Layout component that queries for data
* with Gatsby's useStaticQuery component
*
* See: https://www.gatsbyjs.org/docs/use-static-query/
*/
import React, { useState } from "react"
import PropTypes from "prop-types"
import { useStaticQuery, graphql, Link } from "gatsby"
import HamburgerMenu from 'react-hambu... |
# Copyright 2012 OpenStack Foundation
# 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 requ... |
window.onload = function(event) {
// alert('test');
var options = {
valueNames: [ 'project_tags' ]
};
var projectsList = new List('projects', options);
var clearFilters = function() {
filterWeb.className = "btn";
filterMobile.className = "btn";
filterClear.className = "btn";
};
var to... |
/**
@module ember-metal
*/
import {
removeChainWatcher
} from './chains';
import {
watchKey,
unwatchKey
} from './watch_key';
import {
watchPath,
unwatchPath
} from './watch_path';
import {
isPath
} from './path_cache';
import {
peekMeta,
deleteMeta
} from './meta';
/**
Starts watching a property on... |
# -*- coding: utf-8 -*-
# A simple setup script to create an executable using PyQt4. This also
# demonstrates the method for creating a Windows executable that does not have
# an associated console.
#
# PyQt4app.py is a very simple type of PyQt4 application
#
# Run the build process by running the command 'python setu... |
const assert = require('chai').assert;
const reqlib = require('app-root-path').require;
const appRoot = require("app-root-path");
const path = require("path");
const memFs = require('mem-fs');
const editor = require('mem-fs-editor');
const store = memFs.create();
const fs = editor.create(store);
const DAOImplementation... |
import React, { useState } from "react";
import { Alert, Modal, StyleSheet, Text, Pressable, View } from "react-native";
const UpdateAppModal = () => {
return (
<View style={styles.centeredView}>
<Modal
animationType="slide"
transparent={true}
visible={true}
>
<View st... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var environment_1 = require("./environment");
var backend_cpu_1 = require("./kernels/backend_cpu");
var backend_webgl_1 = require("./kernels/backend_webgl");
Error.stackTraceLimit = Infinity;
function envSatisfiesConstraints(constraints) {
... |
var forOwn = require('./forOwn');
var isPlainObject = require('../lang/isPlainObject');
/**
* Mixes objects into the target object, recursively mixing existing child
* objects.
*/
function deepMixIn(target, objects) {
var i = 0,
n = arguments.length,
obj;
while (++i < n) {
obj = arg... |
from django.contrib.auth import get_user_model
from django.urls import reverse
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Tag, Recipe
from recipe.serializers import TagSerializer
TAGS_URL = reverse('recipe:tag-list')
class ... |
window.UserboundInterface = (function() {
var $ = {
z: require('./libs/zepto.js'),
grapnel: require('grapnel'),
simpleStorage: require('./libs/simpleStorage.js'),
WaveSurfer: require('./libs/wavesurfer.min.js'),
highlighter: require('./libs/highlight.js')
};
$.highlighter.registerLanguage('cl... |
import React, { Component } from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import Picker from "../components/Picker";
import Posts from "../components/Posts";
import {fetchPosts,receivePosts,selectedSubReddit} from '../actions/index'
class App extends Component {
handleChan... |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: telemetry_kv.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _... |
function score(word) {
"use strict";
var points = {
A: 1,
E: 1,
I: 1,
O: 1,
U: 1,
L: 1,
N: 1,
R: 1,
S: 1,
T: 1,
D: 2,
G: 2,
B: 3,
C: 3,
M: 3,
P: 3,
F: 4,
H: 4,
V: 4,
W: 4,
Y: 4,
K: 5,
J: 8,
X: 8,
Q: 10,
Z: 10
... |
/**
* @format
*/
import Verify from './Componets/Verify'
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
AppRegistry.registerComponent(appName, () => App);
|
import { createSelector } from 'reselect';
import { initialState } from './reducer';
/**
* Direct selector to the login state domain
*/
const selectLoginDomain = state => state.get('client', initialState);
/**
* Other specific selectors
*/
/**
* Default selector used by Login
*/
const makeSelectLogin = () =>
... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2013, Serge van Ginderachter <serge@vanginderachter.be>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'me... |
"""Custom protocol command.
A "custom" command contains arbitrary payload and result data.
It can be used by ProtocolEngine plugins to represent external
commands in state that a vanilla ProtocolEngine would not
know about.
This data model serves as a wrapper to ensure custom, arbitrary
data still adheres to the shap... |
"use strict";
Studio.CheckboxFormAttr = function () {
Studio.FormAttr.apply(this, arguments);
};
$.extend(Studio.CheckboxFormAttr.prototype, Studio.FormAttr.prototype, {
constructor: Studio.CheckboxFormAttr,
getRawValue: function () {
return this.$value.is(':checked');
},
setValue: function (value) {
... |
// import { resolve } from "path";
// import("/cinema-gazer-processor.js")
window.addEventListener('DOMContentLoaded', (event) => {
console.log('DOM fully loaded and parsed');
const startButton = document.querySelector("#start-button-form");
startButton.addEventListener('submit', setupAudioFiltering);
... |
/* global describe, it, expect */
const path = require("path");
const rmfr = require("rmfr");
const configuration = require("@swissquote/crafty/src/configuration");
const testUtils = require("../utils");
const getCrafty = configuration.getCrafty;
// Add a high timeout because of https://github.com/facebook/jest/issu... |
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @fileoverview A backpack that lives on top of the workspace.
* @author kozbial@google.com (Monica Kozbial)
*/
import * as Blockly from 'blockly/core';
import {cleanBlockXML, registerContextMenus} from './backpack_helpers'... |
import React from 'react'
import Layout from '../../components/Layout'
export default () => (
<Layout>
<section className="section">
<div className="container">
<div className="content">
<h1>Thank you!</h1>
<p>This is a placeholder form submission page</p>
</div>
<... |
import React, { PureComponent } from 'react';
import { Button, Form, Input, Row, Col } from 'hzero-ui';
import intl from 'utils/intl';
import { SEARCH_FORM_ITEM_LAYOUT } from 'utils/constants';
const FormItem = Form.Item;
const modelPrompt = 'hiam.menuConfig.model.menuConfig';
const commonPrompt = 'hzero.common';
@... |
from bs4 import BeautifulSoup
url = 'http://example.webscraping.com/places/view/United-Kingdom-239'
html = download(url)
broken_html = '<ul class=country><li>Area<li>Population</ul>'
soup = BeautifulSoup(broken_html, 'html.parser')
fixed_html = soup.prettify()
print(fixed_html)
ul = soup.find('ul', attrs={'class':'co... |
const express = require('express');
const app = express();
const noteRoutes = require('./routes/noteRoutes');
//setting initial port
const PORT = process.env.PORT || 3000;
//data parsing
app.use(express.urlencoded({ extended: true }));
app.use(express.json());
app.use(express.static('public'));
app.use(noteRoutes);
... |
"""Platform for switch integration."""
import logging
import async_timeout
from smarttub import SpaPump
from homeassistant.components.switch import SwitchEntity
from .const import API_TIMEOUT, ATTR_PUMPS, DOMAIN, SMARTTUB_CONTROLLER
from .entity import SmartTubEntity
from .helpers import get_spa_name
_LOGGER = logg... |
/*
* @Author: dmyang
* @Date: 2015-08-05 00:25:43
* @Last Modified by: dmyang
* @Last Modified time: 2016-08-01 14:40:20
*/
'use strict';
console.info('require page a.');
require('commonCss');
require('../css/a.css');
require('zepto');
// var z = require('zStuff')
// console.log(z)
// 直接使用npm模块
var _ = require... |
export {useShareProviders, useShareUrl} from './sharing';
export {useEntryMetadata} from './metadata';
export {useEntryStructure, useSectionStructure} from './structure';
export {useFile} from './useFile';
export {useNestedFiles} from './useNestedFiles';
export {useFileRights, useLegalInfo, useCredits} from './legalInf... |
import { __assign } from "tslib";
import * as React from 'react';
import { StyledIconBase } from '@styled-icons/styled-icon';
export var Vibration = React.forwardRef(function (props, ref) {
var attrs = {
"fill": "currentColor",
"xmlns": "http://www.w3.org/2000/svg",
};
return (React.createEl... |
class Cat {}
let kitty = new Cat();
|
import React from 'react'
import { storiesOf } from '@storybook/react'
import { Button, ControlGroup, Icon, Input, Select } from '../src/index.js'
const stories = storiesOf('ControlGroup', module)
stories.add('default', () => (
<ControlGroup>
<ControlGroup.Item>
<Input.AddOn>Prefix</Input.AddOn>
</Con... |
console.log([
__dirname,
__filename,
typeof process,
typeof global,
typeof Buffer
]);
|
# Generated by Django 4.0 on 2021-12-22 12:23
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0012_alter_user_first_name_max_length'),
]
operations = [
migrations.CreateModel(... |