text
stringlengths
3
1.05M
# # Native # # from time import sleep # # Installed # # import paho.mqtt.client as mqtt class MQTTClient(mqtt.Client): def connect(self, host, port=1883, keepalive=60, bind_address="", reconnect=True, retry_freq=2): connected = False try: mqtt.Client.connect(self, host=host, port=por...
import logging import math import slidingwindow as sw import cv2 import numpy as np import tensorflow as tf import time from tf_pose import common from tf_pose.common import CocoPart from tf_pose.tensblur.smoother import Smoother try: from tf_pose.pafprocess import pafprocess except Exception as e: print(e)...
require('dotenv').config() let PORT = process.env.PORT let MONGODB_URI = process.env.MONGODB_URI if (process.env.NODE_ENV === 'test') { MONGODB_URI = process.env.TEST_MONGODB_URI } module.exports = { MONGODB_URI, PORT }
Template.oembedImageWidget.helpers({ loadImage() { const user = Meteor.user(); if (user && user.settings && user.settings.preferences && user.settings.preferences.autoImageLoad === false && this.downloadImages == null) { return false; } if (Meteor.Device.isPhone() && user && user.settings && user.settings....
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
""" WSGI config for django_sample 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/3.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO...
__author__ = "Sven Twardziok, Alex Kanitz, Johannes Köster" __copyright__ = "Copyright 2022, Johannes Köster" __email__ = "johannes.koester@uni-due.de" __license__ = "MIT" import os import stat import time from collections import namedtuple from snakemake.logging import logger from snakemake.exceptions import Workflo...
import resolve from 'rollup-plugin-node-resolve'; const output = [{ name: "css", file: "./build/css.js", format: "iife", globals: { "worker_threads": "null", "os": "null" }, }]; export default { input: "./build/library/css.js", treeshake: { unknownGlobalSideEffects: true }, output, plu...
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def hasCycle(self, head: Optional[ListNode]) -> bool: if not head: return False slow = fast = head while fast.next and fast.next...
import torch.nn as nn import math __all__ = ['mobilenetv3_large', 'mobilenetv3_small'] def _make_divisible(v, divisor, min_value=None): """ This function is taken from the original tf repo. It ensures that all layers have a channel number that is divisible by 8 It can be seen here: https://github...
########################################################################## # # Copyright 2007-2019 by Hans Meine # # 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 w...
//Generated on 2017-9-20 12:41:19 by the SCION SCXML compiler function machineNameConstructor(_x,_sessionid,_ioprocessors,In){ var _name = 'machineName'; var Var1, Var2, Var3, Var4; function $deserializeDatamodel($serializedDatamodel){ Var1 = $serializedDatamodel["Var1"]; Var2 = $serializedDatamodel["Var2"]; V...
# Copyright 2008-2010, 2012-2014, 2016 by Peter Cock. All rights reserved. # # This file is part of the Biopython distribution and governed by your # choice of the "Biopython License Agreement" or the "BSD 3-Clause License". # Please see the LICENSE file that should have been included as part of this # package. """Bio...
"""Test suite for Pathway display module.""" from app.display_modules.display_module_base_test import BaseDisplayModuleTest from app.display_modules.pathways import PathwaysDisplayModule from app.display_modules.pathways.models import PathwayResult from app.display_modules.pathways.constants import MODULE_NAME from app...
import pickle import pandas as pd import numpy as np from sklearn.ensemble import RandomForestClassifier from parameters import get_rf_parameters ### Trains a model based on the given features MODEL_PATH = 'models/classifier_configuration.sav' FEATURES_FILE = 'data/truth.csv' raw_data = pd.read_csv(FEATURES_FILE) ...
#!/usr/bin/env python import os import argparse from RDTPConnection import RDTPReceiver output = None def this_func(data): global output with open(output, "wb") as f: f.write(data) def main(): print("Waiting for inbound file transfer connection...") conn = RDTPReceiver() try: con...
# -*- coding: utf-8 -*- from openre.index.synapses import SynapsesIndex from openre.index.transmitter import TransmitterIndex from openre.index.receiver import ReceiverIndex from openre.index.output import OutputIndex
// // UTF8CSV.h // UTF8CSV // // Created by Nicolas on 5/21/16. // Copyright © 2016 Mobile Labs. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for UTF8CSV. FOUNDATION_EXPORT double UTF8CSVVersionNumber; //! Project version string for UTF8CSV. FOUNDATION_EXPORT const unsigned char UTF...
/** * Created by lmislm on 2018/2/22- 20:25. */ export default { computed:{ filteredBlogs:function () { return this.blogs.filter((blog) => { return blog.title.match(this.search); }); } } }
import asyncio import textwrap import unittest import unittest.mock import discord from bot import constants from bot.cogs import information from bot.decorators import InChannelCheckFailure from tests import helpers COG_PATH = "bot.cogs.information.Information" class InformationCogTests(unittest.TestCase): "...
# -*- coding: utf-8 -*- # # AutoSklearn documentation build configuration file, created by # sphinx-quickstart on Thu May 21 13:40:42 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. #...
const caesarCipher = require('./caesar-cipher'); test('encipher works', () => { expect(caesarCipher.encipher('abc', 3)).toBe('def'); }); test('encipher 0 works', () => { expect(caesarCipher.encipher('abc', 0)).toBe('abc'); }); test('encipher zero works', () => { expect(caesarCipher.encipher('ABC', 0)).toBe('AB...
import React, { useState, useEffect } from 'react'; import { Grow } from '@material-ui/core'; import { useDispatch } from 'react-redux'; import { useParams } from "react-router-dom"; // import useStyles from './styles'; import { getVinylPaginate } from '../../../actions/vinyl'; import { getBands } from '../../../actio...
const path = require('path'); const isDev = think.env === 'development'; const kcors = require('kcors'); /** 框架内置了几个中间件 meta 显示一些 meta 信息,如:发送 ThinkJS 的版本号,接口的处理时间等等 resource 处理静态资源,生产环境建议关闭,直接用 webserver 处理即可。 trace 处理报错,开发环境将详细的报错信息显示处理,也可以自定义显示错误页面。 payload 处理表单提交和文件上传,类似于 koa-bodyparser 等 middleware router 路由解析,包含...
from datetime import timedelta from django.utils import timezone from django.db import models, IntegrityError from django.db.models import Q from . import app_settings class EmailAddressManager(models.Manager): def add_email(self, request, user, email, **kwargs): confirm = kwargs.pop("confirm", False) ...
from django.forms import TypedChoiceField class LazyChoiceField(TypedChoiceField): def __init__(self, choices_name, model=None, empty_label='---------', *args, **kwargs): super(LazyChoiceField, self).__init__(*args, **kwargs) self.choices_name = choices_name self.empty_label = empty_label ...
"""Build Environment used for isolation during sdist building """ import contextlib import logging import os import pathlib import sys import textwrap import zipfile from collections import OrderedDict from sysconfig import get_paths from types import TracebackType from typing import TYPE_CHECKING, Iterab...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import AppConfig, apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured try: from django.urls import reverse except ImportError: from django.core.urlresolvers import reverse from django.db.m...
""" Testing module for `job_helpers.py`. """ import json import pytest from pyspark.sql import SparkSession from pyspark.sql.dataframe import DataFrame from pyspark.sql.session import SparkSession as SparkSessionType from typing import List from py_cubic_ingestion import job_helpers # helper functions def collection...
/* * Copyright 2017 gRPC 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
# -*- coding: utf-8 -*- """ Created on Sun Jun 23 17:39:00 2019 @author: Caio """ #Script usado para treinar Algebra Linear # A Algebra Linear é o ramo da matemática que lida com espaços vetoriais # Definindo a Adição entre as componentes def vector_add(v,w): "Soma dos elementos correspondentes" return[v...
import reactize from './common/reactize.js'; import EWCSpindowntrigger from '@sencha/ext-web-components-modern/dist/ext-spindowntrigger.component.js'; export default reactize(EWCSpindowntrigger);
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2015 Krzysztof Śmiałek 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 right...
# -*- coding: utf-8 -*- import os import pickle,cPickle BIN_COUNTS = 5 def pickled(savepath,data,label,fnames,bin_num=BIN_COUNTS,mode="train"): ''' savepath (str): save path data (array): image data, a nx3072 array label (list): image label, a list with length n fnames (str list): image names, a ...
# -*- coding: utf-8 -*- from __future__ import absolute_import from tap.problemaa.solucion import puede_empacar class TestProblemaA(object): def test_puede_empacar(self): assert puede_empacar('remera') == 'S' assert puede_empacar('camisa') == 'N' assert puede_empacar('buey') == 'S' ...
""" Django settings for community_pulse project. Generated by 'django-admin startproject' using Django 3.0.3. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ impo...
# %% # # utils_tumor.py # BonetumorNet # # Created by Nikolas Wilhelm on 2020-08-01. # Copyright © 2020 Nikolas Wilhelm. All rights reserved. # # general import os import json from datetime import datetime, date from itertools import groupby import pandas as pd import numpy as np from tqdm import tqdm import nrrd...
# Copyright 2018 Iguazio # # 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, softwa...
[{"Owner":"jerome","Date":"2015-06-17T18:41:11Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_Do I need to repeat the title here ?  _lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_wink.png_qt_ alt_eq__qt__sm_)_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emot...
/** * 判读输入密码的格式是否正确 */ function regPwdMsg() { document.getElementsByClassName("pwdMsg")[0].innerText = ""; var values = document.getElementById("passport").value; var reg1 = new RegExp(/^[0-9A-Za-z]+$/); var reg = new RegExp(/[A-Za-z].*[0-9]|[0-9].*[A-Za-z]/); if (values==null || values=="") { ...
import Vue from 'vue' import Vuex from 'vuex' import mutations from './mutations' import actions from './actions' import getters from './getters' Vue.use(Vuex) const state = { homeMultidata: [], detailStoreData: {}, detailCommentData: [], shopCartList: [] } export default new Vuex.Store({ state, mutatio...
// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SHELL_PLATFORM_DARWIN_GRAPHICS_DARWIN_CONTEXT_METAL_H_ #define SHELL_PLATFORM_DARWIN_GRAPHICS_DARWIN_CONTEXT_METAL_H_ #import <Foundation/Foundati...
const assert = require('assert') const bval = require('../validators/bval/bval') describe('bval', function() { it('should allow proper bval contents', function() { const val = '4 6 2 5 3 23 5' bval({}, val, function(issues) { assert.deepEqual(issues, []) }) }) it('should not allow more than on...
import datetime import json import mock import pytest from anyway.parsers import rss_sites, twitter, location_extraction from anyway.parsers.news_flash_classifiers import classify_tweets, classify_rss from anyway import secrets from anyway.parsers.news_flash_db_adapter import init_db from anyway.models import NewsFla...
# -*- coding: utf-8 -*- # # Copyright 2009-2017 Wander Lairson Costa # Copyright 2009-2020 PyUSB contributors # # 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...
import asyncHandler from 'express-async-handler' import Order from '../models/orderModel.js' // @desc Create new order // @route POST /api/orders // @access Private const addOrderItems = asyncHandler(async (req, res) => { const { orderItems, shippingAddress, paymentMethod, itemsPrice, feePr...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var React = tslib_1.__importStar(require("react")); var StyledIconBase_1 = require("../../StyledIconBase"); exports.Circle = React.forwardRef(function (props, ref) { var attrs = { "fill": "none", ...
import React from "react" import { Link, graphql } from "gatsby" import Bio from "../components/bio" import Layout from "../components/layout" import SEO from "../components/seo" import { rhythm } from "../utils/typography" class BlogIndex extends React.Component { render() { const { data } = this.props con...
from .core import * from .learner import * from .lm_rnn import * from torch.utils.data.sampler import Sampler import spacy from spacy.symbols import ORTH re_tok = re.compile(f'([{string.punctuation}“”¨«»®´·º½¾¿¡§£₤‘’])') def tokenize(s): return re_tok.sub(r' \1 ', s).split() def texts_labels_from_folders(path, folder...
#ifndef MAP_INFLATION_TOOL_H #define MAP_INFLATION_TOOL_H #include <queue> #include <ros/ros.h> #include <nav2d_navigator/GridMap.h> class CellData { public: CellData(double d, double i, unsigned int sx, unsigned int sy); double distance; unsigned int index; unsigned int sx, sy; }; inline bool operator<(const C...
/* * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list o...
import axios from 'axios'; let studyGroupInfo = { myStudy: [ { title: null, }, ], }; const setStudyGroupInfo = newStudyGroupInfo => { studyGroupInfo = newStudyGroupInfo; }; const getStudyGroupData = () => ({ ...studyGroupInfo }); const fetchStudyGroupData = user => { const { uid: userUid } = u...
#! /usr/bin/env python # Copyright 2021 Intel Corporation # # 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...
import forges class TopViewController(forges.Entity): def __init__(self, speed = 5, sprint_speed = 10, width = 50, height = 100, x = 0, y = 0, color = forges.color.Color(6, 6, 8), fill = True, parent = None, layer = 1): super().__init__(width = width, height = height, x = x, y = y, color = color, fill ...
#!/usr/bin/env python import sqlite3 conn = sqlite3.connect('northwind_small.sqlite3') def most_expensive(): """Finds the most expensive units per price.""" conn = sqlite3.connect('northwind_small.sqlite3') curs = conn.cursor() query = 'SELECT ProductName, UnitPrice FROM Product ' \ 'OR...
// Copyright (c) 2010-2018 The Bitcoin developers. // Original code was distributed under the MIT software license. // Copyright (c) 2014-2018 TEDLab Sciences Ltd // Tedchain code distributed under the GPLv3 license, see COPYING file. "use strict"; var ByteBuffer = require("protobufjs").ByteBuffer; var ProtoBuf = re...
''' Module that maps incoming URL requests to functions which return responses ''' from django.conf.urls import patterns, include, url from django.contrib import admin from tastypie.api import Api from timetracker import views from timetracker.tracker.models import Tbluser from timetracker.tracker.api import (Tbluse...
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved. /*=========================================================================== Generated code exported from UnrealHeaderTool. DO NOT modify this manually! Edit the corresponding .h files instead! ==========================================================...
# Copyright 2021 CodeNotary, Inc. 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 or...
# -*- coding: utf-8 -*- """ Created on Mon Nov 11 15:05:10 2019 The Simple Linear Regression model @author: Dr. Dr. Danny E. P. Vanpoucke @web : https://dannyvanpoucke.be """ import pandas as pd import numpy as np from TModelClass import TModelClass from TModelResults import TModelResults from Bootstrap import TBoo...
# Copyright 2013-2019 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 PerlModuleBuild(PerlPackage): """Module::Build is a system for building, testing, and in...
# Generated by Django 3.2.10 on 2022-01-02 16:54 import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ("auth", "0011_update_proxy_permissio...
''' /django_api/user/vol/models.py ------------------------- Model of Vol ''' from django.db import models from django.utils import timezone from django_api.user.models import User # Ane model class Vol(models.Model): # Name of ane name = models.CharField(max_length=100) # if the user take part in the ga...
(function() { 'use strict'; /** * Permits declarative (and dynamic) definitions of tab links with full routes. * * requires 'ui.router' and 'ui.bootstrap' * (uses ui-tabset and tab directives in ui.bootstrap and route changes in ui.router) * * You can define (for styling) the attributes type="pi...
/* * This header is generated by classdump-dyld 1.5 * on Wednesday, April 14, 2021 at 2:33:41 PM Mountain Standard Time * Operating System: Version 14.4 (Build 18K802) * Image Source: /System/Library/PrivateFrameworks/C2.framewo...
#include "universalConsts.h" #include "floatConsts.h" #define DIM_INT_STR 3dFloat
load("@tink//:tink_deps_init.bzl", "tink_deps_init") load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository") # How to update go dependencies: # 1) Remove all go_repository rules in WORKSPACE.bazel # 2) Update ...
import datetime import json import time from enum import Enum from time import mktime from django.contrib.auth.models import BaseUserManager, AbstractBaseUser from django.db import models from django.db.models import CharField, DateField, FileField, BooleanField, URLField from chat.log_filters import id_generator fro...
import React from "react"; import ReactDOM from "react-dom"; import "./index.css"; import reportWebVitals from "./reportWebVitals"; import { HashRouter, Routes, Route } from "react-router-dom"; import AppMint from "./AppMint"; import AppRescue from "./AppRescue"; ReactDOM.render( <React.StrictMode> <HashR...
#Classes - Intro to Object Oriented Programming. #OOP - paradigm about software creation # opposed to imperative or procedural # We will write "classes" to represent real-world # things, then create "objects" within these classes #Making an object from a class is called "instantiation" #We work with ...
from django.contrib.auth.models import Group, Permission from rest_framework.response import Response from rest_framework.viewsets import ModelViewSet from apps.meiduo_admin.serializers.admin_group import GroupSerialzier from apps.meiduo_admin.serializers.admin_permission import PermissionSerialzier from apps.meiduo_a...
__all__ = ('VoiceState', ) from datetime import datetime from scarletio import include from ..utils import timestamp_to_datetime from ..core import CHANNELS, GUILDS from .utils import create_partial_user_from_id create_partial_role_from_id = include('create_partial_role_from_id') class VoiceState: """ Rep...
from pythologist.measurements import Measurement import pandas as pd import numpy as np import math, sys class Cartesian(Measurement): @staticmethod def _preprocess_dataframe(cdf,subsets,step_pixels,max_distance_pixels,*args,**kwargs): def _hex_coords(frame_shape,step_pixels): halfstep = int...
/*mashmqc2d.c - A sequence to obtain heteronuclear correlation through evolution of J-coupling (MQ) during 1H FSLG. The phase cycle for this program was obtained from the corresponding HMQC sequence in the ENS-Lyon Pulse Programming Library www.ens-lyon.fr/ST...
// Copyright 2018 The AITS DNNC Authors.All Rights Reserved. // // 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 ...
/** * Copyright IBM Corp. 2019, 2020 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. * * Code generated by @carbon/icon-build-helpers. DO NOT EDIT. */ import { _ as _objectWithoutProperties, I as Icon, a as _extends } from '../I...
nome = str(input('Informe o nome :\n')).strip().split(' ') print('Primeiro nome é {}'.format(nome[0])) print('Último nome é {}'.format(nome[-1])) #(nome[len(nome)-1])
# -*- coding: utf-8 -*- """Mercurial Repo object for libvcs. The following is from pypa/pip (MIT license): - [`MercurialRepo.get_url_and_revision_from_pip_url`](libvcs.hg.get_url_and_revision_from_pip_url) - [`MercurialRepo.get_url`](libvcs.hg.MercurialRepo.get_url) - [`MercurialRepo.get_revision`](libvcs.hg.Mercuria...
_base_ = [ '../_base_/default_runtime.py' ] model = dict( type='PAA', pretrained=None, backbone=dict( type='Conformer', embed_dim=384, depth=12, patch_size=32, channel_ratio=4, num_heads=6, mlp_ratio=4, qkv_bias=True, norm_eval=True...
// // Created by cleve on 1/13/2022. // #pragma once #include <span> #include <memory> #include <coroutine> #include <SDL.h> #include "display/screen.h" namespace cchip8::display { /// \brief Owner class for display window class display_window { public: using sdl_window_pointer = std::unique_ptr<SDL_Window, declt...
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor from scrapy.selector import HtmlXPathSelector from ..items import NewsItem from datetime import datetime import pandas as pd import re class SabahSpider(CrawlSpider): name = "sabah" allowed_domains = ["sabah.c...
import Vue from 'vue' import Router from 'vue-router' import IndexLabel from 'pages/Label/IndexLabel' Vue.use(Router) export default new Router({ routes: [ { path: '/', name: 'IndexLabel', component: IndexLabel } ] })
# encoding: utf-8 __author__ = 'Aleksei Maliutin' """ add_time_index.py Created by lex at 2019-08-04. """ import pandas as pd import numpy as np from typing import Optional def addDateTimeIndex(df: pd.DataFrame, sim_time_column: Optional[str] = "Time"): if sim_time_column not in df.columns: raise KeyError...
import { isString, isNumber, isDate, isSymbol, isRegExp, isObject, isFunction, isError, isBuffer } from 'core-util-is' export const STRICT = [] function D (name, Ctor, is, message) { STRICT.push({ name: [name, Ctor], definition: { validate (value) { if (is(value)) { ...
// @flow import React from 'react' import { CanvasContainer } from './container' import { Waveform } from './waveform' import { PlayMarker } from './play-marker' import { ClipAdder } from './clip-adder' import { ClipDisplay } from './clip-display' import { ClipControls } from './clip-controls' import { ClipDelete } fr...
/* * Copyright (C) 2014, Galois, Inc. * This sotware is distributed under a standard, three-clause BSD license. * Please see the file LICENSE, distributed with this software, for specific * terms and conditions. */ #include <unistd.h> #include <stdio.h> #include <errno.h> int access(const char *pathname __attrib...
!function (ns, tui) { 'use strict'; var Size = tui.Size; var Point = tui.Point; var $ = tui.$; // // Patch for position // var center_position = function (boxSize, winSize) { if (!winSize) { winSize = new Size(window.innerWidth, window.innerHeight); i...
from flask_wtf import FlaskForm # , RecaptchaField from wtforms import StringField, PasswordField #, BooleanField from wtforms.validators import Required, Email, EqualTo class LoginForm(FlaskForm): email = StringField('Email Address', [Email(), Required(message='Forgot your email address...
/* * xbee.h * * Created on: Jan 16, 2019 * Author: marlon */ #ifndef XBEE_H_ #define XBEE_H_ #include "xbee/device.h" #define LIGHT_RED_ENDPOINT 0x02 #define LIGHT_GREEN_ENDPOINT 0x03 #define BUTTON_ENDPOINT 0x04 xbee_dev_t my_xbee; typedef enum { on = 1, off = 2, toggle = 3 }lightState_t; typedef P...
/** * @license Angular v2.4.1 * (c) 2010-2016 Google, Inc. https://angular.io/ * License: MIT */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs/Subject'), require('rxjs/Observable')) : typeof define === 'function' && define.amd ? d...
# Modes # 0 = Ionian # 1 = Dorian, # 2 = Phrygian, # 3 = Lydian, # 4 = Mixolydian, # 5 = Aeolian, # 6 = Locrian # # Notes / Keys # 0 = C # 1 = C# / Db # 2 = D # 3 = D# / Eb # 4 = E # 5 = F # 6 = F# / Gb # 7 = G # 8 = G# / Ab # 9 = A # 10 = A# / B...
import React, { Component } from 'react' import { bindActionCreators } from 'redux' import { connect } from 'react-redux' import RaisedButton from 'material-ui/RaisedButton' import { Card, CardHeader, CardText, CardActions } from 'material-ui/Card' import Divider from 'material-ui/Divider' import { pink400, blue400, ...
import logging from mapchete._registered import processes logger = logging.getLogger(__name__) def registered_processes(process_name=None): """ Return registered process modules. Parameters ---------- process_name : str Python path of process. Returns ------- module """...
require('../../modules/es.typed-array.filter');
"""Test entity_registry API.""" import pytest from homeassistant.components.config import device_registry from tests.common import mock_device_registry @pytest.fixture def client(hass, hass_ws_client): """Fixture that can interact with the config manager API.""" hass.loop.run_until_complete(device_registry.a...
import asyncio import json import aioredis from django.conf import settings async def get_db(): try: db = await aioredis.create_redis( f"redis://{settings.REDIS_HOST}:{settings.REDIS_PORT}" ) assert await db.ping() return db except Exception as e: if not s...
var app = require('app'); // Module to control application life. var BrowserWindow = require('browser-window'); // Module to create native browser window. // Report crashes to our server. require('crash-reporter').start(); // Keep a global reference of the window object, if you don't, the window will // be closed ...
// 4.0.5 (2013-08-27) !function(e,t){"use strict";function n(e,t){for(var n,r=[],i=0;i<e.length;++i){if(n=s[e[i]]||o(e[i]),!n)throw"module definition dependecy not found: "+e[i];r.push(n)}t.apply(null,r)}function r(e,r,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";...
#!/usr/bin/env python # # Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # not...
import React from 'react' import Link from 'next/link' // import '../styles/main.scss' export default () => ( <div> <h1>Welcome to "Build my own Pokédex"</h1> <ul> <li><Link href='/add'><a>Add a Pokémon to my Pokédex</a></Link></li> <li><Link href='/view'><a>b</a></Link></li...