text stringlengths 3 1.05M |
|---|
const router = require('express').Router()
const { User } = require('../db/models')
module.exports = router
router.get('/payment/:blockHash', async (req, res, next) => {
try {
console.log('hello! we are in payment')
const allContracts = await factory.methods.getDeployedBlocks().call()
console.log('allCo... |
#!/usr/bin/env python
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software... |
/*-------------------------------------------------------------------------
*
* copy.h
* Definitions for using the POSTGRES copy command.
*
*
* Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/include/commands... |
var searchData=
[
['blemanagerimpl_3120',['BLEManagerImpl',['../classchip_1_1_device_layer_1_1_platform_manager.html#a208e83cad03106b77b2e8b8956cf0cca',1,'chip::DeviceLayer::PlatformManager::BLEManagerImpl()'],['../classchip_1_1_device_layer_1_1_platform_manager_impl.html#aca038dce8e4402d1c2bc186ff62bd3b6',1,'chip::D... |
# -*- coding: utf-8 -*-
"""
meraki
This file was automatically generated for meraki by APIMATIC v2.0 ( https://apimatic.io ).
"""
class UpdateNetworkSsidsPlashSettingsModel(object):
"""Implementation of the 'updateNetworkSsidSplashSettings' model.
TODO: type model description here.
... |
const user = require('../model/user.js');
const { playerExist } = require('./game.js');
const { OAuth2Client } = require('google-auth-library');
const googleClient = new OAuth2Client(process.env.CLIENTID);
module.exports = async (socket, next) => {
try {
const ticket = await googleClient.verifyIdToken({
idToken:... |
var couchapp, ddoc, path;
couchapp = require('couchapp');
path = require('path');
ddoc = {
_id: '_design/app',
rewrites: {},
views: {},
shows: {},
lists: {},
validate_doc_update: function(newDoc, oldDoc, userCtx) {
if (newDoc._deleted === true && userCtx.roles.indexOf('_admin') === -1) {
throw ... |
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Anscombe'] , ['Lag1Trend'] , ['Seasonal_Second'] , ['NoAR'] ); |
from rest_framework.decorators import action
from care.facility.models import User
from care.utils.serializer.history_serializer import ModelHistorySerializer
class UserAccessMixin:
def get_queryset(self):
queryset = self.queryset
model = self.queryset.__dict__["model"]
if self.request.us... |
/*
* Author: Pierre Pfister <pierre@darou.fr>
*
* Copyright (c) 2014-2015 Cisco Systems, Inc.
*
*/
#include <libubox/list.h>
#include "hncp_wifi.h"
#include "hncp_i.h"
#include "hnetd.h"
#include "exeq.h"
#define HNCP_SSIDS 2 //Number of supported SSID provided to the script
typedef struct hncp_ssid_struct {
... |
import React from 'react'
import ReactDOM from 'react-dom'
import { BrowserRouter } from 'react-router-dom'
import { ApolloProvider } from 'react-apollo'
import registerServiceWorker from './registerServiceWorker'
import apolloClient from './apollo-client'
import App from './App'
import './index.css'
ReactDOM.render(... |
def soma_hipotenusas(x):
i = 1
j = 1
c = 1
soma = 0
apoio = 0
while c <= x:
while i < x:
while j < x:
if ((i ** 2) + (j ** 2)) == (c ** 2) and apoio != c ** 2:
apoio = c ** 2
soma += c
j += 1
... |
/*!
Highlight.js v11.0.1 (git: 1cf31f015d)
(c) 2006-2021 Ivan Sagalaev and other contributors
License: BSD-3-Clause
*/
var hljs=function(){"use strict";var e={exports:{}};function t(e){
return e instanceof Map?e.clear=e.delete=e.set=()=>{
throw Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete... |
import { createStore, applyMiddleware, compose } from "redux";
import createSagaMiddleware from "redux-saga";
import rootSaga from "./services/sagas";
import reducers from "./reducer";
import { menuItems } from "./data/mockData";
import { writeData } from "./services/firebase";
const sagaMiddleware = createSagaMiddlew... |
//
// XMViewController.h
// XMVerificationCodeInputView
//
// Created by 402187526@qq.com on 12/25/2020.
// Copyright (c) 2020 402187526@qq.com. All rights reserved.
//
@import UIKit;
@interface XMViewController : UIViewController
@end
|
/*********************************************************************
* File: kernel.h
* Project: Assignment #2 for ENEL323
* Brief: Header File for kernel.c
* Authors: Paul Bowler & Aydin Arik
* Last Modified: June 2011
**********************************************************************/
#ifndef KERNEL_H_
#d... |
// ************************************************************************ //
// WARNING
// -------
// The types declared in this file were generated from data read from a
... |
# coding: utf-8
"""
Swaggy Jenkins
Jenkins API clients generated from Swagger / Open API specification # noqa: E501
OpenAPI spec version: 1.1.1
Contact: blah@cliffano.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class Organisations(ob... |
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
/*
* Copyright (C) 2012-2014, 2018-2021 Intel Corporation
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
* Copyright (C) 2016-2017 Intel Deutschland GmbH
*/
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/skbuff.h>
#include <linux/net... |
# coding=utf-8
# Copyright 2013 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
from __future__ import print_function
import argparse
... |
import { createSwitchNavigator } from 'react-navigation';
import { MainTabNavigator } from './main.tab';
import { DemoScreen } from '../1.screens/demo-screen/demo-screen';
export const RootSwitchNavigator = createSwitchNavigator(
{
Login: {
path: 'login',
screen: DemoScreen,
... |
# This file is automatically generated by the rmf-codegen project.
#
# The Python code generator is maintained by Lab Digital. If you want to
# contribute to this project then please do not edit this file directly
# but send a pull request to the Lab Digital fork of rmf-codegen at
# https://github.com/labd/rmf-codegen
... |
import Vue from 'vue';
import VueRouter from 'vue-router';
const Home = () => import('../views/Home/Home');
const HomeHot = () => import('../views/Home/children/hot/HomeHot');
const HomeOther = () => import('../views/Home/children/other/HomeOther');
const Recommend = () => import('../views/Recommend/Recommend');
const... |
function none() {}
export default function(selector) {
return selector == null ? none : function() {
return this.querySelector(selector);
};
}
|
import django_tables2 as tables
from django_tables2.utils import A
from .models import *
class ProjectTable(tables.Table):
id = tables.LinkColumn(
'arche:project_detail',
args=[A('pk')], verbose_name='ID'
)
has_title = tables.LinkColumn(
'arche:project_detail',
args=[A('pk'... |
import React from 'react'
import PropTypes from 'prop-types'
import Helmet from 'react-helmet'
import { StaticQuery, graphql } from 'gatsby'
import '../../node_modules/bootstrap/dist/css/bootstrap.min.css'
import Header from './header'
import './layout.css'
const Layout = ({ children }) => (
<StaticQuery
query={... |
from threading import Thread
import urllib3
from queue import Queue
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
class WebSeedManager(Thread):
def __init__(self, request_queue, http_peers):
Thread.__init__(self)
self.request_queue = request_queue
self.stop_requested =... |
#!/usr/bin/env python2.7
import run_utility as u
aggregators = [
"daba",
"daba_lite",
"rb_daba_lite",
"two_stacks",
"two_stacks_lite",
"rb_two_stacks_lite",
"chunked_two_stacks_lite",
"flatfit",
"bclassic4",
"bfinger4",
]
base_window_sizes = [
1, 2, 4, 8, 16, 32, 64, 128, ... |
import * as asn1js from "asn1js";
import { getParametersValue, clearProps } from "pvutils";
import Extension from "./Extension.js";
//**************************************************************************************
/**
* Class from RFC5280
*/
export default class Extensions
{
//********************************... |
import os
import sys
from pkg_resources import get_distribution, DistributionNotFound
__author__ = "Danny Grove <danny@drgrovellc.com>"
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
__version__ = "dev"
# Allows "import mtls_server" and "from mtls_server import <name>".
s... |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: v1.15.6
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1PodReadi... |
/*
* (C) Copyright 2007
* Sascha Hauer, Pengutronix
*
* (C) Copyright 2009 Freescale Semiconductor, Inc.
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <asm/io.h>
#include <div64.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
#include <asm/arch/sys_proto.h>
/* General purp... |
# Generated by Django 4.0.3 on 2022-03-19 20:46
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Inquilino',
fields=[
('id',... |
#
# SPDX-FileCopyrightText: 2021 Thorsten Hapke <thorsten.hapke@sap.com>
#
# SPDX-License-Identifier: Apache-2.0
#
import sys
import yaml
from os.path import dirname, join, abspath
proj_dir = join(dirname(dirname(dirname(dirname(abspath(__file__))))))
sys.path.insert(0, proj_dir)
import script
from diadmin.dimockapi... |
'use strict';
/*global m */
// todo modules
var app = require('./app');
var model = require('./model');
require('./header');
require('./new-task');
require('./list-of-tasks');
require('./task');
require('./footer');
module.exports = m.element('todos-demo', {
controller: function(){
// Todo collection
app... |
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
tsconfigRootDir: __dirname,
project: ["./tsconfig.eslint.json"],
},
env: {
node: true,
},
extends: [
"eslint:recommended",
... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Handles the "LaTeX" unit format.
"""
import re
import numpy as np
from . import base, core, utils
class Latex(base.Base):
"""
Output LaTeX to display the unit based on IAU style guidelines.
Attempts to follow the `IAU Style Manual
... |
"use strict";
const conversions = require("webidl-conversions");
const utils = require("./utils.js");
const impl = utils.implSymbol;
const HTMLElement = require("./HTMLElement.js");
function HTMLDataElement() {
throw new TypeError("Illegal constructor");
}
Object.setPrototypeOf(HTMLDataElement.prototype, HTMLElem... |
#!/usr/bin/python2.4
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''Unit tests for io.FileNode'''
import os
import sys
if __name__ == '__main__':
sys.path.append(os.path.join(os.path.dirnam... |
#!/usr/bin/env python3
import json
import logging
import os
import sys
from os.path import basename
from shutil import copyfileobj
from urllib.error import HTTPError
from urllib.parse import urljoin
from urllib.request import Request, urlopen
LOGGER = logging.getLogger()
def main(url: str, token: str, file_path: s... |
/**
* Copyright IBM Corp. 2016, 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.
*/
import React, { useRef } from 'react';
import ddsSettings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings';
import HeaderSid... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{"UQ+b":function(l,n,u){"use strict";u.r(n);var a=u("CcnG"),e=function(){return function(){}}(),s=u("pMnS"),t=u("MdoF"),r=u("lTVp"),b=u("Ip0R");function o(){return Object.assign(new r.b,{type:"success"})}var c=function(){function l(l){this.dismissible=!0,this.ale... |
'''
Author: Aditya Mangal
Date: 19 september,2020
Purpose: python practise problem
'''
def iter_method(number):
prevnum = 0
currentnum = 1
for i in range(1, number):
prevprevnum = prevnum
prevnum = currentnum
currentnum = prevprevnum + prevnum
return currentnum
if __na... |
import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon([/*#__PURE__*/_jsx("path", {
d: "M8 16h12V4H8v12zm2-10h8v2h-8V6zm0 3h8v2h-8V9zm0 3h4v2h-4v-2z",
opacity: ".3"
}, "0"), /*#__PURE__*/_jsx("path", {
d: "M4 22h14v-2H4V6H2v14c0 1.1.9 2 2 2... |
import React from 'react';
import PropTypes from 'prop-types';
import { useProjectsValue } from '../context';
export const ProjectOverlay = ({
setProject,
showProjectOverlay,
setShowProjectOverlay,
}) => {
const { projects } = useProjectsValue();
return (
projects &&
showProjectOve... |
import os
import subprocess
import tempfile
from hashlib import md5
"""
With fastcoll, each of the two collided data chunks contains two MD5 blocks,
which is 128 bytes.
"""
COLLISION_LEN = 128
"""
The collided data chunks generated by fastcoll are almost identical, only diff
at a few specific positions illustrated in... |
const createNoMarkdownHeadings = require('./noMarkdownHeadings');
describe('createNoMarkdownHeadings rule', () => {
const noMarkdownHeadings = createNoMarkdownHeadings();
it('should return `undefined` if there is no heading in a value', () => {
expect(noMarkdownHeadings({}, 'description', 'some ## text'))
... |
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#--------------------------------------------------------------------------
import logg... |
// @flow
import * as React from 'react'
import { View } from 'react-native'
import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome'
import { type Theme, type ThemeProps, cacheStyles, withTheme } from '../../../components/services/ThemeContext.js'
import { ClickableRow } from '../../../components/themed/Cl... |
const {
etherUnsigned,
etherMantissa,
etherExp,
} = require('./Utils/Ethereum');
const {
makeComptroller,
makeCToken,
preApprove,
preSupply,
quickRedeem,
} = require('./Utils/Compound');
async function compBalance(comptroller, user) {
return etherUnsigned(await call(comptroller.comp, 'balanceOf', [u... |
# -*- coding: utf-8 -*-
'''Settings objects used to configure the web API
These settings get passed into the handler.initialize() function,
of each request, and configure the web API endpoint. They are mostly
a container for the `Config module`_, and any other settings that
are the same across all handler types, e.g. ... |
/*
* Copyright (c) 2006 Chelsio, Inc. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree,... |
#
# Copyright (c), 2016-2020, SISSA (International School for Advanced Studies).
# All rights reserved.
# This file is distributed under the terms of the MIT License.
# See the file 'LICENSE' in the root directory of the present
# distribution, or http://opensource.org/licenses/MIT.
#
# @author Davide Brunato <brunato@... |
module.exports = middleware => {
return (req, res, next) => {
if(req.user.admin) {
middleware(req, res, next)
} else {
res.status(401).send('Usuário não é administrador')
}
}
} |
# Drew Ipson | 3 ML Model | March 12, 2020
# import warnings filter
from warnings import simplefilter
# ignore all future warnings
simplefilter(action='ignore', category=FutureWarning)
import pandas as pd
from sklearn import tree, linear_model, preprocessing
# Read in csv files and store and data frames. Feature... |
/*
* This header is generated by classdump-dyld 1.0
* on Saturday, June 1, 2019 at 6:44:03 PM Mountain Standard Time
* Operating System: Version 12.1.1 (Build 16C5050a)
* Image Source: /System/Library/PrivateFrameworks/StoreServices.framework/StoreServices
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016... |
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------
# drawElements Quality Program utilities
# --------------------------------------
#
# Copyright 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use t... |
#!/usr/bin/env python
import pifacedigitalio
pfd = pifacedigitalio.PiFaceDigital()
pfd.relays[0].value = 1
# turn on/set high the first relay
# pfd.relays[0].value = 0
|
/*
* Copyright 2017-present Shawn Cao
*
* 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... |
/*
Copyright (C) 2000-2005 Heikki Orsila
Copyright (C) 2000-2005 Michael Doering
This module is dual licensed under the GNU GPL and the Public Domain.
Hence you may use _this_ module (not another code module) in any way you
want in your projects.
About security:
This module tries to avoid any buffer overrun... |
# -*- coding: utf-8 -*-
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2018 The Electrum developers
#
# 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,
# includi... |
# -*- coding: utf-8 -*-
class PgError(Exception):
""" Base pg exception class """
class BadUri(PgError):
""" Pg uri parsing error """
class AlreadyRegistered(PgError):
""" Entity class registered error """
class PoolClosed(PgError):
""" Pool closed error """
class ConnectionClosed(PgError):
... |
/*
* RTOSPublic.h
*
* Created on: 25 de ago de 2020
* Author: breno
*/
#ifndef RTOS_PUBLIC_H_
#define RTOS_PUBLIC_H_
#include <IO/OStream.h>
#include <Kernel/Kernel.h>
namespace RTOS
{
Kernel::KernelEEprom& UFat = *(Kernel::UFat);
Kernel::KernelOstream& cout = Kernel::cout;
const STREAM::SPECIAL_CHAR... |
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from keras.models import Sequential
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint
from keras.layers import Lambda, Conv2D, MaxPooling2D, Dropout, Dense, Flatten
from utils import INPUT_SHAPE, batc... |
/* $OpenBSD: asn_pack.c,v 1.15 2015/12/23 20:37:23 mmcc Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999.
*/
/* ====================================================================
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
*
* Redistribution and us... |
/*
* Copyright(C) 1999-2017 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitte... |
# call this script with `python -m evaluation.evaluate_poselines_globalaction`
import os
import numpy as np
import pandas as pd
import datetime
from tqdm import tqdm
from . import eval_utils
import pickle
import copyreg
import cv2
from .compare_deepfeatures import negative_cosine_dist_flatten
from .compare_sift import... |
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
ReactDOM.render(
<App/>,
document.getElementById('root')
);
|
/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2017 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
// Provides control sap.ui.commons.MenuItem.
sap.ui.define(['jquery.sap.global', './MenuItemBase', './library', 'sap/ui/unified/MenuI... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012-2013, Timothy Appnel <tim@appnel.com>
#
# Ansible 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, either version 3 of the License, or
# (at your option) an... |
/**
* Find short path.
*
*/
function BFSAlgorithm(graph, app)
{
BaseTraversal.apply(this, arguments);
this.message = g_startTraversal;
}
// inheritance.
BFSAlgorithm.prototype = Object.create(BaseTraversal.prototype);
// timer interval
BFSAlgorithm.prototype.timerInterval = 500;
BFSAlgorithm.prototype.getN... |
from urllib import response
from flask import Flask,request,jsonify
import util
app = Flask(__name__)
@app.route('/get_location_names')
def get_location_names():
response = jsonify({
'locations': util.get_location_names()
})
response.headers.add('Access-Control-Allow-Origin',"*")
... |
import React, { Component, PropTypes } from 'react'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import { Link } from 'react-router'
import * as Actions from '../../actions'
import HomeBody from '../../components/HomeBody'
import LoadMore from '../../components/LoadMore'
import Wxpub... |
const R = require('ramda');
const { splitText } = require('./splitText');
const { isTag, ensureSentence } = require('./utils');
const { renderExampleTag } = require('./renderExampleTag');
const { renderTagInLine } = require('./renderTagInLine');
const { renderTagInColumns } = require('./renderTagInColumns');
const { ge... |
"""Functional programming structures."""
from functools import partial
from typing import Any, Callable, Sequence, TypeVar
A = TypeVar('A')
B = TypeVar('B')
C = TypeVar('C')
T = TypeVar('T')
F = partial
def curry2(f: Callable[[A, B], C]) -> Callable[[A], Callable[[B], C]]:
"""Curry a two argument function."""... |
define({ "api": [
{
"type": "post",
"url": "/api/login",
"title": "Authenticate the user",
"group": "Authenticate",
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field"... |
#!/usr/bin/python
import argparse,sys,math
def main(options):
if options.input_path is not None:
with open(options.input_path,'rb') as f:
data = f.read()
if options.output_path is not None:
with open(options.output_path,'wb') as f:
for x in data:
u =... |
than=100
print(than)
meters= 24
total_metars =than * meters
print("Total Meters Merchant have :",total_metars)
than_type1="cotton"
than_type2="polyster"
than_type3="silk"
print("Cloth Categories : ", than_type1,than_type2,than_type3)
categories=[than_type1,than_type2,than_type3]
print(categories)
|
from collections import namedtuple, deque, Counter
import copy
import json
import logging
import requests
import time
from datetime import datetime as dt
import warnings
log = logging.getLogger(__name__)
class RateLimitCache(object):
def __init__(self, n, t=60):
self.n = n
self.t = t
self.... |
const companyName = 'Scuber';
var mostProfitableNeighborhood = 'Chelsea';
let companyCeo = 'Susan Smith' |
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2014-2018 ArangoDB GmbH, Cologne, Germany
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except... |
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) { try { step(gene... |
$(document).ready(function() {
$('#disclaimer').bind('do-toggle', function() {
$(this).toggle('slow');
});
$('#toggleButton').click(function() {
$('#disclaimer').trigger('do-toggle');
})
});
|
// Be sure to add these ENV variables!
const KEYGEN_PRODUCT_TOKEN = "admin-67752b8fc687ab43bac1b4810a5ddbaffc3a1ddd62e59ffefde9df7e88f604bdv3"
const KEYGEN_ACCOUNT_ID= "c5e7a619-5304-41cc-aac6-2882bc7033ee"
const KEYGEN_POLICY_ID = "167b5ff8-e776-4318-96cd-593ef41bc94e"
const PORT = 4000
const crypto = require('crypto... |
import CWiPy.MembershipFunction as mf
class FuzzyPartition:
def __init__(self, start, end, points, aliases):
self.start = start
self.end = end
self.points = points
self.aliases = aliases
def set_division(self, count):
points = []
step = float(self.end - self.st... |
# coding: utf-8
"""Backend management system classes
Used to communicate with providers without using CFME facilities
"""
from __future__ import absolute_import
import fauxfactory
import pytz
from ovirtsdk4 import Connection, Error, types
from wait_for import wait_for, TimedOutError
from .base import WrapanapiAPIBase... |
/*---------------------------------------------------------------------------------------------
* Copyright © 2016-present Earth Computing Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE.txt in the project root for license information.
*----------------------------------------------... |
import {ADD_COUNTER, ADD_TO_CART, CHANGE_CHECKED_CART,SET_CHECKED_CART} from './mutation-types'
export default {
addCart({state, commit}, payload) {
return new Promise((resolve) => {
let hasProduct = state.cartList.find(item => item.iid === payload.iid)
if (!hasProduct) {
commit(ADD_TO_CART, ... |
var crypto = require('crypto');
var createHashedPassword = function(password, salt) {
var hash = crypto.createHash('sha256')
.update(password + salt)
.digest('hex');
// console.log(password, 'password')
// console.log(hash, 'hash')
return hash;
}
var createSalt = fu... |
# -*-coding:utf-8-*-
import torch
import torch.nn as nn
import torch.nn.functional as F
__all__ = ["sk_resnext29_16x32d", "sk_resnext29_16x64d"]
class SKConv(nn.Module):
def __init__(self, features, M, G, r, stride=1, L=32):
""" Constructor
Args:
features: input channel dimensionality... |
/***************************************************************************//**
* @file
* @brief EFM32TG11B_CAN_MIR register and bit field definitions
*******************************************************************************
* # License
* <b>Copyright 2022 Silicon Laboratories Inc. www.silabs.com</b>
*****... |
// =====================================================================
// This file is part of the Microsoft Dynamics CRM SDK code samples.
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
// This source code is intended only as a supplement to Microsoft
// Development Tools and/or on-line doc... |
"""
Django settings for django_app project.
Generated by 'django-admin startproject' using Django 1.9.6.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os... |
/*
* This program 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; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be use... |
/* Tabulator v4.2.7 (c) Oliver Folkerd - WJF MODS */
var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};(function(global,factory){if((typeof... |
void photonInjection(struct photon **ph, int *ph_num, double r_inj, double ph_weight, int min_photons, int max_photons, char spect, double theta_min, double theta_max, struct hydro_dataframe *hydro_data, gsl_rng * rand, FILE *fPtr);
void lorentzBoost(double *boost, double *p_ph, double *result, char object, FILE *f... |
#ifndef IntToLongCpxCaster_h
#define IntToLongCpxCaster_h
#ifndef MESSAGE
#define MESSAGE cout << "file " << __FILE__ << " line " << __LINE__ << endl;
#endif
#ifndef ERR_MESSAGE
#define ERR_MESSAGE cout << "Error in file " << __FILE__ << " at line " << __LINE__ << " Exiting" << endl; exit(1);
#endif
#include <comple... |
class UnityHelpers: pass |
import React from 'react';
import { Router, Route, Switch } from 'dva/router';
// import IndexPage from './routes/IndexPage';
import HomePage from './routes/HomePage';
import ContentPage from './routes/ContentPage'
function RouterConfig({ history }) {
return (
<Router history={history}>
<Switch>
<R... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... |