text stringlengths 3 1.05M |
|---|
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* @name: S8.6.2_A4;
* @section: 8.6.2, 11.8.6;
* @assertion: [[HasInstance]] returns a boolean value indicating whether Value delegates behaviour to this object;
* @description... |
"""
HFSS-Icepack Multyphisics Analysis
----------------------------------
This example shows how to create a full project from scratch in HFSS and Icepak (linked to HFSS).
The project creates a setup, solves it, and creates post-processing output. It includes several
commands to show PyAEDT's capabilities.
To provide ... |
/*
Copyright 2019 Open End AB
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
dis... |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2018-02-15 21:55
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('mediane', '0021_distance_id_order'),
]
operations ... |
export const config = {
SERVER_URL: 'http://localhost:8000/api/v1',
};
|
// import dummy from "./dummy.png";
import amritPandey from "./amrit_pandey.webp";
import divyanshuTyagi from "./divyanshu_tyagi.webp";
import adityaShrivastava from "./aditya_shrivastava.webp";
import shidhantaSen from "./shidhanta_sen.webp";
import deepakGupta from "./deepak_gupta.webp";
const teamMembers = [
{
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getObjectType = function (value) {
return Object.prototype.toString.call(value).slice(8, -1);
};
var isObjectOfType = function (type) { return function (value) {
return exports.getObjectType(value) === type;
}; };
var isOfType ... |
import fetch from "cross-fetch";
import {message} from "antd";
export const FETCH_CATALOG = "FETCH_CATALOG";
export const FETCH_CATALOG_SUCCESS = "FETCH_CATALOG_SUCCESS";
export const FETCH_CATALOG_FAILURE = "FETCH_CATALOG_FAILURE";
export const FETCH_REPOSITORY = "FETCH_REPOSITORY";
export const FETCH_REPOSITORY_SUC... |
import { GET_MY_OFFERS, UPDATE_MY_OFFER, REMOVE_MY_OFFER, ADD_MY_OFFER } from '../actions/types';
export default function (state = [], action) {
switch (action.type) {
case GET_MY_OFFERS:
return action.payload;
case UPDATE_MY_OFFER:
return state;
case ADD_MY_OFFER:
return [...state, a... |
import React from 'react'
import styles from '../css/banner.module.css'
const Banner = ({children, title, info}) => {
return (
<div className={styles.banner}>
<h1>{title}</h1>
<p>{info}</p>
{children}
</div>
)
}
export default Banner |
##################################################################
### This file is used to generate Figures & Tables in Chapter6 ###
##################################################################
#Note(Important): Since this file would require data from Data directory,
#you will need to first run gendata.py befor... |
import {
SET_PAYMENTS,
PAYMENTS_TRIGGER_SPINNER,
SAVE_UNPAID_INVOICES,
CREATE_FROM_PAYMENTS,
UPDATE_FROM_PAYMENTS,
REMOVE_FROM_PAYMENTS
} from '../constants';
const initialState = {
payments: [],
errors: null,
unPaidInvoices: [],
loading: {
paymentLoading: false,
... |
const Dimensions = require('react-native')
const wp = percent => {
const { width } = Dimensions.get('window')
return (percent * width) / 100
}
const hp = percent => {
const { height } = Dimensions.get('window')
return (percent * height) / 100
}
module.exports = {
wp,
hp
} |
import enum
PREFIX_DRIVE_NAME = 'AJRamDisk'
CONFIG_FILENAME = 'config.cfg'
SIZE_UNIT = {"0": 'M', "1": "G"}
ALL_DISK_SET = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'}
class ControlCfgType(enum.IntEnum):
add = ... |
/*
* aciTree jQuery Plugin v4.5.0-rc.3
* http://acoderinsights.ro
*
* Copyright (c) 2014 Dragos Ursu
* Dual licensed under the MIT or GPL Version 2 licenses.
*
* Require jQuery Library >= v1.9.0 http://jquery.com
* + aciPlugin >= v1.5.1 https://github.com/dragosu/jquery-aciPlugin
*/
/*
* The aciTree low-lev... |
import React from 'react'
import Header from '../layouts/Header'
const NotFound = () => {
return (
<div className="container">
<Header />
<p className="flow-text center-align">Seems Like you are lost. <a style={{textDecoration: 'underline'}} href="/">Go Back Home</a></p>
</d... |
"""Factorial recursive implementation"""
def factorial(n: int) -> int:
"""Implement factorials recursively
Raise:
- TypeError for given non integers
- ValueError for given negative integers
"""
if type(n) is not int:
raise TypeError("n isn't integer")
if n < 0:
raise Value... |
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-dom')) :
typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-dom'], factory) :
(global = global || self, factory(global.Reactstrap = {}, global... |
var dir_8c9d7019befa7550a5498e442e4faf24 =
[
[ "HoldTurretPosition.cpp", "_hold_turret_position_8cpp.html", null ],
[ "HoldTurretPosition.h", "_hold_turret_position_8h.html", [
[ "HoldTurretPosition", "class_hold_turret_position.html", "class_hold_turret_position" ]
] ],
[ "LimelightAim.cpp", "_li... |
import React from 'react';
import ReactDOM from 'react-dom';
import SplitLayout from '../lib/SplitLayout';
class Example extends React.Component {
render() {
return (
<SplitLayout
onChange={this.onChange}
initialSizes={[100, 300, 100, null]}
minSizes={[100, 100, 100, 100]}
m... |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
# Flag to indicate if this migration is too risky
# to run online and needs to be coordinated for offline
... |
"""
sentry.models.auditlogentry
~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import, print_function
from django.db import models
from django.utils import timezone
from sentry.db... |
import React from 'react';
import PropTypes from 'prop-types';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import IconButton from '@material-ui/core/IconButton';
import Typography from '@material-ui/core/Typography';
import InputBase from '@material-ui/core/InputBase'... |
const test = require('tape')
const If = require('../')
test('If exists as a function', function (t) {
t.equal(typeof If, 'function')
t.end()
})
test('returns function', function (t) {
const res = If(true)
t.equal(typeof res, 'function')
t.end()
})
test('when condition is false', function (t) {
t.test('cu... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2019-01-26 20:19:00
# @Author : Raymond Wong (jiabo.huang@qmul.ac.uk)
# @Link : github.com/Raymond-sci
import os
from logger import log
from configs import parser_argument
cfg = parser_argument()
class MultiStepPolicy:
"""Caffe style step decay learn... |
/* ===========================================================
* es_ar.js
* Spanish (Argentina) translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Félix Vera
* Email : felix.vera@gmail.com
*/
// jshint camelcase:false
... |
/* eslint-disable import/no-extraneous-dependencies */
import Enzyme, {
configure, shallow, mount, render,
} from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
configure({ adapter: new Adapter() });
export { shallow, mount, render };
export default Enzyme;
|
/****************************************************************************
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
http://www.cocos.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated engine source code (the "Software"), a limited,
wo... |
import React from "react"
import { OutboundLink } from "gatsby-plugin-google-analytics"
import { Badge, Product, ProductDetails, Section, SmallIcon } from "./Basic"
import TalkingCode from "./Icons/TalkingCode"
const Podcasts = () => (
<Section>
<h3>Podcasts</h3>
<div>
<Product>
<SmallIcon>
... |
(function(e){const a=e["ast"]=e["ast"]||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"",Aquamarine:"",Black:"",Blue:"",Bold:"Negrina","Bulleted List":"Llista con viñetes",Cancel:"Encaboxar","Centered image":"","Change image text alternative":"","Dim grey":"",Downloadable:"","Dropdown toolbar":"","Edit lin... |
/* Copyright (C) 2016 NooBaa */
'use strict';
/**
*
* REDIRECTOR API
*
*/
module.exports = {
id: 'redirector_api',
methods: {
register_to_cluster: {
method: 'POST',
auth: {
system: false
}
},
publish_to_cluster: {
m... |
/**
* Link all categories with the right descriptions
*/
function defineHovers() {
var allGDCHovers = ["#GDCFunctionalDefects", "#GDCCheck", "#GDCConcurrency", "#GDCErrorHandling", "#GDCInterface",
"#GDCLogic", "#GDCMigration", "#GDCResource", "#GDCMaintainabilityDefects", "#GDCBestPractices", "#GDCCodeS... |
/**
* Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
* Build: `lodash modularize exports="node" -o ./compat/`
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investiga... |
/**
* Pimcore
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://www.pimcore.org/license
*
* @copyright Copyright (c) 2009-2014 pimcore GmbH (http://w... |
import styled from 'styled-components';
export const StyledNavigationItems = styled.ul`
margin: 0;
padding: 0;
list-style: none;
display: flex;
flex-flow: column;
align-items: center;
height: 100%;
@media (min-width: 500px) {
flex-flow: row;
}
`; |
module.exports = function(signal){
signal.add('filterChanged')
.add('completedCleared')
.add('allToggled')
.add('todoToggled')
.add('todoEdited')
.add('todoDestroyed')
.add('todoSaved')
.add('todoCanceled')
.add('todoCreated');
}; |
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import threading
from contextlib import contextmanager
from dataclasses import dataclass
from typing import Any, Callable, Iterable, Iterator, Optional, Sequence, Tuple
from pants.engine.... |
// @flow
// REACT BINDINGS
export { default as Nebula } from './lib/nebula-react';
export { default as NebulaOverlay } from './lib/overlays/nebula-overlay';
export { default as HtmlOverlay } from './lib/overlays/html-overlay';
export { default as HtmlOverlayItem } from './lib/overlays/html-overlay-item';
export { def... |
module.exports = {
"1.6": "56",
"1.7": "58",
"1.8": "59",
"1.3": "52",
"1.4": "53",
"1.5": "54",
"1.2": "51",
"1.1": "50",
"1.0": "49",
"0.37": "49",
"0.36": "47",
"0.35": "45",
"0.34": "45",
"0.33": "45",
"0.32": "45",
"0.31": "44",
"0.30": "44",
"0.29": "43",
"0.28": "43",
"0.27": "42",
"0.26": "... |
/**
* Common bind function. Allows to set an object's function as callback. Set for every function in the
* javascript context.
*/
Function.prototype.bind= Function.prototype.bind || function() {
var fn= this; // the function
var args= Array.prototype.slice.call(argume... |
# pylint: disable=unused-import
"""PyMC3-specific conversion code (PyMC3<4.0)."""
import logging
import warnings
from types import ModuleType
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple, Union
import numpy as np
import xarray as xr
from .. import utils
from ..rcparams import rcParams
... |
import flag, launch
def main(args):
args = flag.Munch(args)
quit = rye_chan(1)
launch.LaunchConfigFiles(quit=quit, filenames=args)
say 'WAITING'
quit.Recv()
say 'QUITTING'
|
# coding: utf-8
"""
OpenSilex API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: INSTANCE-SNAPSHOT
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F4... |
# -*- coding: utf-8 -*-
'''
Tests for the MySQL states
'''
# Import python libs
from __future__ import absolute_import
import logging
# Import Salt Testing libs
from salttesting import skipIf
from salttesting.helpers import (
destructiveTest,
ensure_in_syspath
)
ensure_in_syspath('../../')
# Import salt libs... |
import React from 'react';
import { View, Text, ScrollView, Image, Linking, Alert } from 'react-native';
import styles from './style';
import { useRoute } from '@react-navigation/native';
import BottomButton from '../../components/common/bottom-button';
const CampaignDetails = () => {
const routes = useRoute();
... |
import React from "react";
import PropTypes from "prop-types";
import {
Card,
CardBody,
Button,
UncontrolledTooltip,
UncontrolledButtonDropdown,
DropdownToggle,
DropdownMenu,
CardFooter,
CustomInput,
ButtonGroup,
DropdownItem
} from "./../../../components";
import { Profile } from "./../Profile";
const Use... |
import { twoFer } from './two-fer'
describe('twoFer()', () => {
test('no name given', () => {
expect(twoFer()).toEqual("One for you, one for me.")
})
xtest('a name given', () => {
expect(twoFer("Alice")).toEqual("One for Alice, one for me.")
})
xtest('another name given', () => {
expect(twoFer(... |
const { rules, output } = require("./webpack.parts");
module.exports = {
target: "node",
mode: "development",
output: { ...output(), libraryTarget: "commonjs2" },
entry: "./server/index.js",
module: {
rules: [
{
test: /\.js$/,
loader: "babel-loader",
exclude: /node_modules/,... |
function filmeUnicoDirective(listaFilmeService) {
function link(scope, element, attrs, controller) {
const modelController = element.controller('ngModel');
scope.$watch('nomeFilme', function(newValue, oldValue) {
if(!newValue) {
return;
}
listaFil... |
import cx from 'classnames'
import _ from 'lodash'
import PropTypes from 'prop-types'
import React from 'react'
import {
childrenUtils,
customPropTypes,
getElementType,
getUnhandledProps,
SUI,
useKeyOnly,
} from '../../lib'
/**
* A group of segments can be formatted to appear together.
*/
function Segme... |
const cheerio = require('cheerio');
const got = require('@/utils/got');
module.exports = async (ctx) => {
const { id } = ctx.params;
const url = `https://www.cyzone.cn/author/${id}`;
const res = await got.get(url);
const $ = cheerio.load(res.data);
const list = $('.article-item');
const out =... |
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'jest', 'prettier'],
parserOptions: ... |
from autogoal.grammar import Union, Subset, generate_cfg
from autogoal.utils import nice_repr
@nice_repr
class A:
pass
@nice_repr
class B:
pass
@nice_repr
class C:
pass
D = Union("D", B, C)
@nice_repr
class Main:
def __init__(self, xs: Subset("xs", A, D)):
self.xs = xs
grammar = generate_... |
!function n(t,r,e){function u(o,a){if(!r[o]){if(!t[o]){var c="function"==typeof require&&require;if(!a&&c)return c(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[o]={exports:{}};t[o][0].call(l.exports,function(n){var r=t[o][1][n];return u(r?r:n)},l,l.ex... |
"""
Support for Hikvision event stream events represented as binary sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.hikvision/
"""
import logging
from datetime import timedelta
import voluptuous as vol
from homeassistant.helpers.ev... |
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage, FormattedNumber } from 'react-intl';
import Avatar from '../../Avatar';
import './TransferDelegate.less';
const SignPlaceholderDefault = ({
query,
}) => {
let amount;
let symbol;
if (query.amount) {
[amount, symbol] =... |
import { uiModules } from '../modules';
import { DirtyPrompt } from './dirty_prompt';
uiModules.get('kibana')
.factory('dirtyPrompt', ($injector) => {
const $window = $injector.get('$window');
const confirmModal = $injector.get('confirmModal');
const $rootScope = $injector.get('$rootScope');
return ... |
/**
* Copyright IBM Corp. 2016, 2020
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*
* Code generated by @carbon/icon-build-helpers. DO NOT EDIT.
*/
var _24 = {
"elem": "svg",
"attrs": {
"xmlns": "http://www.w3.org/200... |
# coding: utf-8
"""
Copyright 2016 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applica... |
$(document).ready(function() {
function showPopUpBanner() {
$('.popUpBannerBox').fadeIn("2000");
}
setTimeout(showPopUpBanner, 3000);
$('.closeButton').click(function() {
$('.popUpBannerBox').fadeOut("2000");
return false;
});
getWritters();
});
function getWritters() {
... |
/**
* 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... |
import numpy as np
def manhattanDistance(p1, p2, d=2):
assert (len(p1) == len(p2))
allDistances = 0
for i in range(d):
allDistances += abs(p1[i] - p2[i])
return allDistances
def printBigArray(big, yes='1', no='0'):
print()
for line in big:
for char in line:
if cha... |
from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.testutils import APITestCase, SnubaTestCase
from sentry.testutils.helpers.datetime import before_now
class OrganizationEventsMetaEndpoint(APITestCase, SnubaTestCase):
def setUp(self):
super(OrganizationEvents... |
import os
import sys
import argparse
import prosto as pr
#from prosto.Prosto import *
import logging
log = logging.getLogger("prosto")
def run(script_file):
# TODO: Not implemented
log.error("Script execution is not implemented.".format())
return 0
def main(args = None):
if not args: args = sys.a... |
ace.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having... |
import os
import numpy as np
os.environ['KERAS_BACKEND'] = 'tensorflow'
from keras import backend as K
K.tensorflow_backend._get_available_gpus()
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten, Conv2D, MaxPool2D
from keras.optimizers import RMSprop
from keras.datasets import mni... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from unittest.mock import Mock
from pyramid.httpexceptions import HTTPExpectationFailed, HTTPNotFound
from h.views.api import errors as views
def test_api_notfound_view(pyramid_request):
result = views.api_notfound(HTTPNotFound("Some Reason"), py... |
import { svg } from 'lit';
export const file = svg`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<g>
<path fill="none" d="M0 0h24v24H0z"/>
<path d="M15.414 5h5.594c.548 0 .992.445.992 1v14c0 .552-.455 1-.992 1H2.992A.994.994 0 0 1 2 20V6c0-.552.455-1 .992-1h5.594L6.05 2.464 7.464 1.05... |
const swaggerUi = require("swagger-ui-express");
const swaggerJsdoc = require("swagger-jsdoc");
const options = {
swaggerDefinition: {
// Like the one described here: https://swagger.io/specification/#infoObject
info: {
title: "Flyt API",
version: "1.0.0",
description: "Flyt API with autoge... |
#!/usr/bin/env python
# coding=utf-8
# Author: David Anderson
# dave@natulte.net
#
# This file is part of pTFTPd.
#
# pTFTPd is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of... |
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||... |
Ext.define('SysTech.store.SearchSession', {
extend : 'Ext.data.Store',
storeId : 'SearchSession',
fields : ['id', 'sassion_name'],
proxy : {
type : 'ajax',
url : 'training/search_session',
reader: {
type: 'json',
root: 'data'
}
}
});
//Now create a single SearchUser for mult... |
/*! angular-google-maps 2.1.6 2015-08-27
* AngularJS directives for Google Maps
* git: https://github.com/angular-ui/angular-google-maps.git
*/
;
(function( window, angular, undefined ){
'use strict';
/*
!
The MIT License
Copyright (c) 2010-2013 Google, Inc. http://angularjs.org
Permission is hereby granted, f... |
/**
* Auto-generated action file for "Microsoft Graph API" API.
*
* Generated at: 2019-08-07T14:53:10.102Z
* Mass generator version: 1.1.0
*
* flowground :- Telekom iPaaS / microsoft-graph-api-connector
* Copyright © 2019, Deutsche Telekom AG
* contact: flowground@telekom.de
*
* All files of this connector ar... |
from django.conf import settings
from django.urls import include, path
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from django.views import defaults as default_views
urlpatterns = [
path("", TemplateView.as_view(template_name="pages/home... |
const fs = require('fs')
const pack = require('../package.json')
// update installation.md
const installation = fs
.readFileSync('./gitbook/installation.md', 'utf-8')
.replace(
/https:\/\/unpkg\.com\/vue-toastr-2@[\d.]+.[\d]+\/dist\/vue-toastr-2\.js/,
'https://unpkg.com/vue-toastr-2@' + pack.version + '/di... |
/*
YUI 3.8.0pr2 (build 154)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('querystring-parse', function (Y, NAME) {
/**
* The QueryString module adds support for serializing JavaScript objects into
* query strings and parsing JavaScript obje... |
// External Dependancies
const boom = require('boom')
// Get Data Models
const Note = require('../models/notesModel')
// Get all note
exports.getNotes = async (req, reply) => {
try {
const notes = await Note.find()
return notes
} catch (err) {
throw boom.boomify(err)
}
}
// Get si... |
// Task 2 - Rectangle N x N stars
function rect(input) {
// Read Input
let n = Number(input.shift());
// Logic
for (let i = 0; i < n; i++) {
for (let j = 0; j < n; j++) {
process.stdout.write("*");
}
console.log('');
}
}
rect(["3"]); |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RE_URL_WITH_PORT = exports.RE_URL = exports.RE_ZONE_STRING = exports.RE_SUBNET_STRING = exports.RE_BAD_ADDRESS = exports.RE_BAD_CHARACTERS = exports.TYPES = exports.SCOPES = exports.GROUPS = exports.BITS = void 0;
exports.BITS = 128;
e... |
define({
"enableUndoRedo": "Habilita les opcions per desfer/refer",
"toolbarVisible": "Barra d'eines visible",
"toolbarOptions": "Opcions de la barra d'eines",
"mergeVisible": "Fusiona",
"cutVisible": "Retalla",
"reshapeVisible": "Canvia de forma",
"back": "Enrere",
"label": "Capa",
"edit": "... |
/**
* Created by HUY on 4/15/2016.
*/
// banner object
var tf_m_build_banner = {};
//========== ========== ========== EVENT ON BANNER ========== ========== ==========
$(document).ready(function () {
$('body').on('mouseover', '.tf_m_build_banner', function () {
tf_main.tf_show($(this).children('.tf_m_buil... |
/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[1945],{"013z":function(e,t,c){"use strict";var b=c("q1tI"),n=c.n(b),a=c("NmYn"),s=c.n(a),r=c("Wbzz"),i=c("Xrax"),o=c("a7k6"),l=c("TSYQ"),d=c.n(l),u=c("QH2O"),h=c("qKvR");var m=({title:e,tabs:t=[]})=>Object(h.b)("div",{className:d()(u.pageHeader,{[u.withTabs]:t.length... |
/**
* Copyright (c) 2014, 2017, Oracle and/or its affiliates.
* The Universal Permissive License (UPL), Version 1.0
*/
"use strict";
define(["ojs/ojcore","jquery","knockout","ojs/ojcomponentcore","ojs/ojcomposite"],function(a,g,c){a.vh.register("oj-file-picker",{view:{inline:"\x3cinput type\x3d'file' style\x3d'displ... |
print('hello \nworld') |
import cv2
import os
import argparse
parser = argparse.ArgumentParser(description='control SRCNN')
parser.add_argument('--to', action="store",dest="tryout", default=200)
parser.add_argument('--ep', action="store",dest="epochs", default=1000)
parser.add_argument('--bs', action="store",dest="batch_size", default=16)
par... |
import React from "react";
import classes from "./Autocomplete.module.css";
import useToggle from "hooks/useToggle";
const Autocomplete = ({
id,
suggestions,
children,
value,
addData,
setInputActivity
}) => {
const [isSuggestions, toggleSuggestions, setToggle] = useToggle(true);
const handleClick = dataset =>... |
var imagemin = require('gulp-imagemin');
var umd = require('gulp-umd');
var gulp = require('gulp');
var config = {
copy: {
base: 'src',
src: ['src/vendor/**/*.js'],
out: 'build'
},
babel: {
src: 'src/vendor/babel-polyfill/browser-polyfill.js',
build: 'build/vendor/babel-polyfill/'
},
image... |
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'filter.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportE... |
import warnings
from warnings import catch_warnings
import operator
from itertools import product
import pytest
from numpy.random import randn, rand, randint
import numpy as np
from pandas.core.dtypes.common import is_bool, is_list_like, is_scalar
import pandas as pd
from pandas.core import common as com
from pandas... |
/* eslint-disable node-core/require-common-first, node-core/required-modules */
'use strict';
const assert = require('assert');
const util = require('util');
let internalBinding;
try {
internalBinding = require('internal/test/binding').internalBinding;
} catch (e) {
console.log('using `test/common/heap.js` require... |
const { stringsInLinesWithSeparator } = require('../lib/input');
const data = stringsInLinesWithSeparator(' ');
const generateProgram = () => data.map(line => {
return {
cmd: line[0],
param: parseInt(line[1], 10),
};
});
const OPS = {
nop: () => 1,
acc: machine => {
machine.reg.acc += machine.pro... |
// Core
export * from "./main";
// TESTS
export * from "./lib/ast.js";
export {
map_from_object,
} from "./lib/utils.js";
export {
JS_Parse_Error,
tokenizer,
} from "./lib/parse.js";
|
var style_segment_zero = {
routeType: 0,
connectionRadius: 0,
tubularSegments: 0
};
var style_segment_long = {
routeType: 0,
connectionRadius: 0,
tubularSegments: 1
};
var style_segment_turn = {
routeType: 1,
connectionRadius: 1,
tubularSegments: 8
};
var style_pink = {
color:... |
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad
from hashlib import md5
from os import urandom
from flag import flag
keys = [md5(urandom(3)).digest() for _ in range(2)]
def bytexor(da,ta): return bytes(i^j for i,j in zip(da,ta))
def get_ciphers(iv1, iv2):
return [
AES.new(keys[0], mod... |
const {Reader} = require('wav');
const fs = require('fs');
const gnuplot = require('gnuplot');
const {promisify} = require('util');
const fileReader = fs.createReadStream(process.argv[2]);
const wavReader = new Reader();
wavReader.on('data', async (data) => {
const series = Array(512).fill().map((_, index) => (
(0... |
import logging
import os
import numpy as np
from scipy import interpolate
import src.config.filepaths as fp
def crop(sensor_srf, sol_rad):
sen_wvl = sensor_srf[:, 0] * 1000
sol_wvl = sol_rad[:, 0]
sol_rad = sol_rad[:, 1]
sol_mask = (sol_wvl > sen_wvl.min()) & (sol_wvl < sen_wvl.max())
return sol... |
var LinkedList = (function LinkedList() {
function LinkedList() {
this.head = null;
this.tail = null;
}
/**
* Add a new item to the end of the LinkedList.
*
* @param {*} data the data to insert to the LinkedList.
*/
LinkedList.prototype.push = function (data) {
... |
"""
This file implements a wrapper for saving simulation states to disk.
This data collection wrapper is useful for collecting demonstrations.
"""
import os
import time
import numpy as np
from robosuite.wrappers import Wrapper
from robosuite.utils.mjcf_utils import save_sim_model
class DataCollectionWrapper(Wrapper... |