text stringlengths 3 1.05M |
|---|
#!/usr/bin/env python3
# This is free and unencumbered software released into the public domain.
"""Test cases for the openxr.space module."""
from openxr import Space
if __name__ == '__main__':
import pytest, sys
sys.exit(pytest.main(__file__))
|
#!/usr/bin/env python
from distutils.core import setup
LONG_DESCRIPTION = open("README").read()
LICENSE = open("LICENSE").read()
setup(
name='split',
version='1.1',
description='Functions to split or partition sequences.',
long_description=LONG_DESCRIPTION,
author='Michael Doronin',
author_em... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.addLegacySimulcast = exports.getRtpEncodings = void 0;
function getRtpEncodings({ offerMediaObject }) {
const ssrcs = new Set();
for (const line of offerMediaObject.ssrcs || []) {
const ssrc = line.id;
ssrcs.add... |
//ELIMINAR
$(document).ready(function(){
$('.btn-delete').click(function (e) {
e.preventDefault();
if(! confirm("Esta seguro de eliminar?")){
return false;
}
var row = $(this).parents('tr');
var form = $(this).parents('form');
var url = form.attr('action... |
import {checkLogin, getParcelDetails} from "../common/methods";
import Components from '../components';
import QRCode from 'qrcode';
const Parcel = {
components: Components,
template: `
<div class="page page__parcel">
<main>
... |
# Copyright 2015 Google 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
#
# Unless required by applicable law or agreed ... |
load("bf4b12814bc95f34eeb130127d8438ab.js");
load("93fae755edd261212639eed30afa2ca4.js");
// Copyright 2016 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-applying-the-exp-operator
description: If base is −∞ and exponent < 0 and exponent is no... |
#
# Copyright (c) 2020 by Philipp Scheer. All Rights Reserved.
#
## import global packages
import paho.mqtt.client as mqtt
import time, random, string, collections, os, re, string, gpiozero
# logs a message with given prefix, also accepts an argument to control (disable) logging to file
def log(type, msg, do_not_lo... |
import React, {useState} from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { makeStyles } from '@material-ui/styles';
import {
Container,
Paper,
Typography,
Grid,
IconButton,
Divider,
Card,
CardActions,
CardContent,
CardHeader,
Button
} from '@material-ui/core';
i... |
const resolve = require('path').resolve;
const dirname = require('app-root-path').path;
module.exports = function (inOptions) {
return Object.assign(
{
modules: ['./build/loaders', 'node_modules']
},
inOptions
)
};
|
import path from 'path';
import base from '../..';
import { fileExists, readDir, writeFile } from '../FileSystem';
const mainImportTpl = 'import { combineReducers } from \'redux\';\n';
const exportTpl = '\n\nexport default combineReducers({\n@param\n});';
const importTpl = 'import @param from \'containers/@param/redu... |
import mongoose from 'mongoose';
import model__accounts from '../Models/model__accounts.js';
export const register = (req, res) => {
const account = new model__accounts(req.body);
account.save((err, account) => {
if (err) {
return (res.json({ success: false, err }));
} else {
... |
import {
Button,
Form, FormGroup, Label, Input, FormFeedback,
Card, CardHeader, CardBody,
Spinner,
} from 'reactstrap';
import { Row, Col } from 'react-flexbox-grid';
import { validation } from '@liskhq/lisk-passphrase';
import PropTypes from 'prop-types';
import React from 'react';
import { usePassphraseToSig... |
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... |
#!/usr/bin/env python
# Copyright (c) 2013-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from __future__ import division,print_function,unicode_literals
import biplist
from ds_store import DSStore... |
import json
import time
from cryptography.fernet import Fernet
from osm_validator.models import User
def make_cookie(client, fernet, data):
session_data = {
'session': data,
'created': int(time.time())
}
cookie_data = json.dumps(session_data).encode('utf-8')
data = fernet.encrypt(co... |
import torch,math
from BLOX.Modules.Gaussian import Gaussian
class GMM(torch.nn.Module):
def __init__(self, pis, sigmas):
super(GMM,self).__init__()
self.pis = pis
self.sigmas = sigmas
self.mixtures = [Gaussian(0,sigma) for sigma in sigmas]
if torch.cuda.is_available():
... |
import { __extends } from "tslib";
import { ListSentimentDetectionJobsRequest, ListSentimentDetectionJobsResponse } from "../models/index";
import { deserializeAws_json1_1ListSentimentDetectionJobsCommand, serializeAws_json1_1ListSentimentDetectionJobsCommand, } from "../protocols/Aws_json1_1";
import { getSerdePlugin ... |
// source: managed/transfer_transaction.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
va... |
const path = require('path');
var APP_DIR = path.resolve(__dirname, 'src')
var BUILD_DIR = path.resolve(__dirname, 'dist')
module.exports = {
entry: APP_DIR + '/scripts/app.js',
mode: 'production',
output: {
path: BUILD_DIR + '/scripts/',
filename: 'bundle.js'
},
module: {
... |
/*
jQuery News Ticker is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 2 of the License.
jQuery News Ticker is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without e... |
"""
Provides a collection of utilities for comparing (image) results.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
import hashlib
import os
import shutil
import numpy as np
import matplotlib
from matplotlib.compat import subprocess
from... |
const debug = require('debug')('basicAuth');
/**
* Provide functionality for basic authentication to external websites.
* This module only functions when cat-wrangler is configured to use https.
*/
module.exports = (app) => {
const { platform, userAgent } = window.navigator || { };
/**
* From KevinB https:/... |
import React, { Component } from "react";
import PropTypes from "prop-types";
import cx from "classnames";
import { types, AVAILABLE_TYPES } from "./types";
import "./icon-button.scss";
export default class IconButton extends Component {
static propTypes = {
/**
* Prevents user actions on the button
*... |
#! /usr/bin/env node
// this script updates the blob keys in the prebuilts.json
const fs = require('fs')
const ssb = require('ssb-client')
const { join } = require('path')
const prebuildsJSON = './prebuilts.json'
const current = require(prebuildsJSON)
const fetchLoc = 'fetches'
var i = 0
for (const plat of Object... |
/*
* Main.js - Controller
*
* Defines most of the common functions used throughout the app
*/
Ext.define('FW.controller.Main', {
extend: 'Ext.app.Controller',
requires: [
'Ext.MessageBox',
'Ext.device.Device',
'Ext.device.Connection'
],
launch: function(){
var ... |
import torch.nn as nn
from torch.nn import init
import torch.nn.functional as F
import torchvision.models as models
import nsml
def weights_init_kaiming(m):
classname = m.__class__.__name__
if classname.find('Conv') != -1:
init.kaiming_normal_(m.weight.data, a=0, mode='fan_in')
if m.bias is no... |
"use strict";
angular.module("angularTypewrite", []), angular.module("angularTypewrite").directive("typewrite", ["$timeout", function (a) {
function b(b, c, d) {
function e() {
p = a(function () {
f(c, 0, 0, l)
}, q)
}
function f(c, d, e, i) {
... |
/**
* @license
* Copyright The Closure Library Authors.
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @fileoverview Character Picker widget for picking any Unicode character.
*
* @see ../demos/charpicker.html
*/
goog.provide('goog.ui.CharPicker');
goog.require('goog.a11y.aria');
goog.require('goog.a11y.aria... |
import { Pagination } from 'react-bootstrap'
import { LinkContainer } from 'react-router-bootstrap'
const Paginate = ({ page, pages, isAdmin=false, keyword='' }) => {
return (
pages > 1 && (
<Pagination>
{[...Array(pages).keys()].map((x) => (
<LinkContainer
key={x + 1}
... |
def escreva(texto):
caracteres = len(texto) + 4
print('-' * caracteres)
print(f'{texto:^{caracteres}}')
print('-' * caracteres)
# Programa Principal
escreva('Olá, Mundo!')
escreva('Curso de Python no YouTube!')
|
module.exports = function(el) {
switch (el.tagName.toLowerCase()) {
case "a":
// only attach link if el does not already have link attached
if (!el.hasAttribute("data-pjax-click-state")) {
this.attachLink(el)
}
break
case "form":
// only attach link if el does not alread... |
from contextlib import contextmanager
import colorama
import atexit
import faulthandler
import hashlib
import inspect
import io
import json
import logging
import os
import redis
import signal
from six.moves import queue
import sys
import threading
import time
import traceback
import random
# Ray modules
import ray.clo... |
const merge = require('webpack-merge');
const path = require('path');
const fs = require('fs');
const common = require('./webpack.common.js');
// App directory
const appDirectory = fs.realpathSync(process.cwd());
module.exports = merge(common, {
mode: 'development',
devtool: 'inline-source-map',
devServe... |
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2010, Ajax.org B.V.
* 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 so... |
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
'... |
from django.test import TestCase
from django.template import Context, Template
class CreateMetaTemplateTagTest(TestCase):
def setUp(self):
context = Context({})
template_to_render = Template(
'{% load pwa %}'
'{% progressive_web_app_meta %}'
)
self.rendered_... |
const withPWA = require("next-pwa");
module.exports = withPWA({
webpack5: true,
async headers() {
return [
{
source: "/fonts/(.*)",
headers: [
{
key: "Cache-Control",
value: "public, max-age=31536000, immutable",
},
],
},
];
... |
describe('nixt#code', function() {
it('can verify the exit code of a program', function(done) {
nfixt()
.run('node code-0.js')
.code(0)
.end(done);
});
it('returns an error when the exit code does not match the expected one', function(done) {
nfixt()
.run('node code-0.js')
.code(1)
... |
export function isPlainObject(value){
if(typeof(value) !== "object" || value === null){
return false;
}
if(value.nodeType){
return false;
}
if(value.constructor && !Object.prototype.hasOwnProperty.call(value.constructor.prototype, "isPrototypeOf" )){
return false;
}
return true;
}
//Takes object of form... |
import unittest
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group, Permission
from django.core.files.uploadedfile import SimpleUploadedFile
from django.db.utils import IntegrityError
from django.test import TestCase
from django.test.utils import override_settings
from django.u... |
from .models import Tag, Location,Post
from .serializers import TagSerializer,LocationSerializer,\
PostSerializer
from rest_framework import generics,permissions,viewsets
from .permissions import IsAuthorOrReadOnly,IsAdminOrReadOnly
from django.utils import timezone
from rest_framework.decorator... |
// model 基类,主要解决model更新失败的问题
// author Vicent
define(['backbone','underscore'], function(Backbone,_){
return Backbone.Model.extend({
url: function(){
return window.app ? window.app.api :"";
},
// 该属性的设置能使Backbone的Model使用ajax请求时操作方法的判断更准确
idAttribute: '_id',
initialize: function(){
// ... |
import * as types from '../types';
import eos from '../helpers/eos';
export function sellram(amount) {
return (dispatch: () => void, getState) => {
const {
connection,
settings
} = getState();
dispatch({
type: types.SYSTEM_SELLRAM_PENDING
});
const { account } = settings;
... |
function getJasmineRequireObj(){return"undefined"!=typeof module&&module.exports?exports:(window.jasmineRequire=window.jasmineRequire||{},window.jasmineRequire)}getJasmineRequireObj().core=function(jRequire){var j$={};return jRequire.base(j$),j$.util=jRequire.util(),j$.Any=jRequire.Any(),j$.CallTracker=jRequire.CallTra... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{e4ia:function(e,t,a){"use strict";a.r(t),a.d(t,"_frontmatter",(function(){return r})),a.d(t,"default",(function(){return s}));a("5hJT"),a("W1QL"),a("K/PF"),a("t91x"),a("75LO"),a("PJhk"),a("mXGw");var n=a("/FXl"),o=a("TjRS");a("aD51");function i(){return(i=Object... |
import { h } from 'vue'
export default {
name: "VectorSquareEdit",
vendor: "Mdi",
type: "",
tags: ["vector","square","edit"],
render() {
return h(
"svg",
{"xmlns":"http://www.w3.org/2000/svg","width":"24","height":"24","viewBox":"0 0 24 24","class":"v-icon","fill":"currentColor","data-name":"m... |
/*
* Copyright 2019 is-land
*
* 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 w... |
import { Component } from "react";
import PropTypes from "prop-types";
export default class CheckboxBehavior extends Component {
static propTypes = {
/**
* Checks the checkbox
*/
checked: PropTypes.bool,
/**
* Initially checks the checkbox, but allows user action to change it
*/
d... |
/* eslint-env jest */
import cheerio from 'cheerio'
import { getRedboxHeader, hasRedbox } from 'next-test-utils'
import webdriver from 'next-webdriver'
import { BUILD_MANIFEST, REACT_LOADABLE_MANIFEST } from 'next/constants'
import { join } from 'path'
import url from 'url'
export default function (render, fetch, ctx... |
#!/usr/bin/env python3
import temperature_program
def get_preheating_instructions(fahrenheit: float) -> str:
cels = str(temperature_program.convert_to_celsius(fahrenheit))
fahr = str(fahrenheit)
return 'Preheat oven to ' + fahr + 'degrees F ('+ cels + ' degrees C).'
fahr = float(input('Enter the baking t... |
//This controller houses the utility functions
//Function # 1
//Invoke the 'getinfo' command to return a custom response for RTL
//Arguments - No arguments
//fs = require( 'fs' );
//const macaroon = require('macaroon');
exports.getinfoRtl = (req,res) => {
function connFailed(err) { throw err }
ln.on('error', ... |
const mongoose = require("mongoose");
const userSchema = new mongoose.Schema(
{
username: { type: String, required: true, unique: true },
email: { type: String, required: true, unique: true },
password: { type: String, required: true },
isAdmin: { type: Boolean, default: false },
},
{
timesta... |
import React from 'react';
import {
Dimensions,
Image,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
import colorConstant from '../../constants/colorConstant';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import Swiper from 'react-na... |
const sqlite3 = require('sqlite3').verbose()
const fs = require('fs')
const parse = require('csv-parse')
const dbName = ':memory:' // dbName = ':memory:'; //Pour travailler en mémoirec
// const dbName = ':memory:';
const createDataBase = () => new Promise((resolve, reject) => {
const db = new sqlite3.Database(dbNa... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var lodash_1 = require("./wrap/lodash");
var log_1 = require("./log");
var function_1 = require("./function");
var imitate_1 = require("./imitate");
var proxy_1 = require("./object/proxy");
var DEFAULT_OPTIONS = { excludeMethods: ['then'] };
f... |
import { fetchErrorThrower, fetchToJson } from '../../util/FetchUtils';
import { syFetch } from '../util';
import lookup from '../../util/mimeMapper';
const listFiles = (csrftoken, filePath) => {
const trimmedPath = filePath.slice('/agave'.length);
const url = `/agave/files/v2/listings/system${trimmedPath}?limit=1... |
import React, {Component} from 'react';
function Square(props) {
return (
<button className="square" onClick={props.onClick}>
{props.value}
</button>
);
}
class Board extends React.Component {
renderSquare(i) {
return (
<Square
value={this.pro... |
# Copyright (c) 2013, Marc Horowitz
# 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 conditions and the f... |
# Note: These views are public with the exception of the response_view
# which has "secure" parts to it in the template.
import json
from datetime import date, timedelta
from django.contrib import messages
from django.contrib.contenttypes.models import ContentType
from django.http import (
HttpResponse,
HttpR... |
import React, { Component } from 'react'
const LeftArrow = (props) => {
return (
<div onClick={props.previousSlide} className="backArrow">
<i className="left" />
</div>
)
}
export default LeftArrow
|
var keystone = require('../'),
crypto = require('crypto'),
scmp = require('scmp');
/**
* Creates a hash of str with Keystone's cookie secret.
* Only hashes the first half of the string.
*/
function hash(str) {
// force type
str = '' + str;
// get the first half
str = str.substr(0, Math.round(str.length / 2));... |
/**
* MIT License
*
* Copyright (c) 2017-present, Elasticsearch BV
*
* 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 ... |
const GatewayStorage = require('./GatewayStorage');
const Settings = require('../Settings');
const { Collection } = require('discord.js');
const { RequestHandler } = require('@klasa/request-handler');
/**
* The Gateway class for persistent data interaction with a cache layer
* @extends GatewayStorage
*/
class Gatew... |
#-------------------------------------------------------------------------------
#
# Base class for all motion sensors
#
import iofun
import message
from device import Device
from querier import Querier
from querier import MsgHandler
from dbbuilder import GenericDBBuilder
from linkdb import LightDBRecordFormatter
from ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from wep.libs.exception import Error
def get_data(session, sql, params = {}, help_text="get data failded"):
try:
all_items = session.execute(sql, params).fetchall()
except Exception, e:
raise Error(-1, help_text + ':' + str(e))
data = ... |
class Attachment {
constructor(file, directory) {
this.file = file;
this.directory = directory;
this.state = 'pending';
this.id = null;
this.href = null;
this.name = null;
this.percent = 0;
}
static traverse(transfer, directory) {
return transf... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
'use strict';
const MAGIC_UNBUNDLE_NUMBER = require('../../shared/output/RamBundle/magic-numb... |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe, frappe.utils, frappe.utils.scheduler
import unittest
test_records = frappe.get_test_records('Email Alert')
class TestEmailAlert(unittest.TestCase):
def setUp(self):
frappe.... |
$(function () {
$('#password').bind('keyup', function(event) {
if (event.keyCode == "13") {
//回车执行查询
$('#login-btn').click();
}
});
$("#login-btn").click(function () {
$(".tip").css("display","none");
$(".login-btn").addClass("disabled");
... |
const EventEmitter = require('events');
const BlsSignatures = require('bls-signatures');
const eventNames = {
LOADED_EVENT: 'LOADED',
};
const events = new EventEmitter();
let isLoading = false;
let instance = null;
function compileWasmModule() {
isLoading = true;
return BlsSignatures().then((loadedInstance) =... |
"""
Consolidate Services
Description of all APIs # noqa: E501
The version of the OpenAPI document: version not set
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from argocd_python_client.model_utils import ( # noqa: F401
ApiTypeError,
Mo... |
# myapp/views.py
from django.shortcuts import render
from myapp.reports import MyReport
def my_report(request):
# Initialise the report
template = "myapp/my_report.html"
report = MyReport()
context = {'report': report}
return render(request, template, context)
|
const util = require("util");
const mysql = require("mysql");
const inquirer = require("inquirer");
const connection = mysql.createConnection({
host: "localhost",
port: 3306,
// Your username
user: "root",
// Your password
password: "rootroot",
database: "employees"
});
connection.connect(... |
import { gsap } from '../node_modules/gsap/index.js';
const nameplateEl = document.getElementById('nameplate');
const titleEl = document.getElementById('title');
const event1 = document.getElementById('event1');
const time1 = document.getElementById('time1');
const event2 = document.getElementById('event2');
const ti... |
# Bep Marketplace ELE
# Copyright (c) 2016-2021 Kolibri Solutions
# License: See LICENSE file or https://github.com/KolibriSolutions/BepMarketplace/blob/master/LICENSE
# Generated by Django 3.0.6 on 2020-06-09 09:53
from django.conf import settings
from django.db import migrations, models
class Migration(migrati... |
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Exago(CMakePackage, CudaPackage, ROCmPackage):
"""ExaGO is a package for solving large-sca... |
_base_ = [
'../_base_/models/mask_rcnn_r50_fpn.py',
'../_base_/datasets/coco_instance.py',
'../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py'
]
model = dict(
pretrained=None,
backbone=dict(norm_cfg=dict(type='BN', requires_grad=False)),
roi_head=dict(
bbox_head=dict(ty... |
/******************************************************************************
Our plugin code comes first in this document. Normally, plugins would
appear in separate files named jquery.plugin-name.js, but for our examples
it's convenient to place this plugin code in the same JavaScript file as
the code that ... |
from django.contrib import admin
# Register your models here.
from .models import Product
class ProductAdmin(admin.ModelAdmin):
list_display = ['__str__', 'slug']
class Meta:
model = Product
admin.site.register(Product, ProductAdmin) |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var initialState = {
animating: false,
autoplaying: null,
currentDirection: 0,
currentLeft: null,
currentSlide: 0,
direction: 1,
dragging: false,
edgeDragged: false,
initialized: false,
lazyLoadedList: [],
listHeight: ... |
// usage: log('inside coolFunc', this, arguments);
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
window.log = function(){
log.history = log.history || []; // store logs to an array for reference
log.history.push(arguments);
if(this.console) {
arguments.callee = arguments.callee.caller;
... |
# Originally from Bothub
# Port to scape by @heyworld
#Copyright (C) 2020 azrim.
#imported .song and .vsong form catscape
from telethon import events
import asyncio
import glob
import shutil
from scape.events import register
from scape import bot, CMD_HELP, GOOGLE_CHROME_BIN, TEMP_DOWNLOAD_DIRECTORY, bot
from telethon... |
var dbm = require('db-migrate');
var type = dbm.dataType;
exports.up = function(db, callback) {
var updateAdminSql = 'UPDATE USER SET PASSWORD = ? WHERE NAME = "admin"';
db.runSql(updateAdminSql, ['$2a$10$Vq/cxG7Nxai6SN5U4k.tQOrVySVf840wcmwFkbhXd5u9DQj5fwUiO'], callback);
};
exports.down = function(db, callback)... |
const dotenv= require('dotenv');
require('dotenv').config();
module.exports = {
"client_id": process.env.zclient_id,
"client_secret": process.env.zclient_secret,
"redirect_url": process.env.zredirect_url,
"refresh_token": process.env.zrefresh_token,
"iamurl": "accounts.zoho.com",
"base_url": "ww... |
const is_prime = n => {
for (let x = 2; x < n; x++) {
if (n % x === 0) {
return false;
}
}
return n >= 2;
}
export const get_primes = n => {
let i = 0;
for (let x = 0; x < n+1; x += 1) {
if (is_prime(x)) {
i += 1;
}
}
return i;
}... |
from polyphony import testbench
g_v0 = 20150529
g_v1 = 20170406
def func(n):
if n % 2:
return g_v0
else:
return g_v1
@testbench
def test():
result = func(0)
print(result)
result = func(1)
print(result)
test()
|
import sys
import json
import digitalocean # noqa
from os import path
from metrics import Metrics
from policy import Policy
from importlib import import_module
class Scaler:
policy_dir = path.join(path.abspath(path.dirname(__file__)), '../conf.d/policies')
action_dir = path.join(path.abspath(path.dirname(__fi... |
# Copyright 2020 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
#
# Unless required by applicable law or agreed to... |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
class CredentialsDetails:
ENCRYPTED_CONNECTION = 'Encrypted'
ENCRYPTION_ALGORITHM = 'RSA-OAEP'
# Camel casing is used for the member variables as they are going to be serialized and camel case is standard for JSON keys
credential... |
import logging
import operator
from typing import Iterable
from functools import reduce
import numpy as np
import scipy.sparse as sp
from openTSNE import _tsne
from openTSNE import nearest_neighbors
from openTSNE import utils
log = logging.getLogger(__name__)
class Affinities:
"""Compute the affinities between... |
(self.webpackChunkgeonode_mapstore_client=self.webpackChunkgeonode_mapstore_client||[]).push([[127,3204,7654],{73814:(e,t,n)=>{"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).... |
import keyMirror from 'utils/keyMirror'
import origin from '../services/origin'
export const WalletConstants = keyMirror(
{
INIT: null,
INIT_SUCCESS: null,
INIT_ERROR: null,
BALANCE: null,
BALANCE_SUCCESS: null,
BALANCE_ERROR: null,
},
'WALLET'
)
export function init() {
return async ... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-27abc4c9"],{"1abd":function(t,r,e){"use strict";var s=e("2e8b"),c=e.n(s);c.a},2911:function(t,r,e){"use strict";e.r(r);var s=function(){var t=this,r=t.$createElement,e=t._self._c||r;return e("error-content",{attrs:{code:"404",desc:"抱歉,你访问的页面不存在",src:t.sr... |
import React, { useState, useEffect } from 'react'
import PageTitle from '../components/Typography/PageTitle'
import {
Input,
Label,
Button,
Modal,
ModalHeader,
ModalBody,
Select,
} from '@windmill/react-ui'
import { Link, useParams } from 'react-router-dom'
import { useForm } from 'react-hook-form'
impor... |
'use strict';
import classnames from 'classnames';
import React from 'react';
import ReactDOM from 'react-dom';
import SessionStore from '../stores/SessionStore';
import { Alert, Button, Form, FormField, FormInput } from 'elemental';
import { createHistory } from 'history';
var history = createHistory();
var SigninV... |
import json
from image.docker.interfaces import ContentRetriever
class ContentRetrieverForTesting(ContentRetriever):
def __init__(self, digests=None):
self.digests = digests or {}
def add_digest(self, digest, content):
self.digests[digest] = content
def get_manifest_bytes_with_digest(se... |
from typing import Dict, List, Optional
from great_expectations.datasource.data_connector import ConfiguredAssetSqlDataConnector
from great_expectations.datasource.data_connector.asset import Asset
from great_expectations.execution_engine import ExecutionEngine
try:
import sqlalchemy as sa
from sqlalchemy.exc... |
// @flow
import React from 'react';
import { shallow, mount } from 'enzyme';
import InlineDialog from '@atlaskit/inline-dialog';
import Spinner from '@atlaskit/spinner';
import FieldBase, { FieldBaseStateless } from '../..';
import { ChildWrapper, Content } from '../../styled/Content';
import { WarningIcon } from '../.... |
// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
// for details on configuring this project to bundle and minify static web assets.
// Write your JavaScript code.if (document.readyState == 'loading') {
document.addEventListener('DOMContentLoaded', ready)
}els... |