text stringlengths 3 1.05M |
|---|
import React from 'react'
import { useStaticQuery, graphql} from 'gatsby'
import Avatar from '../Avatar'
import * as S from './styled'
const Profile = () => {
const {
site: {siteMetadata : {title, position, description}}
} = useStaticQuery(graphql`
query MySiteMetadata{
site{
... |
class LeftAndRightHandedDiv2:
def count(self, S):
return sum(i == 'R' and j == 'L' for i, j in zip(S, S[1:]))
|
#!/usr/bin/env python3
# coding: utf-8
# Copyright 2019-2021 Huawei Technologies Co., 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
#
# Un... |
import { combineReducers } from 'redux';
export default combineReducers({
defReducer: () => []
}) |
import React from 'react'
import DropdownArrow from '../icons/dropdown-arrow'
import style from './select-box.scss'
export default function SelectBox ({ children, value, onChange }) {
return (
<div className={style.root}>
<select className={style.select} value={value} onChange={onChange}>
{childre... |
import { css } from 'lit-element/lit-element.js';
export const offscreenStyles = css`
.d2l-offscreen {
position: absolute !important;
overflow: hidden;
width: 1px;
height: 1px;
white-space: nowrap;
left: -10000px;
}
:host([dir="rtl"]) .d2l-offscreen {
left: 0;
right: -10000px;
}
`;
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"00ee":function(e,t,n){var i=n("b622"),a=i("toStringTag"),r={};r[a]="z",e.exports="[object z]"===String(r)},"0366":function(e,t,n){var i=n("1c0b");e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 0:return function(){return ... |
const Discord = require("discord.js");
const client = new Discord.Client();
const fs = require('fs');
const config = require('./config.json');
const appendChunkToFile = (fileName) => {
const pathToFile = __dirname + `/recordings/${fileName}.pcm`;
return fs.createWriteStream(pathToFile, { flags: 'a' });
};
cl... |
# -*- coding: utf-8 -*-
import peewee
from datetime import date
from Conexao import Conexao, Compra
from Conexao import Fornecedor, CatAPagar, StatusEntrega, StatusPagamento
class CrudCompra(object):
def __init__(self, id="", idFornecedor="", dataEmissao="", prazoEntrega="",
dataEntrega="", ca... |
import { System, Tag } from 'engine/core/ecs.js';
import { KeyboardState, GamepadState } from 'engine/core/input.js';
import { Transform } from 'engine/core/transform.js';
import { Velocity } from '../../common/velocity.js';
import { vec3 } from 'gl-matrix';
// TODO: Move somewhere more globally accessible?
const MIN_... |
const router = require('express').Router();
const bcrypt = require('bcryptjs');
const jwt = require('jsonwebtoken');
const User = require('../models/user.model');
const {registerValidation, loginValidation} = require('../validation')
const verify = require('../middlewares/verifyToken');
/**
* @route POST api/users
... |
import React from "react";
import PropTypes from "prop-types";
const UndrawAnalysis = props => (
<svg
style={{height:props.height, width:'100%'}}
className={props.class}
id="8a2604b5-6e64-4e1c-a595-987b18c4a1a4"
data-name="Layer 1"
xmlnsXlink="http://www.w3.org/1999/xlink"
viewBox="0 0 1023.4... |
const subManager = new SubsManager();
const InfiniteScrollIter = 10;
BlazeComponent.extendComponent({
onCreated() {
// for infinite scrolling
this.cardlimit = new ReactiveVar(InfiniteScrollIter);
},
mixins() {
return [Mixins.PerfectScrollbar];
},
openForm(options) {
options = options || {};... |
import Component from '@ember/component';
import layout from '../templates/components/mdc-tab-scroller-scroll-content';
export default Component.extend({
layout,
classNames: ['mdc-tab-scroller__scroll-content']
});
|
from unicodedata import decimal
import streamlit as st
import pandas as pd
st.write("""
# Top Provedores de Internet
By *ANATEL*
""")
df = pd.read_csv('Relatorio_Provedores_Anatel.csv', sep= ';', decimal=',')
a = df.head()
st.dataframe(a) |
/****************************************************************************
jquery-screen-ratio.js,
(c) 2017, FCOO
https://github.com/FCOO/jquery-screen-ratio
https://github.com/FCOO
****************************************************************************/
(function ($, window/*, document, undefined*/) {... |
query_set = [
"INSERT INTO t.a (a1, a2, a3) VALUES (<randInt>, <randInt2>, <randInt3>);",100,
]
|
# coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... |
module.exports = {
"moduleFileExtensions": [
"js",
"jsx",
"json",
"vue"
],
"transform": {
"^.+\\.vue$": "vue-jest",
".+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$": "jest-transform-stub",
"^.+\\.jsx?$": "babel-jest"
},
"transformIgnorePatterns": [
"/node_modules/"
... |
# Definition for singly-linked list.
class ListNode(object):
def __init__(self, x):
self.val = x
self.next = None
class Solution(object):
def sortList(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
if not head.next:
return head
... |
from unittest import TestCase
from tests.utils.hvac_integration_test_case import HvacIntegrationTestCase
class TestSeal(HvacIntegrationTestCase, TestCase):
def test_unseal_multi(self):
cls = type(self)
self.client.sys.seal()
keys = cls.manager.keys
result = self.client.sys.sub... |
# Copyright 2020 Google LLC. 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 applicable law or a... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[799],{1560:function(t,e,o){"use strict";o.r(e);var r=o(19),s=Object(r.a)({},(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[o("h1",{attrs:{id:"px4-sd-card-layout"}},[o("a",{staticCla... |
# Little stub file to get BUILD.bazel to play along
import os.path
import sys
root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.insert(0, root)
import tools.jit.gen_unboxing
tools.jit.gen_unboxing.main()
|
import test from 'ava';
import {join} from '../../lib/array/join';
test('join() joins the elements of an array to a string using a separator', async t => {
const a = ['foo', 'bar', 42];
t.is(join(a), 'foo,bar,42');
t.is(join(a, ''), 'foobar42');
t.is(join(a, ', '), 'foo, bar, 42');
});
test('join() returns a... |
################################# LICENSE ##################################
# Copyright (c) 2009, South African Astronomical Observatory (SAAO) #
# All rights reserved. #
# #
# Redistribu... |
// riddles-model.js - A mongoose model
//
// See http://mongoosejs.com/docs/models.html
// for more of what you can do here.
module.exports = function (app) {
const mongooseClient = app.get('mongooseClient');
const uniqueValidator = require('mongoose-unique-validator');
const riddles = new mongooseClient.Schema... |
module.exports = {
roots: ['./src'],
setupFilesAfterEnv: ['./jest.setup.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js'],
transformIgnorePatterns: [],
transform: {
'^.+\\.[t|j]sx?$': 'babel-jest',
},
testMatch: ['**/*.test.(ts|tsx)'],
moduleDirectories: [
'node_modules',
'src',
],
moduleN... |
import axios from "axios";
import { API_BASE } from '../../env';
import { message } from 'antd';
import { INITIATE_SALESLINE_FAILURE, INITIATE_SALESLINE_REQUEST,GET_SALESLINE_BY_PARENT_ID_SUCCESS, EDIT_SALESLINE_SUCCESS, DELETE_SALESLINE_SUCCESS, HANDLE_SALESLINE_MODAL_SHOW, HANDLE_SALESLINE_MODAL_CANCEL, SET_SALESLINE... |
__NUXT_JSONP__("/18/67", (function(a,b,c,d,e,f,g,h,i){return {data:[{metaTitle:b,metaDesc:c,verseId:67,surahId:18,currentSurah:{number:"18",name:"الكهف",name_latin:"Al-Kahf",number_of_ayah:"110",text:{"1":"اَلْحَمْدُ لِلّٰهِ الَّذِيْٓ اَنْزَلَ عَلٰى عَبْدِهِ الْكِتٰبَ وَلَمْ يَجْعَلْ لَّهٗ عِوَجًا ۜ","2":"قَيِّمًا لِّي... |
// Copyright (c) 2017, Compiler Explorer Authors
// 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 retain the above copyright notice,
// thi... |
module.exports = function quote(str) {
const lines = str.split("\n");
let result = "";
for (let i = 0, l = lines.length; i < l; i++) {
result += `> ${lines[i]}`;
if (i != (l - 1)) result += "\n>\n";
}
return result;
} |
import React from 'react';
import { Router, Route, browserHistory, IndexRoute } from 'react-router';
import PublicComponent from '../components/public/PublicComponent';
import PrivateComponent from '../components/private/PrivateComponent';
import NotFound from '../components/NotFound';
const Public = () => {
return(... |
const nock = require('nock')
const dco = require('..')
const { Probot } = require('probot')
const payload = require('./fixtures/pull_request.opened')
const payloadSuccess = require('./fixtures/pull_request.opened-success')
const compare = require('./fixtures/compare')
const compareSuccess = require('./fixtures/compare-... |
app.controller('ModalRegisterController', ['$scope', '$uibModal', '$log', '$cookies', function($scope, $uibModal, $log, $cookies){
$scope.animationsEnabled = true;
// -------------------------------------------------
$scope.openReg = function (size) {
var modalInstance2 = $uibModal.open({
animation: $sc... |
console.log("안녕");
let arr = [];
// 공백에 배열추가하기
arr.push("길동홍");
arr.push("춘향성");
arr.push("몽룡리");
//전체 배열 확인
console.log(arr);
// 배열의 1번 확인하기
console.log(arr[1]);
let arrCopy = [...arr, "걱정임"];
console.log("arrCopy", arrCopy);
|
export default function isNumber(value) {
// eslint-disable-next-line no-self-compare
return typeof value === 'number' && value === value;
}
|
/*!
* jquery.fancytree.persist.js
*
* Persist tree status in cookiesRemove or highlight tree nodes, based on a filter.
* (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
*
* @depends: js-cookie or jquery-cookie
*
* Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de)
*
* R... |
// pages/personalMessage/index.js
Page({
/**
* 页面的初始数据
*/
data: {
accounts: ["男", "女", "其他"],
accountIndex: 0,
sex: 1,
name: '123'
},
bindAccountChange(e) {
this.data.formData.sex = e.detail.value
this.setData({
accountIndex: e.detail.value,
sex: this.data.sex
})
},
... |
mycallback( {"CONTRIBUTOR OCCUPATION": "Business Representative", "CONTRIBUTION AMOUNT (F3L Bundled)": "100.00", "ELECTION CODE": "", "MEMO CODE": "", "CONTRIBUTOR EMPLOYER": "INT'L ASSOCIATION OF MACHINISTS", "DONOR CANDIDATE STATE": "", "CONTRIBUTOR STREET 1": "516 WINTER WOOD DRIVE", "CONTRIBUTOR MIDDLE NAME": "", "... |
module.exports = function (event, base, context) {
$(".select2-select", this).each(function () {
var options = {
width: '100%',
amdLanguageBase: '/vendor/js/i18n/',
language: 'ar',
minimumInputLength: 0,
allowClear: $(this).is('[data-allowClear]') ... |
let nock = require('nock');
module.exports.hash = "6bef38c0bbced2a8447ec1b74044732f";
module.exports.testInfo = {"uniqueName":{},"newDate":{}}
nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
.post('/azure_tenant_id/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&cl... |
import { StyleSheet } from 'react-native';
import { COLOR_GREEN } from '../../constants';
export default StyleSheet.create({
root: {
flex: 1,
flexDirection: 'row',
},
dateText: {
color: COLOR_GREEN,
},
iconNew: {
marginRight: 3,
top: 3,
},
});
|
from trex.astf.api import *
import argparse
# IPV6 tunable example
#
# ipv6.src_msb
# ipv6.dst_msb
# ipv6.enable
#
class Prof1():
def __init__(self):
pass
def get_profile(self, tunables, **kwargs):
parser = argparse.ArgumentParser(description='Argparser for {}'.format(os.path.basename(__f... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } }... |
var compare = require('..');
var assert = require('assert');
// 配列
assert( compare([], []));
assert( compare([1, 2, 3], [1, 2, 3]));
assert(!compare([1, 2, 3], [1, 2]));
assert(!compare([1, 2], [1, 2, 3]));
assert( compare(Array(), []));
assert( compare(new Array(), []));
assert( compare(Array(1), [undefined]));
asser... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["otherpages-goods-coupon-coupon"],{"163e":function(t,e,i){var o=i("fdea");"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var n=i("4f06").default;n("4043fd8b",o,!0,{sourceMap:!1,shadowMode:!1})},"5ddd":function(t,e,i){"use strict";i.r(e);va... |
# vFabric Administration Server API
# Copyright (c) 2012 VMware, Inc. 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
... |
console.log("Hello from custom JS!"); |
var Npj = Npj || {};
Npj.PesquisarPermissoes = (function(){
function PesquisarPermissoes() {
this.botaoPermissao = $('.js-permissoes-btn');
this.modal = $('#pesquisaPermissoesGrupoModal');
this.htmlTabela = $('#tabela-pesquisa-permissoes-grupo').html();
this.template = Handlebars.compile(this.htmlTabela);
... |
from django.conf import settings
from django.contrib.auth import REDIRECT_FIELD_NAME, authenticate as django_authenticate, login as django_login
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseRedirect
from django.t... |
if (typeof exports === 'object') {
var assert = require('assert');
var alasql = require('..');
} else {
__dirname = '.';
}
describe('Test 298 PLUG-IN TEST', function() {
it('1. CREATE DATABASE', function(done) {
alasql('CREATE DATABASE test298;USE test298');
done();
});
it('2.REQURE ECHO plugin', function(d... |
/**
* Blockly Demos: Block Factory Blocks
*
* Copyright 2012 Google Inc.
* https://developers.google.com/blockly/
*
* 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.ap... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HelixSubscriptionApi = void 0;
var tslib_1 = require("tslib");
var twitch_api_call_1 = require("twitch-api-call");
var UserTools_1 = require("../../../Toolkit/UserTools");
var BaseApi_1 = require("../../BaseApi");
var HelixPaginatedReq... |
from __future__ import annotations
from unittest import TestCase
from jsonclasses.excs import ValidationException
from tests.classes.hex_color import HexColor
class TestHexColor(TestCase):
def test_hexcolor_removes_initial_pound(self):
color = HexColor(hex_color='#01FD6F')
self.assertEqual(color.... |
import UserModal from '@/components/userModal'
import agentImportTemplate from '@/excelfile/agentImportTemplate.xlsx'
import constants from '@/utils/constants'
import Customer from '@/views/agentList/customer'
export default {
name: 'AgentList',
components: {
UserModal, Customer, agentImportTemplate
},
dat... |
// Karma configuration
// Generated on Tue Apr 14 2015 02:07:02 GMT+0400 (MSK)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/k... |
import jQuery from "./core.js";
import document from "./var/document.js";
import rcssNum from "./var/rcssNum.js";
import rnothtmlwhite from "./var/rnothtmlwhite.js";
import cssExpand from "./css/var/cssExpand.js";
import isHiddenWithinTree from "./css/var/isHiddenWithinTree.js";
import adjustCSS from "./css/adjustCSS.j... |
const http = require('http')
const io = require('socket.io')
const httpServer = http.createServer()
const ioServer = new io.Server(httpServer, {
cors: {
origin: '*'
},
})
ioServer.on('connection', socket => {
console.dir({
handshake: {
query: socket.handshake.query,
auth: socket.handshake.au... |
/*
* Copyright (c) 2021 Anton Bagdatyev (Tonix)
*
* 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,... |
'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... |
const NamableAddressList = artifacts.require("NamableAddressList");
expectThrow = async promise => {
try {
await promise;
} catch (error) {
return;
}
assert.fail('Expected throw not received');
};
contract('3_NamableAddressList', function (accounts) {
it("should work", async () => ... |
/*
* Copyright © 2020 Regular Labs - All Rights Reserved
* License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
eval(function(r,e,g,l,a,b){a=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(g--){b[g.toString(e)]=l[g]||g.toString(e)}l=[function(a){return b[a]}];a=function(){return'\\w+'};g=... |
/*
Integration tests for the index.js main library.
*/
// npm libraries
const assert = require('chai').assert
// const { mockSingleSweepWithBch } = require('../unit/mocks/util-mocks')
// const BCHJS = require('@psf/bch-js')
// const bchjs = new BCHJS()
// Locally global variables.
// Unit under test
const SweeperL... |
const target = document.querySelectorAll('[data-scrollAnimation]')
const debounce = function(func, wait, immediate) {
let timeout;
return function(...args) {
const context = this;
const later = function () {
timeout = null;
if (!immediate) func.apply(context, args);
};
c... |
// @flow
import createActionRoot from './utils/createActionRoot';
import normalizeDomain from './utils/normalizeDomain';
type options = {
organisation: string,
type: string,
application?: string,
domain: string,
action: string,
};
// <Organisation>/<Type>/<Application?>/<Domain>/<ACTION>
export default ({... |
"""
Defining, training, and evaluating neural networks in tensorflow.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import tensorflow as tf
import numpy as np
import os
# To remove the tensorflow compilation warnings
os.environ['TF... |
# Generated by Django 2.2.8 on 2020-06-10 06:42
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("engine", "0025_multicallbackdata"),
]
operations = [
migrations.AlterField(
model_name="pipelineprocess",
name="is_a... |
/**
* `components/index.js` exists simply as a 'central export' for our components.
* This way, we can import all of our components from the same place, rather than
* having to figure out which file they belong to!
*/
export {default as Navbar} from './navbar'
export {default as UserHome} from './user-home'
export ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
pip setup file
"""
import os
import codecs
from setuptools import setup
CURRENT_DIRECTORY = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(CURRENT_DIRECTORY, "README.md"), encoding="utf-8") as f:
LONG_DESCRIPTION = "\n" + f.read()
REQU... |
import {connect} from 'react-redux';
import AddTodoEntry from '../components/AddTodoEntry';
import {addTodo} from '../actions/todo';
const mapDispatchToProps = (dispatch) => {
return {
onClick: (text) => {
dispatch(addTodo(text));
}
}
}
// state dispatch dispatch, null
export default connect(null... |
from typing import NamedTuple, Union
from electrum import transaction, bitcoin
from electrum.transaction import (convert_raw_tx_to_hex, tx_from_any, Transaction,
PartialTransaction, TxOutpoint, PartialTxInput,
PartialTxOutput)
from electrum.util impor... |
import _ from 'lodash';
import { retryInterval } from 'asyncbox';
const commands = {};
/**
* Execute the particular application package on Simulator.
* It is required that Simulator is in _booted_ state and
* the application with given bundle identifier is already installed.
*
* @param {string} bundleId - Bundle... |
import { currency as currencyConfig } from './../config'
function constructQry(url, fl) {
url += "?";
Object.keys(fl).forEach(e => {
if (fl[e] && fl[e] !== "undefined" && fl[e].length > 0)
url += `${e}=${fl[e]}&`;
});
return url;
}
function constructURL2(url, fl) {
url += "?";
... |
/*
* Copyright (C) 2010 Google Inc. 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 retain the above copyright
* notice, this list of ... |
import traceback
import py_modules.telegram.telegram as telegram
import py_modules.telegram.classes as classes
from py_modules.mongo import users
import re
import json
import urllib.request
import traceback
import base64
from telebot.types import InlineKeyboardMarkup, InlineKeyboardButton, ReplyKeyboardMarkup, Keyboa... |
import React from "react";
import { Text, TouchableOpacity } from "react-native";
const Button = ({ onPress, children }) => {
const { buttonStyle, textStyle } = styles;
return (
<TouchableOpacity onPress={onPress} style={buttonStyle}>
<Text style={textStyle}>{children}</Text>
</TouchableOpacity>
)... |
module.exports = (body, callback) => {
fetch('https://www.bloomapp.tk/auth/login', {
method: 'POST',
mode: 'cors',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify(body)
})
.then(response => response.json())
.then(response => {
... |
import React from 'react';
import classes from './Input.css';
/**
*
* @param {*} props
*
* Input UI element
*/
const input = (props) => {
let inputElement = null;
let validationError = null;
const inputClasses = [classes.InputElement];
// validation check
if (props.invalid && props.should... |
import os
class Config():
DEBUG = os.getenv('FLASK_DEBUG', default=False)
ENV = os.getenv('FLASK_ENV', default='production')
SECRET_KEY = os.getenv('SECRET_KEY')
ALMA_API_KEY = os.getenv('ALMA_API_KEY')
ALMA_API_URL = os.getenv('ALMA_API_URL')
AWS_ACCESS_KEY_ID = os.getenv('AWS_ACCESS_KEY_ID... |
/* ------------------------------------------------------------------------------
*
* # NoUI Sliders
*
* Demo JS code for extra_sliders_noui.html page
*
* ---------------------------------------------------------------------------- */
// Setup module
// ------------------------------
var NouiSlider = functio... |
const {Model, DataTypes, Sequelize} = require('sequelize')
const USER_TABLE= 'users'; /* normalmente es en plural en db */
const UserSchema = {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: DataTypes.INTEGER
},
email: {
allowNull: false,
type: DataTypes.STRING,
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var nopt = require("nopt");
var path = require("path");
var logger_1 = require("../common/logger/logger");
var app_settings_1 = require("../common/models/app-settings/app-settings");
var cluster_1 = require("../common/models/cluster/cluster");... |
strawberries_price = float(input())
bananas_amount_kg = float(input())
oranges_amount_kg = float(input())
raspberries_amount_kg = float(input())
strawberries_amount_kg = float(input())
raspberries_price_kg = strawberries_price / 2
raspberries_total_price = raspberries_amount_kg * raspberries_price_kg
oranges_total_pri... |
const { registerHelper } = require('hbs');
const Database = require('./database/db.js');
const saveOrphanage = require('./database/saveOrphanage');
module.exports = {
index(req, res) {
return res.render('index')
},
async orphanage(req, res) {
const id = req.query.id
try {
... |
const TxStates = {
STATE_GETH_ERROR: -1,
STATE_NEW: 0,
STATE_PENDING: 1,
STATE_INCLUDED: 2,
STATE_CONFIRMED: 3
};
export default TxStates;
|
#!/usr/local/bin/python2.7
# encoding: utf-8
'''
@author: Sid Probstein
@contact: sidprobstein@gmail.com
'''
#############################################
import sys
import argparse
import json
import os
from utils.file import make_file_list, load_json_list
############################################# ... |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.11.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... |
import logging
import os
from urllib.parse import urlparse
from ..exeptions import GraviteeioError
logger = logging.getLogger("utils")
def is_uri_valid(url, qualifying=('scheme', 'netloc')):
tokens = urlparse(url)
return all([getattr(tokens, qualifying_attr)
for qualifying_attr in qualifying... |
define(["exports", "../../lit/index.js"], function (_exports, _index) {
"use strict";
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.UndoManagerCommand = _exports.UndoManagerBehaviors = _exports.UndoManager = _exports.Undo = void 0;
var _templateObject_22897840942811ecb19379697... |
'use strict';
module.exports = {
HOST: 'localhost',
USER: 'admin',
PASSWORD: '123456',
DB: 'accountDB',
dialect: 'postgres',
};
|
import React, { useEffect } from 'react';
import _isNil from 'lodash/isNil';
import Sidebar from './Sidebar.js';
import WalletTabContent from './WalletTabContent.js';
import Grid from '@material-ui/core/Grid';
import Paper from '@material-ui/core/Paper';
import { withWalletContext } from '../context/WalletContext';
fu... |
import {
DESEMPLEO_FETCH_REQUEST,
DESEMPLEO_FETCH_SUCCESS,
DESEMPLEO_FETCH_FAIL,
} from "../actions/Constants";
const initialState = {
loading: true,
desempleo: null,
};
export default function (state = initialState, action) {
const { type, payload } = action;
switch (type) {
case DESEMPLEO_FETCH_RE... |
# -*- coding: utf-8 -*-
r"""
ClusterSeed
A *cluster seed* is a pair `(B,\mathbf{x})` with `B` being a *skew-symmetrizable* `(n+m \times n)` *-matrix*
and with `\mathbf{x}` being an `n`-tuple of *independent elements* in the field of rational functions in `n` variables.
For the compendium on the cluster algebra and qu... |
from django.conf.urls import url
from .views import bibliotik, whatcd, overdrive, myanonamouse
app_name = 'userscript'
urlpatterns = [
url(r'^bibliotik.user.js$', bibliotik, name='bibliotik'),
url(r'^what.cd.user.js$', whatcd, name='whatcd'),
url(r'^overdrive.user.js$', overdrive, name='overdrive'),
u... |
import fs from 'fs';
import robustOrientation from 'robust-orientation';
import robustInSphere from 'robust-in-sphere';
import {orient2d, orient3d, incircle, insphere} from './index.js';
{
const r = 0.95;
const q = 18;
const p = 16.8;
const w = Math.pow(2, -44);
const size = 2000;
const id =... |
import React from 'react';
import {View, Text, StyleSheet} from "react-native";
import Button from "react-native-button";
import {Actions} from "react-native-router-flux";
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: "center",
alignItems: "center",
backgr... |
"""
Copyright (C) 2019-2020 Vanessa Sochat.
This Source Code Form is subject to the terms of the
Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""
from rest_framework.authtoken.models import Token
def get_user(uid):
... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { t... |
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import type {GlobalConfig} from 'types/Config';
import type {TestRunData} from 'types/TestRunner'... |