text stringlengths 3 1.05M |
|---|
const { Schema, model } = require("mongoose");
const GamesSchema = new Schema(
{
coins: {
type: Number,
default: 15
},
subjects: {
type: Number,
default: 10
},
fear: {
type: Number,
required: true
},
wisdom: {
type: Number,
required: true
... |
from dataclasses import dataclass
from typing import List
import numpy as np
import qubovert as qv
import applications_superstaq
from applications_superstaq import superstaq_client
@dataclass
class MinVolOutput:
best_portfolio: List[str]
best_ret: float
best_std_dev: float
qubo: qv.QUBO
def read_j... |
function solve(input) {
var s = parseInt(input[0]),
count = 0,
weelCount = 0,
trickesWeels = 0,
carsWeels = 0,
trucksWeels = 0;
for (var trikes = 0; ; trikes++) {
trickesWeels = trikes * 3;
if (trickesWeels > s) {
break;
}... |
const gulp = require('gulp');
const sass = require('gulp-sass');
const babel = require('gulp-babel');
const cleanCSS = require('gulp-clean-css');
const uglify = require('gulp-uglify-es').default;
const browserSync = require('browser-sync').create();
const rename = require('gulp-rename');
const autoprefixer = require('g... |
/**
* THIS FILE IS AUTO-GENERATED
* DON'T MAKE CHANGES HERE
*/
import { BigNumberDependencies } from './dependenciesBigNumberClass.generated';
import { createLN2 } from '../../factoriesAny.js';
export var LN2Dependencies = {
BigNumberDependencies: BigNumberDependencies,
createLN2: createLN2
}; |
/*
Copyright 2020 Splunk 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
distrib... |
import unittest
from unittest.mock import (
patch,
)
from uuid import (
uuid4,
)
from minos.aggregate import (
Action,
Event,
FieldDiff,
FieldDiffContainer,
Ref,
)
from minos.common import (
current_datetime,
)
from minos.cqrs import (
PreEventHandler,
)
from tests.utils import (
... |
jQuery('#datetimepicker').datetimepicker(); |
/*jshint expr:true*/
var chai = require('chai');
var assert = chai.assert;
var expect = chai.expect;
// var blanket = require("blanket")({
// // options are passed as an argument object to the require statement
// "pattern": "../lib/"
// });
const config = require('../lib/config.js'),
raccoon = require('../... |
import datetime
from webob.multidict import MultiDict
from pyramid import testing
from pyramid.httpexceptions import (
HTTPBadRequest,
HTTPFound
)
from httmock import urlmatch, HTTMock
from mock import patch
from sqlalchemy.orm.exc import NoResultFound
from whoahqa.constants import characteristics as constant... |
#STATEMENT: A sequence consists of integer numbers and ends with the number 0.
# Determine the index of the largest element of the sequence. If the highest
# element is not unique, print the index of the first of them.
max = 0
counter = 0
while True:
seq = int(input("Enter number: "))
if seq > max:
ma... |
console.log('load _drum_64_0_JCLive_sf2_file');
var _drum_64_0_JCLive_sf2_file={
zones:[
{
midi:128
,loopStart:0
,loopEnd:0
,keyRangeLow:64
,keyRangeHigh:64
,sampleRate:44100
,coarseTune:-1
,fineTune:-1
,originalPitch:6900
,file:'SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU2LjQwLjEwMQAAAAAAAAAAA... |
import sys; sys.path.append('..')
import rbdyn as rbd
import pepper
mb, mbc, mbg, limits, visual_tf, collision_tf =\
pepper.readUrdf('pepper', pepper.rootBody,
pepper.virtualJoints, [],
pepper.halfSitting)
def robot(fixed=False):
if not fixed:
return mb, mbc, ... |
module.exports={D:{"10":0.003126,"11":0.021882,"12":0.003126,"17":0.006252,"18":0.006252,"19":0.006252,"20":0.006252,"21":0.009378,"22":0.028134,"23":0.006252,"24":0.012504,"25":0.006252,"26":0.01563,"27":0.009378,"28":0.012504,"29":0.034386,"30":0.01563,"31":0.040638,"32":0.009378,"33":0.025008,"34":0.025008,"35":0.00... |
# 硬件产品基础结构体定义
# 包含初始化SDK,用户注册设备等相关结构体
from hkws.core.const import *
from hkws.core.type_map import *
# 设置sdk加载路劲
class NET_DVR_LOCAL_SDK_PATH(Structure):
_fields_ = [("sPath", h_BYTE * 256), ("byRes", h_BYTE * 128)]
# 登录参数结构体
class NET_DVR_USER_LOGIN_INFO(Structure):
_fields_ = [
("sDeviceAddress", ... |
class PortMapFailed(Exception):
pass
|
import * as React from "react"
import { useStaticQuery, graphql, Link } from "gatsby"
import { AnchorLink } from "gatsby-plugin-anchor-links";
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faBars } from '@fortawesome/free-solid-svg-icons'
import "./HeroTiles.css"
import logoWhite from "../im... |
/*
* Copyright 1999-2021 Alibaba Group Holding 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 applicab... |
/*
This software is allowed to use under GPL or you need to obtain Commercial or Enterise License
to use it in non-GPL project. Please contact sales@dhtmlx.com for details
*/
window.dhx||(dhx={});dhx.version="3.0";dhx.codebase="./";dhx.name="Core";dhx.clone=function(a){var b=dhx.clone.xa;b.prototype=a;return new b};dhx... |
import React from 'react';
import { View } from 'react-native';
const Spacer = ({ children, vertical, horizontal, style }) => {
return (
<View
style={[
{
marginVertical: vertical ? vertical : 8,
marginHorizontal: horizontal ? horizontal : 16,
},
style,
]}
... |
/**
* @fileoverview added by tsickle
* Generated from: services/drag/nz-drag.service.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @license
* Copyright Alibaba.com All Rights Reserved.
*
* Use of this source code ... |
/**
* handle the en/decryption of documents-data
*/
import objectPath from 'object-path';
import { clone, pluginMissing } from './util';
export var Crypter = /*#__PURE__*/function () {
function Crypter(password, schema) {
this.password = password;
this.schema = schema;
}
/**
* encrypt and stringif... |
import React from 'react';
import Error from 'components/Error';
import handleError, { isUnauthorized } from './handleError';
import redirectToSpotifyLogin from 'services/redirectToSpotifyLogin';
describe('isUnauthorized function', () => {
it('Should return false if status is not 401', () => {
expect(isUnauthori... |
import React from 'react';
import PropTypes from '../../lib/propTypes';
import { MetadataWrapper, MetadataItem } from './Styles';
import { FormattedMessage } from 'react-intl';
export default function Metadata({ group }) {
return (
<MetadataWrapper color={group.color}>
<MetadataItem>
<FormattedMess... |
export const FETCH_FORMS = 'findVAForms/FETCH_FORMS';
export const FETCH_FORMS_FAILURE = 'findVAForms/FETCH_FORMS_FAILURE';
export const FETCH_FORMS_SUCCESS = 'findVAForms/FETCH_FORMS_SUCCESS';
export const UPDATE_PAGINATION = 'findVAForms/UPDATE_PAGINATION';
|
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def index(request):
context_dict = {'boldmessage': "Just a message"}
rend = render(request,'rango/indx.html',context=context_dict)
#return HttpResponse("This is the first one, done this too many times<a hr... |
// THIS FILE IS AUTO GENERATED
import { GenIcon } from '../lib';
export function GiDragonOrb (props) {
return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M256 41C154.8 41 73 122.8 73 224c0 4.1.15 8.2.41 12.2 8.57 20.8 19.53 42 25.89 64.9-30.17-148.4 58.1-237.91 155-237.59... |
// required modules
const express = require("express");
const mongoose = require("mongoose");
// create PORT
const PORT = process.env.PORT || 8080;
// express instance
const app = express();
// add middleware
app.use(express.urlencoded({ extended: true }));
app.use(express.json());
app.use(express.static("public"))... |
"""add post readings
Revision ID: 00ee80d538e5
Revises:
Create Date: 2021-10-06 16:26:34.398553
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '00ee80d538e5'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto ... |
import React from 'react'
import { primaryColorsList, secondaryColorsList } from '../store/colorState'
const ColorPalette = ({ type }) => {
const iconClass = (hex) => {
const mystyle = { backgroundColor: `${hex}` }
return mystyle
}
const colorList = (type) => {
if (type === 'primary') {
return... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0e4a82"],{"90c8":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-card",[a("v-card-title",[e.results.length?a("span",[a("v-btn",{attrs:{icon:"",small:"",color:"success"},on:{click:function(t... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const React = require("react");
const wrapIcon_1 = require("../utils/wrapIcon");
const rawSvg = (iconProps) => {
const { className, primaryFill } = iconProps;
return React.createElement("svg", { width: 28, height: 28, viewBox: "0 0 28 ... |
"""
Copyright 2018 ShipChain, 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, softwar... |
(()=>{var e,t,n={6514:(e,t,n)=>{"use strict";var s={};n.r(s),n.d(s,{Type:()=>ft,clear:()=>_t,fetch:()=>ht,save:()=>mt});var a={};n.r(a),n.d(a,{addChatMembers:()=>yn,answerCallbackButton:()=>ya,blockContact:()=>Qs,checkChatUsername:()=>Ms,checkPassword:()=>xs,checkUsername:()=>Gs,clearDraft:()=>qt,clearPassword:()=>Vs,c... |
from numpy import sqrt
def _comp_R0(self):
"""Compute the radius of the circle
Parameters
----------
self : SlotCirc
A SlotCirc object
Returns
-------
R0 : float
Radius of the circle [m]
"""
# R0 is the radius of the circle
# Pythagore in Triangle: Center, Z2... |
import styled from "astroturf";
export const UnorderedList = styled("ul")`
margin: 0 0 1.4rem 0;
li {
font-size: 1rem;
line-height: normal;
position: relative;
list-style-type: none;
padding-left: 3rem;
&:before {
top: 0.5rem;
display: inline-block;
position: absolute;
... |
# package imports
import uvicorn
from typing import Optional
from typing import List
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from fastapi.responses import RedirectResponse
from fastapi.responses import FileResponse
from pydantic import BaseModel
import csv
# local imports
import ... |
// In this file you can instantiate your views
// We here first instantiate wrapping views, then the trial views
/** Wrapping views below
* Obligatory properties
* trials: int - the number of trials this view will appear
* name: string
*Optional properties
* buttonText: string - the text on... |
import urllib, urllib2
import json
from datetime import datetime
acapelaSpeech = Runtime.createAndStart("speech", "AcapelaSpeech")
client_id = 'your client id'
client_secret = 'your client secret'
azure = Runtime.createAndStart('azure', "ProgramAB")
htmlfilter = Runtime.createAndStart("htmlfilter", "HtmlFilter")
azur... |
import { login, logout, getInfo } from '@/api/acl/user'
import { getToken, setToken, removeToken } from '@/utils/auth'
import { resetRouter,constantRoutes,allAsyncRoutes,anyRoutes } from '@/router'
import router from '@/router'
// 这个函数,是将用户登录返回的登录信息里面的routes名字数组用于过滤所有的异步路由
// 比如用户的权限只有首页(常量路由)那么返回的这个名字数组里面是空的,因此过滤后就只有... |
import React from 'react';
import PropTypes from "prop-types";
import { Container, Col, Row } from 'react-bootstrap';
import styled from 'styled-components';
function HomePage(props){
const HomePageButton = styled.button`
margin: 2px;
`
return(
<React.Fragment>
<Container>
<Row>
<... |
import React from 'react';
import { Helmet } from 'react-helmet';
import App from '../components/App';
import { headData } from '../mock/data';
import 'bootstrap/dist/css/bootstrap.min.css';
import '../style/main.scss';
export default () => {
const { title, lang, description } = headData;
return (
<>
<H... |
/**
* Created by lei_sun on 2017/8/11.
*/
const utilIndex = require('./utils/index');
// 后端 EJS 模板渲染页面
exports.index = function(app){
// 使用 EJS 模板
app.engine('.html', require('ejs').__express);
app.set('view engine', 'html');
app.set('views', __dirname + '/views');
app.get('/ejs', (req, res) => ... |
export var EOF = Symbol('EOF');
/**
* this function converts value to Promise.
* @private
* @param {Promise | ReadableStream | [WritableStream, Object]} target Promise, Promise like or ReadableStream.
* @returns {?Promise} Promise.
*/
export function toPromise(target) {
if (isPromise(target)) {
return targe... |
YUI.add('aui-ace-autocomplete-plugin', function (A, NAME) {
var Plugin = A.Plugin;
/**
* Binds an AutoCompleteList instance to a Node instance.
*
* @module aui-ace-editor
* @submodule aui-ace-autocomplete-plugin
*
* @class A.Plugin.AceAutoCompleteList
* @extends A.AceEditor.AutoCompleteList
*/
function ACLis... |
import mergeDirs from 'merge-dirs';
import path from 'path';
import {
getVersions,
getPackageJson,
writePackageJson,
getBabelDependencies,
installDependencies,
} from '../../lib/helpers';
export default async npmOptions => {
const [storybookVersion, actionsVersion, linksVersion, addonsVersion] = await getV... |
const fetch = require('node-fetch');
const refresh = require('passport-oauth2-refresh');
const User = require('../db/models/user');
const getEventsFromGoogle = async (req, res) => {
return fetch(`https://www.googleapis.com/calendar/v3/calendars/${process.env.GOOGLE_CALENDAR_ID}/events`, {
headers: {
Author... |
/*
Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'contextmenu', 'bn', {
options: 'Context Menu Options' // MISSING
} );
|
'use strict'
const { expect } = require('chai')
.use(require('dirty-chai'))
const ArrayT = require('../src/array')
class Person {
constructor (name) {
this.name = name
}
toString () {
return `name: ${this.name}`
}
}
module.exports = () => {
describe('# array-tests', () => {
it('constructor ... |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mediapipe/framework/calculator.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 impo... |
#!/usr/bin/python3
# -*-coding:utf-8-*-
__author__ = "Bannings"
class Solution:
def countPrimes(self, n: int) -> int:
if n < 2: return 0
primes = [1] * n
primes[0] = primes[1] = 0
for i in range(2, int(n ** 0.5 + 1)):
if primes[i] == 1:
primes[i... |
import React from 'react';
import {useSelector} from 'react-redux';
import {iconGenerator} from '../../iconGenerator';
import './PoolExplorerItem.scss';
function PoolExplorerItem(props) {
const walletIsConnected = useSelector(state => state.appReducer.walletIsConnected);
return (
<React.Fragment>
... |
const defaultString = `
<svg version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:parametric="https://parametric-svg.github.io/v0.2"
width="100"
height="100"
glyphtype="Assembly Scar"
soterms="SO:0001953"
parametric:defaults="baseline_offset=0;baseline_x=0;baseline_y=25;heig... |
# coding=utf-8
# Copyright 2021 The IDEA 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 a... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = require("react");
var Utilities_1 = require("../../Utilities");
var Label_1 = require("../../Label");
var KeytipData_1 = require("../../KeytipData");
var getClassNames = Utilities_1.classNames... |
#
# Copyright The NOMAD Authors.
#
# This file is part of NOMAD.
# See https://nomad-lab.eu for further info.
#
# 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/lic... |
import * as React from "react";
import PropTypes from 'prop-types';
import { property } from 'lodash'
import {
makeStyles,
} from '@material-ui/core'
const useStyles = makeStyles(theme => ({
large: {
fontSize: '14pt',
fontWeight: 'bold',
}
}))
const DefaultField = ({data}) => {
return <span>{data.val... |
var child_process = require("./lib/rx_child_process.js");
var events = require("./lib/rx_events.js");
var http = require("./lib/rx_http.js");
var net = require("./lib/rx_net.js");
var process = require("./lib/rx_process.js");
var dns = require("./lib/rx_dns.js");
var fs ... |
import os
from collections import Counter
class VocabLineSplitor:
"""Vocab line splitor interface."""
def split(self, line):
"""Split line to a list of vocabs.
Args:
line: A python string. Maybe None.
Returns:
A list of vocabs.
"""
raise NotIm... |
import pytest
from armaclass import parse, ParseError
def test_class_with_translation_strings():
expected = {
'testClass': {
'title': "Test Class",
'values': [0, 1],
'texts': ["STR_UNTRANSLATED", "Translated text"],
'default': 1
}
}
translat... |
(function($) {
"use strict";
/*================================
Preloader
==================================*/
var preloader = $('#preloader');
$(window).on('load', function() {
setTimeout(function() {
preloader.fadeOut('slow', function() { $(this).remove(); });
},... |
'use strict';
/* directives */
angular.module('app').directive('ngConfirm', [function () {
return {
restrict: 'A',
link: function (scope, element, attrs) {
element.bind('click', function () {
var message = attrs.ngConfirmMessage || 'Are you sure?';
if (me... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://@sbaseurl@/jsapi/jsapi/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.
//>>built
require({cache:{"url:widgets/SmartEditor/setting/EditDescription.html":'\x3cdiv\x3e\r\n \x3cdiv... |
import moment from 'moment';
import { addToDate, getDate, subtractToDate } from './dateManager.js';
import { excludeActivities } from './speedUtil.js';
moment().format('yyyy-MM-dd');
const globalColors = [
['rgba(255, 0, 0, 0.1)', 'rgba(255, 0, 0, 0.5)'],
['rgba(0, 255, 0, 0.1)', 'rgba(0, 255, 0, 0.5)'],
['rgba... |
from ..sources import ZLIB_SOURCES
from ..dep_versions import ZLIB_VERSION
import build_framework.library.windows
MACROS = [
('Z_SOLO', ''),
]
INCLUDES = ['zlib']
UDEF_MACROS = []
LIB_DIRS = []
LIBS = []
CFLAGS = [
'/Zc:wchar_t',
'/W3 ',
'/Ox ',
'/WX'
]
LDFLAGS = ['/LTCG']
EXTRA_OBJECTS = []
... |
"""Semi-Supervised Optimum-Path Forest.
"""
import time
import numpy as np
import opfython.utils.constants as c
import opfython.utils.logging as l
from opfython.core import Heap, Node, Subgraph
from opfython.models import SupervisedOPF
logger = l.get_logger(__name__)
class SemiSupervisedOPF(SupervisedOPF):
""... |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp-tasks/cldr/extract.js
export default [];
//# sour... |
import discourseComputed from "discourse-common/utils/decorators";
import { isEmpty } from "@ember/utils";
import Controller from "@ember/controller";
import { extractError } from "discourse/lib/ajax-error";
import ModalFunctionality from "discourse/mixins/modal-functionality";
import { ajax } from "discourse/lib/ajax"... |
import { BlocksField } from '../data/blocks'
import { AllSiteMeta } from '../data/meta'
import { AllPages, PageByUri } from '../data/pages'
import { AllPosts, LatestPosts, PostBySlug, PostsByTagId } from '../data/posts'
import {
AllProductCategories,
AllProductCategorySlugs,
AllProductSlugs,
ProductBySlug,
Pr... |
const ut = require("../node/util");
const rl = require("readline-sync");
const fs = require("fs");
require("../js/utils");
const BLACKLIST_FILE_PREFIXES = [
...ut.FILE_PREFIX_BLACKLIST,
"fluff-",
// specific files
"roll20-tables.json",
"roll20-items.json",
"makebrew-creature.json",
"srd-spells.json",
"srd-mon... |
const size = {
mobile: "500px",
tablet: "1024px",
desktop: "2560px",
}
export const device = {
mobile: `(max-width: ${size.mobile})`,
tablet: `(max-width: ${size.tablet})`,
desktop: `(max-width: ${size.desktop})`,
}
|
/*
*
* Escrituras constants
*
*/
/* Escrituras */
export const SEARCH_ESCRITURAS = 'app/containers/Escritura/List/SEARCH_ESCRITURAS';
export const QUERY_ESCRITURAS = 'app/containers/Escritura/List/QUERY_ESCRITURAS';
export const FETCH_ESCRITURAS = 'app/containers/Escritura/List/FETCH_ESCRITURAS';
export const FET... |
// Generated by CoffeeScript 2.3.1
(function() {
var camera, init, onResize, renderer, scene;
console.log("demo_5.13 RingGeometry");
camera = null;
scene = null;
renderer = null;
init = function() {
var controls, createMesh, gui, initStats, renderScene, spotLight, stats, step, torus, webGLRendere... |
/**
* Generates field for specified configuration (see field rules <add wiki link>)
* @type {void|*}
*/
App.ui.SelectionTree = kendo.Class.extend({
container: null,
tree : null,
init: function (config) {
'use strict';
this.config = $.extend({
data : {},
... |
// Copyright 2014 the V8 project authors. All rights reserved.
// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
// Flags: --allow-natives-syntax --harmony
var _obj = new Object();
var _name = "name";
%DebugGetPropertyDetails(_obj, _name);
|
import namespaces from './namespacesReducer';
import * as types from '../constants/namespaceTypes';
describe('namespaces reducer', () => {
it('should handle inital state', () => {
expect(namespaces(undefined, {})).toEqual({
isFetching: false,
items: []
});
});
it('should handle RECEIVE_NAMESP... |
"""freespace.py v0.0.1"""
from collections import defaultdict as dd
import shutil
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
def free_space(folder):
vol_bytes = dd(int)
vol_bytes['total_bytes'], vol_bytes['used_bytes'], vol_bytes['free_bytes']\
= shutil.disk_usag... |
require('cypress-watch-and-reload/support');
require('./commands');
|
// http://127.0.0.1:9001
// http://localhost:9001
var server = require('http'),
url = require('url'),
path = require('path'),
fs = require('fs');
function serverHandler(request, response) {
var uri = url.parse(request.url).pathname,
filename = path.join(process.cwd(), uri);
fs.exists(file... |
const router = require("express").Router();
const { User } = require("../../models");
router.post("/", async (req, res) => {
try {
const userData = await User.create(req.body);
req.session.save(() => {
req.session.user_id = userData.id;
req.session.logged_in = true;
res.status(200).json(use... |
import os
import sys
import json
import gzip
import pandas as pd
import numpy as np
from nameparser import HumanName
import requests
from lxml import etree
from io import BytesIO
# determine if we are loading from a jupyter notebook (to make pretty progress bars)
if 'ipykernel' in sys.modules:
from tqdm.notebook ... |
export function someAction (/* context */) {
}
|
from diot import Diot
from bioprocs.utils.tsvio2 import TsvReader, TsvWriter
infile = {{ i.infile | quote}}
outfile = {{o.outfile | quote}}
out = {{args.out | quote}}
outopts = {{args.outopts |repr}}
CNAMES = Diot(
tumor = ['TUMOR'],
normal = ['NORMAL'],
both = ['TUMOR', 'NORMAL']
)
reader = TsvReader(in... |
var data = {
"body": "<path d=\"M18.41 3.41L16 4.5l2.41 1.09L19.5 8l1.1-2.41L23 4.5l-2.4-1.09L19.5 1M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10s10-4.5 10-10c0-1.47-.33-2.87-.9-4.13l-1.24 2.72c.08.46.14.91.14 1.41c0 4.43-3.57 8-8 8s-8-3.57-8-8v-.13a10 10 0 0 0 5.74-5.56A10 10 0 0 0 17.5 10a10 10 0 0 0 1.33-.09l-1.48-3.26L12.6 ... |
module.exports = {
title: 'Demo',
dest: 'example/.vuepress/dist',
themeConfig: {
search: false,
nav: [
{ text: 'Editor', link: '/editor.html' },
],
sidebar: [
{
collapse: false,
title: 'Patterns',
sidebarDepth: 0,
children: [
'/pattern/ok_01.m... |
/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'smiley', 'fi', {
options: 'Hymiön ominaisuudet',
title: 'Lisää hymiö',
toolbar: 'Hymiö'
} );
|
import pytest
from datahub.investment.opportunity.test.factories import LargeCapitalOpportunityFactory
from datahub.search.large_capital_opportunity.models import (
LargeCapitalOpportunity as ESLargeCapitalOpportunity,
)
pytestmark = pytest.mark.django_db
class TestLargeCapitalOpportunityElasticModel:
"""Te... |
(window.webpackJsonp = window.webpackJsonp || []).push([[62], []]);
|
export { default as camelCase } from './camelCase';
export { default as capitalize } from './capitalize';
export { default as deburr } from './deburr';
export { default as endsWith } from './endsWith';
export { default as escape } from './escape';
export { default as escapeRegExp } from './escapeRegExp';
export { defau... |
#!/usr/bin/env node
const { existsSync } = require(`fs`)
const { createRequire, createRequireFromPath } = require(`module`)
const { resolve } = require(`path`)
const relPnpApiPath = "../../../../.pnp.cjs"
const absPnpApiPath = resolve(__dirname, relPnpApiPath)
const absRequire = (createRequire || createRequireFromPa... |
import React, { Component } from 'react';
import styles from './Sidenav.module.css';
import { Link, NavLink } from 'react-router-dom';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { logoutUser } from '../../actions/authActions';
import { clearCurrentProfile } from '../../actions/pro... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnQtcGF0dGVybi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImV2ZW50LXBhdHRlcm4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXZlbnRzI... |
const Tram = require('tram-one')
const html = Tram.html({
Image: require('../elements/Image'),
ModalImage: require('../elements/ModalImage'),
LoadingSpinner: require('../elements/LoadingSpinner'),
ErrorBlurb: require('../elements/ErrorBlurb')
})
const imagesBlockStyle = `
text-align: center;
`
const pageMap... |
var score = 0;
function scoreUP(){
score ++;
document.getElementById('scoreCounter').innerHTML = score;
}
//++++++++++
//Game Timer
var gameLength = 60 * 3 * 1000;
var elaspedTime = 0;
var timeRemaining = gameLength;
var gameInProgress = false;
var startTime;
var sunZenith = false;
var canvasWidth = 300;
var ... |
# -*- coding: utf-8 -*-
# URI Judge - Problema 1009
funcionario = input()
salario_base = float(input())
vendas = float(input())
comissao = vendas * 0.15
salario_final = salario_base + comissao
print("TOTAL = R$ %.2f" % salario_final)
|
/*!
* jQuery QueryBuilder 2.6.0
* Locale: Spanish (es)
* Author: "pyarza", "kddlb"
* Licensed under MIT (https://opensource.org/licenses/MIT)
*/
(function(root, factory) {
if (typeof define == 'function' && define.amd) {
define(['jquery', 'query-builder'], factory);
}
else {
factory(ro... |
import torch
from torch import nn, einsum
import torch.nn.functional as F
from einops import rearrange, repeat
from einops.layers.torch import Rearrange
class Residual(nn.Module):
def __init__(self, fn):
super().__init__()
self.fn = fn
def forward(self, x, **kwargs):
return... |
from x_rebirth_station_calculator.station_data.station_base import Module
from x_rebirth_station_calculator.station_data.station_base import Production
from x_rebirth_station_calculator.station_data.station_base import Consumption
from x_rebirth_station_calculator.station_data import wares
names = {'L044': 'QTube Y Fa... |
var express = require('express'),
app = express(),
server = require('http').createServer(app),
io = require('socket.io').listen(server);
app.get('/chat.css',function(req, res) {
res.sendFile(__dirname + '/messenger/chat.css');
});
app.get('/', function(req, res) {
res.sendFile(__dirname + '/messen... |
import peepshow.core.dialect as dialect
from peepshow.utils import terminal
from peepshow.core.explorer import Explorer
from peepshow.utils.python import catch, nth
from peepshow.core.trans import TransformationMgr
class Context:
def __init__(self, target, env):
self.mgr = TransformationMgr(target, self)
... |