text stringlengths 3 1.05M |
|---|
from pyconfigurableml.azure import parse_azure_secret_identifier, resolve_azure_secrets
import pytest
import sys
from unittest.mock import patch, MagicMock
@pytest.mark.parametrize('secret_identifier, expected', [
('https://foo.vault.azure.net/secrets/bar', (True, 'foo', 'bar', None)),
('https://foo.vault.azu... |
/**
joSubject
==========
Class for custom events using the Observer Pattern. This is designed to be used
inside a subject to create events which observers can subscribe to. Unlike
the classic observer pattern, a subject can fire more than one event when called,
and each observer gets data from the subject. This... |
from namua.solver.branch import SerialBranch, ParallelBranch, Branch
from namua.solver.hub import Hub
from namua.solver.fluidknot import FluidKnot
from namua.solver.solver import Solver
from namua.spmodule.pipe import Pipe
from namua.property.dry_air import dry_air
from namua.property.liquid_water import liquid_water
... |
/* Shared GDI and Uniscribe Font backend declarations for the Windows API.
Copyright (C) 2007-2019 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs 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 ... |
<input id="id1" type="number" min="100" max="300" required>
<button onclick="myFunction()">OK</button>
<p id="demo"></p>
<script>
function myFunction() {
var inpObj = document.getElementById("id1");
if (!inpObj.checkValidity()) {
document.getElementById("demo").innerHTML = inpObj.validationMessage;
}
}
</sc... |
# Generated by Django 3.2.7 on 2021-10-06 00:08
from django.db import migrations, models
import phonenumber_field.modelfields
class Migration(migrations.Migration):
initial = True
dependencies = [
("auth", "0012_alter_user_first_name_max_length"),
]
operations = [
migrations.Creat... |
/*
* @Author: detailyang
* @Date: 2016-03-10 12:52:31
* @Last modified by: detailyang
* @Last modified time: 2016-06-30T13:24:03+08:00
*/
const avatar = require('avatar-generator')();
module.exports = {
generate(id, sex, width) {
return new Promise((resolve, reject) => {
avatar(id, sex, width).toB... |
import os
import sys
from functools import wraps
import aiohttp
import parfive
from parfive import Results
import sunpy
__all__ = ['Downloader', 'Results']
# Overload the parfive downloader class to set the User-Agent string
class Downloader(parfive.Downloader):
@wraps(parfive.Downloader.__init__)
def __in... |
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
/**
* @requires OpenLayers/Format/GML/Base.js
*/
/**
* Class: O... |
const Image = require('../models/image');
const fs = require('fs');
// const compress_images = require('compress-images');
const Product = require('../models/products');
function productGet(req, res) {
Product.find({}, (err, data) => {
if (err) {
console.log(err);
return res.json({... |
export { default as Phoenix } from './Phoenix.js'; |
const Query = require('./query');
const Mutation = require('./mutation');
const { GraphQLDateTime } = require('graphql-iso-date');
module.exports = {
Query,
Mutation,
DateTime: GraphQLDateTime
};
|
// Helper: root() is defined at the bottom
var path = require('path');
var webpack = require('webpack');
// Webpack Plugins
var CommonsChunkPlugin = webpack.optimize.CommonsChunkPlugin;
var autoprefixer = require('autoprefixer');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require('... |
__NUXT_JSONP__("/amp/35/7", (function(a,b,c,d,e,f,g,h,i,j){return {data:[{metaTitle:b,metaDesc:c,verseId:7,surahId:35,currentSurah:{number:"35",name:"فاطر",name_latin:"Fatir",number_of_ayah:"45",text:{"1":"اَلْحَمْدُ لِلّٰهِ فَاطِرِ السَّمٰوٰتِ وَالْاَرْضِ جَاعِلِ الْمَلٰۤىِٕكَةِ رُسُلًاۙ اُولِيْٓ اَجْنِحَةٍ مَّثْنٰى و... |
# -*- coding: utf-8 -*-
""" Sahana Eden Situation Model
@copyright: 2009-2021 (c) Sahana Software Foundation
@license: MIT
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 wit... |
/*
* This header is generated by classdump-dyld 1.5
* on Wednesday, April 14, 2021 at 2:33:45 PM Mountain Standard Time
* Operating System: Version 14.4 (Build 18K802)
* Image Source: /System/Library/PrivateFrameworks/CMCapture.... |
from .event import Events
from .exception import RunnerAlreadyExistsError
from .stats import RequestStats
from .runners import LocalRunner, MasterRunner, WorkerRunner
from .web import WebUI
from .user.task import filter_tasks_by_tags
class Environment:
events = None
"""
Event hooks used by Locust internal... |
(function (window, document, $) {
"use strict";
$(window).on('load', function () {
$(".noo-spinner").remove();
});
/* On resize */
$(window).on('resize', function () {
cartTopDistance();
});
/* On scroll */
$(window).on('scroll', function () {
cartTopDistance();
var isMobile = {
Android: fun... |
import { $$ } from './utils.js'
export class SyntaxHighlighting {
static getUnderlinedElements() {
return $$('[style*="text-decoration:underline"]')
}
static trimTrailingWhitespace(element) {
const content = element.textContent
if (!/\s$/.test(content)) return
element.textContent = content.trimE... |
import 'emoji-mart/css/emoji-mart.css'
import './index.css'
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import moment from 'moment'
import 'moment/locale/zh-cn'
moment.locale('zh-cn')
ReactDOM.render(<App />, docume... |
# -*- coding: utf-8 -*-
# Copyright 2014 Objectif Libre
#
# 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 ... |
from django.http import Http404, HttpResponseRedirect
from django.shortcuts import render
from django.urls import reverse
from django_prbac.utils import has_privilege
from dimagi.utils.couch.resource_conflict import retry_resource
from corehq import privileges, toggles
from corehq.apps.app_manager import add_ons
fro... |
/*
* @copyright (c) 2017, Philipp Thuerwaechter & Pattrick Hueper
* @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
*/
const path = require('path');
const { updateWebpackConfigForLocales } = require('./utils/buildWebpackConfig');
module.exports = function (config) {
const sauce... |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.17
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import r... |
const EventEmitter = require('events');
const zmq = require('zmq');
const config = require('./nodeconfig.js');
const logger = require('../log.js');
class ZmqSocket extends EventEmitter {
constructor(listenAddress, protocol) {
super();
this.listenAddress = listenAddress;
this.protocol = pro... |
/* eslint-disable sort-keys, no-magic-numbers */
export default [
['timestamp', '1237556', '1281471', '1253200', '1233881'],
[1552492800000, 302292, 79984, 275954, 629850],
[1552579200000, 349875, 89982, 329945, 713830],
[1552665600000, 386262, 74985, 377937, 739024],
[1552752000000, 459036, 109978, 473921, 9... |
"""Lebedev quadrature."""
from numpy import pi
from sphericalquadpy.quadrature.quadrature import Quadrature
from sphericalquadpy.tools.findnearest import find_nearest
from sphericalquadpy.lebedev.writtendict import lebedevdictionary
import os
from numpy import loadtxt
AVAILABLEORDERS = [
3,
5,
7,
9,
... |
from django.conf import settings
from django.template import RequestContext
from django.shortcuts import render_to_response, render, get_object_or_404, redirect
from django.views.decorators.cache import cache_page
from django.views.generic.list import ListView
from django.views.generic.dates import (ArchiveIndexView, Y... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016 Red Hat, Inc
#
# 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 req... |
import { useRef, useState, useContext } from 'react';
import { Link as RouterLink, useNavigate } from 'react-router-dom';
// material
import { alpha } from '@mui/material/styles';
import { Button, Box, Divider, MenuItem, Typography, Avatar, IconButton } from '@mui/material';
// components
import Iconify from '../../com... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = HeaderContainer;
var React = _interopRequireWildcard(require("react"));
var _reactNative = require("react-native");
var _reactNavigation = require("react-navigation");
var _Header = _interopRequireDefault(require("./He... |
############################################
# Copyright (c) 2012 Microsoft Corporation
#
# Z3 Python interface
#
# Author: Leonardo de Moura (leonardo)
############################################
"""Z3 is a high performance theorem prover developed at Microsoft Research. Z3 is used in many applications such as: so... |
const express = require('express')
const app = express();
var cons = require('consolidate');
var path = require('path');
var cors = require('cors');
var crypto = require('crypto');
var algorithm = 'aes-256-ctr';
var password = 'karan@123';
var publicIp = require('public-ip');
const bodyParser = require('body-parser');
... |
#!/usr/bin/env python3
#
## @file
# f2f_cherry_pick_humble.py
#
# Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
''' Contains informational and error messages outputted by
the run_command function of for the f2f-cherry-pick command
'''... |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2013, 2014 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to d... |
function createFunctionArrayFromUseArray(useArray) {
return useArray.map(function(useItem) {
return function(data) {
return useItem;
};
});
}
var useArray = createFunctionArrayFromUseArray([
"./loader",
{
loader: "./loader",
options: "second-2"
},
{
loader: "./loader",
options: {
get: function(... |
/**********************************************************************************************************************
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. *
* ... |
/*!
* VisualEditor DataModel HighlightAnnotation class.
*
* @copyright 2011-2020 VisualEditor Team and others; see http://ve.mit-license.org
*/
/**
* DataModel highlight annotation.
*
* Represents `<mark>` tags.
*
* @class
* @extends ve.dm.TextStyleAnnotation
* @constructor
* @param {Object} element
*/
ve... |
""" utils.py
"""
import os
import torch
import numpy as np
import torchvision
import torchvision.transforms as transforms
import torchvision.utils as vutils
import time
def adjust_dyn_range(x, drange_in, drange_out):
if not drange_in == drange_out:
scale = float(drange_out[1]-drange_out[0])/float(drange_... |
from flask import Flask
from flask import request
from flask import jsonify
from flask import json
app = Flask(__name__)
@app.route("/keyboard", methods=["GET"])
def keyboard():
return jsonify(type="text")
@app.route("/message", methods=["POST"])
def message():
data = json.loads(request.data)
content =... |
import h5py
import os
import numpy as np
from tqdm import tqdm
import torchvision
import scipy.io
nb_train_all = 59551
nb_test_all = 60502
img_count = nb_train_all + nb_test_all
root = '/mnt/datasets/sop'
data = h5py.File(os.path.join(root, 'sop.h5'), 'w')
dt = h5py.special_dtype(vlen=np.dtype('uint8'))
data.create_... |
/* global ViewManager, MocksHelper, LazyLoader */
'use strict';
require('/shared/test/unit/mocks/mock_lazy_loader.js');
require('/test/unit/mock_date.js');
require('/test/unit/mock_debug.js');
require('/test/unit/mock_moz_l10n.js');
require('/js/common.js');
require('/js/utils/toolkit.js');
require('/js/view_manager... |
from TkiWrapper.Logger import *
from TkiWrapper.RootBase import RootBase
import tkinter as tk
from tkinter import ttk
class RootPaned(RootBase):
TYPE = 'PANED'
def __init__(self, windowName, noOfSections, orient):
super().__init__(windowName)
if noOfSections < 2:
Error(self, 'Number of sections in Pa... |
import requests,json
class Qiass:
def __init__(self) -> None:
self.__initlizationVariable()
self.__createSession()
self.__refreshSessionHeaders()
def __initlizationVariable(self):
self.ip = "http://127.0.0.1:5700/"
def __createSession(self):
self.session ... |
module.exports = {
description: "Set or create a quick response",
options: [
{
type: "STRING",
name: "name",
description: `Define the quick response name, for example "help" for \`${require("../../../../config").qrPrefix}help\``,
required: true
},
{
type: "STRING",
na... |
class BaseSettings(object):
'''Creates Settings object'''
def __init__(self, data):
self.reg_season_count = data['scheduleSettings']['matchupPeriodCount']
self.veto_votes_required = data['tradeSettings']['vetoVotesRequired']
self.team_count = data['size']
self.playoff_team_... |
# -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-权限中心(BlueKing-IAM) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with th... |
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\... |
import time
from pygame.surface import Surface
from bomber_monkey.features.board.board import Board, Tiles, TileEffect
from bomber_monkey.features.display.image import Image
from bomber_monkey.features.display.sprite import Sprite
from bomber_monkey.features.player.player import Player
from bomber_monkey.game_config ... |
#!/usr/bin/python
"""
Test datapoints for quality.py
Each one is designed to test some part of the validation functions.
"""
import datetime
dt = datetime.datetime.utcnow()
prod = {
"biomass": 15.0,
"coal": 130.0,
"gas": 890.0,
"hydro": 500.0,
"nuclear": 345.7,
"oil": 0.0,
"solar": 60.0,... |
import os
import math
import torch
import numpy as np
from PIL import Image
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torch.utils.data as data
from alisuretool.Tools import Tools
import torchvision.datasets as datasets
import torchvision.transforms as transforms
class No... |
"use strict";
var mongoose = require('gitter-web-mongoose-bluebird');
var Schema = mongoose.Schema;
var ObjectId = Schema.ObjectId;
var KnownExternalAccessSchema = new Schema({
userId: { type: ObjectId, required: true },
type: { type: String, required: true },
policyName: { type: String, required: true },
lin... |
#include <stdlib.h>
#include <string.h>
static int hash[26];
//cmp function don't consider overflow
int cmp(const void *lhs, const void *rhs)
{
return hash[*(char *)lhs - 'a'] - hash[*(char *)rhs - 'a'];
}
char *customSortString(char *S, char *T)
{
memset(hash, 1 << 6, sizeof(hash));
for (int i = 0; S[i]; ++i)
... |
const { where } = require('./../src/sql-processors/sql-processors')
const data = [
{ name: 'Bob', age: 15, gender: 'male' },
{ name: 'Becka', age: 47, gender: 'female' },
{ name: 'Cate', age: 15, gender: 'female' },
]
describe('where()', () => {
describe('smoke:', () => {
it('should be defined', () => {
... |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# --------------------------------------------------------------------------------------------
import os, math, copy
import numpy ... |
// Copyright (c) 2015 fjz13. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
#pragma once
#include "Node/Input/IInputHandler.h"
#include "Core/Collection/Dictionary.h"
#include "Core/Collection/Array.h"
#include "Core/Geometry/ScrollDirection.... |
const Manager = require("../lib/Manager");
const Engineer = require("../lib/Engineer");
const Intern = require("../lib/Intern");
const generateCardManager = (managerObj) => {
return `
<section class="card shadow mb-3" style="width: 22rem;">
<div class="card-title bg-success px-4 py-2">
<h5 class="t... |
# coding: utf-8
"""
Xero Projects API
This is the Xero Projects API # noqa: E501
OpenAPI spec version: 2.4.0
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
import importlib
import re # noqa: F401
from xero_python import exceptions
from xero_python.api_client import Ap... |
#!/usr/bin/env node
/*
* Copyright (C) 2021 Kian Cross
*/
const fs = require("fs");
function invertObject(object) {
return Object.entries(object)
.reduce((t, [key, value]) => {
t[value] = key;
return t;
}, {});
}
function assertEqual(a, b) {
if (a !== b) {
throw new Error(`Expected "${a... |
'use strict';
const path = require('path');
const lighthouseDir = path.dirname(require.resolve('lighthouse'));
const dirs = {
audits: path.join(__dirname, 'audits'),
gatherers: path.join(__dirname, 'gather', 'gatherers'),
lighthouseAudits: path.join(lighthouseDir, 'audits'),
lighthouseGatherers: path.join(light... |
/*
* Copyright (c) 2014-2015 Wind River Systems, Inc.
* Copyright (c) 2016, Freescale Semiconductor, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief System/hardware module for fsl_frdm_k64f platform
*
* This module provides routines to initialize and support board-level
* hardware for th... |
from vlf_mri import PDFSaver
from pathlib import Path
import numpy as np
folder = Path("pdfsaver_output")
def _plot_random(ax):
x = np.linspace(0., 1., 51)
y = np.sin(x * 2 * np.pi * np.random.randn() + 2 * np.pi * np.random.rand())
ax.plot(x, y)
def test_one_ax():
global folder
filename = fold... |
import numpy as np
import os
from pickle import dump
import string
from tqdm import tqdm
from utils.model import CNNModel
from keras.preprocessing.image import load_img, img_to_array
from datetime import datetime as dt
# Utility function for pretty printing
def mytime(with_date=False):
_str = ''
if with_date:
_str... |
import sys
import warnings
_major, _minor, *_ = sys.version_info
if _major != 3 or _minor < 5:
raise Exception('Pyjackson works only with python version >= 3.5')
if _minor < 7:
from ._typing_utils35 import (is_generic35 as is_generic,
is_mapping35 as is_mapping,
... |
import setuptools
import os
import io
dir_path = os.path.abspath(os.path.dirname(__file__))
long_description = io.open(os.path.join(dir_path, 'README.rst'), encoding='utf-8').read()
setuptools.setup(
name="pysurveycto",
version="0.0.13",
author="Eric Dodge, Jeenu Thomas",
author_email="it@idinsight.or... |
import axios from 'axios'
/**
* Responsible for all HTTP requests.
*/
export default class {
constructor() {
axios.defaults.baseURL = '/api'
// Intercept the request to make sure the token is injected into the header.
axios.interceptors.request.use(config => {
config.headers['X-Requested-With'] = 'XMLHttp... |
var baseFind = require('./internal/baseFind'),
baseForOwnRight = require('./internal/baseForOwnRight'),
baseIteratee = require('./internal/baseIteratee');
/**
* This method is like `_.findKey` except that it iterates over elements of
* a collection in the opposite order.
*
* @static
* @memberOf _
* @cate... |
module.exports = run;
var child_process = require('child_process')
var PathArray = require('path-array')
var path = require('path')
function run() {
var gyp_script = path.resolve(__dirname, 'gyp', 'gyp_main.py')
var pypath = new PathArray(process.env, 'PYTHONPATH')
pypath.unshift(path.join(__dirname, 'gyp', 'p... |
#!/usr/bin/env python
#
# stat_tests.py: testing the svn stat command
#
# Subversion is a tool for revision control.
# See http://subversion.apache.org for more information.
#
# ====================================================================
# Licensed to the Apache Software Foundation (ASF) under one
# ... |
import SettingsModal from './SettingsModal';
export default SettingsModal; |
// Copyright 2021 Workiva Inc.
//
// 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... |
# 买票类,实现自动抢票
import time
from crawl12306 import Crawl
from selenium import webdriver
class Buyer:
def __init__(self):
"""抢票所需的所有全局属性"""
# 以下是需要传给 crawl12306 的属性
self.departure_date = '2017-05-28' # 出发日期
self.from_station_CHS = '出发地' # 出发地的火车站
self.to_station_CHS = '目的地' ... |
import React, { Component } from 'react';
import { Link } from 'react-router';
import config from '../config';
import {browserHistory} from 'react-router';
var $this;
class SignIn extends Component {
constructor(props) {
super(props);
$this = this;
this.state = { email:''
... |
const bcrypt = require('bcryptjs')
const { sequelize } = require('../../core/db');
const { Sequelize, Model } = require('sequelize');
// 定义产品模型
class OutStorageList extends Model {
// static async verifyEmailPassword (drawingNum) {
// // 查询用户
// const productlist = await Productlist.findOne({
// where:... |
"""
agent.py
~
Maintainer: Olivier Cervello.
Description: Low-level agent for Flask-Flash client. Implements retries.
"""
import requests
from requests.packages.urllib3.util.retry import Retry
from requests.adapters import HTTPAdapter
import pprint
import logging
from urllib.parse import urlparse
import re
import time
... |
#!/usr/bin/env python
import datetime
import json
from xml.etree import ElementTree
import requests
SEAMUS_IDS = ['166217431', '167664846', '168197017']
class Timestamper(object):
def __init__(self, start):
self.start = datetime.time(*map(int, start.split(':')))
def __call__(self, marker):
... |
( function () {
class GLTFExporter {
constructor() {
this.pluginCallbacks = [];
this.register( function ( writer ) {
return new GLTFLightExtension( writer );
} );
this.register( function ( writer ) {
return new GLTFMaterialsUnlitExtension( writer );
} );
this.register( function ( wri... |
$(function() {
$('#records').change(function() {
var counter = $(this).val();
document.location.href = appName + '/campaign/manage-campaigns/index/?counter=' + counter;
});
$(document).on("click", "a.closeCampaigns", function() {
var id = $(this).attr('id');
$.ajax({
... |
from os import name
from shopadmin.inventoryviews import redirectremoveitems
from django.urls import path
from . import views
app_name = 'shopadmin'
urlpatterns = [
path('', views.index),
path('store', views.storehome,name='store'),
path('inventory', views.inventoryhome,name='inventory'),
path('redirec... |
from typing import Any
from pydantic import BaseModel
from datetime import datetime
class Task(BaseModel):
uid: str = None
job_name: str = None
created_at: datetime = datetime.utcnow()
completed_at: datetime = None
state: str = "PENDING"
result: Any = None
|
import linkTransform from './linkTransform'
export default function aLink(alphaPrev, d, theta) {
return function(aPrev) {
return linkTransform(alphaPrev, aPrev, d, theta)
}
}
|
def clear_double_space(s):
index_space = s.find(' ')
if index_space > -1:
s = clear_double_space(s[0:index_space] + s[index_space + 1:len(s)])
return s
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var StyledIconBase_1 = require("../../StyledIconBase");
exports.NoteAdd = React.forwardRef(function (props, ref) {
var attrs = {
"fill": "currentCo... |
import React from 'react'
import { Text, View, TouchableOpacity, StyleSheet } from 'react-native'
import { connect } from 'react-redux'
import { compose, withProps, withHandlers } from 'recompose'
import { main } from '../helpers/state'
import { callUserRequest, callHangupRequest, callAnswer, disconnect, loginAs, displ... |
import io
import os.path
import pickle
import tempfile
from dagster import Bool, Field, StringSource, check, resource
from dagster.core.definitions.step_launcher import StepLauncher
from dagster.core.errors import raise_execution_interrupts
from dagster.core.events import log_step_event
from dagster.core.execution.pla... |
from redis_monitor import get_instance
import time
class MonitoredCursorWrapper(object):
def __init__(self, cursor, db):
self.cursor = cursor
self.db = db
self.rm = get_instance('sqlops')
def execute(self, sql, params=()):
start = time.time()
try:
return... |
var connection__driver_8h =
[
[ "PN_TRANSPORT_WRITE_CLOSED", "group__connection__driver.html#ga56e55c7d0343529b7fb3002b930a36b2", null ],
[ "PN_TRANSPORT_READ_CLOSED", "group__connection__driver.html#ga9a331416719994f6cb0971acce5208fb", null ],
[ "pn_connection_driver_init", "group__connection__driver.html#... |
!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=pe.ty... |
'use strict';
let ll = require('./stacks-and-queues.js');
describe('Testing to make sure stack and queue are working', () => {
test('Can successfully push onto a stack', () => {
let testNode = new ll.Stack;
testNode.push(5);
expect(testNode.top.value).toStrictEqual(5);
});
test('Can successfully pus... |
import numpy as np
from numba import jit
@jit(nopython=True)
def RPLG_acc_NoSTC(nLG, lambda_0, tau_0, w_0, P, Psi_0, phi_2, t_0, z_0, beta_0):
# initialize constants (SI units)
c = 2.99792458e8 # speed of light
m_e = 9.10938356e-31
q_e = 1.60217662e-19
e_0 = 8.85418782e-12
# calculate frequenc... |
/**
* @license
* Visual Blocks Editor
*
* Copyright 2012 Google Inc.
* https://blockly.googlecode.com/
*
* 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/l... |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Page.meta_keywords'
db.add_column(u'fiber_page', 'meta_keywords',
self... |
from marshmallow import fields
from pf_flask_rest_com.api_def import APIDef
class PFFRCBaseAPIResponse(APIDef):
class Meta:
ordered = True
status = fields.String()
code = fields.String()
class PFFRCMessageAPIResponse(PFFRCBaseAPIResponse):
message = fields.String()
class PFFRCErrorAPIResp... |
// MojangAPI.h
// Declares the cMojangAPI class representing the various API points provided by Mojang's webservices, and a cache for their results
#pragma once
#include <time.h>
// fwd: ../RankManager.h"
class cRankManager;
namespace Json
{
class Value;
}
class cSettingsRepositoryInterface;
// tolua... |
NEWSCHEMA('Product').make(function(schema) {
schema.define('id', 'String(20)');
schema.define('pictures', '[String]');
schema.define('reference', 'String(20)');
schema.define('category', 'String(300)', true);
schema.define('manufacturer', 'String(50)');
schema.define('name', 'String(50)', true);
schema.define('p... |
/*
* Angular JS Multi Select
* Creates a dropdown-like button with checkboxes.
*
* Project started on: Tue, 14 Jan 2014 - 5:18:02 PM
* Current version: 2.0.2
*
* Released under the MIT License
* --------------------------------------------------------------------------------
* The MIT License (MIT)
*
* Co... |
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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... |
"""
Copyright (c) 2022 Huawei Technologies Co.,Ltd.
openGauss is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W... |
class Settings:
class Test:
MERCHANT_ID = '002020000000001'
SECRET_KEY = MERCHANT_ID + '_KEY1'
URL = 'https://payment-webinit.simu.omnikassa.rabobank.nl/paymentServlet'
URL = 'https://payment-webinit.omnikassa.rabobank.nl/paymentServlet'
VERSION = 'HP_1.0'
class Currency:
EURO ... |
'use strict';
var estraverse = require('estraverse');
var slice = Array.prototype.slice;
module.exports = traverse;
/**
* traverse - AST traverse helper
*
* @param {AST} ast
* @param {Object} ...visitors hash of visitor functions
*/
function traverse(ast) {
var visitors = flatten(slice.call(arguments,... |