text stringlengths 3 1.05M |
|---|
/**
* @file producer.js
*/
const util = require('util'),
events = require('./events'),
Constants = require('./constants');
var Subscriber = require('./subscriber');
function SubscriberInfo (name) {
this.name = name;
}
function Publisher (name, event) {
// call parent constructor
Su... |
import logging
import numpy as np
import argparse
import pandas as pd
from time import time
from pprint import pprint
from random import random, choice, shuffle, randint
from main import loadData, loadQ, saveQ, getBackgroundKnowledge, summarizeActions
from world import DATA, PERIODS, ACTIONS, getState, getReward
def... |
// Copyright (C) 2017 The Android Open Source Project
//
// 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 ... |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File : ukrainian.py
@Time : 2020/09/07
@Author : Montyzzz
@Version : 1.0
@Contact : ---
@Desc :
'''
class LangUkrainian(object):
SETTING = "НАЛАШТУВАННЯ"
VALUE = "ЗНАЧЕННЯ"
SETTING_DOWNLOAD_PATH = "Шлях завантаження... |
#
# -------------------------------------------------------------------------
# Copyright (c) 2015-2017 AT&T Intellectual Property
#
# 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
#
# ... |
"""
A light-weight Table class for manipulating 2D data and representing it as
text, or writing to file for import into other packages.
Current output formats include pickle (pythons serialisation format),
restructured text (keyed by 'rest'), latex, html, delimited columns, and a
simple text format.
Table can read pi... |
/**@preserve GeneXus Java 10_3_12-110051 on February 11, 2021 5:25:2.97
*/
gx.evt.autoSkip = false;
gx.define('hbem', false, function () {
this.ServerClass = "hbem" ;
this.PackageName = "" ;
this.setObjectType("web");
this.setOnAjaxSessionTimeout("Warn");
this.hasEnterEvent = false;
this.skipOnEnte... |
/*
* Apache License, Version 2.0
*
* Copyright (c) 2019 Tigoole
*
* 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 { makeStyles } from '@material-ui/core/styles'
import classnames from 'classnames'
import prettyMs from 'pretty-ms'
import * as R from 'ramda'
import React from 'react'
import { Label1, Label2, TL2 } from 'src/components/typography'
import { ReactComponent as Wrench } from 'src/styling/icons/action/wrench/zodia... |
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import { withRouter } from 'react-router'
import ListItem from '@material-ui/core/ListItem';
import ListItemText from '@material-ui/core/ListItemText';
import ListItemIcon from '@material-ui/core/ListItemIcon';
import Typography from '@ma... |
export const template = `<h1>material-loader</h1>
<p>
Checkboxes allow the user to select multiple options from a set.
</p>
<h3>Usage</h3>
<pre>
<material-loader size="50"></material-loader>
</pre>
<h3>Attributes</h3>
<ul>
<li><code>size</code>: Number, width and height of the loader</li>
</ul... |
// Copyright (c) 2020, B2Grow and contributors
// For license information, please see license.txt
frappe.ui.form.on('Discount Type', {
// refresh: function(frm) {
// }
});
|
Template.categories.helpers({
categories: function(){
return Categories.find({}, {sort: {order: 1, name: 1}});
},
menuItems: function () {
var menuItems = _.map(Categories.find({}, {sort: {order: 1, name: 1}}).fetch(), function (category) {
return {
_id: category._id,
parentId: categ... |
import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/home.vue";
Vue.use(VueRouter);
const routes = [
{
path: "/",
name: "Home",
component: Home,
redirect: "/index",
children: [
{
path: "/index",
name: "Index",
component: () => import... |
/**
* [description]
*
* @function Phaser.Geom.Ellipse.Circumference
* @since 3.0.0
*
* @param {Phaser.Geom.Ellipse} ellipse - [description]
*
* @return {number} [description]
*/
var Circumference = function (ellipse)
{
var rx = ellipse.width / 2;
var ry = ellipse.height / 2;
var h = Math.pow((rx - ... |
/*************************************************************************************************
The MIT License (MIT)
Copyright (c) 2015 THOMAS FORD
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
... |
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_pre... |
/* eslint-disable */
/*
* @pqina/tick v1.8.0 - Counters Made Easy
* Copyright (c) 2020 PQINA - https://github.com/pqina/tick/
*/
(function(root, plugins, undefined){
'use strict';
// private library reference
var Tick = (function() {
if (!module) {
var module = {};
}
'use strict';
// Available extension t... |
var NAVTREEINDEX19 =
{
"classIoss_1_1Beam2.html#a3ec30d218d72802711b7a37478580d82":[3,0,135,7,15],
"classIoss_1_1Beam2.html#a464d76e2d4b495d9928f7aeab4043a37":[3,0,135,7,6],
"classIoss_1_1Beam2.html#a464d76e2d4b495d9928f7aeab4043a37":[4,0,90,7,6],
"classIoss_1_1Beam2.html#a6eb387bcbe5c5eb1cb09642a85476b37":[4,0,90,7,7]... |
# -*- coding: UTF-8 -*-
from presentation.formatter.formatter import Formatter
class Max7219AsciiFormatter(Formatter):
def format(self, value):
"""
Unicode values of the characters:
¡ a8
¿ ad
á a0
é 82
í a1
ó a2
ú a3
Á 41
É 45... |
import Vue from 'vue'
import ThemePageCategory from '../theme/Category.vue'
import ThemePageSingle from '../theme/Single.vue'
import ThemePagePage from '../theme/Page.vue'
import ThemePageCategoryLearningPaths from '../theme/Category-LearningPaths.vue'
import ThemePageSingleLearningPaths from '../theme/Single-LearningP... |
"""
Connection module for Amazon APIGateway
.. versionadded:: 2016.11.0
:depends:
- boto >= 2.8.0
- boto3 >= 1.2.1
- botocore >= 1.4.49
:configuration: This module accepts explicit Lambda credentials but can also
utilize IAM roles assigned to the instance trough Instance Profiles.
Dynamic credentials a... |
from elasticsearch_dsl import Search
class ElasticQuerySet(object):
def __init__(self, doctype=None):
self.doctype
self.search = self._all()
def _all(self):
search = Search()
if self.doctype:
search = self.search.doc_type(self.doctype)
return search
de... |
/**
* Use this file to configure your truffle project. It's seeded with some
* common settings for different networks and features like migrations,
* compilation and testing. Uncomment the ones you need or modify
* them to suit your project as necessary.
*
* More information about configuration can be found at:
... |
const withLess = require('@zeit/next-less');
const FilterWarningsPlugin = require('webpack-filter-warnings-plugin');
const antdCustom = require('./src/styles/antd-custom');
const { STRIPE_CONNECT_CLIENT_ID, STRIPE_PUBLISHABLE_KEY } = process.env;
if (!STRIPE_CONNECT_CLIENT_ID || !STRIPE_PUBLISHABLE_KEY) {
console.e... |
import React from "react";
import { useNavigate } from "react-router";
import StripeCheckout from 'react-stripe-checkout';
import axios from "axios";
import LOGO from '../logo.png';
import {toast} from 'react-toastify';
toast.configure();
const Payment = (props) => {
const navigate = useNavigate();
const no... |
import _extends from "@babel/runtime/helpers/extends";
import React from 'react';
import PropTypes from 'prop-types';
import withWidth, { isWidthDown } from '../withWidth';
/**
* Dialog will responsively be full screen *at or below* the given breakpoint
* (defaults to 'sm' for mobile devices).
* Notice that this Hig... |
define({
"sourceSetting": "ตั้งค่าการค้นหาแหล่งที่มา",
"instruction": "เพิ่มและกำหนดค่าบริการรหัสเชิงพื้นที่ หรือชั้นข้อมูลที่เป็นแหล่งที่มาของการค้นหา ระบุแหล่งที่มาเหล่านี้ตรวจสอบสิ่งที่ค้นหาภายในช่องค้นหา",
"add": "เพิ่มช่องค้นหาแหล่งที่มา",
"addGeocoder": "เพิ่มเครื่องมือระบุพิกัดจากชื่อสถานที่",
"geocode... |
exports.notEmpty = name => {
return v => {
if (!v || v.trim === '') {
return `${name} is required`
} else {
return true
}
}
}
|
# Generated by Django 3.1.1 on 2020-09-06 19:52
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('finder', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='course',
name='description',
... |
/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined... |
#!/usr/bin/python
########################################################################################################################
#
# Copyright (c) 2014, Regents of the University of California
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permi... |
/////////////////////////////////////////////////////////////////////////
////////////////////// SETTING UP THE VISUALISATION /////////////////////
/////////////////////////////////////////////////////////////////////////
const MARGIN = { LEFT: 90, RIGHT: 100, TOP: 70, BOTTOM: 100 };
const WIDTH = 1200 - MARGIN.LEFT -... |
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 3.3.0
build: 3167
*/
YUI.add("lang/datatype-date-format_fr-FR",function(a){a.Intl.add("datatype-date-format","fr-FR",{"a":["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],"... |
import React from 'react';
import ToolForm from 'components/Tool/ToolForm';
import ToolInput from 'components/Tool/ToolInput';
import messages from './messages';
import commonMessages from '../../messages';
const FormObject = props => {
const { handleSubmit, intl } = props;
const FormData = [
{
id: 'qu... |
/*
AngularJS v1.5.7
(c) 2010-2016 Google, Inc. http://angularjs.org
License: MIT
*/
(function(E){'use strict';function O(a){return function(){var b=arguments[0],d;d="["+(a?a+":":"")+b+"] http://errors.angularjs.org/1.5.7/"+(a?a+"/":"")+b;for(b=1;b<arguments.length;b++){d=d+(1==b?"?":"&")+"p"+(b-1)+"=";var c=encodeUR... |
// Download the Node helper library from twilio.com/docs/node/install
// These are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const params = {
startDate: '2015-04-01T00:00:00Z',
endDate: '2015-04-30T... |
import movies
const http = require("http");
const server = http.createServer((req, res) => {
if (req.url === "/") {
res.write("ggg");
res.end();
}
if (req.url === "/movies") {
res.write(JSON.stringify([1, 2, 3]));
res.end();
}
});
server.listen(3001);
console.log("Listening on port 3001");
|
# Python新手入门学习常见错误
# 0
# project interpreter没有设定为python3
spam = 42
# 1
# 忘记在 if , elif , else , for , while , class ,def 声明末尾添加' :'
# if spam == 42:
# print('Forget colon')
# SyntaxError :invalid syntax
# 2
# 使用 = 而不是 ==
# = 是赋值操作符而 == 是等于比较操作。
#
# if spam == 42:
# print('Hello')
#
# while spam = 42:
# print... |
exports.name = 'Dynamic Sampling';
exports.version = '0.1';
exports.group = 'Standard';
const { Expression } = C.expr;
const cLogger = C.util.getLogger('func:dynamic_sampling');
const DEFAULT_PERIOD_SECS = 30;
const DEFAULT_MIN_EVENTS = 30;
const DEFAULT_MAX_SAMPLE_RATE = 100;
const SAMPLE_MODES = { NONE: 0, LOG: 1, ... |
!function(e,t){"use strict";function n(e,t){for(var n,i=[],r=0;r<e.length;++r){if(n=o[e[r]]||a(e[r]),!n)throw"module definition dependecy not found: "+e[r];i.push(n)}t.apply(null,i)}function i(e,i,a){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(i===t)throw"invalid... |
/* eslint-disable no-unused-vars */
const dotenv = require('dotenv').config();
const config = require('config');
const chalk = require('chalk');
const { checkEnvVars } = require('./helpers/appHelpers');
// Check required environment vars
const { env } = process;
if (checkEnvVars(env) === true) {
console.log(chalk.bo... |
!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate"],a):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"Medan ini diperlukan.",remote:"Sila betulkan medan ini.",email:"Sila masukkan alamat emel yang betul.",url:"Sila masukkan URL yang betul.",date:"Sila masukkan tari... |
# 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 the Li... |
import * as actions from '@/store/tasks/actions';
import { storeWithThunk } from './../../utils';
describe('updateTask', () => {
test('returns TaskUpdated', () => {
const expected = { type: 'TASK_UPDATE', payload: {} };
expect(actions.updateTask({})).toEqual(expected);
});
});
describe('createTaskPR', (... |
/*
* 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 turtle
def draw_art():
window = turtle.Screen()
window.bgcolor("yellow")
brad = turtle.Turtle()
brad.shape("turtle")
# brad.color("red")
brad.speed(2)
brad.color("yellow")
brad.right(90)
brad.right(90)
brad.forward(250)
brad.right(90)
brad.color("red"... |
import React, { Component } from 'react';
import * as R from 'ramda';
import { withStyles } from '@material-ui/core/styles';
import Grid from '@material-ui/core/Grid';
import { KeyboardDatePicker } from '@material-ui/pickers';
import Autocomplete from '@material-ui/lab/Autocomplete';
import TextField from '@material-ui... |
#!/usr/bin/env python
"""Base classes and routines used by all end to end tests."""
from __future__ import absolute_import
import abc
import io
import logging
import time
from future.utils import with_metaclass
import unittest
from grr_api_client import errors
from grr_response_core.lib import flags
flags.DEFINE_... |
/*
* Token History API
* # Introduction Token History API allows users to search for information and transfer records on KLAY, FT (KIP-7, Labeled ERC-20), and NFT (KIP-17, Labeled ERC-721) tokens. You can use Token History API to check the records of a specific EOA transferring KLAY, retrieve NFT information, or oth... |
/* @module to-float32 */
'use strict'
module.exports = float32
module.exports.float32 =
module.exports.float = float32
module.exports.fract32 =
module.exports.fract = fract32
var narr = new Float32Array(1)
// Returns fractional part of float32 array
function fract32 (arr, fract) {
if (arr.length) {
if (arr insta... |
import csv
import os
import json
from string import join
from product_spiders.items import Product, ProductLoaderWithNameStrip as ProductLoader
from scrapy.spider import BaseSpider
from scrapy.selector import HtmlXPathSelector
HERE = os.path.abspath(os.path.dirname(__file__))
class Bosch (BaseSpider):
base_url... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[44],{139:function(e,r,t){var a={"./bash":123,"./bash.js":123,"./css":124,"./css.js":124,"./htmlbars":125,"./htmlbars.js":125,"./javascript":126,"./javascript.js":126,"./scss":127,"./scss.js":127,"./typescript":128,"./typescript.js":128};function s(e){var r=n(e);retur... |
window.onload = function(){
console.log('start page...');
const upload = document.querySelector('#upload');
upload.onchange = function(){
const imgDiv = document.querySelector('#img-div');
const imgObj = imgDiv.querySelectorAll('img')[0];
if(this.files.length > 0){
document.querySelector('#upload-name').val... |
from .githubconnector import GithubConnector
from .config import *
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return "To create PR add repository name after '/' for example '/DiscordCodeReviewBot/TestRepo'"
@app.route('/<username>/<repository>', methods=['GET'])
def create_pr(us... |
'use strict';
angular.module('myApp')
.directive('viewinfotimesheet', viewinfotimesheet)
.controller('timesheetController', timesheetController);
timesheetController.$inject = ['$scope', 'dataTimesheetFactory', '$filter'];
function timesheetController($scope, dataTimesheetFactory, $filter) {
$scope.times... |
/*Funções parametrizadas - calculaValorDevido 2
Depois de nossa consultoria, a lavanderia DigitalLaundry percebeu que poderia deixar a sua cobrança mais sofisticada e justa.
Ela decidiu cobrar R$10,00 fixo, a título de taxa de serviço (independente da quantidade de roupa), mais R$ 3,00 por quilo de roupa suja.
Reescr... |
export const GET_ERRORS = "GET_ERRORS";
export const SET_CURRENT_USER = "SET_CURRENT_USER";
export const UPDATE_INPUT_VALUE = 'UPDATE_INPUT_VALUE';
export const UPDATE_BRAND_STYLE = 'UPDATE_BRAND_STYLE';
export const UPDATE_BOTTLE_SIZE = 'UPDATE_BOTTLE_SIZE';
export const CLEAR_SUGGESTIONS = 'CLEAR_SUGGESTIONS';
export... |
/**
* Copyright (c) 2008-2009
* Falko Menge
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge... |
__all__ = ["spectral_model"]
from africanus.model.spectral.spec_model import spectral_model
|
from __future__ import print_function
import os
import sys
import runpy
def _clean_env():
for k, v in os.environ.items():
if k.startswith('PYTHON'):
del os.environ[k]
def _remove_user_site(paths):
site_paths = ('site-packages', 'site-python')
def is_site_path(path):
for p i... |
/**
* @fileoverview added by tsickle
* Generated from: scroll/public-api.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @license
* Copyright Alibaba.com All Rights Reserved.
*
* Use of this source code is governed ... |
from ...Logging import PI_CORE_ASSERT
from ...Renderer import Framebuffer, Texture2D, RenderCommand
from ...Core.Constants import *
from OpenGL.GL import *
class OpenGLFramebuffer(Framebuffer):
__Specs: Framebuffer.Specs
__RendererID: int
__ColorAttachment : Texture2D
__DepthAttachment : Texture2D
... |
class Particle {
constructor(x, y, exploded){
this.exploded = exploded;
this.pos = createVector(x, y);
this.acc = createVector(0, 0);
this.lifespan = 255;
if(this.exploded){
this.vel = createVector(0, random(-60, -30));
}
else {
this.vel = p5.Vector.random2D();
this.vel.... |
// pre-acquire SharedLock for a given pid
function acquireLockForPid(lock, pid) {
lock.storage.setItem(lock.storageKey + ':X', pid);
lock.storage.setItem(lock.storageKey + ':Y', pid);
}
export { acquireLockForPid };
|
# =============================================================================
# asr9k
#
# Copyright (c) 2016, Cisco Systems
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions o... |
'use strict';
/*<replacement>*/
var processNextTick = require('process-nextick-args').nextTick;
/*</replacement>*/
// undocumented cb() API, needed for core, not for public API
function destroy(err, cb) {
var _this = this;
var readableDestroyed = this._readableState && this._readableState.destroyed;
... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Author: Xiaoy LI
# Last update: 2019.04.23
# First create: 2019.04.23
# Description:
# bert_tagger.py
import os
import sys
root_path = "/".join(os.path.realpath(__file__).split("/")[:-2])
if root_path not in sys.path:
sys.path.insert(0, root_path)
im... |
module.exports = {
extends: [
'eslint-config-qiwi',
'prettier',
],
rules: {
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/ban-types': 'off',
'no-unused-expressions': 'off',
'no-void': 'off',
'unicorn/no-null': 'off',
... |
$(document).ready(function(){
$("#myAirTimePlayer").jPlayer({
ready: function (event) {
$(this).jPlayer("setMedia", {
title: "Bubble",
m4a: "http://stream1.itacafm.com:8000/stream1",
oga: "http://stream1.itacafm.com:8000/stream1"
});
},
swfPath: "dist/jplayer",
supplied: "m4a, oga",
wmode:... |
'use strict';
var Range = require('./internal/Range'),
defineOnPrototype = require('../common/internal/defineOnPrototype');
defineOnPrototype(Range, {
'contains': function(el) {
if (el == null) return false;
if (el.start && el.end) {
return el.start >= this.start && el.start <= this.end &&
... |
import pika_wrapper
import trapum_pipeline_wrapper
from trapum_pipeline_wrapper import TrapumPipelineWrapper
import optparse
from sqlalchemy.pool import NullPool
import subprocess
import logging
import parseheader
import lxml
from pymongo import MongoClient
from xmljson import parker
import os
import math
import numpy ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# pyvows testing engine
# https://github.com/heynemann/pyvows
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2013 Richard Lupton r.lupton@gmail.com
from pyvows import Vows, expect
from pyvows.reporting import VowsDefaul... |
var charwise = require('charwise')
var dbRange = require('./src/dbRange')
var encode = require('encoding-down')
var levelup = require('levelup')
var memdown = require('memdown')
var test = require('ava')
var Transactor = require('./')
function mkDB () {
return levelup(encode(memdown(), {
keyEncoding: charwise,
... |
var cloud_datasets = {};
function get_cloud_data(corpus, utterance_list){
var utterance_ids = utterance_list.utterance_ids;
var dataset_name = utterance_list.dataset_name;
return $.Deferred( function( defer ) {
send = {};
send.dataset = corpus;
send.utterances = utterance_ids;
$.ajax... |
var fetchService = ngApp.factory('fetchService',['$http', function($http){
var urlBase = '/api/workspace/{0}/seed-url'; //TODO improve this url /fetch/job
var service = {};
service.generate = function(workspaceId, nResults, crawlProvider, crawlSources) {
var url = String.format(urlBase, workspaceId);
var po =... |
import Vue from 'vue'
import Router from 'vue-router'
import routes from './routers'
import iView from 'iview'
import { AuthUtil } from '@/utils'
import { LOGIN_PAGE_NAME } from '@/constants/common'
Vue.use(Router)
const router = new Router({
routes,
mode: 'history'
})
let isInit = true
router.beforeEach(async (to... |
#!/usr/bin/env python
# Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
# Copyright [2016-2019] EMBL-European Bioinformatics Institute
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Licens... |
import React from 'react';
import { Autocomplete } from '../source/components/Autocomplete';
import { mountInSimpleTheme } from './helpers/theming';
const MNEMONIC_WORDS = [
'home',
'cat',
'dog',
'fish',
'hide',
'hover',
'duck',
'category',
'join',
'paper',
'box',
'tab'
];
const ABC_SORTED_MN... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Produto = void 0;
class Produto {
constructor(codigo, nome, preco) {
this.codigo = codigo;
this.nome = nome;
this.preco = preco;
}
}
exports.Produto = Produto;
//# sourceMappingURL=produto.mod... |
module.exports = db
var mongoose = require('mongoose')
var debug = require('debug')('meanstackjs:db')
function db (self) {
// Connect to MongoDb
mongoose.Promise = global.Promise
mongoose.set('debug', self.settings.mongodb.debug)
mongoose.connect(self.settings.mongodb.uri, self.settings.mongodb.options)
mongoo... |
/**
* Module dependencies.
*/
var mongoose = require('../../lib'),
Schema = mongoose.Schema;
/**
* Schema definition
*/
// recursive embedded-document schema
var Comment = new Schema();
Comment.add({
title: {
type: String,
index: true
},
date: Date,
body: String,
comments: [Comment]
});
... |
import { put, select, takeEvery, take, fork, cancel } from 'redux-saga/effects';
import { push, LOCATION_CHANGE } from 'connected-react-router';
import isArray from 'lodash/isArray';
import map from 'lodash/map';
import get from 'lodash/get';
import toPairs from 'lodash/toPairs';
import flow from 'lodash/flow';
import ... |
import codecs
import os
import collections
from six.moves import cPickle
import numpy as np
import tensorflow as tf
class TextLoader():
def __init__(self, data_dir, file_list, batch_size, seq_length, cid_num, encoding=None):
self.data_dir = data_dir
self.batch_size = batch_size
self.seq_le... |
module.exports = (() => {
// Main paths
const SOURCE_PATH = './src/nhsd';
const DIST_PATH = './dist';
const PACKAGE_PATH = './package';
// Route config
const PATHS = {
src: {
root: SOURCE_PATH,
assets: `${SOURCE_PATH}/assets`,
images: `${SOURCE_PATH}/assets/images`,
scss: `${SOU... |
macDetailCallback("245cbf000000/24",[{"d":"2016-06-29","t":"add","a":"Future of China Electronics Science & Technology Beijing Changping District CN 102200","c":"CN","o":"NCSE"}]);
|
OC.L10N.register(
"files_versions",
{
"Could not revert: %s" : "Impossible de restaurer %s",
"Versions" : "Versions",
"Failed to revert {file} to revision {timestamp}." : "Échec du retour du fichier {file} à la révision {timestamp}.",
"More versions..." : "Plus de versions...",
"No other ver... |
/**
* The MIT License (MIT)
*
* Copyright (c) 2018-2019 Mickael Jeanroy
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
... |
var Plotly = require('@lib/index');
var Funnel = require('@src/traces/funnel');
var Lib = require('@src/lib');
var Plots = require('@src/plots/plots');
var Drawing = require('@src/components/drawing');
var Axes = require('@src/plots/cartesian/axes');
var createGraphDiv = require('../assets/create_graph_div');
var de... |
'use strict';
import isBoolean from '@valkyriestudios/utils/boolean/is';
export default function vBoolean (val, equals = null) {
return (isBoolean(val) && (equals !== null))
? (!!val === !!equals)
: isBoolean(val);
}
|
//>>built
define("dojo/cldr/nls/fr/hebrew",{"days-standAlone-short":"dim. lun. mar. mer. jeu. ven. sam.".split(" "),"field-second-relative+0":"maintenant","field-weekday":"jour de la semaine","field-wed-relative+0":"ce mercredi","field-wed-relative+1":"mercredi prochain","dateFormatItem-GyMMMEd":"E d MMM y G","dateForm... |
class BaseModel {
constructor(data, message) {
if (typeof data === "string") {
this.message = data;
data = null;
message = null;
}
if (data) {
this.data = data;
}
if (message) {
this.message = message;
}
}
}
class SuccessModel extends BaseModel {
constructor(... |
function start() {
var eim = cm.getDisconnected("Dragon_Nest");
if (eim != null && cm.getPlayer().getParty() != null) { //only skip if not null
eim.registerPlayer(cm.getPlayer());
}
if (cm.getPlayer().getParty() == null || !cm.isLeader()) {
cm.sendOk("The leader of the party must be here... |
/*
* @lc app=leetcode.cn id=717 lang=javascript
*
* [717] 1比特与2比特字符
*/
// @lc code=start
/**
* @param {number[]} bits
* @return {boolean}
*/
var isOneBitCharacter = function(bits) {
let i = 0
for(; i < bits.length-1; i++){
if(bits[i]===1)i++;
}
return i===bits.length-1;
... |
import PropTypes from 'prop-types';
import React from 'react';
import styled from 'styled-components'
const TreeViewChildren = styled.div`
padding-left: 10px;
margin-bottom: 10px;
`
class TreeView extends React.Component {
state = { collapsed: this.props.defaultCollapsed }
toggleCollapsed = () => {
thi... |
from typing import Union
from .color import Color
from .console import Console, ConsoleOptions, RenderResult
from .jupyter import JupyterMixin
from .measure import Measurement
from .segment import Segment
from .style import Style
# There are left-aligned characters for 1/8 to 7/8, but
# the right-aligned characters e... |
tinyMCE.addI18n('ka.modxlink_dlg',{
title:"\u10D1\u10DB\u10E3\u10DA\u10D8\u10E1 \u10DE\u10D0\u10E0\u10D0\u10DB\u10D4\u10E2\u10E0\u10D4\u10D1\u10D8",
url:"\u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
target:"\u10DB\u10D8\u10D6\u10D0\u10DC\u10D8",
titlefield:"\u10E1\u10D0\u10D7\u10D0\u10E3\u10E0\u10D8",
is_em... |
describe('GeoPoint', function() {
describe('geoPoint.distanceTo(geoPoint, options)', function() {
it('Get the distance to another `GeoPoint`', function() {
var here = new GeoPoint({lat: 10, lng: 10});
var there = new GeoPoint({lat: 5, lng: 5});
var distance = here.distanceTo(there, {type: 'meter... |
export default [
{ value: 0, label: '待移交' },
{ value: 1, label: '已移交' }
]
|
from django.conf.urls import url, include
from django.utils.translation import ugettext_lazy as _
from . import views
urlpatterns = [
url(
regex=_(r'^institution-(?P<epuap_id>[\w_-]+)/$'),
view=views.InstitutionDetailView.as_view(),
name='details'
),
url(
regex=_(r'^search... |