text stringlengths 3 1.05M |
|---|
import datetime
def handle_prices(data: dict) -> dict:
"""Set price according to rate."""
for reservation in data['Reservation']:
if reservation['Tarif'] == "Plein tarif":
price = 10.00
elif reservation['Tarif'] == "Tarif reduit":
price = 8.00
elif reservation['... |
(function ($, DataTable) {
if ( ! DataTable.ext.editorFields ) {
DataTable.ext.editorFields = {};
}
var Editor = DataTable.Editor;
var _fieldTypes = DataTable.ext.editorFields;
_fieldTypes.tcg_checkbox = {
create: function ( conf ) {
var that = this;
... |
/**
* Auto-generated action file for "trash nothing!" API.
*
* Generated at: 2019-05-07T14:44:27.208Z
* Mass generator version: 1.1.0
*
* flowground :- Telekom iPaaS / trashnothing-com-connector
* Copyright © 2019, Deutsche Telekom AG
* contact: flowground@telekom.de
*
* All files of this connector are licens... |
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
(function() {
'use strict';
angular.module('app.history')
.controller('HistoryController', HistoryController);
HistoryController.$inject = [
'$scope',
'persistenceService',
'dayEntity',
'timeCalculationService',
'settingsService'
];
function HistoryC... |
/* jshint -W097 */
/* jshint -W030 */
/* jshint strict:true */
/* jslint node: true */
/* jslint esversion: 6 */
'use strict';
const mqtt = require('mqtt-connection');
const ping = require('ping');
const tcpp = require('tcp-ping');
const net = require('net');
const request = require('request');
const datapoints = req... |
/* The common simulator framework for GDB, the GNU Debugger.
Copyright 2002-2017 Free Software Foundation, Inc.
Contributed by Andrew Cagney and Red Hat.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License... |
/*
* Copyright (C) 2017 by Author: Aroudj, Samir, born in Suhl, Thueringen, Germany
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD 3-Clause license. See the License.txt file for details.
*/
#ifndef _APPLICATION_ADDRESS_H_
#define _APPLICATION_ADDRESS_H_
#inc... |
#pragma once
#include "SyntaxNodeImpl.h"
struct TokenNode;
struct IdentifyNode;
struct TemplateParameterListNode : SyntaxNodeImpl
{
TemplateParameterListNode* m_parameterList;
TokenNode* m_delimiter;
IdentifyNode* m_parameter;
public:
TemplateParameterListNode(TemplateParameterListNode* parameterList, TokenNode* ... |
import React from 'react'
import PropTypes from 'prop-types'
import classnames from 'classnames'
import styled from 'styled-components'
import {COMMON, get} from './constants'
import theme from './theme'
const ITEM_CLASS = 'TabNav-item'
const SELECTED_CLASS = 'selected'
function TabNavBase({actions, className, align,... |
from __future__ import absolute_import
from flytekit.models import common as _common
from flytekit.models.core import identifier as _identifier, execution as _execution
from flyteidl.admin import task_execution_pb2 as _task_execution_pb2
class TaskExecutionClosure(_common.FlyteIdlEntity):
def __init__(self, phas... |
const { convertToUnitQty } = require('./index');
console.log('convert to unit qty 1.5 -> 65');
console.log(convertToUnitQty('1.5', 60)); |
from setuptools import find_packages, setup
setup(name='apistrap',
version='0.9.11',
description='Iterait REST API utilities',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Operating System :: Uni... |
/*-----------------------------------------------------------------------*/
/* Low level disk I/O module SKELETON for FatFs (C)ChaN, 2019 */
/*-----------------------------------------------------------------------*/
/* If a working storage control module is available, it should be */
/* attached to t... |
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PerlTestRequires(PerlPackage):
"""Checks to see if the module can be loaded."""
homep... |
//----------------------------------------------------------------------------
// ObjectComponents
// Copyright (c) 1994, 1996 by Borland International, All Rights Reserved
//
// Implementation for the two standard events classes \\
//------------------------------------... |
define(
"dojo/cldr/nls/bs-cyrl/roc", //begin v1.x content
{
"eraAbbr": [
"Пре РК",
"РК"
]
}
//end v1.x content
); |
// Generated by CoffeeScript 1.7.1
(function() {
CodeMirror.defineMode("coffeescript", function(conf) {
var ERRORCLASS, commonConstants, commonKeywords, constants, dedent, delimiters, external, identifiers, indent, indentKeywords, keywords, longComment, operators, properties, regexPrefixes, stringPrefixes, tokenB... |
import time
import typer
def main():
total = 1000
with typer.progressbar(length=total) as progress:
for batch in range(4):
# Fake processing time
time.sleep(1)
# Increment by 250 on each loop iteration
# (it will take 4 seconds to reach 1000)
... |
/*
* Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
* Copyright 2004-2011 Red Hat, Inc.
*
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU General Public License version 2.
*/
#define... |
var classveins_1_1_tra_c_i_command_interface_1_1_vehicle =
[
[ "Vehicle", "classveins_1_1_tra_c_i_command_interface_1_1_vehicle.html#a912b048710decb43dac5cdc132489c3d", null ],
[ "changeRoute", "classveins_1_1_tra_c_i_command_interface_1_1_vehicle.html#a20cdfcef89ebb3d4609e42d64c4c3a66", null ],
[ "changeVe... |
const fs = require('fs');
var AssetWatchdog = class {
constructor(assetFolder, assetCount, assets, emitter, logger) {
this.assetFolder = assetFolder;
this.assetCount = assetCount;
this.assets = assets;
this.logger = logger;
this.emitter = emitter;
//get paths of alr... |
# Copyright 2020-2021 Huawei Technologies Co., Ltd.All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... |
import mysql.connector
from common.utils import Properties, Config
from modelandpredict.trainhousing import trainhousing
credentials = Properties('../resources/credentials.properties').get_properties()
user = credentials['user']
pw = credentials['pw']
address = credentials['address']
db = credentials['db']
db_conn = ... |
import React from "react";
import PageListItem from "./pageListItem";
import lazyloadImages from "../../utils/lazyLoadImages";
class PageList extends React.Component {
componentDidMount() {
const lazyLoadElements = document.querySelectorAll(".lazy-load");
if (lazyLoadElements.length > 0) {
lazyloadIma... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'page.ui'
#
# Created by: PyQt5 UI code generator 5.13.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("F... |
"""
With these settings, tests run faster.
"""
from .base import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY = env(
"DJANGO_SECRET_KEY",
default="K4syQXJBp... |
var config = require('./config');
var express = require('express');
var site = require('./controllers/site');
var staticController = require('./controllers/static');
var user = require('./controllers/user');
var account = require('./controllers/account');
var article = require('./controllers/article');
var aut... |
goog.provide('Mavelous.util');
goog.require('goog.object');
/**
* Contains static methods for utility functions on heartbeat mavlink
* messages.
*/
Mavelous.util.heartbeat = {};
/**
* Bitfields for base_mode.
* @enum {number}
*/
Mavelous.util.MavModeFlag = {
CUSTOM_MODE_ENABLED: 1,
TEST_ENABLED: 2,
AUT... |
var chalk = require('chalk');
var semver = require('semver');
var util = require('../lib/util');
var config = require('../lib/config');
var modelXml = require('../lib/modelXml');
var fs = require('fs-extra-promise');
var _ = require('lodash');
var jxon = require('jxon');
var watch = require('watch');
var path = require... |
/** @format */
module.exports = {
parser: '@typescript-eslint/parser', //定义ESLint的解析器
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'], //定义文件继承的子规范
plugins: ['@typescript-eslint'], //定义了该eslint文件所依赖的插件
env: {
//指定代码的运行环境
browser: true,
node: true,
},
}
|
/*
* avrdude - A Downloader/Uploader for AVR device programmers
* Copyright (C) 2000-2005 Brian S. Dean <bsd@bsdhome.com>
* Copyright (C) 2007 Joerg Wunsch
*
* 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 S... |
/*
* Lua RTOS, FreeRTOS adds needed for Lua RTOS
*
* Copyright (C) 2015 - 2017
* IBEROXARXA SERVICIOS INTEGRALES, S.L. & CSS IBÉRICA, S.L.
*
* Author: Jaume Olivé (jolive@iberoxarxa.com / jolive@whitecatboard.org)
*
* All rights reserved.
*
* Permission to use, copy, modify, and distribute this software
... |
const unsigned int m_TimeTable[301]= {
//[Accelator = 5]
20670, 8561, 6569, 5538, 4879, 4411, 4056, 3775, 3546, 3354,
3190, 3048, 2923, 2813, 2714, 2625, 2544, 2470, 2403, 2340,
2282, 2229, 2178, 2132, 2088, 2046, 2007, 1970, 1936, 1902,
1871, 1... |
from typing import Any
from ...functional.mixins import CompositionClassMixin
from ..one import Identifier
from .registrars import IterableRegistrar, DICT_PARTS
class AllIdentifier(CompositionClassMixin, metaclass=IterableRegistrar):
"""
"""
def __new__(cls, iterable, name: str = None, *, attrs='__new__... |
import logging
import requests
from . import config, storage, utils, log
from .components import load_components
class Core(object):
def __init__(self):
''' init is the only method defined in core.py
alive is value showing whether core is running
- you should call l... |
import {
faAngleDown,
faRandom,
faRetweet,
faListUl,
faVolumeMute,
faVolumeUp
} from "@fortawesome/free-solid-svg-icons";
import { useSelector } from "react-redux";
import React from "react";
import {
IconButton as BackwardButton,
IconButton as CloseExpandedPlayerButton,
IconButton as DesktopPlayPaus... |
"""The tests for the UPC ConnextBox device tracker platform."""
import asyncio
import os
from unittest.mock import patch
import logging
from homeassistant.setup import setup_component
from homeassistant.components import device_tracker
from homeassistant.const import (
CONF_PLATFORM, CONF_HOST, CONF_PASSWORD)
from... |
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
FOUNDATION_EXPORT double PayfoneSDKVersionNumber;
FOUNDATION_EXPORT const unsigned char PayfoneSDKVersionString[];
|
module.exports.tasks = {
/**
* Connect
* https://github.com/gruntjs/grunt-contrib-connect
* Start a static web server
*/
connect: {
site: {
options: {
open: 'http://0.0.0.0:8000/bannersDist/banners',
livereload: true
}
}
}
};
|
//
// VRTSoundManager.h
// ViroReact
//
// Created by Andy Chu on 1/27/17.
// Copyright © 2017 Viro Media. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "ViroViewManager.h"
@interface VRTSoundManager : ViroViewManager
@end
@interface VRTSoundFieldManager : ViroViewManager
@end
@interface V... |
import inspect
from django import template
from django.contrib import messages
from django.contrib.contenttypes.models import ContentType
from django.db.models import Q
from django.http import Http404, HttpResponseForbidden
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import revers... |
/***************************************************************************
* A program for libmseed packing tests.
*
* This file is part of the miniSEED Library.
*
* Copyright (c) 2020 Chad Trabant, IRIS Data Management Center
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not u... |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path fill="none" d="M0 0h24v24H0V0z" /><path d="M22 3H7c-.69 0-1.23.35-1.59.88L.37 11.45c-.22.34-.22.77 0 1.11l5.04 7.56c.36.52.97.88 1.66.88H22c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 13.5c-.83 0-... |
from zpy.constants import EnvironmentKeys
from typing import Dict, List
from zpy.utils import find
from zpy.utils import env as genv
import os
__author__ = "Noé Cruz | contactozurckz@gmail.com"
__copyright__ = "Copyright 2021, Small APi Project"
__credits__ = ["Noé Cruz", "Zurck'z"]
__license__ = "MIT"
__version__ = "... |
# Copyright 2018-2020 Xanadu Quantum Technologies 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... |
import numpy as np
import pandas as pd
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_experimental_option('excludeSwitches', ['enable-logging'])
global driver
driver = webdriver.Chrome(executable_path="chromedriver.exe... |
/**
* Class ContactItemView of Backbone Router
* @author KOI || @dropecamargo
* @link http://koi-ti.com
*/
//Global App Backbone
app || (app = {});
(function ($, window, document, undefined) {
app.ContactItemView = Backbone.View.extend({
tagName: 'tr',
template: _.template( ($('#contact-item-li... |
(function () {
angular.module('Wallet').factory('authInterceptorService',
['$q', '$location',
function ($q, $location) {
var authInterceptorServiceFactory = {}
var _request = function (config) {
config.headers = config.headers || {}
var authData = JSON.parse(... |
/**
* Copyright 2021 The Google Earth Engine Community Authors
*
* 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... |
# -*- coding:utf-8 -*-
import tensorflow as tf
import matplotlib.pyplot as plt
import numpy as np
import os, random, cv2
import my_tensorflow.captcha.helpers as helpers
class Discuz():
def __init__(self):
self.config = tf.ConfigProto(allow_soft_placement=True)
gpu_options = tf.GPUOptions(per_proce... |
// META: title=NativeIO API: Transferred buffer is of the same type as input.
// META: global=dedicatedworker
// META: script=resources/support.js
'use strict';
const kViewTypes = [
Int8Array,
Uint8Array,
Uint8ClampedArray,
Int16Array,
Uint16Array,
Int32Array,
Uint32Array,
Float32Array,
Float64Array... |
/*
* defines for the dmalloc library
*
* Copyright 1995 by Gray Watson
*
* This file is part of the dmalloc package.
*
* Permission to use, copy, modify, and distribute this software for any
* NON-COMMERCIAL purpose and without fee is hereby granted, provided
* that the above copyright notice and this permissi... |
webpackJsonp([25],{c4hK:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s("5Qen"),n=s("T452"),r={data:function(){return{name:"",logoUrl:"",qrcode:"",billMoney:0,subsidyMoney:0}},created:function(){var t=this;this._getCurrentMerchant(),this._getCurrentUser(),window.resize=function(){t... |
from flask import render_template
from brewmeister import app
@app.route('/')
def index():
return render_template('index.html')
|
# coding=utf-8
"""
src.module
~~~~~~~~~~~~~~
Main source of the microservice.
:copyright: (c) 2020 by Irakli Nadareishvili.
:license: MIT, see LICENSE for more details.
"""
import logging
# logFormatter = '%(asctime)s %(levelname)s \
# [%(filename)s %(funcName)s():%(lineno)d] - %(message)s'
LO... |
// Blend2D - 2D Vector Graphics Powered by a JIT Compiler
//
// * Official Blend2D Home Page: https://blend2d.com
// * Official Github Repository: https://github.com/blend2d/blend2d
//
// Copyright (c) 2017-2020 The Blend2D Authors
//
// This software is provided 'as-is', without any express or implied
// warranty. I... |
'use strict'
const conventionalChangelogCore = require('conventional-changelog-core')
const getPreset = require('../')
const preset = getPreset()
const expect = require('chai').expect
const mocha = require('mocha')
const describe = mocha.describe
const it = mocha.it
const gitDummyCommit = require('git-dummy-commit')
co... |
export default {
"pages": {
"root": {
"id": "root",
"pageUrl": "root",
"name": "root",
"children": [
"60b3566d765ed9001e2a8a46",
"60b3566d765ed9001e2a8a48",
"60bdf49a39274b001e1ca934"
]
},
"60b3566d765ed9001e2a8a46": {
"id": "60b3566d765ed9001e2a8a46",
"name": "404",
"pageUrl"... |
"""Test of v0x04 queue module."""
from pyof.v0x04.common.queue import (
PacketQueue, QueuePropExperimenter, QueuePropHeader, QueuePropMaxRate,
QueuePropMinRate)
from tests.unit.test_struct import TestStruct
class TestPacketQueue(TestStruct):
"""Packet Queue structure tests (also those in :class:`.TestDump... |
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
# Generated by Django 2.1.1 on 2018-10-06 16:17
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('api', '0025_... |
/**
* Created by Mahesh on 1/8/2018.
*/
'use strict';
// Declare app level module which depends on views, and components
var Adbapp = angular.module('abpib', ['ngMaterial', 'ui.router','chart.js','ui.bootstrap','ui.grid']);
// Declare the providers only handle the config method
Adbapp.config(['$stateProvider', '$h... |
(function(d){d['tt']=Object.assign(d['tt']||{},{a:"Cannot upload file:",b:"Image toolbar",c:"Insert image or file",d:"Numbered List",e:"Bulleted List",f:"Калын",g:"Italic",h:"image widget",i:"Insert image",j:"Full size image",k:"Side image",l:"Left aligned image",m:"Centered image",n:"Right aligned image",o:"Enter imag... |
function Circle() {
// antiClockwise is not required for the circle as arc has to be 360 degree.
}
Circle.prototype = {
startAngle: 0,
endAngle: 2 * Math.PI,
antiClockwise: false,
draw: function (inContext, ofRadius, withPattern, atPosition /* array */) {
this.in(inContext);
this.of... |
import { FETCH_NEW_EVENT } from '../actions/index';
const initalState = {
fetching: false,
fetched: false,
error: null,
response: null,
}
export default ( state = initalState, action ) => {
switch (action.type) {
case `${FETCH_NEW_EVENT}_PENDING`:
return {
...st... |
from django.test import TestCase
from django.db import IntegrityError
from django.core.exceptions import ValidationError
from django.db.models import Model
from address.models import *
from address.models import to_python
# Python 3 fixes.
import sys
if sys.version > '3':
long = int
basestring = (str, bytes)
... |
'use strict';
var test = require('tape'),
validation = require('../lib/validator'),
thing = require('core-util-is');
test('validation', function (t) {
var validator = validation({
api: require('./fixtures/defs/pets.json')
});
t.test('input pass', function (t) {
t.plan(1);
... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{YTIe:function(e,l,c){"use strict";var a=c("mXGw"),t=c("cUhM");function n(e){return a.createElement(t.t,e,a.createElement("path",{fill:"currentColor",d:"M8.125 4H21.25c.962 0 1.75.8 1.75 1.778v12.444C23 19.2 22.212 20 21.25 20H8.125c-.604 0-1.076-.32-1.391-.791l-4... |
import pytest
import torch
from mmseg.models.decode_heads import ASPPHead, DepthwiseSeparableASPPHead
from .utils import _conv_has_norm, to_cuda
def test_aspp_head():
with pytest.raises(AssertionError):
# pool_scales must be list|tuple
ASPPHead(in_channels=32, channels=16, num_classes=19, dilati... |
'use strict'
const path = require('path')
const AutoLoad = require('fastify-autoload')
module.exports = async function (fastify, opts) {
// Place here your custom code!
// Do not touch the following lines
// This loads all plugins defined in plugins
// those should be support plugins that are reused
// t... |
import { getLocalUser } from "./helpers/auth";
const user = getLocalUser();
export default {
state: {
currentUser: user,
isLoggedIn: !!user,
loading: false,
auth_error: null,
customers: [],
total:'',
dataTransaksi:[],
},
getters: {
isLoading(... |
'use strict';
import { window } from './browser';
export const set = function (token) {
if (window.localStorage && typeof window.localStorage.setItem === 'function') {
window.localStorage.setItem('auth-token', token);
}
};
export const get = function () {
let auth = null;
if (window.localStorage && typeof w... |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: v1.15.7
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import kube... |
# model settings
temperature = 0.01
with_norm = True
model = dict(
type='UVCTrackerV2',
backbone=dict(
type='ResNet',
pretrained=None,
depth=18,
out_indices=(3, ),
strides=(1, 2, 1, 1),
norm_eval=False,
zero_init_residual=True),
cls_head=dict(
... |
import React, { Component } from 'react'
import Modal from 'react-bootstrap/Modal'
import Toast from 'react-bootstrap/Toast'
import { Link } from 'react-router-dom'
import TB_Descuentos from './tabla/tb_descuentos'
class Descuento extends Component {
constructor(){
super();
this.state ={
... |
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import Ads from '@/components/Ads'
import CopyRight from '@/components/CopyRight.vue'
Vue.component('Ad... |
import numpy as np
from highway.engine import Pipeline
from highway.modules.processing import Noise, Augmentations
from highway.modules.network import ZMQSink, ZMQSource
from highway.augmentations.img import Resize
class TestProcessingPipeline:
def test_resizing(self):
N = 5
data_shape = (320, 2... |
# SPDX-FileCopyrightText: 2021 easyCore contributors <core@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2021 Contributors to the easyCore project <https://github.com/easyScience/easyCore>
__author__ = 'github.com/wardsimon'
__version__ = '0.1.0'
from copy import deepcopy
from easyCore.Objects... |
import PropTypes from "prop-types";
import React, { Component } from "react";
import { Button, Grid, TextField, CircularProgress } from "@material-ui/core";
import SearchIcon from "@material-ui/icons/Search";
import MediaItemSearchDetails from "../../shared/MediaItemSearchDetails";
class ShowResults extends Componen... |
/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is ... |
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commerci... |
from unittest import TestCase, main
from expects import expect, equal
from twin_sister.expects_matchers import raise_ex
class Spam(Exception):
pass
class SonOfSpam(Spam):
pass
class Eggs(Exception):
pass
class TestRaiseEx(TestCase):
def test_returns_true_if_specified_exception_is_raised(self):... |
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n... |
# THIS FILE IS SAFE TO EDIT. It will not be overwritten when rerunning go-raml.
from flask import jsonify, request
import json as JSON
import jsonschema
from jsonschema import Draft4Validator
import os
dir_path = os.path.dirname(os.path.realpath(__file__))
User_schema = JSON.load(open(dir_path + '/schema/User_schem... |
/**
* First we will load all of this project's JavaScript dependencies which
* includes Vue and other libraries. It is a great starting point when
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap');
window.Vue = require('vue');
/**
* The following block of code may be ... |
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.filter
es5id: 15.4.4.20-1-12
description: Array.prototype.filter applied to RegExp object
---*/
function callbackfn(val, idx, obj) {
return obj insta... |
/*
**
** $Filename: b3Material.h $
** $Release: Dortmund 2004 $
** $Revision$
** $Date$
** $Author$
** $Developer: Steffen A. Mork $
**
** Blizzard III - Raytracing class definitions for materials
**
** (C) Copyright 2004 Steffen A. Mork
** All Rights Reserved
**
**
**
*/
#pragma once
#ifndef B3_RAYTRACE_MATERIA... |
"""Module used to set, update and retrieve the global articles"""
ARTICLES = []
COVID_DATA_LIST = []
UPDATES = []
def init() -> None:
"""
Definition:
Initiates the global_vars module
"""
set_global_vars()
def set_global_vars() -> None:
"""
Defintion:
Sets the global variables... |
import os
import re
from typing import Any, Dict, List
from commitizen import defaults, git
from commitizen.config import BaseConfig
from commitizen.cz.base import BaseCommitizen
from commitizen.cz.exceptions import CzException
from commitizen.cz.utils import multiple_line_breaker, required_validator
__all__ = ["GitJ... |
/*
* This file is part of Saenaru.
*
* Copyright (c) 1990-1998 Microsoft Corporation.
* Copyright (c) 2003 Hye-Shik Chang <perky@i18n.org>.
* Copyright (c) 2003 Won-Kyu Park <wkpark@kldp.org>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are perm... |
// license [
// This file is part of the Phantom project. Copyright 2011-2020 Vivien Millet.
// Distributed under the MIT license. Text available here at
// https://github.com/vlmillet/phantom
// ]
#pragma once
/* ****************** Includes ******************* */
#include <phantom/lang/reflection_fwd.h>
#include <ph... |
import numpy as np
import random
from collections import deque, namedtuple
import torch
class PrioritizedReplayBuffer(object):
""" Prioritized experience buffer implementation """
def __init__(
self,
buffer_size,
prob_alpha,
random_seed,
):
"""
:param: buff... |
import urwid
from subprocess import run, PIPE
class DeleteChartsMenu:
def __init__(self, return_func, helm_charts_installed_dict):
self.selection_ch_box = [urwid.CheckBox("{:30}{}".format(repo['chart_name'], repo['name_space']))
for repo in helm_charts_installed_dict]
... |
/**
*
* App.js
*
* This component is the skeleton around the actual pages, and should only
* contain code that should be seen on all pages. (e.g. navigation bar)
*
*/
import React from 'react';
import { Switch, Route } from 'react-router-dom';
import Home from 'containers/Home/Loadable';
import NotFoundPage fr... |
from multiprocessing import Process, Queue, Manager
import scrapy.spiders
from scrapy.crawler import CrawlerProcess
from urllib.parse import urlencode
import re
import json
def GoogleScholar(request):
def SearchResultsScraper(request):
def script(queue, output):
try:
... |
from pwn import *
elf = ELF('./task')
solved = False
while not solved:
if args.GDB:
p = gdb.debug(elf.path, '\n'.join([
"b *main",
"c"
]))
elif args.REMOTE:
p = remote("localhost" if not args.ADDR else args.ADDR, 11306)
else:
p = process(elf.path)
payload = b'aa' + p8(0)
p.send(payload)
data = ... |
# coding: utf-8
from __future__ import absolute_import, division, print_function, unicode_literals
import os
from datetime import datetime
from pymongo import ReturnDocument
from tqdm import tqdm
from atomate.utils.utils import get_mongolike, get_logger
from atomate.vasp.builders.base import AbstractBuilder
from at... |
# 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 ... |
import requests
from download import download_file
def get_hubble(image_id, ext='jpeg'):
status_ready = None
response = requests.get('http://hubblesite.org/api/v3/image/{}'.format(image_id))
data = response.json()['image_files']
image_name = "Hubble-{}.{}".format(image_id, ext)
loading_list = [imag... |