text stringlengths 3 1.05M |
|---|
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import textwrap
import py
import pytest
from _pytest.config import PytestPluginManager
from _pytest.main import EXIT_NOTESTSCOLLECTED
from _pytest.main import EXIT_OK
from _pytest.main... |
import React from "react";
import ReactDOM from 'react-dom';
import { confirmAlert } from 'react-confirm-alert';
import 'react-confirm-alert/src/react-confirm-alert.css';
import "./EndOfDay.css";
import Output, {addMessage} from './Output'
//import * as utils from './Output.js';
//import {addMessage} from './Output.js'... |
class EnumValue(object):
def __init__(self,
identifier):
self._identifier = identifier
@property
def identifier(self):
return self._identifier
def __repr__(self):
return '<Enum {0}>'.format(self._identifier)
def __str__(self):
return '{0}'.format(s... |
# (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
# Copyright 2017 FUJITSU LIMITED
#
# 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/LICE... |
/*
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function(){var a=CKEDITOR.tools.cssLength,b=function(d){var e=this.id;if(!d.info)d.info={};d.info[e]=this.getValue();};function c(d,e){var f=function(h){return new CKEDITOR... |
var _ = require('lodash'),
utils = require('../../../utils'),
driver = utils.getDriver(),
C = driver.constants,
config = require('../../../config');
module.exports = function(object, intent, roomObjects, roomTerrain, bulk, bulkUsers, roomController, stats, gameTime) {
if(object.type != 'creep') {... |
import React, { useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import { add_test, reset_add_test } from "../../redux/actions/add_test";
import QuestionComponent from "../../components/Form/Question";
import "./styles/global-master.css";
import { useHistory } from "react-router-dom";
im... |
import time
from datetime import datetime, timedelta
import requests
from copy import deepcopy
from chargebee_byte.requests import SubscriptionRequest, CustomerRequest, InvoiceRequest
class Client(object):
def __init__(self, site, api_key, rate_limit=None):
self.auth = requests.auth.HTTPBasicAuth(api_ke... |
Hola Juan,
bueno, te cuento la idea de la implementacion de los modelos,
falta darle cierre y necesito un poco de feedback.
La idea original, que motivó todo el kilombo de los grafos, era hacer
cualquier modelo y guardarlo como un grafo. Cada nodo representa un
compartimiento (que puede tener un valor escalar, o ... |
from django.db import transaction
from slavdict.dictionary.models import *
def cf(civil_equivalents):
'''Расстановка взаимных ссылок вида "ср." между словарными статьями.'''
entries = []
civil_equivalents = [x.strip() for x in civil_equivalents.split() if x.strip()]
for ce in civil_equivalents:
... |
const express = require('express');
const router = new express.Router();
const controller = require('@controllers/dice');
const { server, admin } = require('@middleware/auth');
const validate = require('@middleware/validate');
// Getters
router.route('/get/game')
.get(server, validate('index'), controller.get.game... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
# ///////////////// #
# /// PLAIN I/O /// #
# ///////////////// #
def reader(path, encoding="utf-8"):
"""
read txt file from given path
"""
if os.path.exists(path):
with open(path, "r", encoding=encoding) as f:
# return lis... |
# -*- coding: utf-8 -*-
#
# Copyright 2015-2022 BigML
#
# 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 ... |
import React from 'react' ;
import './ExpenseDate.css' ;
export default function ExpenseDate(props) {
const month = props.date.toLocaleDateString('en-IN', { month: 'long' });
const day = props.date.toLocaleDateString('en-IN', { day: '2-digit' });
const year = props.date.getFullYear();
return (
... |
/*
* This header is generated by classdump-dyld 1.0
* on Wednesday, March 22, 2017 at 9:01:56 AM Mountain Standard Time
* Operating System: Version 10.1 (Build 14U593)
* Image Source: /System/Library/PrivateFrameworks/WebCore.framework/WebCore
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Lim... |
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import sy... |
/**
* Copyright 2019-2021 Wingify Software Pvt. 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 applicab... |
import styled from 'styled-components';
export const MiddleBlock = styled.section`
position: relative;
padding: 5.5rem 0 3rem;
text-align: center;
display: flex;
justify-content: center;
`;
export const Content = styled.p`
padding: 0.75rem 0 0.75rem;
`;
export const ContentWrapper = styled.div`
max-wid... |
const Main = imports.ui.main;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const {Gio, GObject, St, Clutter} = imports.gi;
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Password = Me.imports.passwordDialog;
var Locker = cl... |
# coding:utf-8
import sys, os
import tornado.ioloop
from tornado import gen
sys.path.append(os.path.dirname(sys.path[0]))
import time
from custor.decorators import run_with_thread_future
@run_with_thread_future(None)
def thread_sleep(self, args):
time.sleep(5)
@gen.coroutine
def sleep_coroutine():
yield th... |
from MultiDark import *
import sys
import glob
snList= n.array(glob.glob("/data2/DATA/eBOSS/Multidark-lightcones/MD_1Gpc/snapshots/out_*.list"))
box = MultiDarkSimulation(Lbox=1000.0 * uu.Mpc, boxDir = "MD_1Gpc",snl =snList ,zsl = None,zArray = n.arange(0.2,2.4,1e-1),Hbox = 67.77 * uu.km / (uu.s * uu.Mpc))
for ii ... |
const config = require('./utils/config')
const middleware = require('./utils/middleware')
const logger = require('./utils/logger')
const express = require('express')
const bodyParser = require('body-parser')
const app = express()
const cors = require('cors')
const usersRouter = require('./controllers/users')
const l... |
# Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved.
# 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, co... |
from enum import IntEnum
from apps.utils.default_enum import DefaultEnum
class UnitMeasurement(IntEnum, DefaultEnum):
Gram = 0
Milligram = 1
Kilogram = 2
Liter = 3
Millilitem = 4
Unity = 5
|
# coding: utf8
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve.
#
# 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 requ... |
# -*- coding: utf-8 -*-
"""Time manipulation functions and variables.
This module contain common methods that can be used to convert timestamps
from various formats into number of microseconds since January 1, 1970,
00:00:00 UTC that is used internally to store timestamps.
It also contains various functions to repres... |
"""
Function parameters
Discuss the calls of 'example' one by one
"""
def example(obligatory, optional=77, *args, **kwargs):
print("obligatory: ", obligatory)
print("optional : ", optional)
print("args : ", args)
print("kwargs : ", kwargs)
print()
example()
# example(True)
# example(True... |
module.exports=[746,747,12549,12550,12551,12552,12553,12554,12555,12556,12557,12558,12559,12560,12561,12562,12563,12564,12565,12566,12567,12568,12569,12570,12571,12572,12573,12574,12575,12576,12577,12578,12579,12580,12581,12582,12583,12584,12585,12586,12587,12588,12589,12704,12705,12706,12707,12708,12709,12710,12711,12... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=3
# total number=54
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
from cirq.contrib.svg import SVGCircuit
# Symbols for... |
// fork of buyatsellat with trailing stop loss
// var _ = require('lodash');
var helper = require('./indicators/helper.js');;
var log = require('../core/log.js');
var config = require('../core/util.js').getConfig();
var settings = config.saichovsky;
var timeToSell = function(t) {
if(t.pLimits.length == 2) {
ret... |
"""Test parse strategies."""
def test_json():
"""Test `text/json` parse strategy."""
from oteapi.models.resourceconfig import ResourceConfig
from oteapi.strategies.parse.text_json import JSONDataParseStrategy
data = {
"firstName": "Joe",
"lastName": "Jackson",
"gender": "male"... |
# coding: utf-8
#
# Copyright (C) 2015-2016 YouCompleteMe contributors
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe 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,... |
#!/usr/bin/env python
"""main Absorb routines
Copyright: 2009, Robert B. Von Dreele (Argonne National Laboratory)
"""
from __future__ import division, print_function
import platform
import math
import wx
import numpy as np
import sys
import matplotlib as mpl
import GSASIIpath
GSASIIpath.SetVersionNumber("$Revision:... |
var GuessDatatableFormat = {
columns :[
{"data" : 'guess_name'},
{"data" : 'profit_amount'},
{"data" : 'home_team'},
{"data" : 'home_bets'},
{"data" : 'home_amount'},
{"data" : 'guest_team'},
{"data" : 'guest_bets'},
{"data" : 'guest_amount'},
{"data" : 'avg_odds'},
{"data" : 'r... |
var classrx_1_1_renderer =
[
[ "Renderer", "classrx_1_1_renderer.html#adac272ae85ea19cc6ce17c93e4fbb5b5", null ],
[ "Renderer", "classrx_1_1_renderer.html#ae7ad602d913e3a5725a067389653984f", null ],
[ "Renderer", "classrx_1_1_renderer.html#a2307afebcca82a81ff1b1468e1d9b02d", null ],
[ "Renderer", "class... |
// Copyright (c) 2022 FHNW, Switzerland. All rights reserved.
// Licensed under MIT License, see LICENSE for details.
export const LOADING_STATE_ON = '[UTIL] loading state on';
export const LOADING_STATE_OFF = '[UTIL] loading state off';
export const COPY_URL_TO_CLIPBOARD = '[UTIL] copy URL to clipboard';
export con... |
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'mailreceive/index',
add_url... |
/*
*******************************************************************************
* Copyright (c) 2020-2021, STMicroelectronics
* All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You... |
const childProcess = require('child_process')
const fs = require('fs')
const path = require('path')
const { parseKeymap } = require('./keymap')
const ZMK_PATH = path.join(__dirname, '..', '..', '..', 'zmk-config')
const KEYBOARD = 'dactyl'
function loadBehaviors() {
return JSON.parse(fs.readFileSync(path.join(__dir... |
from django_analyses.filters.analysis_version import AnalysisVersionFilter
from django_analyses.models.analysis_version import AnalysisVersion
from django_analyses.serializers.analysis_version import \
AnalysisVersionSerializer
from django_analyses.views.defaults import DefaultsMixin
from django_analyses.views.pagi... |
import sys
import os
import runpy
path = os.path.dirname(sys.modules[__name__].__file__)
path = os.path.join(path, '..')
sys.path.insert(0, path)
runpy.run_module('brightmntr', run_name="__main__",alter_sys=True)
|
#include <v3_core.h>
#include <assert.h>
#include "v3_tokenizer.h"
#include "v3_parser.h"
typedef struct {
v3_vector_t *params;
v3_vector_t *defaults;
} v3_params_t;
static v3_node_t v3_arrow_parameter_place_holder;
static v3_int_t binary_precedence(v3_ctx_t *ctx, v3_token_t *token, v3_bool_t allowin)... |
/**
* @listens giftpaidupgrade
* @param {import("../../../modules/twitchclient").TwitchClient} client
* @param {string} channel
* @param {string} username
*/
exports.event = (client, channel, username) => {
// message for Action
client.clients.logger.log("info", `${username} extended subcription`);
cl... |
#!/usr/bin/env python3
# Copyright (c) 2016-2020 The Wflscoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test Wallet encryption"""
import time
from test_framework.test_framework import WflscoinTestFramewor... |
"""logiskip's command-line interface"""
import logging
import click
import click_logging
from .load import load_registry
logging.basicConfig(format="%(asctime)s - %(levelname)s - %(message)s")
_logger = logging.getLogger("logiskip")
@click.command()
@click.option("--source", prompt="Source URI", help="URI of sour... |
/*
*** Copyright Notice ***
Differential Protection Scheme, Copyright (c) 2014, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
If you have questions about your rights to use o... |
model = dict(
type='DBNet',
backbone=dict(
type='mmdet.ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=-1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=False,
style='pytorch',
dcn=dict(type='DCNv2', defor... |
/*
Highstock JS v1.3.5 (2013-08-23)
MooTools adapter
(c) 2010-2013 Torstein Hønsi
License: www.highcharts.com/license
*/
(function(){var e=window,h=document,f=e.MooTools.version.substring(0,3),i=f==="1.2"||f==="1.1",j=i||f==="1.3",g=e.$extend||function(){return Object.append.apply(Object,arguments)};e.HighchartsA... |
#!/usr/bin/env python
"""
Copyright 2000 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Date: 2001/12/24 20:27... |
import React from "react"
import PropTypes from "prop-types"
import * as classes from "./NavigationItem.module.scss"
import { Link } from "gatsby"
import * as fade from "../../../../styles/transitions/Fade.module.scss"
function NavigationItem({ link, children, show, clicked }) {
const classesArr = show
? [... |
import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript';
import pkg from './package.json';
const banner = `/*!
* ${pkg.name}
* @version ${pkg.version} | ${new Date().toDateString()}
* @author ${pkg.author}
* @license ${p... |
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 15.4.4.18-2-9
description: >
Array.prototype.forEach applied to Array-like object, 'length' is
an own accessor property that overrides an inherited accessor
pr... |
import xml.etree.ElementTree as ET
from collections import Counter
from meeting import meeting
class manage_meeting(meeting):
def get_roots_segments(self):
#tempo = self.get_files()
segment_roots = dict.fromkeys(self.participants)
#segment_list = tempo[1]
segment_list = self.get... |
/*******************************************************************\
Module: analyses variable-sensitivity
Author: Jez Higgins, jez@jezuk.co.uk
\*******************************************************************/
/// \file
/// Common behaviour for abstract objects modelling values -
/// constants, intervals, et... |
"""
WSGI config for dist 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_SETTINGS... |
"use strict";
var com_netsuite_webservices_transactions_demandplanning_2019_2_Module_Factory = function () {
var com_netsuite_webservices_transactions_demandplanning_2019_2 = {
name: 'com_netsuite_webservices_transactions_demandplanning_2019_2',
defaultElementNamespaceURI: 'urn:demandplanning_2019_2... |
# Copyright (c) 2021, MohJamal and Contributors
# See license.txt
# import frappe
import unittest
class TestCashReceiptType(unittest.TestCase):
pass
|
import React, { Component } from 'react';
import { View, Text, Alert, Dimensions, ScrollView, TouchableHighlight} from 'react-native';
import Config from '../config/app.json'
import {Color} from '../config/theme.json'
import { StackNavigator, TabNavigator } from "react-navigation";
import { RkButton, RkText, RkCard }... |
//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE... |
# 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
# distribu... |
# Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# 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... |
# Generated by Django 2.2 on 2022-01-05 03:37
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('auth', '0011_update_proxy_permissions'),
('office_space_app', '0002_auto_20211123_0107'),
]
operations = [
... |
""" Generic IOS-XE State Machine """
__author__ = "Myles Dear <pyats-support@cisco.com>"
import re
from unicon.plugins.generic.statemachine import GenericSingleRpStateMachine, config_transition
from unicon.plugins.generic.statements import (connection_statement_list,
def... |
const path = require('path');
const webpackMerge = require('webpack-merge');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const CleanupStatsPlugin = require('./cleanup-stats-plugin');
const AssetConfigLoader = require('.... |
"""
Test File
Note that the basic functionalities (retrieve, create, update) of many parts of the backend
work similarly because they all use Django ModelViewSet.
So, there is no duplicate test on these basic functionalities.
However, the customized/additional methods are well tested.
"""
from backend.api.models impo... |
import keras
import tensorflowjs as tfjs
tempModel = keras.applications.nasnet.NASNetMobile()
tfjs.converters.save_keras_model(tempModel,'tfjs-model')
|
/*======================================================
************ Views ************
======================================================*/
app.views = [];
var View = function (selector, params) {
var defaults = {
dynamicNavbar: false,
domCache: false,
linksView: undefined,
... |
import { createStore } from 'redux';
import reducer from './reducers';
export default createStore(reducer);
|
from datetime import datetime
import random
SKETYL_EPOCH = 1643000000000
def generate_id():
sketyl_millis = int(datetime.utcnow().timestamp() * 1000 - SKETYL_EPOCH)
random_id = "".join(random.choice("0123456789") for _ in range(3))
encoded = str((sketyl_millis << 13) + (2 ** 13))
return int(encoded +... |
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "area.hoverlabel"
_path_str = "area.hoverlabel.font"
_valid_props = {"color", "colorsrc", "fami... |
/**
* Class Applier module for Rangy.
* Adds, removes and toggles classes on Ranges and Selections
*
* Part of Rangy, a cross-browser JavaScript range and selection library
* https://github.com/timdown/rangy
*
* Depends on Rangy core.
*
* Copyright 2015, Tim Down
* Licensed under the MIT license.
* Version: ... |
# coding: utf-8
"""
Enrollment API
Connect Enrollment Service allows users to claim the ownership of a device which is not yet assigned to an account. A device without an assigned account can be a device purchased from the open market (OEM dealer) or a device transferred from an account to another. More infor... |
import os
import sys
import zipfile
from io import BytesIO
import platform
import requests
from pick import pick
from .utils.logger import LoggingBase
class Base(metaclass=LoggingBase):
CONFIG = None
ATOMIC_RED_TEAM_REPO = 'https://github.com/redcanaryco/atomic-red-team/zipball/master/'
command_map = {
... |
$(function() {
var e = getCookie("key");
if (!e) {
location.href = "login.html"
}
function s() {
$.ajax({type: "post", url: ApiUrl + "/Memberaddress/address_list.html", data: {key: e}, dataType: "json", success: function(e) {
checkLogin(e.login);
if (e.res... |
ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],function(a,b,d){"use strict";var o=a("./lib/oop");var E=a("./lib/event_emitter").EventEmitter;var l=a("./lib/lang"... |
$(function(){
$('input').attr('autocomplete', 'off');
var url = window.location.pathname;
var host = window.location.hostname;
var filename = window.location.href;
//$('.sidebar-menu li a[href="'+filename+'"]').parent('li').addClass('active');
$('.navbar-nav li a[href="'+filename+'"]').paren... |
from .positional_encoding import RelativePositionalEmbedding
from .qna import FusedKQnA
from .self_attention import MultiHeadSelfAttention
from .utils import DropPath, LayerScale, MlpBlock
|
from django.db import models
class Tvip(models.Model):
id = models.BigAutoField(db_column='Id', primary_key=True)
timestamp = models.DateTimeField(auto_now=True)
playername = models.CharField(max_length=200)
playerid = models.CharField(unique=True, max_length=20)
enddate = models.DateTimeField()
... |
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import rc
rc('font',**{'family':'serif','serif':['Palatino']})
rc('text', usetex=True)
rc('text.latex', preamble=r'''\usepackage{amsmath}
\usepackage{physics}
\usepackage{siunitx}
''')
from matplotlib import ticker
from tqd... |
from django.contrib import admin
from .models import *
# Register your models here.
class AuthorManage(admin.ModelAdmin):
list_display = ['id', 'name']
list_display_links = ['name']
class BookManage(admin.ModelAdmin):
list_display = ['id', 'title']
admin.site.register(Author, AuthorManage)
admin.site.... |
/**
* Algorithm: SequentialSearch(A[0..n - 1], K)
*
* Searches for a given value in a given array by sequential search
* Input: An array `A[0..n - 1]`, and a search key `K`
* Output: The index of the first element of `A` that matches `K`
* or `-1` if there are no matching elements
*
* i ← 0
* while i <... |
//
// Quiz28.h
// LeetCodePractice
//
// Created by White on 2018/9/24.
// Copyright © 2018年 White. All rights reserved.
//
#ifndef Quiz28_h
#define Quiz28_h
#include <stdio.h>
#endif /* Quiz28_h */
|
from .inference import (async_inference_detector, inference_detector,
init_detector, show_result_pyplot, save_result_pyplot)
from .test import multi_gpu_test, single_gpu_test
from .test_analysis import single_gpu_test_analysis
from .train import get_root_logger, set_random_seed, train_detector
... |
window.peopleAlsoBoughtJSON = [{"asin":"B09MJJTYR2","authors":"Lily Harper Hart","cover":"51GgPqUpcSL","length":"6 hrs and 38 mins","narrators":"Meghan Kelly","title":"Once in a Brew Moon"},{"asin":"B078XLRY3L","authors":"Amanda M. Lee","cover":"51jHU7sBkRL","length":"10 hrs and 14 mins","narrators":"Angel Clark","subH... |
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# 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 applicabl... |
const Attachments = require("./components/Attachments");
const Checklists = require("./components/Checklists");
const Comments = require("./components/Comments");
const CustomFields = require("./components/CustomFields");
const Dependencies = require("./components/Dependencies");
const Folders = require("./components/F... |
/* eslint-disable no-unused-vars,prefer-template */
const R = require('ramda');
const moment = require('moment-timezone');
const inflection = require('inflection');
const UserError = require('../compiler/UserError');
const BaseMeasure = require('./BaseMeasure');
const BaseDimension = require('./BaseDimension');
const ... |
var lunrIndex, pagesIndex;
// Initialize lunrjs using our generated index file
function initLunr() {
// First retrieve the index file
$.getJSON(index_url)
.done(function(index) {
pagesIndex = index;
// Set up lunrjs by declaring the fields we use
// Also provide thei... |
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Windows platform implementation."""
import contextlib
import errno
import functools
import os
import sys
import time
from collections import namedtuple... |
//
// Win32 utilities library
// Macros for importing/exporting functionality from the library.
//
// Jun-2019, Michael Lindner
// MIT license
//
#pragma once
#ifdef _WIN32
// Projects that use the DLL target build of win32-util have
// to define the WIN32UTIL_DLL macro to make WIN32UTIL_API
// resolve to '__declspec(... |
from thermos import app, db
# from thermos.models import User
from flask_script import Manager, prompt_bool
manager = Manager(app)
@manager.command
def initdb():
db.create_all()
db.session.add(User(username="sudeep", email="sudeep@gmail.com"))
db.session.commit()
print("Initialized the database")
@... |
import React from 'react';
import Popup from 'reactjs-popup';
import Painting from '../painting';
import Loading from '../loading';
const key = process.env.REACT_APP_API_KEY
const url = `https://www.rijksmuseum.nl/api/nl/collection?key=${key}&search?p=1&ps=20&role=schilder&imgonly=True`
let query = '20'
class Home ex... |
import numpy as np
import pandas as pd
import gym
from gym import spaces
from gym.utils import seeding
import matplotlib
import matplotlib.pyplot as plt
matplotlib.use('Agg')
# Amount of cash we start trading with
INITIAL_CASH_POSITION=1000000
# number of stocks we can act on. These are DOW30 stocks excluding Vis... |
import torch
import numpy as np
from pdb import set_trace
class QuadraticCost:
def __init__(self, Q, cuda=False, feature=None):
self.n = Q.shape[-1]
self.np_Q = Q.reshape((1, self.n, self.n))
self.to_Q = torch.from_numpy(Q).view(1, self.n, self.n).float()
self.device = None
... |
/* Get process times
Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
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, or (at your option)
any later vers... |
import numpy as np
from Normalize_clean import Normalize
import pickle
# Set bias value
BIAS = 1
# Create layer with all weights randomly initialized between -1 and 1
class Layer:
def __init__(self, neurons, inputs_per_neuron):
self.weights = 0.01 * (2.0 * np.random.random((inputs_per_neuron, neurons)) - ... |
/*
* ping.c
*
* Created on: Oct 27, 2021
* Author: benhall
*/
#include "ping.h"
volatile enum {LOW, HIGH, DONE} state; // set by ISR
volatile unsigned int rising_time; // pulse start time: set by ISR
volatile unsigned int falling_time; // pulse end time: set by ISR
void TIMER3B_Handler();
/*... |
let cosmetic = require('cosmetic'),
{ existsSync } = require('fs'),
{ resolve } = require('path'),
{ Group_Shortcut, Group, Script, Shortcut } = require('../emporium'),
{ abbreviateDirectory, printTable } = require('../helpers');
module.exports = async (options) => {
let { dir, shortcut, verbose } = options;... |
/*======================================================================
expTest.c
Unit tests for EXP node in the Alan compiler
======================================================================*/
#include "exp.c"
#include <cgreen/cgreen.h>
#include "unitmock.h"
#include "unitList.h"
#include "ins_x.h"... |
import time
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import pages.page_editor as e
from webdriver_manager.chrome import ChromeDriverManager
class PageArticle:
title_xpath = '/html/body/div[1]/div/div[1]/div/h1'
delete_xpath = '/html/body/div[1]/div/div[1]/div/div/sp... |