text stringlengths 3 1.05M |
|---|
#! /usr/bin/env python
import os
import re
import sys
import time
import random
import logging
import tempfile
import subprocess
import shutil
import argparse
# params overwrite priority:
# for default:
# default_params < blackbox|whitebox_default_params < args
# for simple:
# simple_default_params < b... |
from mdingestion import rights
def test_is_open_access():
assert rights.is_open_access('') is True
assert rights.is_open_access('info:eu-repo/semantics/closedAccess') is False
assert rights.is_open_access('info:eu-repo/semantics/embargoedAccess') is False
assert rights.is_open_access('info:eu-repo/sem... |
#!/usr/bin/env python
"""
Pandas-based Table Data Handler
https://github.com/dceoy/pdbio
"""
import bz2
import gzip
import logging
import os
import subprocess
import sys
from abc import ABCMeta, abstractmethod
from collections import OrderedDict
from itertools import product
import pandas as pd
class BaseBioDataFra... |
class Matrix:
def __init__(self, matrix_string):
self._matrix_string = [[int(row_item) for row_item in row.split()] for row in matrix_string.splitlines()]
def row(self, index):
return self._matrix_string[index - 1]
def column(self, index):
return [column_item[index - 1] for colum... |
/* eslint-disable */
// This optional code is used to register a service worker.
// register() is not called by default.
// This lets the app load faster on subsequent visits in production, and gives
// it offline capabilities. However, it also means that developers (and users)
// will only see deployed updates on su... |
// THIS FILE IS AUTO GENERATED
var GenIcon = require('../lib').GenIcon
module.exports.GiShiningHeart = function GiShiningHeart (props) {
return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M142.094 20.063l37.594 76.78c-9.028-2.783-18.278-4.158-27.47-4.187-7.775-.024-15.51.... |
const mongoose = require('mongoose');
mongoose.connect(process.env.MONGODB_URI || 'mongodb://localhost/wanderpro', {
useNewUrlParser: true,
useUnifiedTopology: true,
useCreateIndex: true,
useFindAndModify: false
});
module.exports = mongoose.connection;
|
import Template from "./template";
import paper from "paper";
export default class AlignmentMarks extends Template {
constructor() {
super();
}
__setupDefinitions() {
this.__unique = {
position: "Point"
};
this.__heritable = {
width: "Float",
... |
//classe responsável por construir os textos e botões exibidos para o usuário
const moment = require('moment');
var self = module.exports = {
ABOUT: 0,
INITIAL: 1,
NOTIFICATIONS: 2,
BNDLIST: 3,
BNDFULL: 4,
NOTIPAUSE: 5,
NOTILIST: 6,
NOTITOGGLE: 7,
NOTITIMES: 8,
NOTITIMEPICKER: ... |
/**
* Copyright (c) 2006-2015, JGraph Ltd
* Copyright (c) 2006-2015, Gaudenz Alder
*/
/**
* Class: mxGraphHandler
*
* Graph event handler that handles selection. Individual cells are handled
* separately using <mxVertexHandler> or one of the edge handlers. These
* handlers are created using <mxGraph.createHand... |
/*! Element Plus v2.1.7 */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ElementPlusLocaleId... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# script by Ruchir Chawdhry
# released under MIT License
# github.com/RuchirChawdhry/Python
# ruchirchawdhry.com
# linkedin.com/in/RuchirChawdhry
from selectolax.parser import HTMLParser
import urllib.request
import re
from more_itertools import filter_except
from iterto... |
from host import Host
def print_hi(name):
print(f'Hi, {name}')
h1 = Host('192.168.100.100', 26, 'user_name-1', 0)
h2 = Host('192.168.100.101', 26, 'user_name-2', 0)
h3 = Host('192.168.100.102', 26, 'user_name-3', 0)
h4 = Host('192.168.100.103', 26, 'user_name-4', 0)
h5 = Host('192.168.100.104'... |
/*
* Copyright (C) 2017-2021 HERE Europe B.V.
*
* 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... |
# coding=utf-8
# Copyright 2021 The Google Research 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 applicab... |
import React from "react";
import ReactDOM from "react-dom";
import App from "../app/layout/App";
import "../app/styles/buttons.less";
import "../app/styles/containers.less";
import "../app/styles/text.less";
import "../app/styles/input.less";
ReactDOM.render(<App />, document.getElementById("App"));
|
# Copyright (c) 2017-2019 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
import random
import string
from itertools import chain
def pri... |
// Print out classrooms ordered by size
// Usage:
// mongo <address>:<port>/<database> <script file> -u <username> -p <password>
var userClassroomMap = {};
var cursor = db.classrooms.find({$where: 'this.members.length > 40'}, {ownerID: 1, name: 1, members: 1});
while (cursor.hasNext()) {
var doc = cursor.next();
... |
import Vue from 'vue'
import App from './App.vue'
import './styles/main.scss'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
state: {
/**
* Messages <type>:<message>
*/
messages: []
},
mutations: {
errorPush (state, message) {
sta... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
export default createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
children: [/*#__PURE__*/_jsx("path", {
fillOpacity: ".3",
d:... |
const utils = {
putIfAbsent: (list, element) => {
if (list.indexOf(element) === -1) {
list.push(element)
}
},
color: (value) => {
if (!isNaN(value)) {
if (value >= 200 && value < 300) {
return '#4caf50'
} else if (value >= 400 && va... |
//import '@kadira/storybook/addons'
import '@storybook/addon-knobs/register'
|
from unittest import skip
from tests.test_base import TestBase
from capanno_utils.repo_config import config
from capanno_utils.helpers.get_paths import *
from capanno_utils.validate_content import main as validate_content
# @skip('')
class TestValidateTools(TestBase):
def test_validate_main_tool_dir(self):
... |
import test from "ava"
import { fake } from "sinon"
import Lobby from "~/app/models/lobby"
test("starts empty", t => {
const lobby = new Lobby()
t.is(0, lobby.users.length)
})
test("accepts new users", async t => {
const lobby = new Lobby()
const user = { get: () => { return 0 } }
t.falsy(await lobby.p... |
var searchData=
[
['tenorbasisswap_5128',['TenorBasisSwap',['../../qle/class_quant_ext_1_1_tenor_basis_swap.html',1,'QuantExt']]],
['tenorbasisswapconvention_5129',['TenorBasisSwapConvention',['../../ored/classore_1_1data_1_1_tenor_basis_swap_convention.html',1,'ore::data']]],
['tenorbasisswaphelper_5130',['Tenor... |
#!/usr/bin/python
"""
(C) Copyright 2020 Intel Corporation.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable ... |
import ApolloClient, {
createNetworkInterface,
addTypeName,
} from 'apollo-client';
import { BASE_URL } from 'config'; // eslint-disable-line
const url = `${BASE_URL}graphql`;
const client = new ApolloClient({
networkInterface: createNetworkInterface({
uri: url,
}),
initialState: typeof window !== 'unde... |
'use strict';
const db = require('./db');
const passport = require('passport');
const { Strategy: LocalStrategy } = require('passport-local');
const { BasicStrategy } = require('passport-http');
const { Strategy: ClientPasswordSt... |
import React, { Component } from 'react';
import { changeNumberOfData } from './utils';
import { AreaChart, Area, XAxis, YAxis, Tooltip, CartesianGrid, Brush, Legend,
ReferenceArea, ReferenceLine, ReferenceDot, ResponsiveContainer } from 'recharts';
const data = [
{ name: 'Page A', uv: 4000, pv: 2400, amt: 2400, t... |
module.exports = function(sequelize, DataTypes) {
var Record = sequelize.define("Record", {
age: {
type: DataTypes.INTEGER,
allowNull: false
},
gender: {
type: DataTypes.STRING,
allowNull: false
},
city: {
type: DataTypes.STRING,
allowNull: false
}
});
... |
#!/usr/bin/env node
var fs = require('fs');
if (process.argv.length !== 4) {
console.info('Usage: node extract.js input.txt output.txt');
process.exit();
}
console.info('Reading file...');
var draft = fs.readFileSync(
process.argv[2]
).toString();
console.log('Scanning...');
var regex = /((\w|\-)+ )?(enum|struct) {(... |
// Invoked on the commit-msg git hook by yorkie.
const chalk = require('chalk');
const msgPath = process.env.GIT_PARAMS;
const msg = require('fs')
.readFileSync(msgPath, 'utf-8')
.trim();
const commitRE = /^(revert: )?(feat|fix|docs|refactor|perf|test|workflow|build|ci|chore|wip|release)(\(.+\))?: .{1,50}/;
if (... |
var fs = require("fs");
var data = '';
//可读流
var readerStream = fs.createReadStream('js/input.txt');
readerStream.setEncoding('UTF8');
readerStream.on('data',function(chunk){
data+=chunk;
});
readerStream.on('end',function(){
console.log(data);
});
readerStream.on('error',function(err){
console.log(err.st... |
"use strict";
/**
* Copyright 2014 IBM Corp. 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 requi... |
/**
* skylark-lodash - A version of lodash.js that ported to running on skylarkjs.
* @author Hudaokeji, Inc.
* @version v0.9.0
* @link https://github.com/skylark-integration/skylark-lodash/
* @license MIT
*/
define(["./lodash"],function(n){return n});
//# sourceMappingURL=sourcemaps/main.js.map
|
from setuptools import setup
setup(
name='wranglesearch',
version='0.1',
description='Mining wrangling functions from Python programs',
url='https://github.com/josepablocam/wranglesearch',
author='Jose Cambronero',
author_email='jcamsan@mit.edu',
license='MIT',
packages=['wranglesearch'... |
import hashlib
wordlist_location = str(input('Enter wordlist file location: '))
hash_input = str(input('Enter hash to be cracked: '))
with open(wordlist_location, 'r') as file:
for line in file.readlines():
hash_ob = hashlib.md5(line.strip().encode())
hashed_pass = hash_ob.hexdigest()
if h... |
/**
* Custom Redux Middleware to track Redux Actions
*
* React Native Starter App
* https://github.com/mcnamee/react-native-starter-app
*/
import { GoogleAnalyticsTracker } from 'react-native-google-analytics-bridge'
// Consts and Libs
import { AppConfig } from '@constants/'
// Google Analytics
const GoogleAnaly... |
'use strict';
// Setting up route
angular.module('core').config(['$stateProvider', '$urlRouterProvider',
function ($stateProvider, $urlRouterProvider) {
// Redirect to home view when route not found
$urlRouterProvider.otherwise('/');
// Home state routing
$stateProvider.
state('home', {
... |
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import print_function, absolute_import
import json
import os
from jupyterlab_launcher.process import which
from jupyterlab_launcher.process_app import ProcessApp
HERE = os.path.dirname(os.path.realpath... |
/*
* Copyright 2013 Amadeus s.a.s.
* 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 i... |
import test from 'ava';
const BigNumber = require('bignumber.js');
const LibCrucible = require('../../../').default;
const Address = require('../../fixtures/address');
const config = require('../../fixtures/config');
const CrucibleUtils = require('../../fixtures/crucible-utils');
test.before(async t => {
t.context.... |
function toJSONValue(e) {
const doc = e.currentTarget;
e.json.isNew = doc._isNew;
};
export default toJSONValue; |
$(document).ready(function($) {
$('#bannerCarousel').carousel({
interval: 10000
});
$('#newsCarousel').carousel({
interval: 10000
})
$('li.homeMenu').addClass('liActive');
$('li.menuItem').hover(function(){
//disable hover effect on active menu item
if (!$... |
import discord
import classes.osu as osu
class OsuPerformanceEmbed(discord.Embed):
def __init__(self, beatmap:osu.Beatmap, perf_info:dict, color: str):
super().__init__(
title = f"{beatmap.title} [{beatmap.version}] ({beatmap.creator}) [{perf_info.star_rating:.2f}★] +{str(perf_info.mods)}",
... |
// This exports the plugin object.
export default {
// The install method will be called with the Vue constructor as
// the first argument, along with possible options
install (Vue, options) {
Vue.component('FileUploader', require('./FileUploader.vue').default)
Vue.component('Dropzone', req... |
import unittest
import pandas as pd
from freezegun import freeze_time
from datetime import datetime, timedelta
from time import sleep
import pandas
from jardin import Collection
from jardin.model import RecordNotPersisted
from tests import transaction
from tests.models import JardinTestModel
class Project(JardinTe... |
import { FilledLaptopWindows as OutlineLaptopWindows } from './FilledLaptopWindows';
export { OutlineLaptopWindows }; |
module.exports = (sequelize, DataTypes) => {
const Area = sequelize.define(
'Area',
{
name: DataTypes.STRING
},
{
tableName: 'area'
}
)
return Area
}
|
from Jumpscale import j
JSBASE = j.baseclasses.object
import re
import sys
# from JumpscaleAYS.core.types import IPv4Address, IPv4Range
import textwrap
import string
import collections
import sys
import os
if j.core.platformtype.myplatform.platform_is_windows:
import msvcrt
def clear():
return os.s... |
import React, { Component } from 'react'
import { Item } from './Item'
export class ItemList extends Component {
state={
database:[
{id:1,name:'Google Pixel - Black',price:13,count:0,total:0,img:"img/product-1.png"},
{id:2,name:'Samsung S7',price:28,count:0,total:0,img:"img/p... |
const Promise = require('bluebird')
const path = require('path')
exports.createPages = ({ graphql, actions }) => {
const { createPage } = actions
return new Promise((resolve, reject) => {
resolve(
graphql(
`
{
allContentfulAlbum {
edges {
node ... |
import { configureStore } from '@reduxjs/toolkit';
import logger from 'redux-logger';
import { reducer } from './reducer';
const initData = () => {
const contact = localStorage.getItem("contacts");
if (contact) {
return JSON.parse(contact);
}
else { return [];}
};
const preloadState = {
cont... |
import platform
import pytest
import dartpy as dart
import numpy as np
def collision_groups_tester(cd):
size = [1, 1, 1]
pos1 = [0, 0, 0]
pos2 = [0.5, 0, 0]
simple_frame1 = dart.dynamics.SimpleFrame()
simple_frame2 = dart.dynamics.SimpleFrame()
sphere1 = dart.dynamics.SphereShape(1)
sphe... |
(this.webpackJsonpdashboard=this.webpackJsonpdashboard||[]).push([[125],{541:function(e,a,t){"use strict";function n(e){e.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"|'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+|[a-zA-Z]+|\S)/,alias:"string"},keyword:{pattern:/(\()(?:define(?:... |
import {IoNumberSliderRange} from '../../io-elements.js';
export default class {
constructor() {
this.element = new IoNumberSliderRange();
this.element.style.display = 'none';
document.body.appendChild(this.element);
}
reset() {
this.element.value = [0, 1];
this.element.step = 0.01;
this.... |
// @flow
import React from 'react';
import moment from 'moment';
import { Link } from 'gatsby';
import type { Edges } from '../../types';
import styles from './Feed.module.scss';
type Props = {
edges: Edges,
};
const Feed = ({ edges }: Props) => (
<div className={styles['feed']}>
{edges.map(edge => (
<d... |
import { customAttribute, inject } from 'aurelia-framework';
@customAttribute('ui-dropdown-hover-action')
@inject(Element)
export class AttrUiDropdownHoverActionCustomAttribute {
constructor(element) {
this.element = element;
}
valueChanged(newValue, oldValue) {
}
_init(context) {
... |
!function(e,t){for(var n in t)e[n]=t[n]}(exports,function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"... |
export const resizeCover = () => {
var imgs = document.querySelectorAll("div.notion-collection-card-cover>img[src*='https://images.unsplash.com']");
imgs.forEach(function(item) {
item.src=item.src+"&fit=clip&w=640";
});
var imgs = document.querySelectorAll("img.notion-page-cover[src*='https://i... |
import $ from 'jquery';
import {findClosestEntity, getDirectionForEntity} from '../utils/aframe-utils';
import pretty from 'pretty';
import {getHotkeyDialog, getTextEditorInstance} from './utils';
// ---------------------------------
var previousFocus = null;
function updateContentArea () {
var content = getTextE... |
"""Support for tasks, coroutines and the scheduler."""
__all__ = ['Task',
'FIRST_COMPLETED', 'FIRST_EXCEPTION', 'ALL_COMPLETED',
'wait', 'wait_for', 'as_completed', 'sleep', 'async',
'gather', 'shield', 'ensure_future', 'run_coroutine_threadsafe',
]
import concurrent.future... |
var prog = require('child_process')
var cons = require('./console').Console
var _colors = require('./colors')
var colors_max = _colors.colors_max
var colors = _colors.colors
var os = require('os')
var platform = os.platform()
// Run a Specific Process
// - Key is a Process Name and Numb... |
import Vue from 'vue';
import App from './App.vue';
import router from './router';
import './plugins/element.js';
import i18n from './plugins/i18n';
import store from './store';
import VueTitlebar from '@backrunner/vue-titlebar';
Vue.config.productionTip = false;
Vue.use(VueTitlebar);
Vue.prototype.$bus = new Vue();... |
/********************************************************************************************/
/********************************************************************************************/
/******************************* COMMON ******************************/
/*******************************... |
// @flow
import Button from '../';
export default {
component: Button,
props: {
color: 'blue',
},
children: 'Button',
simulateSubmission: true,
};
|
module.exports = function (RED) {
function MayaBrowserOpen(config) {
RED.nodes.createNode(this, config);
this.url = config.url;
this.payloadTypeUrl = config.payloadTypeUrl;
var node = this;
async function getValue(value, valueType, msg) {
return new Promise(function (resolve, reject) {
... |
var elixir= require ('laravel-elixir');
require ('laravel-elixir-vue-2');
elixir(function(mix){
mix.saas('app.scss');
}); |
"use strict";
exports.__esModule = true;
exports.c_notification_drawer__header_ZIndex = {
"name": "--pf-c-notification-drawer__header--ZIndex",
"value": "200",
"var": "var(--pf-c-notification-drawer__header--ZIndex)"
};
exports["default"] = exports.c_notification_drawer__header_ZIndex; |
$( document ).ready(function() {
$('.add-to-cart').on('click',function(){
console.log(CURRENT_URL+"/add-to-cart");
$.ajax({
url:BASE_URL+"shop/add-to-cart",
type:"GET",
dataType: "html",
data:{id:$(this).data('id')},
success:function(response){
... |
/* eslint-env mocha */
'use strict';
var Assert = require('@ravdocs/assert');
var FS = require('fs');
var Prince = require('../..');
var Fixtures = require('../fixtures');
var dir = __dirname + '/..';
describe('Prince.exec()', function() {
this.timeout(40000);
it('should return data in correct format', function(d... |
function mergeSort (arr) {
if (arr.length < 2) return arr;
var mid = Math.floor(arr.length /2);
var subLeft = mergeSort(arr.slice(0,mid));
var subRight = mergeSort(arr.slice(mid));
return merge(subLeft, subRight);
}
function merge (a,b) {
var result = [];
while (a.length >0 &&... |
# renames the student submission folders to the following format
# submissions/studentid/source.c
# usage: python list-all.py <directory>
# example: python list-all.py submissions
import os
import sys
if len(sys.argv)<=1:
print 'You must specify a folder'
exit(1)
os.chdir(sys.argv[1])
for sub in os.listdir... |
import React from 'react';
import PropTypes from 'prop-types';
import { Edit } from 'react-admin';
import TaxonomyForm from './Form';
const TaxonomyEdit = ({ basePath, id, resource }) => (
<Edit id={id} basePath={basePath} resource={resource}>
<TaxonomyForm />
</Edit>
);
TaxonomyEdit.propTypes = {
id: PropTypes.... |
import stringIncludes from 'core-js-pure/stable/string/includes';
import stringStartsWith from 'core-js-pure/stable/string/starts-with';
import { SDK_SETTINGS } from '@paypal/sdk-constants';
import { create } from 'zoid/src';
import { uniqueID, getCurrentScriptUID } from 'belter/src';
import {
getMeta,
getEnv,... |
import json
from nhc_hobby_api import NHC
with open('./config.json') as f:
config = json.load(f)
nhc = NHC(hostname=config['nhc']['hostname'])\
.connect(
username=config['nhc']['auth']['username'],
password=config['nhc']['auth']['password']
)\
.wait_until_init_done()
... |
from django.conf.urls import patterns, include, url
from lists.views import HomePageView
urlpatterns = patterns('',
url(r'^$', HomePageView.as_view(), name='home'),
url(r'^accounts/', include('accounts.urls')),
url(r'^lists/', include('lists.urls')),
)
|
import React, { Component } from 'react';
//simple components
const BlogImage = (props) => {
return <img src={props.displayData.imageUrl} alt="" />
};
const BlogTitleandDesc = (props) => {
return (
<div className='blog-post-info-container'>
<h1 className='blog-post-title'>{props.displayD... |
import React from "react";
import styled from "styled-components/macro";
import { ButtonStyle, ButtonOutline } from "../GlobalStyle";
const Button = styled.button`
${ButtonStyle};
margin-bottom: 50px;
`;
const Div = styled.div`
${ButtonOutline}
`;
export default function RouletteButton() {
return (
<Butt... |
from slurmapi import Slurm_Queue, Slurm_Nodes, Slurm_Statistics, Slurm_Partitions
|
# Preprocess cornell movie dialogs dataset
import argparse
import json
import os
import pickle
from multiprocessing import Pool
from pathlib import Path
from urllib.request import urlretrieve
from tqdm import tqdm
from src.utils import EOS_TOKEN, PAD_TOKEN, Tokenizer, Vocab
project_dir = Path(__file__).resolve().pa... |
"""
Read through the most recent logs of all active ingesters and send email notifications if any errors or warnings
are found.
"""
import datetime
import os
import sys
from pyramid.request import Request
from pyramid_mailer import get_mailer
from pyramid_mailer.message import Message
import transaction
... |
import React, { Component } from "react";
import Container from "./Container";
import Row from "./Row";
import Col from "./Col";
class Contact extends Component {
render() {
return (
<div>
<Container style={{ marginTop: 30 }}>
<Row>
<Col size="md-3">
<div></div>
... |
/*
* Talk Messages
*
* This contains all the text for the Talk component.
*/
import { defineMessages } from 'react-intl';
export default defineMessages({
header: {
id: 'app.containers.Talk.header',
defaultMessage: 'This is Talk container !',
},
});
|
import { test } from '@/test'
import Vue from 'vue/dist/vue.common'
import VTextField from '@/components/VTextField/VTextField'
import VProgressLinear from '@/components/VProgressLinear'
test('VTextField.js', ({ mount }) => {
it('should render component and match snapshot', () => {
const wrapper = mount(VTextFie... |
/* */
"format cjs";
import { Subscriber } from '../Subscriber';
import { tryCatch } from '../util/tryCatch';
import { errorObject } from '../util/errorObject';
export function distinctUntilChanged(compare, keySelector) {
return (source) => source.lift(new DistinctUntilChangedOperator(compare, keySelector));
}
clas... |
#!/usr/bin/python
import logging
logger = logging.getLogger('pytest')
class AccountService:
'''
account service template
'''
def place_order(self):
'''authentication'''
print 'account service - authentication'
logger.info('account service - authentication')
@staticmethod
... |
/** Plot a scan of the robot using matplotlib. */
var plot = require('plotter').plot;
var LegoLogfile = require('./legoRobot').LegoLogfile;
/** Read the logfile which contains all scans. */
var logfile = new LegoLogfile();
logfile.read('robot4_scan.txt');
/** Plot one scan. */
plot({
data: logfile.scanD... |
'use strict';define(["modules/default/defaultmodel"],function(a){"use strict";function b(){}return $.extend(!0,b.prototype,a,{getValue:function(){return this.dataValue}}),b});
|
import React from 'react';
function ItemDescription(props) {
return (
<div>
<p className="item-description">{props.item.description}</p>
</div>
);
}
export default ItemDescription;
|
from sklearn.svm import LinearSVC
from sklearn.tree import DecisionTreeClassifier
from sklearn.neural_network import MLPClassifier
from sklearn.neighbors import KNeighborsClassifier
from sklearn.naive_bayes import MultinomialNB
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
from sklearn.mo... |
'use strict';
/* Controllers */
angular.module('myApp.controllers', ['ngRoute']).
controller('AppCtrl', function ($rootScope, $window, $scope, $http, $state, $location) {
$rootScope.isLogin = $window.isLogin;
if (typeof(Storage) != "undefined") {
var lang = localStorage.getItem("lang");
// con... |
# Copyright (c) 2019 Microsoft Corporation
# Distributed under the MIT software license
import pytest
import numpy as np
import numpy.ma as ma
import pandas as pd
import scipy as sp
import math
from itertools import repeat, chain
from ..bin import *
from ..bin import _process_column_initial, _encode_categorical_exis... |
process.env.NODE_ENV = 'production';
const rm = require('rimraf');
const ora = require('ora');
const log = console.log;
const path = require('path');
const chalk = require('chalk');
const webpack = require('webpack');
const renderConfig = require('./webpack.renderer.prod');
const mainConfig = require('./webpack.main')... |
var debug = require('debug')('botkit:incoming_webhooks');
module.exports = function(webserver, controller) {
debug('Configured /botkit/receive url');
webserver.post('/botkit/receive', function(req, res) {
// respond to Slack that the webhook has been received.
res.status(200);
// Now, ... |
/*
* (C) Copyright 2012, IBM Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... |
const { MessageEmbed} = require("discord.js")
const delay = require('delay');
module.exports = {
name:"bass",
botPermission: ["EMBED_LINKS", "READ_MESSAGE_HISTORY","USE_EXTERNAL_EMOJIS","ADD_REACTIONS","CONNECT","SPEAK","DEAFEN_MEMBERS","MOVE_MEMBERS","USE_VAD"],
run: async(client,message,args) => {
... |
import React, { useState } from "react";
import { Components, registerComponent } from "meteor/penpal";
import { makeStyles, useTheme } from "@material-ui/core/styles";
const useStyles = makeStyles((theme) => ({
root: {
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "... |
import { _ } from './utils'
export const parseFeatureFlagDecideResponse = (response, persistence) => {
const flags = response['featureFlags']
if (flags) {
// using the v1 api
if (Array.isArray(flags)) {
const $enabled_feature_flags = {}
if (flags) {
for (... |
import math
import pickle
import six
from rdkit import Chem
from nose.tools import eq_
from numpy.testing import assert_almost_equal
from mordred import Calculator, descriptors
from mordred.error import MissingValueBase
def test_pickle_calculator():
orig = Calculator(descriptors)
d0 = orig.descriptors[0]
... |