text stringlengths 3 1.05M |
|---|
/**
* Copyright (c) 2008-2011 The Open Planning Project
*
* Published under the BSD license.
* See https://github.com/opengeo/gxp/raw/master/license.txt for the full text
* of the license.
*/
/** api: (define)
* module = gxp.form
* class = FontComboBox
* base_link = `Ext.form.ComboBox <http://e... |
// This wrapper was auto-generated.
define(["goog"], function (goog) {
// Copyright 2005 The Closure Library Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at... |
let handler = async (m, { conn }) => {
conn.reply(m.chat, `
*DAFTAR HASH*
\`\`\`
${Object.entries(global.db.data.sticker).map(([key, value], index) => `${index + 1}. ${value.locked ? `(Terkunci) ${key}` : key} : ${value.text}`).join('\n')}
\`\`\`
`.trim(), null, {
mentions: Object.values(global.db.da... |
const test = require('ava')
const { geom2, geom3, path2 } = require('../../geometry')
const { line, rectangle, cuboid } = require('../../primitives')
const { measureArea } = require('./index')
test('measureArea: single objects', (t) => {
let aline = line([[10, 10], [15, 15]])
let arect = rectangle()
let acube... |
function autocorrect(input) {
return input.replace(/\b(u|you+)\b/ig, "your sister");
} |
import { combineReducers } from 'redux';
var wordlist = []
var imageList = []
for (let index = 0; index < 10; index++) {
wordlist.push({ word: "loading...", frequency: 0, translations: ['loading...', 'loading...'] });
imageList.push("../sass/images/no-image.png");
}
var initStages = []
for (let i = 0; i < 200;... |
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you m... |
var searchData=
[
['deallocatable_108',['deallocatable',['../classg24__lib_1_1carried__bool__vector.html#adf9039048c26251683657f1347bbc45d',1,'g24_lib::carried_bool_vector::deallocatable()'],['../classg24__lib_1_1managed__object.html#a9478fefed7e71e74c01248a999834945',1,'g24_lib::managed_object::deallocatable()'],['.... |
// Aula 16 - Arrow function, Callback e Javadoc
// 1. Arrow Function
var ArrowFunction = require('./modulos/arrow-function');
var Callback = require('./modulos/callback');
console.log('Arrow Function');
console.log('Um parametro:', ArrowFunction.temIdadeParaBeber(17));
console.log('Sem parametro:', ArrowFunction.pe... |
import json
from calculator import Calculator
class StateInputPair(object):
def __init__(self, state, input):
self.input = input
self.state = None
if state != None:
self.state = Calculator(state['stack'], state['display'],
state['is_operator_... |
import keras_applications
|
import React from 'react'
import BelieverForm from '../BelieverForm'
import { Header, Image, Segment, Grid, Container } from 'semantic-ui-react'
const FormBackground = () => (
<div>
<Grid columns={3}>
<Grid.Column width={7} textAlign='centered'>
<Header as='h2'>
<p style={{ marginTop:'1.5em', mar... |
import '@pollyjs-tests/helpers/global-fetch';
import { Polly } from '@pollyjs/core';
import pollyConfig from '../../utils/polly-config';
describe('Integration | Jest | Fetch', function() {
let polly;
beforeEach(() => {
polly = new Polly('Integration | Jest | Fetch', pollyConfig);
});
afterEach(async ()... |
import React, { Component } from 'react';
import { render } from 'react-dom';
import css from './multi-select-input.module.css';
/*
This components adds style to the default `select`.
@params
name: input name.
onChange: onChange event handler.
value: value of the input. Optional.
color: color of the backg... |
import PageSerializer from '@apps/websites/serializers/page_serializer'
import Website from '@apps/websites/models/website'
import Alias from '@apps/websites/models/alias'
import Page from '@apps/websites/models/page'
const showRoute = async (req, res) => {
const website = await Website.query(qb => {
qb.where('... |
const Employee = require("./Employee");
class Engineer extends Employee {
constructor(name, id, email, task, githubName) {
super(name, id, email, task);
this.githubName = githubName;
this.role = "Engineer";
}
getgithubName() {
return this.githubName;
}
getRole() {
return this.role;
}
}
... |
'use strict';
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
function _asyncToGenerator(fn) { retur... |
/*
* Backpack - Skyscanner's Design System
*
* Copyright 2016-2021 Skyscanner Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
... |
# Copyright (C) 2019 The Electrum developers
# Distributed under the MIT software license, see the accompanying
# file LICENCE or http://www.opensource.org/licenses/mit-license.php
import logging
import datetime
import sys
import pathlib
import os
import platform
from typing import Optional
import copy
class LogForm... |
var Cluster = require('./cluster.js');
require('./cluster_search.js');
var wmu = require('./utils.js');
var Point = require('./point.js');
var Line = require('./line.js');
var Markers = function(map, options) {
var self = this;
this._visibleClusters = [];
this._visibleConnections = [];
this._keepKey =... |
SETTINGS_SQL_HOST="localhost"
SETTINGS_SQL_USER="username"
SETTINGS_SQL_PASSWORD="password"
SETTINGS_SQL_DB="dbname"
SETTINGS_S3_BUCKET="wordpressbucket-staging"
|
import { LOAD_ALL_COMICS, FILTER_COMICS, SELECT_COMIC } from './actionsTypes';
import MarvelApI from '../../services/MarvelApi';
import Adapter from '../../services/Adapter';
export const loadAllComics = (page, order = '') => async (dispatch, getState) => {
callApiAction({ page: page, orderBy: order }, LOAD_ALL_COMI... |
module.exports = async function (db, { proffyValue, classValue, classScheduleValues }) {
const insertedProffy = await db.run(`
INSERT INTO proffys (
name,
avatar,
whatsapp,
bio
) VALUES (
"${proffyValue.name}",
"${proff... |
const Discord = require("discord.js");
config = require("./config");
Enmap = require("enmap");
const client = new Discord.Client({
allowedMentions: {
parse: ["roles", "users"],
repliedUser: false,
},
partials: ['MESSAGE', 'CHANNEL'],
intents: [
Discord.Intents.FLAGS.GUILDS,
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
The commands that can be executed in the Poseidon shell.
Created on 18 January 2019
@author: Charlie Lewis
"""
import json
from poseidon.helpers.config import Config
from poseidon.main import SDNConnect
class Commands:
def __init__(self):
self.states = ... |
import HSAbstractObserver from "./abstract";
export default class HSHeaderMomentShowHideObserver extends HSAbstractObserver {
constructor(element) {
super(element);
this.dataSettings = this.element.hasAttribute('data-hs-header-options') ? JSON.parse(this.element.getAttribute('data-hs-header-options')) : {};
}
... |
/**
* Implement Gatsby's Node APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/node-apis/
*/
// You can delete this file if you're not using it
const path = require("path")
const { createFilePath } = require(`gatsby-source-filesystem`)
exports.onCreateNode = ({ node, getNode, actions }) => {
const { cr... |
const HtmlWebpackPlugin = require('html-webpack-plugin');
const common = require('./webpack.common');
const merge = require('webpack-merge');
const path = require('path');
module.exports = merge(common, {
mode: 'development',
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist')
}... |
import inspect
import sys
import numpy
import pytest
import chainer
import chainer.testing
import chainerx
class _OpTest(chainer.testing.function.FunctionTestBase):
def setup(self):
# This method can be overridden by a concrete class with arbitrary
# arguments.
pass
def teardown(se... |
import torch
import torch.nn as nn
from torch.autograd import Variable
import numpy as np
from rnncells import LSTMCell, GRUCell, RNNCell
class SimpleRNN(nn.Module):
def __init__(self, input_size, hidden_size, num_layers, bias, output_size, activation='tanh'):
super(SimpleRNN, self).__init__()
... |
$(function()
{
var bWizardTabClass = '';
$('.wizard').each(function()
{
if ($(this).is('#rootwizard'))
bWizardTabClass = 'bwizard-steps';
else
bWizardTabClass = '';
var wiz = $(this);
$(this).bootstrapWizard(
{
onNext: function(tab, navigation, index)
{
if(index==1)
... |
"""Test Match abstraction for v0x01 and v0x04."""
from unittest import TestCase
from unittest.mock import MagicMock, patch, PropertyMock
from napps.kytos.of_core.v0x01.flow import Match as Match01
from napps.kytos.of_core.v0x04.flow import Match as Match04
class TestMatch(TestCase):
"""Tests for the Match class.... |
const service = require('../../utils/service');
const config = require('../../utils/config');
const WxParse = require('../../utils/wxParse/wxParse.js');
const app = getApp();
let self;
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
self = this;
},
... |
module.exports = {
env: {
mocha: true
},
globals: {
define: true,
it: true,
expect: true,
browser: true,
$: true,
$$: true
}
};
|
const nodemailer = require('nodemailer');
exports.sendMail = function(title, htmlText, address, cb){
console.log(this)
const transporter = nodemailer.createTransport({
host: "smtp.163.com",
secureConnection: true, // use SSL
port: 465, // port
auth: {
user: 'qmx_aler... |
import argparse
import json
import os
from datetime import date
# -------------------------------------------------------------------------------
def extract_new_mirnas_from_report(report_tsv, type='new'):
"""
"""
new_mirnas = {}
fp = open(report_tsv, 'r')
count = 0
for line in fp:
... |
/**
* Carousels, like tabs, are a great way to allow the user to swipe through multiple full-screen pages.
* A Carousel shows only one of its pages at a time but allows you to swipe through with your finger.
*
* Carousels can be oriented either horizontally or vertically and are easy to configure - they just work l... |
!function(e){const a=e.sl=e.sl||{};a.dictionary=Object.assign(a.dictionary||{},{"%0 of %1":"","Align center":"Sredinska poravnava","Align left":"Poravnava levo","Align right":"Poravnava desno",Aquamarine:"Akvamarin",Big:"Veliko",Black:"Črna","Block quote":"Blokiraj citat",Blue:"Modra",Bold:"Krepko",Cancel:"Prekliči","C... |
module.exports={A:{A:{"2":"E A B fB","8":"H D G"},B:{"2":"1 C p J L N I"},C:{"2":"0 1 2 3 5 6 7 8 9 dB FB F K H D G E A B C p J L N I O P Q R S T U V W X Y Z a b d e f g h i j k l m n o M q r s t u v w x y z BB CB DB bB VB"},D:{"1":"1 3 F K H D G E A B C p J L N I O P Q R S T U V W X Y Z a b d e f g","2":"0 2 5 6 7 8 9... |
var str = "1000";
var x = 3;
console.log(str / 3); // auto detected
var a = 23.567;
console.log(Number.parseInt(a));
var b = 22;
console.log(Number.parseFloat(b));
var b = 1;
var c = 1;
d = b = c;
console.log(Boolean(d));
console.log(Boolean(''));
console.log(Boolean(null)); |
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-integer-indexed-exotic-objects-hasproperty-p
description: Return abrupt from OrdinaryHasProperty parent's [[HasProperty]]
info: |
9.4.5.2 [[HasProperty]](P)
...
... |
module.exports = {
extends: [
"stylelint-config-standard",
"stylelint-config-rational-order",
"stylelint-config-prettier",
],
plugins: [
"stylelint-order",
"stylelint-declaration-block-no-ignored-properties",
],
rules: {
"plugin/declaration-block-no-ignored-properties": true,
"comm... |
const path = require('path');
const webpack = require('webpack');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { ModuleFederationPlugin } = require('webpack').container;
const packageJso... |
import Equipments from './EquipmentTypes'
import EquipmentTypeSelect from './EquipmentTypeSelect'
export {
Equipments as default,
EquipmentTypeSelect,
}
|
import React, { Fragment, useState, useEffect } from "react";
import MetaData from "../layout/MetaData";
import { useAlert } from "react-alert";
import { useDispatch, useSelector } from "react-redux";
import { forgotPassword, clearErrors } from "../../actions/userActions";
const ForgotPassword = () => {
const... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2020 Edgewall Software
# Copyright (C) 2005-2006 Christian Boos <cboos@edgewall.org>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available... |
from numpy.testing import (assert_, assert_allclose, assert_equal, suppress_warnings)
from modpy.optimize._lsq import lsq_linear
|
module.exports = function(grunt) {
// Add the grunt-mocha-test tasks.
grunt.loadNpmTasks('grunt-mocha-test');
var config = {
mochaTest: {
yaml: {
src: 'test/read-yaml.js',
options: {
reporter: 'spec',
// captureFile: 'results.txt', // Optionally capture the reporter... |
// @flow
module.exports = function () {
'use strict'
/* INITIALIZATIONS */
// Require all modules, wrap it into a single object
const $ = require('./modules')
// store start time
const startTime = process.hrtime()
// logger funtion on command line with styling
$.log.info('Building site...')
// site... |
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
__all__ = [
"WideResNet",
"wrn",
"wrn_40_2",
"wrn_40_1",
"wrn_16_2",
"wrn_16_1"
]
class BasicBlock(nn.Module):
def __init__(self, in_planes, out_planes, stride, dropRate=0.0):
super(B... |
import React from 'react';
import Dropdown from './Dropdown';
import FontPicker from 'font-picker-react';
class Header extends React.Component {
state = {
availableGradients: [
'blue',
'seafoam',
'purple',
'orange',
'magenta',
... |
ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var DocCommentHighlightRule... |
import gulp from 'gulp';
import babel from 'gulp-babel';
import sass from 'gulp-sass';
import autoprefixer from 'gulp-autoprefixer';
import concat from 'gulp-concat';
import uglify from 'gulp-uglify';
import rename from 'gulp-rename';
import imagemin from 'gulp-imagemin';
import sourcemaps from 'gulp-sourcemaps... |
import React from 'react';
import './App.css';
import DrumMachine from './DrumMachine'
class App extends React.Component {
render() {
return (
<div className='wrapper'>
<DrumMachine />
</div>
)
}
}
export default App;
|
"""add_limiting_factor_column_to_query_model.py
Revision ID: d416d0d715cc
Revises: 19e978e1b9c3
Create Date: 2021-04-16 17:38:40.342260
"""
# revision identifiers, used by Alembic.
revision = "d416d0d715cc"
down_revision = "19e978e1b9c3"
import sqlalchemy as sa
from alembic import op
def upgrade():
with op.ba... |
class Data {
constructor(size, dataSource) {
this.size = size || 2000;
this.datas = [];
this.dataList = dataSource;
}
dataModel(index) {
return this.dataList[index];
}
getObjectAt(index) {
if (index < 0 || index > this.size) {
return undefined;
}
if (this.datas[index] ==... |
"""Base Module."""
from abc import ABC, abstractmethod
from typing import Callable, Dict, List, Optional, Union, cast
from eth_account.account import LocalAccount
from thirdweb_web3 import Web3
from thirdweb_web3.types import TxReceipt
from zero_ex.contract_wrappers import TxParams
import json
from ..abi.coin import ... |
"""
With these settings, tests run faster.
"""
from .base import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY = env(
"DJANGO_SECRET_KEY",
default="TkAUQWFyX... |
import axios from 'axios'
import * as constants from './constants'
const changeLogin = () => ({
type: constants.CHANGE_LOGIN,
value: true
})
export const logout = () => ({
type: constants.LOGOUT,
value: false
})
export const login = (accout, password) => {
return dispatch => {
axios
.get(`/api/lo... |
// original git setup:
// origin https://github.com/LevelAds/Greens.git (fetch)
// origin https://github.com/LevelAds/Greens.git (push)
import { globals } from './config.js';
import { validate } from './validation.js';
import { storage } from './crud.js';
import { locale } from './locale.js';
import { util } from './u... |
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var collection_1 = require('angular2/src/facade/... |
(function() {
var identifier = '[Intercom]:';
window.__IntercomBooted = false;
var onBootEvents = [];
var log = function () {
Array.prototype.unshift.call(arguments, identifier);
console.log.apply(this, arguments);
}
window.__trackIntercomEvent = function (type, data) {
if (window.__IntercomBoo... |
import React from 'react';
import {shallow} from 'enzyme';
import Currency from './Currency';
import helper from '../../../../../../tests/helper';
const {expect} = helper;
describe('Currency component', () => {
it('renders correct currency symbol', () => {
expect(shallow(<Currency code="GBP"/>).text()).to.equal... |
# system
import numpy as np
import copy
# director
from director import transformUtils
import director.vtkAll as vtk
# spartan
import spartan.utils.utils as spartanUtils
import spartan.utils.ros_utils as rosUtils
import spartan.utils.director_utils as director_utils
import spartan.utils.control_utils as control_utils... |
!function(a,b){function c(a){var b=a.length,c=ib.type(a);return ib.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||"function"!==c&&(0===b||"number"==typeof b&&b>0&&b-1 in a)}function d(a){var b=xb[a]={};return ib.each(a.match(kb)||[],function(a,c){b[c]=!0}),b}function e(a,c,d,e){if(ib.acceptData(a)){var f,g,h=ib.expan... |
'use strict';
var lint = require('./_lint');
describe('function name format - scss', function () {
var file = lint.file('function-name-format.scss');
it('[convention: hyphenatedlowercase]', function (done) {
lint.test(file, {
'function-name-format': 1
}, function (data) {
lint.assert.equal(15... |
'use strict'
const _ = require('lodash')
const envVars = _.pick(process.env, [
'LMS_DEPLOY_TARGET',
'LMS_GITHUB_CLIENT_ID',
'LMS_ROLLBAR_CLIENT_ID',
'LMS_HOST',
'LMS_GATEKEEPER_URL',
])
module.exports = function (environment) {
const ENV = {
modulePrefix : 'lolma-us',
podModulePrefix : 'lolm... |
const Sequelize = require('sequelize')
const db = require('../db')
const Words_InEmail = db.define('words_inemail', {
wordId: {
type: Sequelize.INTEGER
},
emailId: {
type: Sequelize.INTEGER
},
userId: {
type: Sequelize.INTEGER
},
count: {
type: Sequelize.INTEGER
}
})
module.exports = Wo... |
// nodejs fs
var fs = require('fs');
/**
*
* file manager
*
* @returns {fileManagerConstructor}
*/
var fileManager = function fileManagerConstructor() {
};
/**
*
* check if the file exists
*
* @param {type} file
* @param {type} callback
* @returns {undefined}
*/
fileManager.prototype.exists = fun... |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "common.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
|
/**
* @license Highcharts JS v7.2.0 (2019-09-03)
*
* Accessibility module
*
* (c) 2010-2019 Highsoft AS
* Author: Oystein Moseng
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
m... |
/**
* Created by jbarron on 2/22/16.
*/
/**
* **************** ciudadesController ***********
*/
moduleCatalogos.controller('ciudadesController',['$scope','$http',function($scope,$http){
$scope.estadosApi = [];
$scope.data={};
$scope.regiones={};
$scope.nombreEstado ='';
//funcion para mos... |
export default function () {
this.playing = true
this.fadeIn = 0
this.fadeOut = 0
this.start = 1
this.end = 0
this.duration = 1000
this.interval = 200
this.speed = 300
this.blendMode = 'source-over'
this.rangeX = 0
this.rangeY = 0
this.rangeZ = 0
this.gravityScale = 1
this.de... |
def fatorial(num, show=False):
"""
-> Calcula o fatorial de um número
:param num: O número a ser calculado
:param show: (opcional) Mostrar ou não a conta
:return: O valor do fatorial de um número n
"""
f = 1
for c in range(num, 0, -1):
if show:
print(c, end='')
... |
'use strict';
// Production steps of ECMA-262, Edition 5, 15.4.4.18
// Reference: http://es5.github.io/#x15.4.4.18
if (!Array.prototype.forEach) {
Array.prototype.forEach = function(callback/*, thisArg*/) {
var T, k;
if (this == null) {
throw new TypeError('this is null or not defined');
}
... |
'use strict';
const DEPRECATED_RULES = require('../helpers/deprecated-rules');
const Scope = require('./internal/scope');
// Constant to return from AST handlers so we know to remove/unregister them
const REMOVE_HANDLER = {};
// If we need to log an error or warning about an instruction node (e.g. syntax
// error), ... |
var badRequestUrl = 'https://api.github.com/orgs/nodejs/oreps';
var responseText = document.getElementById('response-text');
function getApi(requestUrl) {
fetch(requestUrl)
.then(function (response) {
console.log(response.status);
// Conditional for the the response.status.
if (response.statu... |
module.exports.all = (req,res) => {
console.log('in all handler')
res.json({req,res})
}
|
$wnd.jsme.runAsyncCallback1('var QZ={10:1,89:1,93:1,104:1},RZ=" ",SZ=" 1",TZ=" 2",UZ=" 3",VZ=" 0",WZ=" 1",XZ=" 2",YZ="Assignment of aromatic double bonds failed";function ZZ(a,b){var c,d,e,f;1==a.d.B[b]&&(iR(a.d,b,2),a.e+=2);for(e=0;2>e;++e){c=W(a.d,e,b);for(f=0;f<a.d.f[c];++f)d=NP(a.d,c,f),a.c[d]&&(a.c[d]=!... |
# Copyright 2020 The AutoKeras 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 applicable law or agreed to i... |
# source: http://stackoverflow.com/questions/2758159/how-to-embed-a-python-interpreter-in-a-pyqt-widget
import sys, os, re
import traceback, platform
from PyQt4 import QtCore
from PyQt4 import QtGui
from reddelectrum import util
if platform.system() == 'Windows':
MONOSPACE_FONT = 'Lucida Console'
elif platform.s... |
#!/usr/bin/python
# Copyright (c) 2020, 2022 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... |
/**
* @author Deepak Tiwari [ Emp Id: U43779 ]
* @description
*
* DateTime utility class that spits out UTC timestamp strings usually used in a reporting, print-capable process.
*/
(function ()
{
"use strict";
/**
* Register the class with RequireJS.
*/
define([], function ()
{
... |
module.exports = function inet_ntop (a) { // eslint-disable-line camelcase
// discuss at: https://locutus.io/php/inet_ntop/
// original by: Theriault (https://github.com/Theriault)
// example 1: inet_ntop('\x7F\x00\x00\x01')
// returns 1: '127.0.0.1'
// _example 2: inet_ntop('\0\0\0\0\0\0\0\0\0\0\0\0\0... |
"""Test cases for testing hosting services."""
from __future__ import unicode_literals
import io
import json
from contextlib import contextmanager
from django.utils import six
from django.utils.six.moves.urllib.error import HTTPError
from django.utils.six.moves.urllib.parse import urlparse
from kgb import SpyAgency
... |
/**
* Each section of the site has its own module. It probably also has
* submodules, though this boilerplate is too simple to demonstrate it. Within
* `src/app/home`, however, could exist several additional folders representing
* additional modules that would then be listed as dependencies of this one.
* For exam... |
exports.seed = function (knex) {
return knex('users')
.truncate()
.then(function () {
// Inserts seed entries
return knex('users').insert([
{ id: 1, username: 'user', password: 'password' },
{ id: 2, username: 'user2', password: 'password' },
{ id: 3, username: 'user3', pas... |
# Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2015-Present Datadog, Inc
import warnings
from functools import wraps
def deprecated(message):
def depreca... |
"""
Helper classes for encoding sequences.
"""
import tensorflow as tf
from dgm4nlp.tf.utils import add_timing_signal
from dgm4nlp.tf.tri import fill_triangular
from dgm4nlp.tf.utils import dense, get_nonlinearity
def dynamic_rnn_scope_name(dropout=0., variational_recurrent=False):
"""
Use this to mark param... |
/** A divider in the list.
Events:
None
Attributes:
None
Private Attributes:
_labelView
*/
af.DividerView = new JS.Class('DividerView', myt.View, {
include:[myt.Reusable],
// Life Cycle //////////////////////////////////////////////////... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var react = require('react');
var tabbable = require('./tabbable.js');
var scopeTab = require('./scope-tab.js');
var createAriaHider = require('./create-aria-hider.js');
function useFocusTrap(active = true) {
const ref = react.useRef();
... |
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
// flow-typed signature: 195cec6dc98ab7533f0eb927ee493f99
// flow-typed version: 1a6d5d1968/mocha_v8.x.x/flow_>=v0.104.x
declare interface $npm$mocha$SetupOptions {
slow?: number;
timeout?: number;
ui?: string;
globals?: Array<any>;
reporter?: any;
bail?: boolean;
ignoreLeaks?: boolean;
grep?: any;
}
... |
"""NEOs orbit from NEOWS and JPL SBDB
"""
import re
import astropy.units as u
import requests
from astropy.time import Time
from bs4 import BeautifulSoup
from poliastro.bodies import Sun
from poliastro.frames import Planes
from poliastro.twobody.angles import M_to_nu
from poliastro.twobody.orbit import Orbit
# Base... |
import { useState } from "react";
//usecallback, changes w F on each function (maybe?)
export function useFilters({ initialFilters = [] }) {
const [activeFilters, setActiveFilters] = useState(initialFilters);
function toggle(f) {
if (activeFilters.includes(f)) {
console.log(f);
setActiveFilters(ac... |
#!/usr/bin/env python
# polarizer.py - add Drude oscillators to LAMMPS data file.
# Agilio Padua <agilio.padua@univ-bpclermont.fr>
# Alain Dequidt <alain.dequidt@univ-bpclermont.fr>
# version 2017/02/08
import sys
import argparse
import random
from copy import deepcopy
usage = """Add Drude oscillators to LAMMPS data ... |
var _ = require('lodash');
var path = require('path');
var prevnextPlugin = require('antwar-prevnext-plugin');
var markdown = require('./utilities/markdown');
var highlight = require('./utilities/highlight');
module.exports = {
template: {
title: 'webpack',
description: 'webpack is a module bundler. Its main... |
/**
* @license Copyright 2017 The Lighthouse Authors. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applica... |
"""Bert Preprocessor."""
from pytorch_transformers import BertTokenizer
from . import units
from mzcn import DataPack
from mzcn.engine.base_preprocessor import BasePreprocessor
class BertPreprocessor(BasePreprocessor):
"""
Baisc preprocessor helper.
:param mode: String, supported mode can be referred
... |
import React, {Component} from 'react';
import {connect} from 'react-redux';
import List from '../../../common/components/List'
import * as actions from '../actions'
import {Actions} from 'react-native-router-flux'
const onItemClick = (character) => {
Actions.characterDetail({character})
}
const mapStateToProps = (... |