text stringlengths 3 1.05M |
|---|
module.exports = (sequelize, DataTypes) => {
const User = sequelize.define(
'user',
{
firstName: {
type: DataTypes.STRING,
allowNull: false
},
lastName: {
type: DataTypes.STRING,
allowNull: false
},
username: {
type: DataTypes.STRING,
... |
module.exports = {
semi: false,
singleQuote: true,
jsxBracketSameLine: false,
}
|
HistoryAssistant = Class.create({
backend: null,
storage: null,
initialize: function(backend, storage) {
this.backend = backend;
this.storage = storage;
},
setup : function() { ... |
(function(e){function s(s){for(var a,o,n=s[0],c=s[1],l=s[2],u=0,m=[];u<n.length;u++)o=n[u],i[o]&&m.push(i[o][0]),i[o]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);d&&d(s);while(m.length)m.shift()();return r.push.apply(r,l||[]),t()}function t(){for(var e,s=0;s<r.length;s++){for(var t=r[s],a=!0,n=1... |
const Command = require('../Command.js');
const { MessageEmbed } = require('discord.js');
const emojis = require('../../../dataJson/emojis.json');
const { oneLine } = require('common-tags');
module.exports = class ToggleTypeCommand extends Command {
constructor(client) {
super(client, {
name: 'toggletype',... |
export function calculateThreadsRatio(availableThreads, currentSecurity, minSecurity, growThreads, weakenThreads) {
if ((growThreads + weakenThreads) <= availableThreads) {
return { weakenThreads: weakenThreads, growThreads: growThreads };
}
const threadsForMinSecurity = (currentSecurity - minSecuri... |
# Some image transforms
from PIL import Image, ImageOps, ImageFilter, ImageEnhance
import numpy as np
from random import randint
# All of these need to be called on PIL imagez
class SquarePad(object):
def __call__(self, img):
w, h = img.size
img_padded = ImageOps.expand(img, border=(0, 0... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const fs_1 = __importDefault(require("fs"));
const loglevel_1 = __importDefault(require("loglevel"));
co... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require('fs');
const store_1 = require("../../../store");
const actions_1 = require("../actions");
const utils_1 = require("../../../utils");
exports.deleteEffect = store_1.default
.effect((state, { type, payload: { branch, modu... |
import React from 'react';
import styled from '@emotion/styled';
import { gsap } from 'gsap';
const SVG = styled.svg`
& rect {
fill: #fff;
}
&:hover {
& .line-one {
stroke: red;
}
}
`;
const BurgerSVG = () => {
// main mobile function, gets called on hover
function moveBurger() {
... |
import os
import platform
import textwrap
import unittest
from conans.client.tools.oss import detected_os
from conans.model.info import ConanInfo
from conans.model.ref import ConanFileReference, PackageReference
from conans.paths import CONANFILE, CONANFILE_TXT, CONANINFO
from conans.test.utils.conanfile import TestCo... |
/* eslint-env node */
'use strict';
module.exports = {
name: 'ember-confirm-dialog'
};
|
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
export default function CardHeaderTitle({
centered,
children,
className,
component,
...props
}) {
const Element = component;
const classes = classNames('card-header-title', className, {
'is-centered':... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Lingvodoc documentation build configuration file, created by
# sphinx-quickstart on Thu Dec 15 08:11:36 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# ... |
// Load modules
var Http = require('http');
var Hoek = require('hoek');
// Declare internals
var internals = {};
exports.wrap = function (error, statusCode, message) {
Hoek.assert(error instanceof Error, 'Cannot wrap non-Error object');
return (error.isBoom ? error : internals.initialize(error, statusCod... |
'use strict';
var inquirer = require('inquirer'),
chalk = require('chalk'),
fs = require('fs'),
// submenus
checkout = require('./checkout'),
checkin = require('./checkin'),
find = require('./find'),
list = require('./list'),
stats = require('./stats');
function checkIfRadioDataExists() {
// if ther... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.run = run;
var _compact = require('./compact');
var compactPlugin = _interopRequireWildcard(_compact);
var _serialize = require('./serialize');
var serializePlugin = _interopRequireWildcard(_serialize);
function _interopRequire... |
from flask import Flask, redirect
from flask_cors import cross_origin
from datetime import datetime, timedelta
# from urllib3 import open
import requests
import base64
import subprocess
from multiprocessing import Process
from config.strings import Strings as s
from config.templates import Templates
from utils.flask_e... |
$(function () {
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
$('#calendar-holder').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
... |
window.chartColors = {
red: 'rgb(255, 99, 132)',
orange: 'rgb(255, 159, 64)',
yellow: 'rgb(255, 205, 86)',
green: 'rgb(75, 192, 192)',
blue: 'rgb(54, 162, 235)',
purple: 'rgb(153, 102, 255)',
grey: 'rgb(201, 203, 207)'
};
(function(global) {
var Months = [
'January',
'February',
'March',
'April',
'Ma... |
/*
* 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
*... |
# The MIT License (MIT)
# Copyright (c) 2019 Ian Buttimer
# 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,... |
const express = require('express');
const { auth } = require('../');
const MemoryStore = require('memorystore')(auth);
const app = express();
app.use(
auth({
idpLogout: true,
session: {
store: new MemoryStore({
checkPeriod: 24 * 60 * 1000,
}),
},
})
);
app.get('/', (req, res) => {... |
/*
* Copyright (c) 2011 Vinay Pulim <vinay@milewise.com>
* MIT Licensed
*/
"use strict";
var Client = require('./client').Client,
Server = require('./server').Server,
HttpClient = require('./http'),
security = require('./security'),
passwordDigest = require('./utils').passwordDigest,
wsdl = require('./ws... |
module.exports={D:{"5":0.016947,"40":0.011298,"45":0.011298,"46":0.011298,"49":0.220311,"54":0.344589,"55":0.355887,"56":0.011298,"57":0.039543,"59":0.11298,"60":0.016947,"62":0.016947,"63":0.016947,"65":0.011298,"67":0.355887,"68":0.011298,"69":0.11298,"70":0.305046,"71":0.084735,"72":5.123643,"73":27.668802,"74":0.01... |
$(function() {
// Read a page's GET URL variables and return them as an associative array.
function getUrlVars() {
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for(var i = 0; i < hashes.length; i++)
{
... |
var cmap = require('./..'),
tap = require('tap');
tap.test('is object - object', function(t) {
t.plan(1);
var n = 15,
cg,
check = true;
// Display all the colormaps
var cms = ['jet', 'hsv' ,'hot', 'cool', 'spring', 'summer', 'autumn',
'winter', 'greys', 'bone', 'copper'];
... |
/**
* DevExtreme (viz/vector_map/projection.main.js)
* Version: 18.2.5
* Build date: Wed Jan 23 2019
*
* Copyright (c) 2012 - 2019 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
"use strict";
var extend = require("../../core/uti... |
"use strict";
var winston = require('winston');
var logger = new winston.Logger({
transports: [
new winston.transports.Console({
colorize: true,
level: 'debug'
})
],
// Default winston log levels are: silly, verbose, info, warn, debug,
// error. We want debug to be lower level than inf... |
import styled from "styled-components";
export const Introduction = styled.main`
height: 580px;
display: flex;
flex-direction: row;
justify-content: center;
`;
export const IntroductionPhoto = styled.img`
width: 468px;
height: 580px;
`;
export const IntroductionBox = styled.div`
width: 770px;
padding... |
function SvgArtTrackTwoTone(props) {
return (
<svg
xmlns='http://www.w3.org/2000/svg'
height='1em'
viewBox='0 0 24 24'
width='1em'
className='svg-icon'
{...props}>
<path d='M0 0h24v24H0V0z' fill='none' />
<path d='M14 7h8v2h-8zm0 4h8v2h-8zm0 4h8v2h-8zM4 17h6c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2H4c... |
/* Luxembourgish initialisation for the jQuery UI date picker plugin. */
/* Written by Michel Weimerskirch <michel@weimerskirch.net> */
( function( factory ) {
"use strict";
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [ "../widgets/datepicker" ], factory ... |
import unittest
import mock
from mock import MagicMock,patch
import os.path
import logging
import sys,os
from MockData import Emailid
import sys
from Test_Config import *
import sys, os
sys.path.append(os.path.abspath(os.path.join('..', 'extensions/')))
import extensions
sys.path.append(os.path.abspath(os.path.join('..... |
/*
* jQuery Tools 1.2.3 - The missing UI library for the Web
*
* [tabs, tabs.slideshow, tooltip, tooltip.slide, tooltip.dynamic, scrollable, scrollable.autoscroll, scrollable.navigator, overlay, overlay.apple, dateinput, rangeinput, validator, toolbox.flashembed, toolbox.history, toolbox.expose, toolbox.mousewheel]... |
function* a() {
yield* b;
}
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[59],{194:function(e,r,t){"use strict";t.r(r),t.d(r,"frontMatter",(function(){return c})),t.d(r,"metadata",(function(){return i})),t.d(r,"rightToc",(function(){return l})),t.d(r,"default",(function(){return s}));var n=t(2),o=t(9),a=(t(0),t(324)),c={id:"error",title:"T... |
$(".cell-index").flickity({
cellAlign: '',
groupCells: true,
groupCells: 3,
groupCells: '80%',
autoPlay: 'true',
pauseAutoPlayOnHover: false,
freeScroll: true,
wrapAround: true
});
|
import React from 'react';
import PropTypes from 'prop-types';
import Layout from 'components/layout';
import Box from 'components/box';
import Title from 'components/title';
import Gallery from 'components/gallery';
import Modal from 'containers/modal';
import { graphql } from 'gatsby';
const Index = ({ data }) => (
... |
/**
* Copyright IBM Corp. 2019, 2020
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*
* Code generated by @carbon/icon-build-helpers. DO NOT EDIT.
*/
import { _ as _objectWithoutProperties, I as Icon, a as _extends } from '../I... |
"""Setup for pctiler."""
from setuptools import find_packages, setup
# Runtime requirements.
inst_reqs = [
"geojson-pydantic==0.3.3",
"jinja2==3.0.3",
"pystac==1.*",
"planetary-computer==0.4.*",
"rasterio==1.2.*",
"titiler.core==0.5.*",
"titiler.mosaic==0.5.*",
# titiler-pgstac
"... |
from keras.preprocessing.image import ImageDataGenerator
from keras.models import Sequential
from keras.layers import Convolution2D, MaxPooling2D
from keras.layers import Activation, Dropout, Flatten, Dense
from keras.layers.normalization import BatchNormalization
# dimensions of our images.
img_width, img_height = 2... |
import React from 'react';
import AnimatedSection from '../../_shared/AnimatedSection';
const EducationSection = ({ sectionData }) => {
const { endDate, heading, listDescription, subHeading, startDate } = sectionData;
return (
<AnimatedSection
bottomOffset="200px"
endDate={endDate}
heading=... |
/**
* @license
* Visual Blocks Editor
*
* Copyright 2016 Massachusetts Institute of Technology
* 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://w... |
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[27],{
/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/pages/reader/home.vue?vue&type=script&lang=js&":
/*!**********************************************************************************************... |
#! /usr/bin/env python
# Copyright (c) 1999-2018 David Muse
# See the file COPYING for more information.
from SQLRelay import PySQLRClient
from decimal import *
import sys
import string
def checkSuccess(value,success):
if value==success:
print("success")
else:
print("wanted", type(success), ":", success)
pr... |
import os
import unittest
import logging
import smartbridge
from smartbridge.factory import ProviderFactory, ProviderList
import uuid
class TestLogin(unittest.TestCase):
def test_login(self):
client_cfg = {
'wyze_app_id': '9319141212m2ik',
'wyze_app_name': 'wyze',
'wyze... |
import Vue from 'vue';
import Element from 'main/index.js';
Vue.use(Element);
let id = 0;
const createElm = function() {
const elm = document.createElement('div');
elm.id = 'app' + ++id;
document.body.appendChild(elm);
return elm;
};
/**
* 回收 vm
* @param {Object} vm
*/
exports.destroyVM = function(vm)... |
const join = require("path").join;
const tailwindJS = join(__dirname, "tailwind.config.js");
module.exports = {
plugins: [require("tailwindcss")(tailwindJS), require("autoprefixer")]
};
|
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
*/
import { NgModule } from '@angular/core';
import { CalendarCommonModule, CalendarEventTitleFormatter, CalendarDateFormatter } from './common/calendar-common.module';
import { CalendarMonthModule } from './month/c... |
var url = document.URL;
console.log(url);
var coordinates = [4.6247575, -74.0836085];
var map = L.map('mapid').setView(coordinates, 15);
var token ="pk.eyJ1Ijoid2lzZG9tZGV2IiwiYSI6ImNqam5tcnBsNzFkYjQzcXFpaDgzYzhxd2QifQ.cFJqhoAPFomNa4khKDMdLg";
var markerCoordinates = {};
markerCoordinates.lat = coordinates[0];
markerC... |
module.exports = class Wrapper {
constructor(iter) {
this.iter = iter;
}
next() {
return new Promise((resolve, reject) => {
this.iter.next((err, k, v) => {
if (err) {
reject(err);
} else {
resolve({
... |
# -*- coding: utf-8 -*-
# Copyright (c) 2016-2019, Camptocamp SA
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
#... |
// 994. Rotting Oranges
// https://leetcode.com/problems/rotting-oranges/
{
var orangesRotting = function (grid) {
let answer = 0;
const m = grid.length;
const n = grid[0].length;
const dx = [0, 0, -1, 1];
const dy = [1, -1, 0, 0];
const ch = [...Array(m)].map(() => Array(n).fill(0));
co... |
#!/usr/bin/env python
# -*- coding: utf-8; py-indent-offset:4 -*-
###############################################################################
#
# Copyright (C) 2015, 2016 Daniel Rodriguez
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License ... |
#!/usr/bin/python3
def canUnlockAll(boxes):
keys = boxes[0]
pending = []
for i in range(1, len(boxes)):
if i in keys:
for key in boxes[i]:
keys.append(key)
else:
pending.append(i)
for i in pending:
if i in keys:
for key in box... |
import { t, tt } from '../lang.js'
import Logger from '../logger.js'
import login from './login.html'
import Component from '../component.js'
const logger = Logger.create('Login') // eslint-disable-line no-unused-vars
export default class Login extends Component {
constructor (dispatcher) {
super()
this.disp... |
import Vue from 'vue';
import { destroyVM, createVM } from './utils';
const getTestData = function () {
return [{
id:"1",
children:[
{id:"1-1"},
{id:"1-2"},
{id:"1-3"},
{id:"1-4"},
{id:"1-5"},
{id:"1-6"},
{id:"1-7"},
{id:"1-8"},
]
... |
AmCharts.makeChart("feedback_facts_chartdiv",
{
"type": "serial",
"pathToImages": "http://cdn.amcharts.com/lib/3/images/",
"categoryField": "category",
"rotate": true,
"startDuration": 1,
"addClassNames": true,
"classNamePrefix": "feedbackfact",
"categoryAxis": {
"gridP... |
# coding=utf-8
"""
etymology.py - Sopel Etymology Module
Copyright 2007-9, Sean B. Palmer, inamidst.com
Licensed under the Eiffel Forum License 2.
https://sopel.chat
"""
from __future__ import unicode_literals, absolute_import, print_function, division
try:
from html import unescape
except ImportError:
from H... |
import React from 'react';
import PropTypes from 'prop-types';
import { graphql, Link } from 'gatsby';
import Img from 'gatsby-image';
import BlogPostTeaser from '../components/BlogPostTeaser';
import Content, { HTMLContent } from '../components/Content';
import SocialButtons from '../components/SocialButtons';
import ... |
/**
* Created by Seven on 2019/4/2.
* project: AutumnUI
* email: fighting20xx@126.com
*/
export default {
methods:{
dispatch(componentName, eventName, params){ //向上通知, 找到一个就停止了。
let parent = this.$parent || this.$root;
while(parent && (parent.$options.name !== componentName)){
pa... |
const EventEmitter = require("events");
const chalk = require("chalk");
const {reportScores} = require("./challonge");
const {markUnderway} = require("./challonge");
class TournamentAutohost extends EventEmitter {
constructor({ribbon, tournamentID, matchID, player1, player2, tournamentShortname, tournamentName, f... |
sap.ui.define(["exports"],function(_){"use strict";var e={_:":root{--_ui5_bar_base_height:2.75rem;--_ui5_bar_subheader_height:3rem}.sapUiSizeCompact,.ui5-content-density-compact,[data-ui5-compact-size]{--_ui5_bar_base_height:2.5rem;--_ui5_bar_subheader_height:2.25rem}:root{--_ui5_fcl_solid_bg:var(--sapShell_Background)... |
import os
import re
fileRe = r"^messages_?([A-Za-z_-]*)\.properties$"
keyRe = r"^([A-Za-z]+)=.*\\n$"
def isComment(string):
return string[0] == "#"
def normalizeLine(string):
if string.endswith("\n") == False:
string = string + "\n"
return string
def sortFile(filename):
contents = None
... |
const express = require('express');
const router = express.Router();
const path = require('path');
const authenticate = require('../util/auth/authenticateRequest');
router.get('/', authenticate(), function(req, res) {
res.sendFile(path.join(__dirname, '../../public/views', 'panel.html'));
});
module.exports = rou... |
import React from 'react';
import {Table} from 'graphene-ui';
/** Basic Table: */
export default function ExampleInput() {
return (
<Table>
<Table.Header>
<Table.HeaderCell>First Name</Table.HeaderCell>
<Table.HeaderCell>Last Name</Table.HeaderCell>
</Table.Header>
<Table.Body>
... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, Peter Hanecak <hanecak@opendata.sk>
# 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 of source code must reta... |
#!/usr/bin/env python
import glob
import os
import shutil
import sys
import platform
from distutils import log
from setuptools import setup
from distutils.util import get_platform
from distutils.command.build import build
from distutils.command.sdist import sdist
from setuptools.command.bdist_egg import bdist_egg
SY... |
import React from 'react';
import PropTypes from 'prop-types';
import { ENTERED, ENTERING, EXITING } from './Transition'
import TransitionGroupContext from './TransitionGroupContext';
function areChildrenDifferent(oldChildren, newChildren) {
if (oldChildren === newChildren) return false;
if (
React.isValidElem... |
#!/bin/sh
# Copyright 2019 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
# We want to run python in unbuffered mode; however shebangs on linux grab the
# entire rest of the shebang line as a single argument, l... |
import React from "react";
import Button from "@material-ui/core/Button";
import "../../App.css";
import { Link } from "react-router-dom";
//Lotties
import LockLottie from "../../Lotties/LockLottie";
import ChatLottie from "../../Lotties/ChatLottie";
import VerifyLottie from "../../Lotties/VerifyLottie";
import Partic... |
from app.services.DBService import get_conn
class DropDownService(object):
def CompanyDropDown(self):
connection = get_conn()
with connection.cursor() as cursor:
#Manager-Only Registration, Manager-Customer Registration, Manage Company, Create Theater
# Explore Movie, Explore Theater, Vi... |
import validarToken from '../middlewares/validarToken.js'
import userController from '../controller/UserController.js';
import express from 'express'
const router = express.Router()
router.get('/contatos',validarToken, userController.bucarRegistros)
.get('/contatos/:id',validarToken, userController.bucarRegistr... |
import React from 'react';
import Button from 'components/button';
import MapSvg from 'assets/images/map/intro-map.svg';
import s from './assets/scss/main.scss';
import MapMain from './Main';
class StateMap extends React.Component {
state = {
isIntroVisible: true,
}
render() {
return (
<section ... |
# Copyright 2012 NEC 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 law or ag... |
module.exports = Nightwatch;
function Nightwatch(nightwatch, runner, test_settings) {
this._instance = null;
test_settings.output = false;
this._instance = nightwatch.initClient(test_settings);
this._instance.on('error', function(err) {
runner.failOnError(err);
}.bind(this));
}
Nightwatch.prototype.ge... |
class Pared:
def __init__(self, orientacion):
self.__orientacion = orientacion
self.__ventanas = []
def ventanas(self):
return self.__ventanas
def superficie_cristal(self):
superficie = 0
for ventana in self.ventanas():
superficie += ventana.superficie()... |
// jQuery(function($){
// $("#gift_card_expiration_date").mask("99/99",{placeholder:"MM/YY"});
// $("#gift_card_gift_card_number").mask("9999-9999-9999-9999");
// });
$( document ).ready(function() {
$("#gift_card_expiration_date").mask("99/99",{placeholder:"MM/YY"});
//$("#gift_card_gift_card_number").mask... |
"""
Created on Sun May 23 20:50:10 2021
Graph showing six types of mass functions considered in different PBH models.
It is created in the Plots folder, with the name of MassFunctionPlot.pdf
@author: ABRAM PÉREZ HERRERO
"""
import matplotlib.pyplot as plt
import MassFunction as MF
import numpy as np
import m... |
from timer import timer, notify
Work = int(input("Work Time: "))
Break = int(input("Break Time: "))
Sess = int(input("# of Sessions: "))
Current = 1
Total = Sess
while (Sess>0):
timer(Work, "~~ Work ~~", Current, Total)
notify("Pomodoro", "Break Start")
timer(Break, "~~ Break ~~", Current, Total)
notif... |
import {
BasePropertyType,
ItemQualityType,
MagicPropertyType,
PlayerClassType,
SkillSetType,
SkillType,
} from '../../../enums/index.js';
import {normalizeItems} from '../../utils/normalize-items.js';
import ids from '../../ids/index.js';
export default normalizeItems({
quality: ItemQualityType.Unique,
... |
/**
* Copyright (c) 2018 Public Library of Science
*
* 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,... |
const { publicAddress } = require('./stun')
const { createSocket } = require('dgram')
const argv = require('yargs').boolean('public').string('ping').argv
const port = argv.port || 1926
const main = async () => {
console.log(`Using port ${port}`)
const socket = createSocket('udp4')
socket.bind(port, '0.0.0.0')
... |
# Natural Language Toolkit: Chatbots
#
# Copyright (C) 2001-2022 NLTK Project
# Authors: Steven Bird <stevenbird1@gmail.com>
# URL: <https://www.nltk.org/>
# For license information, see LICENSE.TXT
# Based on an Eliza implementation by Joe Strout <joe@strout.net>,
# Jeff Epler <jepler@inetnebr.com> and Jez Hi... |
module.exports = {
mandatoryCheck,
locationCheck,
commaNumToUnits,
stringToArray,
dateCheckMandatory,
extraCheck,
maxCargoVolume,
stringToArrayMandatory,
commaNumToUnitsMandatory,
removeForbiden,
removeForbidenStrict,
locationCheckNoMand,
stringCheck,
typeCheck,
idCheck,
stringToArra... |
import bcrypt from 'bcryptjs';
const hashPassword = password => {
if (password.length < 0) {
throw new Error('Password must be 8 characters or longer.');
}
return bcrypt.hash(password, 10);
};
export { hashPassword as default };
|
'''
Created on Mar 8, 2018
@author: batman
'''
import os
print(os.sys.path)
#from . import foo
import drive
#if __name__ == '__main__':
# pass |
import splitUpdater from './splitUpdater'
function stateSpliter (state, updater) {
return function linkState (key, init, stateName = 'value', updaterName = 'onChange') {
const { [key]: subState = init } = state
return {
[stateName]: subState,
[updaterName]: splitUpdater(updater)(key),
}
}
... |
module.exports = [
'src/intro.js',
'src/core.js',
'src/inherits.js',
'src/extend.js',
'src/global.js',
'src/svg.js',
'src/vml.js',
'src/init.js',
'src/display/Node.js',
'src/display/Element.js',
'src/display/Shape.js',
'src/display/Text.js',
'src/di... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ShadingType = exports.TableShading = void 0;
const xml_components_1 = require("file/xml-components");
class TableShadingAttributes extends xml_components_1.XmlAttributeComponent {
constructor() {
super(...arguments);
... |
DataTable = {
ready: function() {
App.log("\t\tDataTable initialized.")
}
} |
module.exports = {
name: 'withdraw',
aliases: ['withdraw', 'with'],
cooldown: 3,
execute: (message, args, data) => {
args.shift();
var wallet;
var bank;
try {
wallet = data.getData(`/${message.author.id}/wallet`);
} catch (error) {
consol... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.SimpleEdge = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descr... |
import React from "react"
import Layout from "../components/Layout"
export default function about() {
return (
<Layout>
<div>
<h2 className="text-center">About Me</h2>
</div>
</Layout>
)
}
|
"""This tests the hardware extension API to ensure that rudimentary expected
behaviours are present and correct. It uses a piece of fake hardware, the
Dummy Processing Unit (DPU) to do this. The DPU borrows a lot from the CPU but
is part of the GPU class of hardware. The DPU target has deliberately strange
implementati... |
from __future__ import absolute_import
from datetime import timedelta
from django.db import models
from django.db.models.signals import post_delete, post_save
from django.utils import timezone
from sentry.db.models import (
BaseManager,
BoundedPositiveIntegerField,
FlexibleForeignKey,
JSONField,
... |
import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import moment from 'moment';
import { lighten, makeStyles } from '@material-ui/core/styles';
import Link from '@material-ui/core/Link';
import Table from '@material-ui/core/Table';
import TableBody from '@material-ui/core/TableBody'... |
import { arrayIncludes } from '../utils/array'
import { isBrowser } from '../utils/env'
import { EVENT_OPTIONS_NO_CAPTURE, eventOn, eventOff } from '../utils/events'
import { isString, isFunction } from '../utils/inspect'
import { keys } from '../utils/object'
const PROP = '$_bv_windowHandlers_'
// @vue/component
exp... |
"use strict";
/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a dif... |
import React, { useState } from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import classNames from 'classnames'
import ReactGA from 'react-ga'
import { useI18n } from 'core/i18n/i18nContext'
import { getBlockMeta } from 'core/helpers/blockHelpers'
import { usePageContext } from 'co... |