text stringlengths 3 1.05M |
|---|
#!/usr/bin/python
# Classification (U)
"""Program: list_repos.py
Description: Unit testing of list_repos in elastic_db_repo.py.
Usage:
test/unit/elastic_db_repo/list_repos.py
Arguments:
"""
# Libraries and Global Variables
# Standard
import sys
import os
if sys.version_info < (2, 7):
i... |
const path = require("path");
const stats = {
hash: false,
timings: false,
builtAt: false,
assets: false,
chunks: true,
chunkOrigins: true,
entrypoints: true,
modules: false
};
module.exports = [
{
name: "disabled",
mode: "production",
entry: {
main: "./",
a: "./a",
b: "./b",
c: "./c"
},
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var string_1 = require("../core/util/string");
var Message = /** @class */ (function () {
function Message(header, metadata, content) {
this.header = header;
this.metadata = metadata;
this.content = content;
... |
"""
@ProjectName: DXY-2019-nCov-Crawler
@FileName: crawler.py
@Author: Jiabao Lin
@Date: 2020/1/21
"""
from bs4 import BeautifulSoup
from service.db import DB
from service.countryTypeMap import country_type
import re
import json
import time
import logging
import datetime
import requests
logging.basicConfig(level=logg... |
"""Collection of tests for unified general functions."""
# global
import os
import math
import time
import einops
import pytest
from hypothesis import given, strategies as st
import numpy as np
from numbers import Number
from collections.abc import Sequence
import torch.multiprocessing as multiprocessing
# local
impo... |
"""
Migration script to add the tool_shed_repository table.
"""
from __future__ import print_function
import datetime
import logging
import sys
from sqlalchemy import Boolean, Column, DateTime, Integer, MetaData, Table, TEXT
# Need our custom types, but don't import anything else from model
from galaxy.model.custom_... |
"""
Idea: on instantiation, save a matrix where each cell has the sum
of the rectangle starting at the top left corner and ending at
the equivalent cell in the original matrix.
On query, calculate the arbitrary rectangle sum based on that sum-from-top-left
minus the sum of the rectangle above it and the rectangle to th... |
from __future__ import annotations
from functools import wraps
import re
from typing import (
TYPE_CHECKING,
Any,
Callable,
cast,
)
import warnings
import numpy as np
from pandas._libs import (
Timestamp,
algos as libalgos,
internals as libinternals,
lib,
writers,
)
from pandas._l... |
# <pep8-80 compliant>
# ##### BEGIN GPL LICENSE BLOCK #####
#
# 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.
#
# ... |
import glob
import json
import os
import shutil
import operator
import sys
import argparse
import math
import numpy as np
MINOVERLAP = 0.5 # default value (defined in the PASCAL VOC2012 challenge)
'''
parser = argparse.ArgumentParser()
parser.add_argument('-dp', '--detection_path', type=str, help="detection results ... |
# Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# 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
... |
# -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
import hashlib
from ccxt.base.errors import ExchangeError
from ccxt.base.errors impor... |
import torch
def shift_by_int(img, x_shift, y_shift, is_res=False):
if is_res:
img = img.permute(0, 3, 1, 2)
x_shifted = torch.zeros_like(img)
if x_shift > 0:
x_shifted[..., x_shift:, :] = img[..., :-x_shift, :]
elif x_shift < 0:
x_shifted[..., :x_shift, :] = img[..., -x_shif... |
# RLWallet is subclass of Wallet
import asyncio
import json
import time
from dataclasses import dataclass
from secrets import token_bytes
from typing import Any, List, Optional, Tuple
from blspy import AugSchemeMPL, G1Element, PrivateKey
from covid.types.blockchain_format.coin import Coin
from covid.types.blockchain_... |
import FWCore.ParameterSet.Config as cms
pythia8CUEP8M1SettingsBlock = cms.PSet(
pythia8CUEP8M1Settings = cms.vstring(
'Tune:pp 14',
'Tune:ee 7',
'MultipartonInteractions:pT0Ref=2.4024',
'MultipartonInteractions:ecmPow=0.25208',
'MultipartonInteractions:expPow=1.6',
)
)
|
/*! OvenPlayerv0.9.741 | (c)2019 AirenSoft Co., Ltd. | MIT license (https://github.com/AirenSoft/OvenPlayerPrivate/blob/master/LICENSE) | Github : https://github.com/AirenSoft/OvenPlayer */
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["smiparser"],{
/***/ "./src/js/api/caption/parser/SmiParser.js":
/... |
input = """
{a,b} :- a.
"""
output = """
{}
"""
|
################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this... |
import pytest
import pexpect
import logging
from tests.common.helpers.assertions import pytest_assert
from tests.common.utilities import wait_until
pytestmark = [
pytest.mark.topology('any')
]
@pytest.mark.parametrize("target_line", ["1", "2"])
def test_console_reversessh_connectivity(duthost, creds, target_line... |
import React, { useState, useEffect } from "react"
// import { Link } from "gatsby"
import {
Box,
Form,
Button,
FormField,
TextInput,
List,
Heading,
Text,
Meter,
Layer,
} from "grommet"
import { Play, Close, Restroom } from "grommet-icons"
import Layout from "../components/layout"
// import Image ... |
#include <stdio.h>
#define INPUT_SIZE 3
int main(void)
{
char name [INPUT_SIZE];
printf("Who are you?\n");
fgets(name, INPUT_SIZE, stdin);
printf("Glad to meet you, %s.\n", name);
return(0);
}
|
# encoding: utf-8
from __future__ import absolute_import, division, print_function, unicode_literals
import copy
import threading
import warnings
from django.core.exceptions import ImproperlyConfigured
from django.utils.encoding import force_text
from six import with_metaclass
from haystack import connection_router... |
# coding=utf-8
# --------------------------------------------------------------------------
# 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 ... |
import { BAspect } from './aspect'
import { pluginFactory } from '../../utils/plugins'
const AspectPlugin = /*#__PURE__*/ pluginFactory({
components: { BAspect }
})
export { AspectPlugin, BAspect }
|
#! /usr/bin/env python
# ______________________________________________________________________
from numba.decorators import autojit
import numpy as np
import numpy
import unittest
# ______________________________________________________________________
def _get_ndarray_ndim(ndarr):
return ndarr.ndim
def _get... |
import TokenId from "./TokenId.js";
import AccountId from "../account/AccountId.js";
import Transaction, {
TRANSACTION_REGISTRY,
} from "../transaction/Transaction.js";
/**
* @namespace proto
* @typedef {import("@hashgraph/proto").ITransaction} proto.ITransaction
* @typedef {import("@hashgraph/proto").ISignedTr... |
//! Adapted for use in Sonus by Evan Cohen @_evnc
//! annyang
//! version : 2.5.0
//! author : Tal Ater @TalAter
//! license : MIT
//! https://www.TalAter.com/annyang/
"use strict";
let annyang;
let commandsList = [];
const callbacks = { start: [], error: [], end: [], result: [], resultMatch: [], resultNoMatch: [], e... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.arrows_anticlockwise = void 0;
var arrows_anticlockwise = {
'viewBox': '0 0 64 64',
'children': [{
'name': 'path',
'attribs': {
'fill': 'none',
'stroke': '#000000',
'stroke-width': '2',
'stroke-mi... |
/*
Copyright (c) 2009-present Maximus5
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the follo... |
/*
* Copyright (c) 2019, Intel Corporation
*
* 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, merge, publis... |
/*
* hv.h
* Hypervisor Framework
*
* Copyright (c) 2013 Apple Inc. All rights reserved.
*/
#ifndef __HYPERVISOR_HV__
#define __HYPERVISOR_HV__
#include <stdbool.h>
#include <sys/types.h>
#include <Availability.h>
#include <Hypervisor/hv_error.h>
#include <Hypervisor/hv_types.h>
#include <Hypervisor/hv_arch_x... |
$(document).ready(function(){
$('#sort').on('change',function(){
// alert("You entered p1!");
this.form.submit();
});
});
$(document).ready(function(){
$('#sort4').on('change',function(){
// alert("You entered p1!");
this.form.submit();
});
});
$(document... |
const path = require("path")
const TerserPlugin = require("terser-webpack-plugin")
const MiniCssExtractPlugin = require("mini-css-extract-plugin")
let isProduction = process.env.NODE_ENV === "production"
const { CleanWebpackPlugin } = require("clean-webpack-plugin")
module.exports = {
entry: {
"CoCreate-random-c... |
#! /usr/bin/env python3
# Script for preparing OpenSSL for building on Windows.
# Uses Perl to create nmake makefiles and otherwise prepare the way
# for building on 32 or 64 bit platforms.
# Script originally authored by Mark Hammond.
# Major revisions by:
# Martin v. Löwis
# Christian Heimes
# Zachary Ware
# ... |
# terrascript/nsxt/r.py
import terrascript
class nsxt_dhcp_relay_profile(terrascript.Resource):
pass
class nsxt_dhcp_relay_service(terrascript.Resource):
pass
class nsxt_dhcp_server_profile(terrascript.Resource):
pass
class nsxt_logical_dhcp_server(terrascript.Resource):
pass
class nsxt_dhcp_s... |
"""Unit tests configuration file."""
def pytest_configure(config):
"""Disable verbose output when running tests."""
terminal = config.pluginmanager.getplugin('terminal')
base = terminal.TerminalReporter
class QuietReporter(base):
"""A py.test reporting that only shows dots when running tests.... |
# Test methods with long descriptive names can omit docstrings
# pylint: disable=missing-docstring
import unittest
import numpy as np
from Orange.classification import LogisticRegressionLearner
from Orange.data import Table, Domain, ContinuousVariable, DiscreteVariable
from Orange.statistics.util import stats
from Or... |
// Import vue component
import component from '@/vue3_jspreadsheet.vue';
// Default export is installable instance of component.
// IIFE injects install function into component, allowing component
// to be registered via Vue.use() as well as Vue.component(),
export default /*#__PURE__*/(() => {
// Get component ins... |
// Courtesy of https://uigradients.com/ and https://webgradients.com/
const themes = {
// kimoby: {
// color1: '#396afc',
// color2: '#2948ff',
// },
orca: {
color1: '#44A08D',
color2: '#093637'
},
legacy: {
color1: '#282c34',
primary: '#325D88'
},
default: {
color1: '#282c34',... |
//
// Copyright : @2021, ***, All Rights Reserved
//
// Author : 王科威
// E-mail : wangkw531@hotmail.com
// Date : 2022-05-26
// Description : ES over RTP解析器
//
// History:
// 1. 2022-05-26 由王科威创建
//
#ifndef MODULE_AV_STREAM_RTP_ES_PARSER_H
#define MODULE_AV_STREAM_RTP_ES_PARSER_H
#include "av_parser_node.h"
... |
# 信息利用率低:不同的机器学习算法和模型对数据中信息的利用是不同的,之前提到在线性模型中,使用对定性特征哑编码可以达到非线性的效果。
# 类似地,对定量变量多项式化,或者进行其他的转换,都能达到非线性的效果。
from sklearn.preprocessing import OneHotEncoder
enc = OneHotEncoder()
enc.fit([[0, 0, 3], [1, 1, 0], [0, 2, 1], [1, 0, 2]])
print(enc.n_values_)
print(enc.feature_indices_)
print(enc.transform([[0, 1, 1]]).toarray... |
"""A setuptools based setup module.
See:
https://packaging.python.org/guides/distributing-packages-using-setuptools/
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
import pathlib
here = pathlib.Path(__file__).parent.resolve()
version =... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2016, 2017, 2018 Guenter Bartsch
#
# 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... |
/**
* Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
* Copyright (C) 2017-2019 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 t... |
# Copyright 2018 The Cirq Developers
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... |
#ifndef OPTIONSWINDOW_H
#define OPTIONSWINDOW_H
#include <QAbstractButton>
#include <QDialog>
#include <QMap>
#include <QStringListModel>
#include "models/copyprofilelistmodel.h"
#include "addcopyprofilewindow.h"
namespace Ui {
class OptionsWindow;
}
class OptionsWindow : public QDialog
{
Q_OBJECT
public:
... |
# MIT License
#
# Copyright (c) 2020 Jonathan Zernik
#
# 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, mer... |
export { default as Add } from './Add';
export { default as Build } from './Build';
export { default as Code } from './Code';
export { default as Connect } from './Connect';
export { default as Done } from './Done';
export { default as Empty } from './Empty';
export { default as Error } from './Error';
export { default... |
/*
* Konva JavaScript Framework v1.2.2
* http://konvajs.github.io/
* Licensed under the MIT or GPL Version 2 licenses.
* Date: Wed Sep 21 2016
*
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
* Modified work Copyright (C) 2014 - 2015 by Anton Lavrenov (Konva)
*
* @license
* Permission i... |
var MyClass = (function () {
function MyClass() {
}
return MyClass;
}());
|
/*
* Copyright (c) 2007, Swedish Institute of Computer Science
* All rights reserved.
*
* Additional fixes for AVR contributed by:
*
* David Kopf dak664@embarqmail.com
* Ivan Delamer delamer@ieee.com
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provid... |
import copy
from petisco.base.misc.interface import Interface
class BasePattern(Interface):
def with_info_id(self, info_id):
base = copy.copy(self)
base._set_info_id(info_id)
return base
def _set_info_id(self, info_id):
if info_id is not None:
self.info_id = info_... |
/*
AeroQuad v3.0.1 - February 2012
www.AeroQuad.com
Copyright (c) 2012 Ted Carancho. All rights reserved.
An Open Source Arduino based multicopter.
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 Softwa... |
// proposal:
// test:
// constructor
// setData
// callback
// style:
// expand/collapse if click on a node
// search bar is workeds
/**
* CaMicroscope Layers Viewer. A componet that shows all layers by the different categories.
* @constructor
* @param {Object} options
* All required and optional settings f... |
#pragma once
#include "Morpheus/Core/Common.h"
#include "Platform/Vulkan/VulkanCommon.h"
#include "Platform/Vulkan/VulkanCore/VulkanQueue.h"
namespace Morpheus { namespace Vulkan {
struct SwapchainSupportDetails
{
public:
VkSurfaceCapabilitiesKHR Capabilities;
Vector<VkSurfaceFormatKHR> Formats;
Vector<VkPre... |
/*********************************************************************
*
* unixODBC Cursor Library
*
* Created by Nick Gorham
* (nick@lurcher.org).
*
* copyright (c) 1999 Nick Gorham
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
... |
# -*- coding: utf-8 -*-
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
# This program is free software: you can r... |
import $ from '../../core/renderer';
import domAdapter from '../../core/dom_adapter';
import eventsEngine from '../../events/core/events_engine';
import dataUtils from '../../core/element_data';
import translator from '../../animation/translator';
import dateUtils from '../../core/utils/date';
import commonUtils from '... |
/*
* linux/sound/arm/pxa2xx-pcm.h -- ALSA PCM interface for the Intel PXA2xx chip
*
* Author: Nicolas Pitre
* Created: Nov 30, 2004
* Copyright: MontaVista Software, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
... |
# Generated by Django 2.1 on 2018-09-08 20:24
import ckeditor.fields
from django.db import migrations, models
import django.db.models.deletion
import django_jalali.db.models
import phonenumber_field.modelfields
class Migration(migrations.Migration):
initial = True
dependencies = [
('customers', '00... |
#!/usr/bin/env python3
import sys
import os
import time
import argparse
import json
import paho.mqtt.client as mqtt
debug_p = False
dryrun = False
def run_script(config_file, script_file):
'''
config_file holds the address of the MQTT server and login credentials
script_file JSON file with array of MQTT e... |
# Generated by Django 2.2.7 on 2020-07-14 02:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('support', '0010_auto_20200714_0244'),
]
operations = [
migrations.AlterField(
model_name='question',
name='descripti... |
# Generated by Django 3.1.6 on 2021-05-14 21:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0005_newuser_username'),
]
operations = [
migrations.AlterField(
model_name='newuser',
name='username',
... |
import torch
import torch.utils.data.dataloader
import importlib
import collections
from torch._six import string_classes, int_classes
from pytracking import TensorDict, TensorList
def _check_use_shared_memory():
if hasattr(torch.utils.data.dataloader, '_use_shared_memory'):
return getattr(torch.utils.dat... |
"""
WSGI config for blogapp project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTI... |
"""Configuration file for pytest.
Some code borrowed from mlp6's fem/tests/conftest.py
"""
import pytest
import csv
import os
import numpy as np
@pytest.fixture
def mktmpdir(tmpdir_factory):
"""Creates temporary directory for unit testing-required files.
:param tmpdir_factory:
:returns: tmpdir object
... |
from sympy import C, pi, I
from sympy.core import Dummy, sympify
from sympy.functions import legendre, assoc_legendre
from sympy.functions.elementary.miscellaneous import sqrt
Pl = legendre
Plm= assoc_legendre
_x = Dummy("x")
def Plmcos(l, m, th):
l = sympify(l)
m = sympify(m)
sin = C.sin
cos = C.cos... |
#!/usr/bin/env python3
# Install pip3 (if not there)
# sudo apt-get install python3-pip
# Install zmq with
# pip3 install pyzmq
# Install bitcoinrpc with
# pip3 install python-bitcoinrpc
# Install ipfsapi with
# pip3 install ipfsapi
import sys
import argparse
import zmq
import struct
import binascii
imp... |
#!/usr/bin/env python3
"""
Main-level command handling routine for running brokkr on the command line.
"""
# Standard library imports
import argparse
import multiprocessing
VERSION_PARAM = "version"
SUBCOMMAND_PARAM = "subcommand_name"
SYSTEM_PARAM = "system"
SYSTEM_PATH_PARAM = "system_path"
MODE_PARAM = "mode"
PE... |
"""
sid_group indicates that this is a collection of policy-related data organized by their SIDs
"""
import logging
import re
from policy_sentry.querying.all import get_all_actions
from policy_sentry.querying.actions import (
get_action_data,
get_actions_with_arn_type_and_access_level,
get_dependent_actions... |
#import "WKInterfaceObject.h"
@interface WKInterfaceButton : WKInterfaceObject
- (void)setTitle:(NSString *)title;
- (void)setAttributedTitle:(NSAttributedString *)attributedTitle;
- (void)setColor:(UIColor *)color;
- (void)setBackgroundImage:(UIImage *)image;
- (void)setBackgroundImageData:(NSData *)imageData;
- (... |
#!/usr/bin/python3
# Copyright (C) 2020 Intel Corporation
from html import escape
from urllib.parse import parse_qs
from flup.server.fcgi import WSGIServer
import json
import base64
import os
import time
import sys
import wave
import datetime
import numpy as np
import ctypes
import inferservice_python as rt_api
from ... |
from setuptools import setup, find_packages
console_scripts = [
'pyenv_update=pyenv_update.pyenv_update:console_script',
]
setup(
name='pyenv_update',
version='0.0.1',
packages=find_packages(),
description='pyenv_update',
author='Taisei Miyagawa @miyagaw61',
author_email='miyag... |
from pprint import pformat
import sys
from threading import Lock
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from django import http
from django.core import signals
from django.core.handlers import base
from django.core.urlresolvers import set_script_prefix
from django... |
"""
Utilities to turn SymPy objects into C strings.
"""
import numpy as np
from mpmath.libmp import prec_to_dps, to_str
from sympy.printing.ccode import C99CodePrinter
__all__ = ['ccode']
class CodePrinter(C99CodePrinter):
custom_functions = {'INT': '(int)', 'FLOAT': '(float)', 'DOUBLE': '(double)'}
"""
... |
## ===============================================================================
## Authors: AFRL/RQQA
## Organization: Air Force Research Laboratory, Aerospace Systems Directorate, Power and Control Division
##
## Copyright (c) 2017 Government of the United State of America, as represented by
## the Secretary of th... |
import komand
from .schema import QueryInput, QueryOutput
# Custom imports below
from komand_active_directory_ldap.util.utils import ADUtils
import json
import ldap3
class Query(komand.Action):
def __init__(self):
super(self.__class__, self).__init__(
name='query',
descrip... |
var Oro = Oro || {};
Oro.Datagrid = Oro.Datagrid || {};
/**
* Datagrid header cell
*
* @class Oro.Datagrid.HeaderCell
* @extends Backgrid.HeaderCell
*/
Oro.Datagrid.HeaderCell = Backgrid.HeaderCell.extend({
/** @property */
template:_.template(
'<% if (sortable) { %>' +
'<a href="#"... |
/* core_definitions.h */
#ifndef MC_SOURCE_H
#define MC_SOURCE_H
// #include <stddef.h>
#include "core/core_definitions.h"
// #include "core/c_parser_lexer.h"
#include "tinycc/libtccinterp.h"
// int register_external_definitions_from_file(mc_node *definitions_owner, char *filepath,
// ... |
import {shell} from 'electron';
export default function openExternal(event, data) {
shell.openExternal(data.url);
this.resolve();
}
|
#!/usr/bin/env python3
# vim: set ai et ts=4 sw=4:
# Diplexer Generator v 0.1
# (c) Aleksander Alekseev 2020
# https://eax.me/
# The algorithm is based on Chapter 11 of The ARRL Handbook 2020
from math import pi
import sys
import argparse
def scale(x):
unit = ""
if x < 1:
x *= 1000
unit = "... |
#ifndef LOG4CPLUS_CONFIG_HXX
#define LOG4CPLUS_CONFIG_HXX
#include <string>
#include <iostream>
#if defined (_MSC_VER)
#if !defined (LOG4CPLUS_STATIC)
#undef LOG4CPLUS_BUILD_DLL
#define LOG4CPLUS_BUILD_DLL
#endif
#if !defined (LOG4CPLUS_BUILD_DLL)
#undef LOG4CPLUS_STATIC
#define LOG4CPLUS_STATIC
#endif
... |
/**
* Kettle Socket Support Tests
*
* Copyright 2013 OCAD University
*
* Licensed under the New BSD license. You may not use this file except in
* compliance with this License.
*
* You may obtain a copy of the License at
* https://github.com/fluid-project/kettle/blob/main/LICENSE.txt
*/
"use strict";
var fl... |
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["vue-pithy-progress"] = factory();
else
... |
""" flask part of request processing / "middleware" """
import flask # noqa
from logextractx.middleware import LogCtxData
def _set_logctx_data():
""" function called before flask request. Equivalent of Diango's middleware """
session = flask.session
LogCtxData.init_request_data(session=session)
def i... |
exports.success = (req, res, next) => {
res.status(req.status || 200).json({
error: false,
status: req.status || 200,
message: req.message || "Request completed successfully",
body: req.body,
})
}
exports.error = (req, res, message = 'Internal server error', status = 500) => {
res.status(statu... |
import { takeEvery, select, call, put } from 'redux-saga/effects';
import { IMAGES } from '../constants/contants';
import { fetchImages } from '../apis/fetchImages';
import { setImages, setError } from '../actions/actions';
const getPage = state => state.nextPage;
function* handleImagesLoad() {
try {
cons... |
from asyncdbus.service import ServiceInterface, dbus_property, method
from asyncdbus import Message, MessageBus, MessageType, PropertyAccess, ErrorType, Variant, DBusError
from asyncdbus.signature import Tuple, Str
import pytest
import anyio
from asyncdbus.signature import Str, Array, Struct, Dict, Int64
class Exam... |
var searchData=
[
['room_5finfo_88',['room_info',['../namespaceroom__info.html',1,'']]]
];
|
import threading, smtpd, asyncore, socket, smtplib, time
import unittest
import pyzmail
from pyzmail.generate import *
smtpd_addr='127.0.0.1'
smtpd_port=32525
smtp_bad_port=smtpd_port-1
smtp_mode='normal'
smtp_login=None
smtp_password=None
class SMTPServer(smtpd.SMTPServer):
def __init__(self, localaddr, ... |
const db = require('../connectDB');
const redisClient = require('../redisClient');
const getUser = (req, res) => {
const { authorization } = req.headers;
if (authorization) {
const token = authorization.split(' ')[1];
redisClient.get(token, (error, reply) => {
if (error || !reply) {
return ... |
// Copyright (c) 2012 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.
#ifndef COMPONENTS_HISTORY_CORE_BROWSER_TOP_SITES_CACHE_H_
#define COMPONENTS_HISTORY_CORE_BROWSER_TOP_SITES_CACHE_H_
#include <stddef.h>
#include <... |
"""
Django settings for app project.
Generated by 'django-admin startproject' using Django 2.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
# Bui... |
import os
from collections import OrderedDict
from conans.errors import ConanException
from conans.model.env_info import EnvValues, unquote
from conans.model.info import ConanInfo
from conans.model.options import OptionsValues
from conans.model.profile import Profile
from conans.model.ref import ConanFileReference
fro... |
import difflib
import json
import posixpath
import sys
import threading
import unittest
import warnings
from collections import Counter
from contextlib import contextmanager
from copy import copy
from difflib import get_close_matches
from functools import wraps
from unittest.util import safe_repr
from urllib.parse impo... |
# --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
import datasets
import datasets.imagenet
from imagenet_eval import voc_... |
import json
from vulcan import Vulcan
def register(token=None, symbol=None, pin=None):
if not token:
token = input('Podaj token: ').strip()
if not symbol:
symbol = input('Podaj symbol: ').strip()
if not pin:
pin = input('Podaj PIN: ').strip()
if token and symbol and pin:
... |
/*****************************************************************************
* Copyright (c) 2016 The University of Tokyo
* This software is released under the MIT License, see LICENSE.txt
*****************************************************************************/
#ifndef INC_HECMW_COUPLE_COMM
#define INC_HECM... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2021 Patrick Lumban Tobing (Nagoya University)
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
from __future__ import division
from __future__ import print_function
import argparse
from dateutil.relativedelta import relativedelta
from distutils.ut... |
# Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... |