text
stringlengths
3
1.05M
"""Module for the Pusher websocket driver.""" from ...contracts import BroadcastContract from ...drivers import BaseDriver from ...exceptions import DriverLibraryNotFound from ...helpers import config class BroadcastPusherDriver(BroadcastContract, BaseDriver): """Class for the Pusher websocket driver.""" de...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=4 # total number=19 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np #thatsNoCode def make_circuit(n: int, input_qubit): c = cirq.Ci...
from __future__ import print_function, division import six import numpy as np from astropy import units as u from astropy_healpix import npix_to_nside, HEALPix from ..wcs_utils import convert_world_coordinates from .utils import parse_coord_system __all__ = ['healpix_to_image', 'image_to_healpix'] ORDER = {} ORDE...
# -*- 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.hitbtc import hitbtc # ----------------------------------------------------------------------------- try: bas...
# -*- coding: utf-8 -*- import pymysql from poi.settings import DB_CONFIG class DBHelper(object): """" 读取settings中的配置,实现数据库操作 """ def __init__(self): self.db = pymysql.connect( host=DB_CONFIG['MYSQL_HOST'], db=DB_CONFIG['MYSQL_DBNAME'], user=DB_CONFIG['M...
"use strict"; var $ = require("../../core/renderer"), typeUtils = require("../../core/utils/type"), noop = require("../../core/utils/common").noop, isDefined = require("../../core/utils/type").isDefined, extend = require("../../core/utils/extend").extend, each = require("../../core/utils/iterator")...
# coding: utf-8 """ Automox Console API API for use with the Automox Console # noqa: E501 OpenAPI spec version: 2021-08-10 Contact: support@automox.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import automox_co...
# Import packages import elevation import netCDF4 as nc4 import numpy as np import rasterio import math import plotly.graph_objects as go import pandas as pd # Set grid size final_grid_x = 260 final_grid_y = 200 # Set target map target_x_1 = 117.8 target_x_2 = 118 target_y_1 = 30.5 target_y_2 = 30.7 elevation_datase...
module.exports = createFilter; const types = ['Unknown', 'Point', 'LineString', 'Polygon']; /** * Given a filter expressed as nested arrays, return a new function * that evaluates whether a given feature (with a .properties or .tags property) * passes its test. * * @private * @param {Array} filter mapbox gl fil...
import * as Scrivito from "scrivito"; import tickListWidgetIcon from "../../assets/images/tick_list_widget.svg"; import TickListItemWidget from "../TickListItemWidget/TickListItemWidgetClass"; Scrivito.provideEditingConfig("TickListWidget", { title: "Tick List", thumbnail: tickListWidgetIcon, initialContent: { ...
# Copyright 2020 Google Research. 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 law...
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains th...
# Copyright 2019 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, ...
from django.conf.urls.defaults import * urlpatterns = patterns('', url(r'^(?P<slug>[-\w]+)/process/$', view = 'quiz.views.process_quiz', name = 'process_quiz', ), url(r'^(?P<slug>[-\w]+)/$', view = 'quiz.views.quiz_detail', name = 'quiz_detail', ), url(r'^$', view = 'quiz.views.quiz_dashboard', name =...
define(['d3'],function(d3){ // 传入容器id var table = function(id,data){ // 获取容器宽度,高度 var oDiv = d3.select(id); var width = oDiv[0][0].clientWidth; var height = oDiv[0][0].clientHeight; // 请求获取来的数据 var dataset = data; // 设置变量获取x轴,y轴数据 var weights =...
import biorbd from time import time import numpy as np from bioptim import ( OptimalControlProgram, ObjectiveList, Objective, DynamicsTypeList, DynamicsType, BoundsList, QAndQDotBounds, InitialGuessList, InitialGuessOption, ShowResult, Solver, InterpolationType, ) def ...
#!/home/moringaschool/Documents/Core/Pitch/venv/bin/python3 # $Id: rst2xml.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ A minimal front end to the Docutils Publisher, producing Docutils XML. """ try: import ...
/** * FreeRDP: A Remote Desktop Protocol client. * Video Redirection Virtual Channel - Types * * Copyright 2010-2011 Vic Lee * * 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 * * ...
"""Test MySQL FOR UPDATE behavior. See #4246 """ import contextlib from sqlalchemy_1_3 import Column from sqlalchemy_1_3 import exc from sqlalchemy_1_3 import ForeignKey from sqlalchemy_1_3 import Integer from sqlalchemy_1_3 import Table from sqlalchemy_1_3 import testing from sqlalchemy_1_3 import update from sqlal...
import functools from peewee import fn from playhouse.shortcuts import model_to_dict from .model import Nb101TrialStats, Nb101TrialConfig from .graph_util import hash_module, infer_num_vertices def query_nb101_trial_stats(arch, num_epochs, isomorphism=True, reduction=None, include_intermediates=False): """ Q...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; function _default(number, index) { return [['az önce', 'şimdi'], ['%s saniye önce', '%s saniye içinde'], ['1 dakika önce', '1 dakika içinde'], ['%s dakika önce', '%s dakika içinde'], ['1 saat önce', '1 saat iç...
/* eslint-disable camelcase */ // https://github.com/zondax/cosmos-delegation-js/ // https://github.com/cosmos/ledger-cosmos-js/blob/master/src/index.js import 'babel-polyfill'; import TransportWebUSB from "@ledgerhq/hw-transport-webusb"; import BluetoothTransport from "@ledgerhq/hw-transport-web-ble"; import CosmosApp...
import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorInsertChart = (props) => ( <SvgIcon {...props}> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"/> </SvgIcon> ); EditorInsertChart = pure(EditorIn...
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6301],{16165:function(ye,se,c){"use strict";var h=c(28991),O=c(96156),l=c(81253),m=c(67294),B=c(94184),A=c.n(B),G=c(63017),V=c(41755),pe=["className","component","viewBox","spin","rotate","tabIndex","onClick","children"],Q=m.forwardRef(functio...
import logging import datetime from django.db import models from django.contrib.auth.models import User from django.conf import settings from django_push.subscriber import signals as push_signals from django_push.subscriber.models import Subscription log = logging.getLogger(__name__) class FeedType(models.Model): ...
"""Tests for the Z-Wave JS integration."""
# 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 file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { Version } from '@angular/core'; export { MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY, MatAutocompleteSelectedEve...
import React from 'react' import { fireEvent, render as defaultRender, screen } from '@testing-library/react' import { PlayerSpeedComponent } from './player-speed.component' import { WithStyledComponents } from '../../app/components/with-styled-components/with-styled-components' import { MOCK_STATE } from './player-spe...
# Copyright (C) 2021, Mindee. # This program is licensed under the Apache License version 2. # See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details. from typing import Any from doctr import is_tf_available from .predictor import RecognitionPredictor from doctr.models.prepro...
# IronPython Pad. Write code snippets here and F5 to run. import ctypes #Load CoolProp shared library CP = ctypes.cdll.LoadLibrary(r"E:\Cyril\Dropbox\CVC\BIM_Revit\ScriptsPython\dll\CoolProp.dll") #making PropsSI function call shorter PropsSI = CP.PropsSI #Convert python data type entered in PropsSI function call to ...
# Generated by Django 2.2.24 on 2022-03-05 17:02 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('document_states', '0025_auto_20220305_1636'), ] operations = [ migrations.AddField( model_name='workflow', name='en...
#!/usr/bin/env python import os import shutil import sys import json from setuptools import setup, find_packages from setuptools.command.develop import develop from setuptools.command.install import install from setuptools.command.sdist import sdist import pyct.build def get_setup_version(reponame): """ He...
import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; import _createClass from "@babel/runtime/helpers/createClass"; import _defineProperty from "@babel/runtime/helpers/defineProperty"; function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var sym...
#include <std.h> #include "/d/stella/short.h" inherit ROOM; void reset(){ ::reset(); if (!present("mundanoid")) new(MPATH "mund_nw.c")->move(TO); } void init(){ ::init(); /* removing chance for a star here so it can't be used to kill the mundanoid *Styx* 8/2003 if (interactive(TP)...
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE121_Stack_Based_Buffer_Overflow__src_wchar_t_alloca_cpy_64b.c Label Definition File: CWE121_Stack_Based_Buffer_Overflow__src.string.label.xml Template File: sources-sink-64b.tmpl.c */ /* * @description * CWE: 121 Stack Based Buffer Overflow * BadSource: Initi...
""" Tuple as Data Structure We have see how we interpreted tuples as data structures The position of the object contained in the tuple gives it meaning For example, we can represent a 2D coordinate as: (10, 20) x y If pt is a position tuple, we can re...
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang('autosave', 'ru', { dateFormat: 'LLL', autoSaveMessage: 'Автоматическое сохранение', loadSavedContent: 'Найдена сохраненная версия этого ...
import os import json import argparse import pickle as pkl from collections import defaultdict from tqdm import tqdm from dataset import ImagenetVidVRD from dataset import VidOR from baseline import segment_video, get_model_path from baseline import trajectory, feature, model, association dataset = None def load_ob...
#$Id$ class Item: """This class is used to create object for item.""" def __init__(self): """Initialize parameters for Item object.""" self.item_id = '' self.name = '' self.status = '' self.description = '' self.rate = 0.0 self.unit = '' self.acco...
/*global define */ define(['jquery', 'underscore', 'backbone', 'models/SolrResult'], function($, _, Backbone, SolrResult) { 'use strict'; // Search Model // ------------------ var Search = Backbone.Model.extend({ // This model contains all of the search/filter terms /* * Search filters can be either ...
def Main(a: Tuple[int]) -> int: return a['0']
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path fill="none" d="M0 0h24v24H0V0zm0 0h24v24H0V0z" /><path d="M9 21h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14...
import { cloneDeep, get, set } from 'lodash'; import { mergeMetasWithSchema } from '../../../utils'; import pluginId from '../../../pluginId'; const getRelationModel = (targetModel, models) => models.find(model => model.uid === targetModel); // editRelations is an array of strings... const formatEditRelationsLayoutWi...
import Canvas from '../index' import expect from 'expect' import { shallow } from 'enzyme' import React from 'react' describe('<Canvas />', () => { it('should render its children', () => { const children = 'I am a child' const canvas = shallow(<Canvas>{children}</Canvas>) expect(canvas.contains(children...
'use strict'; /** * This module is used to receive incoming SparkPost events * * Note that `bodyParser.json()` has a default limit of 100kb. * If you need to process larger requets, you need to change that. * @link https://github.com/expressjs/body-parser#bodyparserjsonoptions */ /** * Module dependencies. */...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /* tslint:disable-next-line */ const paramCase = require("param-case"); class Check { constructor() { this.prefix = `[sql-lint: ${this.getName()}] `; } /** * Infers the name of the error message from the child's *...
# import what you need import config_main from Application.Frame.global_variables import JobInitStateReturn, global_var_handler from Application.Frame.transferJobPorts import get_port_from_wave from Utils.log_handler import log_to_console, log_to_file, log_error_to_console from Application.Config.create_config i...
import pandas as pd spy_vix_src = 'https://raw.githubusercontent.com/hackingthemarkets/vix-strategy/master/spy_vix.csv' spy_vix = pd.read_csv(spy_vix_src, index_col=0) spy_vix.to_csv('/home/aufeld/repo/market_volatility/spy_vix.csv', index=True, header=True) vix_src = 'https://raw.githubusercontent.com/hackingthem...
# -*- coding: utf-8 -*- import os import sys from sphinx.util import logging import recommonmark from recommonmark.transform import AutoStructify logger = logging.getLogger(__name__) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, st...
#ifndef _3DSIDENT_WIFI_H_ #define _3DSIDENT_WIFI_H_ #include <3ds.h> /* Wifi Slot Structure constructed using the info provided here https://www.3dbrew.org/wiki/Config_Savegame#WiFi_Slot_Structure */ #define CFG_WIFI_BLKID (u32) 0x00080000 // Configuration blocks BlkID for WiFi configuration slots #define CFG_WIFI...
import ais.stream as astr import pandas as pd import numpy as np import glob import feather as ft lloyds=pd.read_csv('20170627_LloydsList_PoL.csv') lloyds=lloyds.loc[-np.isnan(lloyds.MMSI),:] lloyds['MMSI']=lloyds.MMSI.astype(int) files=glob.glob('AIS_DATA_2016/*.dat') for name in files: msgs=[] with open...
// This file is part of libnosync library. See LICENSE file for license details. #ifndef NOSYNC__FUNCTION_UTILS_H #define NOSYNC__FUNCTION_UTILS_H #include <cstddef> #include <functional> #include <string> namespace nosync { std::function<std::string(std::size_t)> make_buffering_bytes_supplier(std::function<std::st...
""" Base settings to build other settings files upon. """ import environ ROOT_DIR = environ.Path(__file__) - 3 # (rgram/config/settings/base.py - 3 = rgram/) APPS_DIR = ROOT_DIR.path('rgram') env = environ.Env() READ_DOT_ENV_FILE = env.bool('DJANGO_READ_DOT_ENV_FILE', default=False) if READ_DOT_ENV_FILE: # OS ...
"""Test generation results. Test target: - :py:meth:`lmp.script.gen_txt.main`. """ import lmp.script.gen_txt from lmp.infer import Top1Infer, TopKInfer, TopPInfer from lmp.tknzr import BaseTknzr def test_top_1_output(capsys, ckpt: int, max_seq_len: int, model_exp_name: str, seed: int, tknzr: BaseTknzr) -> None: "...
var cp = require('child_process'); var path = require('path'); var assert = require('assert'); var Q = require('q'); var EventEmitter = require('events').EventEmitter; var util = require('./util'); var HEARTBEAT_INTERVAL = util.HEARTBEAT_INTERVAL; var HEARTBEAT_TIMEOUT = util.HEARTBEAT_TIMEOUT; var MESSAGE = util.MESSA...
from django import forms from .models import Comment class CommentForm(forms.ModelForm): class Meta: model = Comment fields = ()
# coding: utf-8 """ Pure Storage FlashBlade REST 1.12 Python SDK Pure Storage FlashBlade REST 1.12 Python SDK. Compatible with REST API versions 1.0 - 1.12. Developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/...
module.exports = { siteMetadata: { title: `Gatsby Typescript blog Starter`, description: `A simple blog starter using Typescript in front & back side with eslint & prettier.`, author: { name: 'Julien CARON', content: 'I like build some things using Javascript', }, social: { githu...
from typing import List, Dict, Tuple from collections import Counter from math import log SentList = List[str] def get_tf(sentences: List[SentList]) -> Dict[str, float]: """ Returns a dictionary containing the (normalised frequencies) of all tokens in source text. Input(s): 1) sentences - List o...
var p = document.getElementsByTagName('p'); var scroll = document.getElementsByClassName('scroll'); var dragItem = null; for (var i of p) { i.addEventListener('dragstart', dragStart); i.addEventListener('dragend', dragEnd); } function dragStart() { d...
""" Tests the 'makefixtures' custom management.py command. """ import pytest import ujson from django.core import serializers from django.core.management import call_command from django.core.management.base import CommandError from django.db.models import Q from django.utils.six import StringIO from testmodels impor...
/** * Workspace API * Agent API * * OpenAPI spec version: 9.0.000.78.3880 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * * Swagger Codegen version: 2.4.5 * * Do not edit the class manually. * */ (function(root, factory) ...
/* eslint-env mocha */ 'use strict' const assert = require('assert') const Sunbeam = require('../') const Wock = require('./ws-testhelper.js') const snap = [ ['18446744073709551615', 5000000, 10000], ['1', 5010000, -12000], ['2', 5010000, -12000] ] const snapNew = [ ['133713371337', 5000000, 10000], ['5',...
'use strict'; var superagent = require( 'superagent' ); var expect = require( 'chai' ).expect; describe( 'Options', function() { it( 'Can access the provided context in the handler', function( done ) { superagent .get( 'http://localhost:3000/pets' ) .end( function( e, res ) { e...
import React from "react"; export const Link = props => <a href={props.link}><span style={{fontSize: 25}}>{props.children}</span></a>;
/* eslint-disable */ $('.nav-toggle').click(function (e) { $('.nav-menu').slideToggle(500); }); $(window).resize(function(){ if($(window).width() > 720){ $('.nav-menu').removeAttr('style'); } }); $('.sloga__title-text').typed({ strings: [ 'Hello, everyone!', 'We are code cafe',...
import argparse ap = argparse.ArgumentParser() ap.add_argument("-p", "--path_wiki_xml", default='./',type = str, help="path to Wiki xml dump") ap.add_argument("-w", "--filename_wiki", default='ruwiki-latest-pages-articles.xml',type = str, help="Name of Wiki xml dump") ap.add_argument("-a", "--filename_articles"...
import os import sys from setuptools import setup, find_packages from fnmatch import fnmatchcase from distutils.util import convert_path standard_exclude = ('*.pyc', '*~', '.*', '*.bak', '*.swp*') standard_exclude_directories = ('.*', 'CVS', '_darcs', './build', './dist', 'EGG-INFO', '*.egg-info') def find_package_dat...
/* * Copyright (c) 2016 Intel Corporation. * * SPDX-License-Identifier: Apache-2.0 */ #include <logging/log.h> LOG_MODULE_REGISTER(net_ieee802154_fake_driver, LOG_LEVEL_DBG); #include <zephyr.h> #include <net/net_core.h> #include "net_private.h" #include <net/net_pkt.h> /** FAKE ieee802.15.4 driver **/ #includ...
var express = require('express'); var router = express.Router(); const userController = require('../controllers/user-controller'); /* GET users listing. */ router.get('/:id', userController.getUserById); router.get('/postid/:id', userController.setSugg); module.exports = router;
# Raymond Kirk (Tunstill) Copyright (c) 2020 # Email: ray.tunstill@gmail.com # Provides conversion methods between different storage types from __future__ import absolute_import, division, print_function import json import rospy import rosbag import pathlib import pymongo import argparse from tqdm import tqdm from...
# -*- encoding=utf-8 -*- import os import json from urllib import parse from handler.base_http_handler import BaseHTTPRequestHandler RESOURCES_PATH = os.path.join(os.path.abspath(os.path.dirname(__name__)), '../resources') class SimpleHTTPRequestHandler(BaseHTTPRequestHandler): ...
#!/usr/bin/env python3 # Copyright (c) 2014-2017 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the dir...
''' extract_mouth_batch.py This script will extract mouth crop of every single video inside source directory while preserving the overall structure of the source directory content. Usage: python extract_mouth_batch.py [source directory] [pattern] [target directory] [face predictor path] pattern: *.av...
#!/usr/bin/env python3 import unittest import numpy as np import numpy.testing as numpy_testing from distributions import Binomial class TestBinomail(unittest.TestCase): def setUp(self): self.distribution = Binomial(3, 5, 0.85) def test_init_with_errors(self): params = ( (None, ...
import sys import warnings import functools import operator import numpy as np from numpy.core._multiarray_tests import array_indexing from itertools import product from numpy.testing import ( assert_, assert_equal, assert_raises, assert_array_equal, assert_warns, HAS_REFCOUNT, ) class TestIndexing: ...
(window.webpackJsonp=window.webpackJsonp||[]).push([["js/admin"],{0:function(s,j){},RnhZ:function(s,j,a){var e={"./af":"K/tc","./af.js":"K/tc","./ar":"jnO4","./ar-dz":"o1bE","./ar-dz.js":"o1bE","./ar-kw":"Qj4J","./ar-kw.js":"Qj4J","./ar-ly":"HP3h","./ar-ly.js":"HP3h","./ar-ma":"CoRJ","./ar-ma.js":"CoRJ","./ar-sa":"gjCT...
from flask import Blueprint main = Blueprint('main',__name__) from . import views,errors
# ++++++++++ key, value in dictionary +++++ # things = ['a', 'b', 'c', 'd'] print things[1] things[1] = 'z' print things[1] print things stuff = {'name': 'Zed', 'age': 39, 'height': 6*12+2} print stuff['name'] print stuff['age'] print stuff['height'] # you can add things to a dict stuff['city'] = "San Francisco" pr...
/**************************************************************** * * The author of this software is David M. Gay. * * Copyright (c) 1991, 2000, 2001 by Lucent Technologies. * * Permission to use, copy, modify, and distribute this software for any * purpose without fee is hereby granted, provided that this entir...
var arrLang = { "en": { "store": "store", "ABOUT": "About Us", "CONTACT": "Contact Us", }, "jp": { "store": "首頁", "ABOUT": "關於我們", "CONTACT": "聯絡我們", } }; $(document).ready(function() { // The default language is English var lang = "en-gb"; ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # SPDX-License-Identifier: Apache-2.0 """ Support to interface with Alexa Devices. For more details about this platform, please refer to the documentation at https://community.home-assistant.io/t/echo-devices-alexa-as-media-player-testers-needed/58639 """ from datetime im...
from django.core.cache import caches from django.test import TestCase from mock import Mock, patch from rest_framework import views from rest_framework.response import Response from rest_framework_extensions.cache.decorators import cache_response from rest_framework_extensions.settings import extensions_api_settings f...
import matplotlib.pyplot as plt x = [2, 4, 6, 8, 10] y = [6, 7, 8, 2, 4] x2 = [1, 3, 5, 7, 9] y2 = [7, 8, 2, 4, 2] plt.bar(x, y, label='Barras 1', color='purple') plt.bar(x2, y2, label='Barras 2', color='yellow') plt.legend() plt.show()
import React, { useEffect, useRef } from 'react'; import { useRecoilState, useRecoilValue } from 'recoil'; import { fieldValuesState } from './../../recoil/atom/editorStates'; function BasicCheckbox(props) { const { hash, thumbnailed, thumbnailWidth, multiple } = props; const optionsBank = window._inplace.opt...
import ee import geemap # Create a map centered at (lat, lon). Map = geemap.Map(center=[40, -100], zoom=4) # Load a Landsat 8 top-of-atmosphere reflectance image. image = ee.Image('LANDSAT/LC08/C01/T1_TOA/LC08_044034_20140318') Map.addLayer( image, {'bands': ['B4', 'B3', 'B2'], 'min': 0, 'max': 0.25, 'gamma'...
## @ingroup Components-Energy-Converters # Rocket_Combustor.py # # Created: Feb 2018, W. Maier # Modified: # ---------------------------------------------------------------------- # Imports # ---------------------------------------------------------------------- import SUAVE import numpy as np from SUAVE.Core impo...
#!/usr/bin/env python # Copyright 2008 by Konrads Smelkovs <konrads.smelkovs@gmail.com> import sys,os,re,time import Image, ImageOps from StringIO import StringIO DEBUG=False class NoMorePPM(Exception): """Signals that there are no more PPM files """ def read_one_ppm(f): """ Read exactly one PPM...
""" paydirekt payment provider """ import uuid from email.utils import format_datetime from decimal import Decimal from base64 import urlsafe_b64encode, urlsafe_b64decode import os import time import datetime import hmac # for hmac and hashed email import hashlib import simplejson as json import logging import reque...
import Vue from "vue"; import axios from "axios"; const Url = "http://192.168.58.111:3333/api/v1"; axios.defaults.baseURL = Url; axios.interceptors.request.use((config) => { config.headers.Authorization = `Bearer ${window.sessionStorage.getItem( "token" )}`; return config; }); Vue.prototype.$htt...
/** * Clock * * A simple timer to keep track of elapsed time, * which can be retrieved with the `now` method. * The clock is initially in a stopped state, during * which the elapsed time does not increase. When * started, the clock will return the total elapsed * time since the first start / last reset. * * A...
__NUXT_JSONP__("/25/14", (function(a,b,c,d,e,f,g,h,i,j,k,l,m){return {data:[{metaTitle:b,metaDesc:c,verseId:14,surahId:25,currentSurah:{number:"25",name:"الفرقان",name_latin:"Al-Furqan",number_of_ayah:"77",text:{"1":"تَبٰرَكَ الَّذِيْ نَزَّلَ الْفُرْقَانَ عَلٰى عَبْدِهٖ لِيَكُوْنَ لِلْعٰلَمِيْنَ نَذِيْرًا ۙ","2":" ۨالّ...
// file: header/essentials/collections/buffer.h //////////////////////////////////////////////////////////////// // // Fixed Capacity Buffer (POD Types) // // // zpl_buffer(Type) works like zpl_string or zpl_array where the actual type is just a pointer to the first // element. // // Available Procedures for zpl_buffe...
# Copyright 2019 The PlaNet 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...
from collections import defaultdict from promise import Promise from ....attribute.models import ( AssignedProductAttribute, AssignedProductAttributeValue, AssignedVariantAttribute, AssignedVariantAttributeValue, AttributeProduct, AttributeVariant, ) from ....core.permissions import ProductPer...
import time import logging from healthtools.scrapers.base_scraper import Scraper from healthtools.config import SITES, SMALL_BATCH_NHIF log = logging.getLogger(__name__) class NhifOutpatientScraper(Scraper): """ Scraper for the NHIF accredited outpatient facilities """ def __init__(self): sup...
#!/usr/bin/python3 from googleapi import GoogleAPIBase from videodata import VideoData from datetime import * import math class YTData(GoogleAPIBase): channel_id = None def __init__(self): self.set_api("youtube", "v3") self.add_scope("https://www.googleapis.com/auth/youtube.force-ssl") ...
import math import warnings import numpy as np from scipy import optimize def _check_data_dim(data, dim): if data.ndim != 2 or data.shape[1] != dim: raise ValueError('Input data must have shape (N, %d).' % dim) class BaseModel(object): def __init__(self): self.params = None @property ...
import os import sys # Add repo root sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))) # Add functions/scripts import technical import performance