text stringlengths 3 1.05M |
|---|
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.default = void 0;
var _defaultConfig = _interopRequireDefault(require('./defaultConfig'));
var _utils = require('./utils');
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {default: obj};
}
function... |
import React, { useEffect, useState, useRef } from 'react';
import PropTypes from 'prop-types';
import firebase from 'firebase/app';
import { useFirestoreQuery } from '../hooks';
// Components
import Message from './Message';
const Channel = ({ user = null }) => {
const db = firebase.firestore();
const messagesRef... |
import React, { Component } from 'react';
import styles from '../App.css';
import NavBar from './NavBar';
import Game from './Game';
import Profile from './Profile';
import Stats from './Stats';
import Instructions from './Instructions';
class GameBoard extends Component {
constructor(props) {
super(props);
... |
# this file is hardware connection layer which use to connect to suitable hardware
# here all the processing like joint no and etc start from 0, like 0=Joint 1, 1=joint 2...
# this class most of the method return string, either status code "OK" or "ERR_SPECIFIC_CODE" only
import serial
import serial.tools
import serial... |
const EE = require('events')
const events = new EE()
module.exports = events |
import dgl
import torch.nn as nn
"""
GAT: Graph Attention Network
Graph Attention Networks (Veličković et al., ICLR 2018)
https://arxiv.org/abs/1710.10903
"""
from layers.gat_layer import GATLayer
from layers.mlp_readout_layer import MLPReadout
class GATNet(nn.Module):
def __init__(self, net_params):... |
/*
* L.Map is the central class of the API - it is used to create a map.
*/
L.Map = L.Class.extend({
includes: L.Mixin.Events,
options: {
crs: L.CRS.EPSG3857,
/*
center: LatLng,
zoom: Number,
layers: Array,
*/
fadeAnimation: L.DomUtil.TRANSITION && !L.Browser.android23,
trackResize: true,
mar... |
import fs from "fs"
import pify from "pify"
export const writeFile = pify(fs.writeFile)
export const runQuery = (handler, query) =>
handler(query).then(r => {
if (r.errors) {
throw new Error(r.errors.join(`, `))
}
return r.data
})
export const defaultOptions = {
// Override if you want to ma... |
import jwt from 'jsonwebtoken';
export const userDetails = {
id: 1,
firstNmae: 'Isaiah',
};
export const oneUserDetail = {
id: 1,
email: 'email@email.com',
firstName: 'user.firstName',
lastName: 'user.lastName',
businesses: [],
reviews: [],
Image: 'user.Image',
};
const businesses = [
{
id: ... |
const Token = "f6bae9511cd510f9322cae49c5db7268";
export default Token;
|
from .core import *
from .misc import *
from .command import *
from .curve import *
|
const express = require('express');
const router = express.Router();
const profile = require("../config/profile")
const settings = require("../config/settings")
const soPosts = require("../lib/so_posts")
/* GET home page. */
soPosts.getPosts().then((resp) => {
router.get('/', function (req, res, next) {
res.rende... |
import styled from 'styled-components'
import { colors, grid } from '%/styles'
import { rgba, rem, em } from 'polished'
import { mediaMin } from '%/styles/mixins'
const checkPadding = props => props.noPadding
? null
: `padding: ${rem(20)} ${rem(grid.gutter / 2)};`
const Body = styled.div`
${checkPadding}
back... |
import os
from abc import ABC, abstractmethod
import logging
import numpy as np
from typing import Union, Sequence, List
import tensorflow as tf
from tensorflow import keras
from tensorflow.python.framework.convert_to_constants import \
convert_variables_to_constants_v2 as convert_var_to_const
from tensorflow.pyt... |
from bs4 import BeautifulSoup
import urllib.request
import xlsxwriter
import pandas as pd
# uu = pd.read_table('api_name.txt',header = None)
#
#
# xl = xlsxwriter.Workbook(r'E:\PycharmProjects\webex_api\url.xlsx')
# sheet = xl.add_worksheet('sheet1')
url="https://developer.twist.com/v3/#get-comment"
p... |
# Copyright (c) 2010 OpenStack Foundation
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in complianc... |
/**
* Copyright 2019 Adobe Systems Incorporated. All rights reserved.
* This file is licensed to you 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
*
* Unl... |
// @ts-check
const path = require('path')
/**
* @see https://playwright.dev/docs/test-configuration
* @type{import('@playwright/test').PlaywrightTestConfig}
*/
const config = {
webServer: {
port: 9900,
command: 'npm run start',
},
// Test directory
testDir: path.join(__dirname, 'tests'),
};
module.e... |
const fs = require('fs-extra');
const { find_markdown_files } = require('./shared');
const { find_asset_files } = require('./shared');
const { get_yearly_configs } = require('./shared');
const crypto = require('crypto');
const static_pages = [
'index.html',
'table_of_contents.html',
'methodology.html',
'contri... |
export default {
en: {
common: {
pageTitle: 'Telekom',
},
},
de: {
common: {
pageTitle: 'Telekom',
},
},
};
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function getColDef(view, field) {
return view.getScaleByField(field);
}
exports.getColDef = getColDef;
//# sourceMappingURL=get-color-def.js.map |
/**
* selection.Rowspan() get or change rowspan attribute value of selection
* @param {string} [value=''] new value or dont specify to return current value
* @return selected if setting or current value
*/
export default function (value)
{
if (arguments.length < 1)
{
return this.attr('rowspan');
}
else
... |
import { ROUTES_WALLET } from '@/core/configs/configRoutes';
import { ETH, GOERLI } from '@/utils/networks/types';
import layout from './TheStakedLayout';
import stakedRouterGuard from '@/core/router/helpers';
export default {
title: 'Stake on Eth2',
subtitle: 'Stake your ETH on Ethereum 2.0 and watch your rewards ... |
const properties = require('../.vscode/c_cpp_properties.json').configurations[0];
const promisify = require('util').promisify;
const execFile = promisify(require('child_process').execFile);
const exec = promisify(require('child_process').exec);
const os = require('os');
// Command line arguments and settings
co... |
import specTextValue from './spec-text-value'
const variationsGrids = (product, filterGrids, inStockOnly, delimiter) => {
let grids = {}
if (product && Array.isArray(product.variations)) {
product.variations.forEach(variation => {
if (inStockOnly && variation.quantity <= 0) {
// out of stock
... |
"use strict";
describe('WalkontableScrollbar', function () {
var $table;
var $container;
var $wrapper;
var debug = false;
beforeEach(function () {
$wrapper = $('<div></div>').css({
overflow: 'hidden'
});
$container = $('<div></div>');
$table = $('<table></table>'); // create a table tha... |
import gulp from 'gulp';
import gulpLoadPlugins from 'gulp-load-plugins';
import path from 'path';
import del from 'del';
import runSequence from 'run-sequence';
const plugins = gulpLoadPlugins();
const paths = {
js: ['./**/*.js', '!dist/**', '!node_modules/**', '!coverage/**'],
nonJs: ['./package.json', './.giti... |
module.exports = {
env: {
browser: true,
es6: true,
node: true
},
extends: 'standard',
rules: {
camelcase: ['error', { properties: 'always' }],
'no-var': ['error'],
'prefer-const': ['error'],
'space-before-function-paren': ['error', {
anonymous: 'always',
asyncArrow... |
import React, { Component } from 'react';
import AppNavbar from '../../components/AppNavbar/AppNavbar';
import { Collapsible, CollapsibleItem } from 'react-materialize';
import RowContainer from '../../hoc/rowContainer';
import CoppingGuide from '../../components/Resources/ResourceSubcomponents/CoppingGuides';
import S... |
"""
2021-11-19
此代码提供热力学参数计算,包括:
给定 油气比f 大气湿度d 温度T 计算 比焓H
给定 油气比f 大气湿度d 温度T 计算 熵S
给定 油气比f 大气湿度d 温度T 计算 气体绝热指数k
给定 油气比f 大气湿度d 温度T 计算 热力学常数R
"""
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from scipy import interpolate
class GasTable():
def __init__(self):
self.a_air_i = [-0.30591266... |
from task import task, RetryTaskException
from google.appengine.ext.key_range import KeyRange
from taskutils.future import future, FutureReadyForResult, FutureNotReadyForResult
from taskutils.future import GenerateOnAllChildSuccess, generatefuturepagemapf,\
setlocalprogress, GetFutureAndCheckReady
from taskutils.ut... |
var searchData=
[
['hack_497',['hack',['../d2/d0e/class_y_t_music_uploader_1_1_providers_1_1_request_models_1_1_browse_playlists_results_context_1_1_createplaylistendpoint.html#a375d290fab5f9fd15f4bf9389029fa6f',1,'YTMusicUploader.Providers.RequestModels.BrowsePlaylistsResultsContext.Createplaylistendpoint.hack()'],[... |
/* eslint-disable */
import TWEEN from '@tweenjs/tween.js'
function animate(time) {
requestAnimationFrame(animate)
TWEEN.update(time)
}
requestAnimationFrame(animate)
function tweenScroll(el, position, duration = 500) {
let dom = null
if (typeof el === 'string') {
dom = document.querySelector(... |
import HttpErrorHandler from 'src/services/HttpErrorHandler'
import lang from 'src/lang/en'
function makeResponse (code) {
return {
response: {
status: code
}
}
}
function makeGoogleResponse (code, reason) {
var obj = makeResponse(code)
obj.response.data = {
error: {
errors: [{ reason:... |
function module(i,t,e){"use strict";var s=i("../core/utils"),n=i("../../core/utils/type").isDefined,a=s.raiseTo,r=s.getLog;e.exports={_fromValue:function(i){return null!==i?r(i,this._canvasOptions.base):i},_toValue:function(i){return null!==i?a(i,this._canvasOptions.base):i},getMinBarSize:function(i){var t=this.getCanv... |
const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
// const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const MiniCs... |
const fs = require("fs");
const express = require("express");
const bodyParser = require("body-parser");
const expressLogging = require("express-logging");
const queryString = require("querystring");
const path = require("path");
const getPort = require("get-port");
const chokidar = require("chokidar");
const jwtDecode... |
'use strict';
function init(app, config) {
app.set('view engine', 'jade');
app.use(require('express').static(path.join(__dirname, '..', 'public')));
require('./routes/index').init(app, config);
}
module.exports = {
init: init
}; |
/**
* @generated-from ./$find.test.js
* This file is autogenerated from a template. Please do not edit it directly.
* To rebuild it from its template use the command
* > npm run generate
* More information can be found in CONTRIBUTING.md
*/
/* eslint-disable no-unused-vars,import/no-duplicates */
import { async... |
require('/json2.js');
require('/jquery-1.4.4.min.js');
require('/underscore-min.js');
require('/backbone-min.js');
require('/shCore.js');
require('/shBrushRuby.js');
document.write("<div id='module_template'> \n</div> \n<div id='method_template'> \n</div>\n<div id='source_template'>\n</div>\n<div id='source_error_temp... |
const mongoose = require("mongoose");
const Schema = mongoose.Schema;
// Create Schema
const NotificationSwitchSchema = new Schema({
user_id: {
type: String,
required: true
},
target: {
type: String,
required: true
},
notify: {
type: Boolean,
required: true
},
created_at: {
typ... |
const toggleSwitch = document.querySelector('input[type="checkbox"]');
const nav = document.getElementById('nav');
const toggleIcon = document.getElementById('toggle-icon');
const image1 = document.getElementById('image1');
const image2 = document.getElementById('image2');
const image3 = document.getElementById('image3... |
/* This file is automatically rebuilt by the Cesium build process. */
define(['./when-6655f883', './PrimitivePipeline-6f0d65f3', './createTaskProcessorWorker', './Transforms-f37c129d', './Matrix2-70d3547e', './RuntimeError-5f205b85', './ComponentDatatype-579b2047', './WebGLConstants-cf1206a6', './combine-1fd4d5cd', './... |
"use strict";
var $ = require("jquery"),
Class = require("../../core/class"),
errors = require("../widget/ui.errors"),
dateUtils = require("../../core/utils/date");
var abstract = Class.abstract;
var APPOINTMENT_MIN_SIZE = 2,
COMPACT_APPOINTMENT_DEFAULT_SIZE = 15,
COMPACT_APPOINTMENT_DEFAULT_OFFS... |
angular.module('unitmetaApp', []).controller('unitmetaController', ['$scope', function($scope) {
$scope.mode = ecEditor.getConfig('editorConfig').mode;
$scope.metadataCloneOb = {};
$scope.nodeId = $scope.nodeType = '';
$scope.showImageIcon = true;
$scope.showAssestBrowser = function(){
ecEd... |
import React, { Component } from 'react';
import { Card, CardBody, CardHeader, Progress } from 'reactstrap';
class ProgressBar extends Component {
render() {
return (
<div className="animated fadeIn">
<Card>
<CardBody>
<Progress animated value={100} className="mb-3" />
... |
function bar() {
for (var i = 0; i < 3; i++) {
var y = 'world!'
console.log('hello ' + y);
}
}
|
(function( window, undefined ) {
kendo.cultures["ff-MR"] = {
name: "ff-MR",
numberFormat: {
pattern: ["-n"],
decimals: 2,
",": " ",
".": ",",
groupSize: [3],
percent: {
pattern: ["-n%","n%"],
deci... |
import json
from typing import Any, Dict, List, Optional, Union
from uuid import UUID
from dateutil import parser
from ee.clickhouse.client import sync_execute
from ee.clickhouse.models.element import chain_to_elements
from ee.clickhouse.process_event import process_event_ee
from ee.clickhouse.sql.session_recording_e... |
// @flow
import React, { Component } from 'react'
import { Image, Text, View } from 'react-native'
import MDIcon from 'react-native-vector-icons/MaterialIcons'
import accountIcon from '../../../../assets/images/sidenav/accounts.png'
import { SceneWrapper } from '../../../../components/common/SceneWrapper.js'
import s... |
Vue.component('btech-item',{
props: ['btech'],
template:
'<div class="col-sm-2" style="margin-bottom: 15px;">'+
'<div class="cardnew" style="height: 210px;">'+
'<img class="student_image" v-bind:src="btech.img" style="margin-top: 5px;">'+
'<div cla... |
import PropTypes from "prop-types"
import React from "react"
import NavBar from "./Nav/NavBar"
import "../components/Nav/nav.css"
const Header = ({ siteTitle, hero, user, logout }) => (
<NavBar user={user} hero={hero} logout={logout} />
)
Header.propTypes = {
siteTitle: PropTypes.string,
}
Header.defaultProps = ... |
const fs = require('fs');
export function readInputFile(file) {
return new Promise((resolve, reject) => {
let reader = new FileReader();
reader.readAsText(file);
reader.onload = (event) => {
let csv = event.target.result;
resolve(csv);
};
reader.on... |
import React, { Component } from 'react-native';
var {
StyleSheet,
Text,
View,
TouchableHighlight
} = React;
class OfButton extends Component {
render() {
return (
<TouchableHighlight
style={styles.ofButton}
activeOpacity={1}
animationVelocity={0}
underlayColor="ora... |
function processImage4()
{
// **********************************************
// *** Update or verify the following values. ***
// **********************************************
// Replace the subscriptionKey string value with your valid subscription key.
var subscriptionKey = "c9ff0ef0cbf2491b8b4c89572347e4d... |
var FluentUIReactHooks;!function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.t... |
import styled from 'styled-components';
const ImageWrapper = styled.div`
display: block-inline;
margin: auto;
z-index: 3;
float: right;
width: 20%;
padding-right: 5%;
padding-top: 100px;
text-align: center;
`;
export default ImageWrapper;
|
!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(e,s){var n,o,a,r=e.nodeName.toLowerCase();return"area"===r?(n=e.parentNode,o=n.name,e.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']")[0],!!a&&i(a)):!1):(/input|select|textarea|button|object/.... |
import argparse
import datetime
import logging
import os
import re
from typing import Dict, Tuple
from cdc_kafka import kafka, constants, progress_tracking, options
from .metric_reporting import accumulator
logger = logging.getLogger(__name__)
class NoopAccumulator(accumulator.AccumulatorAbstract):
pass
def m... |
/**
* DevExtreme (viz/tree_map/colorizing.discrete.js)
* Version: 19.2.4
* Build date: Tue Nov 19 2019
*
* Copyright (c) 2012 - 2019 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
"use strict";
function discreteColorizer(options, themeM... |
var data = {
"status":"OK",
"copyright":" Copyright (c) 2019 Pro Publica Inc. All Rights Reserved.",
"results":[
{
"congress": "113",
"chamber": "House",
"num_results": 450,
"offset": 0,
"members": [
{
"id": "... |
import React from 'react';
import AddOption from './AddOption';
import Action from './Action';
import Header from './Header';
import Options from './Options';
import OptionModal from './OptionModal';
export default class IndecisionApp extends React.Component {
state = {
options: [],
selectedOption: undefined,
}... |
var WuhanGeoJSON = {"type":"FeatureCollection","features":[{"type":"Feature","properties":{"adcode":420102,"name":"江岸区","center":[114.30304,30.594911],"centroid":[114.319956,30.642014],"childrenNum":0,"level":"district","subFeatureIndex":0,"acroutes":[100000,420000,420100],"parent":{"adcode":420100}},"geometry":{"type"... |
import Categories from '../constants/categories';
const categories = [
...Categories.incomeCategory,
...Categories.spendingCategory,
];
export const makeTransaction = transaction => {
const month = String(transaction.month + 1).padStart(2, '0');
const dateToTable = `${transaction.year}-${month}-${transaction.... |
import pytest
from pybuildkite.annotations import Annotations
def test_list_annotations(fake_client):
annotations = Annotations(fake_client, "https://api.buildkite.com/v2/")
annotations.list_annotations("org_slug", "pipeline_id", "build_number")
fake_client.get.assert_called_with(
annotations.pat... |
# 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
# distributed under t... |
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* 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... |
import React from 'react';
import ReactDOM from 'react-dom';
import {Provider} from 'react-redux';
import App from './App';
import {ConnectedRouter} from 'connected-react-router';
ReactDOM.render(
<Provider>
<ConnectedRouter>
<App />
</ConnectedRouter>
</Provider>,
document.getElementBy... |
import { unstable_useId as useId } from '@mui/utils';
export default useId; |
/**
* Lightbox v2.7.1
* by Lokesh Dhakar - http://lokeshdhakar.com/projects/lightbox2/
*
* @license http://creativecommons.org/licenses/by/2.5/
* - Free for use in both personal and commercial projects
* - Attribution requires leaving author name, author link, and the license info intact
*/
(function(){v... |
function renderUsers(page = 1) {
state.usersPage.page = page;
const query = new URLSearchParams({
page: page,
sort_field: state.usersPage.sortField,
sort_direction: state.usersPage.sortDirection,
});
$.ajax({
url: state.usersPage.indexUri + '?' + query.toString(),
... |
'use strict'
const test = require('tape')
const isRoughlyEqual = require('is-roughly-equal')
const moment = require('moment-timezone')
const index = require('.')
const stations = require('./stations.json')
const journeys = require('./lib/journeys')
const journeyDetails = require('./lib/journey-details')
const {passen... |
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not u... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ApiManager_1 = require("./ApiManager");
const StorageHelper_1 = require("../utils/StorageHelper");
function hashCode(str) {
var hash = 0, i, chr;
if (str.length === 0)
return hash;
for (i = 0; i < str.length; i++) {
... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _classCallCheck(instance, Construct... |
/*
* secGrpAuthorityDataSource - 分配安全组-数据权限tab页 - 数据源 - model
* @date: 2019-12-23
* @author: hulingfangzi <lingfangzi.hu01@hand-china.com>
* @version: 0.0.1
* @copyright Copyright (c) 2018, Hand
*/
import { createPagination, getResponse } from 'utils/utils';
import { queryData } from '../../services/roleManagemen... |
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var execs = require('./routes/execs');
var index = require('./routes/index');
var app = express();... |
/* global cy */
import elements from '../sw-general.page-object';
export default class SalesChannelPageObject {
constructor() {
this.elements = {
...elements,
...{
salesChannelMenuName: '.sw-admin-menu__sales-channel-item',
salesChannelModal: '.sw-sal... |
// SurveyFormReview shows allows users to review their form entries before final submission
import _ from 'lodash';
import React from 'react';
import { connect } from 'react-redux';
import formFields from './formFields';
import { withRouter } from 'react-router-dom';
import * as actions from '../../actions';
const Sur... |
'use strict'
var yo = require('yo-yo')
var DropdownPanel = require('./DropdownPanel')
function StepDetail(_parent, _traceManager) {
this.parent = _parent
this.traceManager = _traceManager
this.basicPanel = new DropdownPanel('Step detail', {json: true})
this.detail = initDetail()
this.view
this.init()
}
... |
/*!
* OpenUI5
* (c) Copyright 2009-2020 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define([
'sap/ui/core/Control',
'sap/m/Text',
"sap/f/cards/NumericSideIndicatorRenderer"
], function (
Control,
Text
) {
"use strict";
/**
* Const... |
/*
jQWidgets v13.1.0 (2021-Nov)
Copyright (c) 2011-2021 jQWidgets.
License: https://jqwidgets.com/license/
*/
/* eslint-disable */
(function(b){b.jqx.jqxWidget("jqxGrid","",{});b.extend(b.jqx._jqxGrid.prototype,{defineInstance:function(){var d={adaptive:false,adaptivewidth:600,disabled:false,width:600,height:400,pager... |
/*! cyberhobo. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
var chalk = require('chalk')
var connectivity = require('connectivity')
var cp = require('child_process')
var fs = require('fs')
var once = require('once')
var path = require('path')
var series = require('run-series')
var waterfall = req... |
import { postComment, postOtherComment } from '~/api'
export const state = () => ({})
export const mutations = {}
export const actions = {
async addComment(_, { payload }) {
return await postComment(payload)
},
async addOtherComment(_, { payload }) {
return await postOtherComment(payload)
}
}
|
var assert = require('assert');
var normalizeNewline = require('normalize-newline');
var read = require('read-file-relative').readSync;
var createReport = require('./utils/create-report');
const flowId = process.env.TEAMCITY_FLOWID = 123456;
it('Should produce report without colors', functio... |
import nltk
from nltk.corpus import wordnet
class WordnetModule:
def __init__(self, model_dir):
self.model_dir = model_dir
def query_expanded(self, query_as_list):
"""
expand the query with similar words to the terms in query
:param query_as_list: list of query's ... |
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
from sklearn.datasets import load_digits
digits = load_digits()
X_scale = StandardScaler()
X = X_scale.fit_transform(digits.data)
y = digits.target # target
X_train, X_test, y_train, y_test = train_test_split(X, y,... |
"""script to create the default set of map marker icons distributed with clld."""
import os
import sys
import pyx
from pyx import bbox, unit, style, path, color, canvas, deco
# set the scale to 1/20th of an inch
unit.set(uscale=0.05, wscale=0.02, defaultunit="inch")
linewidth = style.linewidth(1.2)
ICONS = [
'f... |
# Em uma competição de ginástica, cada atleta recebe notas de sete jurados.
# A melhor e a pior nota são eliminadas.
# A sua nota fica sendo a média dos notas restantes. Você deve fazer um programa que receba o nome do ginasta e as notas dos sete jurados alcançadas pelo atleta
# em sua apresentação e depois informe ... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[247],{3122:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.icon=void 0,n(10);var o=function(e){return e&&e.__esModule?e:{default:e}}(n(0));function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=argum... |
'use strict';
angular.module('mean.temperature').factory('Temperature', ['$resource',
function ($resource) {
return {
name: 'temperature',
getTemperature: function () {
return $resource(
"https://api.particle.io/v1/devices/340030000447343337373737/temperature", {}, {
... |
import os, csv
datadir = "/Users/titlis/cogsci/projects/stanford/projects/overinformativeness/Caroline/5_OI_Final_Experiment2/data/"
csv_messagenames = [o for o in os.listdir("/Users/titlis/cogsci/projects/stanford/projects/overinformativeness/Caroline/5_OI_Final_Experiment2/data/message/") if (o.endswith('csv') & o.... |
var chai = require('chai');
var sinon = require('sinon');
var sinonChai = require('sinon-chai');
var expect = chai.expect;
chai.should();
chai.use(sinonChai);
var GraphicsService = require('../lib/graphics');
describe('GraphicsService tests:', function() {
describe('GraphicsService', function() {
v... |
from django.urls import path
from django_vue_sample.users.views import (
user_list_view,
user_redirect_view,
user_update_view,
user_detail_view,
)
app_name = "users"
urlpatterns = [
path("", view=user_list_view, name="list"),
path("~redirect/", view=user_redirect_view, name="redirect"),
pa... |
document.querySelectorAll('.accordion__button').forEach(button => {
button.addEventListener('click', () => {
const accordionContent = button.nextElementSibling;
button.classList.toggle('accordion__button--active');
if(button.classList.contains('accordion__button--active')) {
... |
import time, numpy
import thread
import _coreaudio
import time
import Queue
mainThreadQueue = Queue.Queue()
outBufSize = _coreaudio.getOutBufSize()
inBufSize = _coreaudio.getInBufSize()
sleepDuration = .1
numSamplesPlayed = 0
numSamplesRecorded = 0
class AudioInterface(object):
def __init__(self, device=None):
... |
var fs = require('fs')
var build = require('build-modules')
var name = 'stackinfo'
var buildDirectory = __dirname+'/generatedBuild/'
if(!fs.existsSync(buildDirectory)) {
fs.mkdirSync(buildDirectory)
}
console.log('building and minifying...')
build(buildDirectory, name, '/*Copyright 2014 Billy Tetrud - MIT licen... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails oncall+relay
* @flow strict-local
* @format
*/
// flowlint ambiguous-object-type:error
'use strict';
const Profiler... |
module.exports = ({ Class, method, property }) => {
test(`Calling '${method}()' should set the '${property}' property to 'true'`, () => {
const instance = new Class();
instance[method]();
expect(instance.props[property]).toEqual(true);
});
}; |
var http = require('http')
, https = false
, tls = false
, url = require('url')
, util = require('util')
, stream = require('stream')
, qs = require('qs')
, querystring = require('querystring')
, crypto = require('crypto')
, oauth = require('oauth-sign')
, hawk = require('hawk')
, aws = require('... |