text
stringlengths
3
1.05M
const Discord = require('discord.js'); module.exports = { 'name': 'list', 'aliases': [ 'list-connections', 'list-desktops', 'lis' ], 'desc': 'List available VNC Connections.', 'run': function(msg) { const conns = Object.entries(this.vncServersConfig.servers); const embed = new Discord.Mess...
from leaguepedia_parser.leaguepedia_parser import LeaguepediaParser
/* ====================================================================== PROGRAM FW File Viewer - A retro TUI file viewing tool @author : Velorek @version : 0.1 Last modified : 08/09/2021 - Screen resize limits ======================================================================*/ #include <stdio.h> #include <stdli...
/** * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v25.0.0 * @link http://www.ag-grid.com/ * @license MIT */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var array_1 = require("./array"); var AgPromis...
#ifndef CalibTracker_SiStripESProducer_DummyCondDBWriter_h #define CalibTracker_SiStripESProducer_DummyCondDBWriter_h // user include files #include "FWCore/Framework/interface/EDAnalyzer.h" #include "FWCore/Framework/interface/ESWatcher.h" #include "FWCore/Framework/interface/Run.h" #include "FWCore/Framework/interfa...
# coding: utf-8 """ Intersight REST API This is Intersight REST API OpenAPI spec version: 1.0.9-262 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class FirmwareUpgradeStatus(object): """ NOTE: This...
import React from 'react'; import createSvg from './utils/createSvg'; export default createSvg(<path d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" />, 'ErrorOutline', '0 0 24 24');
#!/usr/bin/env python # noinspection PyUnresolvedReferences import vtkmodules.vtkInteractionStyle # noinspection PyUnresolvedReferences import vtkmodules.vtkRenderingOpenGL2 from vtkmodules.vtkCommonColor import vtkNamedColors from vtkmodules.vtkIOXML import vtkXMLPolyDataReader from vtkmodules.vtkRenderingCore import...
""" Sprites are game objects. To use a sprite you use :meth:`BaseScene.add <ppb.BaseScene.add>` to add it to a scene. When contained in an active scene, the engine will call the various :mod:`event <ppb.events>` handlers on the sprite. When defining your own custom sprites, we suggest you start with :class:`~ppb.Spri...
export default { key: 'A', suffix: 'sus2', positions: [ { frets: '2452', fingers: '1341', barres: 2, capo: true }, { frets: '4457', fingers: '1124', barres: 4, capo: true }, { frets: '9977', fingers: '3411', barres: 7, cap...
"use strict"; import I from "immutable"; import assert from "assert"; import React from "react/addons"; let { TestUtils } = React.addons; import FilterInput from "../../../src/js/components/filter/FilterInput"; import MultiSelect from "../../../src/js/components/filter/MultiSelect"; import Preset from "../../../src/j...
#!/usr/bin/env python3 """ Use black to clean this badly-formatted, barely-readable script. """ from this import s as S def rot13(text): """ str: Encrypt text badly. """ rot = {**rotmap(65), **rotmap(97)}.get return "".join(rot(x, x) for x in text) def rotmap(start): """ dict[char,char]: Map cha...
function binarySearch(array, target) { if (!array.length) return false; let mid = Math.floor(array.length / 2); if (array[mid] === target) return true; if (target < array[mid]) { return binarySearch(array.slice(0, mid), target); } else { return binarySearch(array.slice(mid + 1), target); } } functi...
function fizzBuzz(input){ if((input % 5 == 0) && (input % 3 == 0)){ return "FizzBuzz"; }else if(input % 3 == 0){ return "Fizz"; }else if(input % 5 == 0){ return "Buzz"; }else{ return input; } }
const path = require( "path" ); const fs = require( "fs-extra" ); class Script { constructor( world ) { this.world = world; } createWellKnownScript( scriptId ) { const { repo } = this.world.config.app; try { const pristinePath = path.resolve( __dirname, `../feature...
import os from .excavation import Excavation, DuplicateArtifact from .artifact import DuplicateName from .record import Record PYREVENG3 = os.environ.get("AUTOARCHAEOLOGIST_PYREVENG3") if not PYREVENG3 or not os.path.isdir(PYREVENG3): PYREVENG3 = str(os.environ.get("HOME")) + "/PyReveng3/" if not PYREVENG3 or no...
import pytest @pytest.fixture(scope="function", autouse=True) def set_up(): import qcdb qcdb.driver.pe.clean_nu_options() # psi4.set_output_file("pytest_output.dat", True)
/// /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. /// /// Auto-generated by Stone, do not modify. /// #import <Foundation/Foundation.h> #import "DBSerializableProtocol.h" @class DBTEAMLOGSharedFolderTransferOwnershipType; NS_ASSUME_NONNULL_BEGIN #pragma mark - API Object /// /// The `SharedFolderTrans...
Platformer.Player = CLASS({ preset : () => { return SkyEngine.StateSet; }, params : () => { return { accelY : Platformer.Global.gravity, stateNodes : { idle : SkyEngine.Sprite({ y : -92, srcs : [ Platformer.R('image/alienGreen_stand.png') ] }), walk : SkyEngine.Sprit...
/** * Copyright IBM Corp. 2016, 2018 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { Add16, Subtract16 } from '@carbon/icons-react'; import cx from 'classnames'; import PropTypes from 'prop-types'; import React, { use...
import React, { Component } from 'react' import { Link } from 'gatsby' import Menu from '../Menu' import logo from '../../images/posthog-logo-150x29.svg' import { getMenuState } from '../../store/selectors' import { connect } from 'react-redux' class Header extends Component { render() { const { sidebarDocked } ...
import os from glob import glob import sys import shutil import pytest from ..helpers import skip_if_windows, skip_if_not_windows from jedi.evaluate import sys_path from jedi.api.environment import create_environment def test_paths_from_assignment(Script): def paths(src): script = Script(src, path='/foo...
import Vue from 'vue'; import App from './App.vue'; import router from './router'; import store from './store'; Vue.config.productionTip = false; Vue.directive('visible', (el, binding) => { // eslint-disable-next-line no-param-reassign el.style.visibility = binding.value ? 'visible' : 'hidden'; }); new Vue({ r...
import embed from 'particle' import _ from 'underscore' import moment from 'moment' import Article from '../../models/article' import { crop } from '../../components/resizer' import { SAILTHRU_KEY, SAILTHRU_SECRET, SAILTHRU_MASTER_LIST } from '../../config.coffee' const sailThruClient = require('sailthru-client'...
#!/usr/bin/env python3 from sys import argv from random import randint import os N = 10 INT_LIMIT = 1000 MAX_LENGTH = 1000 def main(): test_map = { '0': run_general_test, '1': run_quicksort_test, '2': run_heapsort_test } test_num = argv[1] for i in range(1, N+1): test...
import React from 'react'; import './Board.css'; import Square from './Square'; import PropTypes from 'prop-types'; const generateSquareComponents = (squares, onClickCallback) => { // Complete this for Wave 1 // squares is a 2D Array, but // you need to return a 1D array // of square components // itterate...
import pytest from urlparse import urlparse from rest_framework import exceptions from api.base.settings.defaults import API_BASE from website.util import permissions from osf.models import Registration, NodeLog from framework.auth import Auth from api.registrations.serializers import RegistrationSerializer, Registrat...
# Generated by Django 2.0.6 on 2018-08-06 11:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('daily_dockets', '0008_auto_20180713_0913'), ] operations = [ migrations.AlterField( model_name='docket', name='docke...
# GENERATED BY KOMAND SDK - DO NOT EDIT import komand import json class Component: DESCRIPTION = "Attaches an existing disk resource to an instance" class Input: INSTANCE = "instance" SOURCE = "source" ZONE = "zone" class Output: CLIENTOPERATIONID = "clientOperationId" DESCRIPTION = "d...
module.exports = { globalSetup: './setup.js', globalTeardown: './teardown.js', testEnvironment: './puppeteer_environment.js' }
from setuptools import setup from setuptools import find_packages with open("README.md", "r") as fh: long_description = fh.read() with open("requirements.txt", "r") as fh: requirements = [line.strip() for line in fh] setup( name="file-ops", version='0.0.0', license='MIT', author='M. H. Bani-Ha...
r""" Emperor 3D PCoA viewer (:mod:`emperor.core`) ============================================ This module provides an Object to interact and visualize an Emperor plot from the IPython notebook. .. currentmodule:: emperor.core Classes ------- .. autosummary:: :toctree: generated/ Emperor """ # -------------...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_import_schema_config tests the nagios config formatter copyright: 2015, (c) sproutsocial.com author: Nicholas Flink <nicholas@sproutsocial.com> """ # This script requires the following packages to be installed: # mock==1.0.1 # PyYAML==3.11 import import_...
/* eslint valid-jsdoc: "off" */ 'use strict'; const path = require('path'); const isLocal = process.env.EGG_SERVER_ENV === 'local'; if (isLocal) { require('dotenv').config({ path: path.join(__dirname, '..', '.env.local'), }); } /** * @param {Egg.EggAppInfo} appInfo app info */ module.exports = appInfo => ...
import string import os from os import walk from os.path import expanduser, isdir, dirname, join, sep from kivy.utils import platform def convert_bytes(num): """Convert bytes to MB.... GB... etc.""" for x in ["bytes", "KB", "MB", "GB", "TB"]: if num < 1024.0: return "%3.1f %s" % (num, x...
describe("me.ObservableVector3d", function () { var x = 1, y = 2, z = 3; var a, b, c, d; var _newX, _newY, _newZ, _oldX, _oldY, _oldZ; var callback = function (newX, newY, newZ, oldX, oldY, oldZ) { // this will also validate the argument list _newX = newX; _newY = newY; ...
import os import unittest from config import basedir from app import app, db from app.models import User if __name__ == '__main__': unittest.main()
# customize string representations of objects class myColor(): def __init__(self): self.red = 50 self.green = 75 self.blue = 100 # use getattr to dynamically return a value def __getattr__(self, attr): if attr == "rgbcolor": return (self.red, self.green, self.b...
const post2get = require('../src/post2get.js') const chai = require('chai') const chaiHttp = require('chai-http') chai.use(chaiHttp) const expect = chai.expect const assert = chai.assert const username = "bobbobberson" const password = "bobsfordays" let app, express beforeAll(() => { process.env['USERS'] = `${userna...
import unittest import openmesh from math import pi, fabs class Others(unittest.TestCase): def setUp(self): self.mesh = openmesh.TriMesh() self.vhandle = [] def test_is_estimated_feature_edge(self): # Add some vertices self.vhandle.append(self.mesh.add_vertex(openmesh.Vec...
# coding: utf-8 # Modified Work: Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE...
#********************************************************************** # Copyright 2020 Advanced Micro Devices, 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.o...
// Credit: https://codeburst.io/easy-i18n-in-10-lines-of-javascript-poc-eb9e5444d71e function i18n(template) { for (var info = i18n.db[i18n.locale][template], out = [info.t[0]], i = 1, length = info.t.length; i < length; i++) out[i] = arguments[1 + info.v[i - 1]] + info.t[i]; return out....
let bodypix; let video; let segmentation; let img; const options = { outputStride: 8, // 8, 16, or 32, default is 16 segmentationThreshold: 0.3 // 0 - 1, defaults to 0.5 } function preload(){ bodypix = ml5.bodyPix(options); } function setup() { createCanvas(320, 240); // load up your video vid...
/* * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ /* * Note: Currently, the backtraces must still be checked manually. Therefore, * these test cases should always pass. * Todo: Automate the checking of backtrace addresses. */ #include <stdlib.h> #in...
import sys sys.path.append('..') import numpy as np import math from geneticalgorithm import geneticalgorithm as ga def f(X): dim = len(X) OF = 0 for i in range (0, dim): OF+=(X[i]**2)-10*math.cos(2*math.pi*X[i])+10 return OF def test_rastrigin(): parameters={'max_num_iteration': 1000, ...
import torch from scripts.study_case.ID_13.torch_geometric.utils import is_undirected, to_undirected def test_is_undirected(): row = torch.tensor([0, 1, 0]) col = torch.tensor([1, 0, 0]) assert is_undirected(torch.stack([row, col], dim=0)) row = torch.tensor([0, 1, 1]) col = torch.tensor([1, 0, ...
/** * Manage the search functions for N2, which uses the Awesomplete widget from * https://leaverou.github.io/awesomplete/ * @typedef N2Search */ class N2Search { /** * Initialize N2Search object properties and Awesomeplete. * @param {N2TreeNode} zoomedElement The selected node in the model tree. ...
var _conf = global.conf; var _path = require('path'); var _db = require('../db'); var _helper = require('../helper'); function init() { } function getItems(path, cb) { if (!path) { return cb (null, [{type : 'Section', title : 'Web Videos', id : 'webvids'}]); } else if (path[0] !== 'webvids') return cb(null, ...
const Employee = require("./Employee"); class Manager extends Employee { constructor(name, id, email, officeNumber) { super(name, id, email) this.officeNumber = officeNumber } getOfficeNumber() { return this.officeNumber } getRole() { return 'Manager' } htmlcard(){ return `<div clas...
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); var _mongoose = _interopRequireDefault(require("mongoose")); var Schema = _mongoose["default"].Schema; var cateogorySchema = new Schema({ categoryName: { type: String, required: true } }, { versionKey: f...
# Discord Card Wars Bot import sys import os import discord from discord.ext import commands import requests import csv import datetime import json import aiohttp import urllib.parse import funcs import asyncio from PIL import Image import random from discord_components import DiscordComponents from paginate import pag...
import unittest from app.models import Pitch,User from app import db class PitchModelTest(unittest.TestCase): def setUp(self): self.user_manow = User(username = 'manow',password = '1234') self.new_pitch = Pitch(name='zee',title='Money',description='moneyreview',user =self.user_manow, category='Fina...
# 使用requests库前都要导入requests库 import requests # 发送GET,POST,PUT,DELETE,HEAD 以及 OPTIONS 请求 a = requests.get('https://postman-echo.com/get') b = requests.post('https://postman-echo.com/post') c = requests.put('https://postman-echo.com/put') d = requests.delete('https://postman-echo.com/delete') f = requests.head('https://p...
const fs = require('fs') const del = require('del') const path = require('path') const chalk = require('chalk') const Listr = require('listr') const vfs = require('vinyl-fs') const inquirer = require('inquirer') const { promisify } = require('util') const template = require('gulp-template') const { installDependencies...
/* * 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 ma...
# Generated by Django 3.1.2 on 2020-11-15 11:11 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Testi', fields=[ ('id', models.AutoField(au...
import {Zondy} from '../../service/common/Base'; import {assign} from 'ol/obj.js'; import Feature from 'ol/Feature.js'; import * as ol_extent from 'ol/extent.js'; import BaseObject from 'ol/Object.js'; import Polygon from 'ol/geom/Polygon.js'; import GeometryLayout from 'ol/geom/GeometryLayout.js'; import MultiLineS...
/*! For license information please see chunk.0fc9b800556417becf02.js.LICENSE.txt */ (self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[4764],{28417:(e,t,r)=>{"use strict";r(50808);var i=r(33367),n=r(93592),o=r(87156);const s={getTabbableNodes:function(e){const t=[];return thi...
from werkzeug.security import safe_str_cmp from models.user import UserModel def authenticate(username, password): user = UserModel.find_by_username(username) if user and safe_str_cmp(user.password, password): return user def identity(payload): user_id = payload['identity'] return UserModel...
#ifndef TESTCHAIN_BLOCK_H #define TESTCHAIN_BLOCK_H #include <cstdint> #include <iostream> #include <sstream> #include <fstream> #include "writeCSV.h" using namespace std; class Block { uint32_t _nIndex; uint32_t _nNonce; string _sData; time_t _tTime; string sDataFrom; string sDataTo; st...
import os import telebot from flask import Flask, request TOKEN = '1790892466:AAEo2tiTgaDjpXiA9omYZGKmZHFdLLXaPQY' # это мой токен bot = telebot.TeleBot(TOKEN) server = Flask(__name__) @bot.message_handler(commands=['start']) def send_info(message): text = ( "<b>Welcome to the Ыbot!</b>\n" "Say He...
#/usr/bin/env python # # Copyright 2020-2021 John T. Foster # # 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 typing from functools import cmp_to_key import collections.abc import inspect from .logging import warn from .util import get_class_name, get_type_index, lift_key, reflect, make_comparator T = typing.TypeVar('T') _primitive_types = [ type(None), bool, int, float, str ] def satisfies_type(value, ty): if...
const { getLoad } = require('../lib/getLoad') const { getUptime } = require('../lib/getUptime') const metricsMiddleware = async (req, res, next) => { const uptime = getUptime() const loadData = getLoad() res.set('Content-Type', 'text/plain') let metrics = '' if (loadData) { metrics += `#...
export { default as Icon } from './ui/Icon.svelte' export { default as SentryAuth } from './ui/SentryAuth.svelte' export { sentry, isAuthChanging } from './sentry' export { sessionFromCookies, cookiesFromSession } from './helper'
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Wed Jun 5 15:52:22 2019 @author: dan """ import numpy as np def chisq_from_stim_table(stim_table, columns, mean_sweep_events, num_shuffles=1000, verbo...
#!/usr/bin/env python """ Plots an extracted sky spectrum with an archived one Probably most useful for exploring sky spectra in the blue """ def parse_args(options=None, return_parser=False): import argparse parser = argparse.ArgumentParser(description='Compare the extracted sky spectrum against an ' ...
menu_name = "Flashlight" from zerophone_hw import RGB_LED led = None state = False def init_app(i, o): global led led = RGB_LED() def callback(): global state if not state: led.set_color("white") state = True else: led.set_color("none") state = False
#!/usr/bin/python # # Code by Tony Bussieres <t.bussieres@gmail.com> inspired by # 40-convert_to_tcx.py by Gustav Tiger <gustav@tiger.name> # # This helper uses GcpUploader to send the fit files to Garmin Connect # # To install GcpUploader: # # sudo pip install GcpUploader # # edit the file ~/.guploadrc and add the f...
"""Implements the File extension. https://github.com/stac-extensions/file """ from enum import Enum from typing import Any, Dict, List, Optional, Set import pystac from pystac.extensions.base import ExtensionManagementMixin, PropertiesExtension from pystac.extensions.hooks import ExtensionHooks from pystac.serializa...
import got from 'got' export const getCatFact = async () => { const json = await got('https://the-cat-fact.herokuapp.com/api/randomfact').json() const [factData] = json.data const factText = factData.fact if (!factText) { throw new Error('Fact text not found.') } return factText }
/* * Copyright (c) 2017-2018 Aion foundation. * * This file is part of the aion network project. * * The aion network project is free software: you can redistribute it * and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, either ver...
/* See LICENSE file for copyright and license details. */ /* appearance, colors are specified in the form 0x00bbggrr or with the RGB(r, g, b) macro */ #define normbordercolor 0x00cccccc #define normbgcolor 0x00cccccc #define normfgcolor 0x00000000 #define selbordercolor 0x00ff6600 #define selbgcolor ...
// Copyright 2020 The casbin 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 a...
'use strict' const { app, mock, assert } = require('egg-mock/bootstrap') describe('❤️ test/controller/home.test.js:', () => { describe('GET /', () => { it('should status 200 and get the body', () => { return app.httpRequest().get('/').expect(200).expect('Hello World') }) }) })
""" WSGI config for githubapi project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SET...
define(["require", "exports", "@fluentui/set-version"], function (require, exports, set_version_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); set_version_1.setVersion('@fluentui/utilities', '8.3.9'); }); //# sourceMappingURL=version.js.map
/** * Marlin 3D Printer Firmware * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General...
#!/usr/bin/env python import os import re def get_program_parameters(): import argparse description = 'Generate a FindPackage(VTK COMPONENTS) that lists all modules referenced by a set of files.' epilogue = ''' ''' parser = argparse.ArgumentParser(description=description, epilog=epilogue, ...
import React from 'react' import MapFilter from 'react-mapfilter' import { ipcRenderer, remote } from 'electron' import { FIELD_TYPE_STRING } from 'react-mapfilter/es5/constants' import xor from 'lodash/xor' import differenceBy from 'lodash/differenceBy' import url from 'url' import MenuItem from '@material-ui/core/...
// ############################## // // // Cards // ############################# import ChartCard from "./Cards/ChartCard.jsx"; import ProfileCard from "./Cards/ProfileCard.jsx"; import RegularCard from "./Cards/RegularCard.jsx"; import StatsCard from "./Cards/StatsCard.jsx"; import TasksCard from "./Cards/TasksCard....
// Copyright 2017 Benjamin Glatzel // // 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...
'use strict'; var rfr = require('rfr'); var config = rfr('/config'); var logger = rfr('/stack-util/logger'); var AWS = config.AWS; var cf = rfr('/stack-util/cloudFormation'); var path = require('path'); var fs = require('fs'); var assert = require('assert'); function createFunction(operationId, description) { retu...
/* * The contents of this file are subject to the license and copyright * detailed in the LICENSE and NOTICE files at the root of the source * tree and available online at * * http://www.dspace.org/license/ */ /** * bootstrap.js v3.0.0 by @fat and @mdo * Copyright 2013 Twitter Inc. * http://www.apache.o...
import time from django.core.management import BaseCommand from bot.bot import bot class Command(BaseCommand): def handle(self, *args, **options): print("Started Development Bot Client") try: bot.polling() except Exception as e: print(e) time.sleep(5) ...
/* * Academic License - for use in teaching, academic research, and meeting * course requirements at degree granting institutions only. Not for * government, commercial, or other organizational use. * * sprdmpF105.h * * Code generation for function 'sprdmpF105' * */ #ifndef SPRDMPF105_H #define SPRDMPF105_H ...
from scipy.misc import imread, imresize import numpy as np def detect_ingrs(recipe, vocab): try: ingr_names = [ingr['text'] for ingr in recipe['ingredients'] if ingr['text']] except: ingr_names = [] print "Could not load ingredients! Moving on..." detected = set() for ...
from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from django.utils import timezone from main.models import Todo from django.http import HttpResponseRedirect # Create your views here. def home(request): todo_items = Todo.objects.all().order_by("-added_date") return rende...
"use strict"; const mergeSort = require("../code-challenges/challenge-21/mergeSort.js"); describe(" insertion Function Checking", () => { test("should ", () => { let arr1 = [8, 4, 23, 42, 16, 15]; let arr2 = [20, 18, 12, 8, 5, -2]; mergeSort(arr1); mergeSort(arr2); expect(arr1).toStrictEqual([4,...
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the listtransactions API from test_framework.test_framework import BitcoinTestFramework from ...
var EventEmitter = require('events').EventEmitter; var util = require('util'); var heartbeats = require('heartbeats'); var routeController = require('./lib/controllers/routeController'); var connectionController = require('./lib/controllers/connectionController'); var executionController = require('./lib/controllers/e...
# # This source file is part of the EdgeDB open source project. # # Copyright 2008-present MagicStack Inc. and the EdgeDB 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...
import argparse import git from .utils import github_url_to_owner_repo from autorelease import GitHubUser, ProjectOptions class AutoreleaseParsingHelper(object): def __init__(self, parser=None, disable_defaults=False): if parser is None: parser = argparse.ArgumentParser() self.parser ...
import presence from "../../utils/presences.js"; import tempmute from "../../utils/tempmute.js"; import poll from "../../utils/poll.js"; import banners from '../../utils/banner.js'; import MessageModel2 from '../../database/models/mutedmembers.js'; import MessageModel3 from '../../database/models/poll.js'; import...
from authentication.account.models import EmailAddress from authentication.socialaccount import providers from authentication.socialaccount.providers.base import AuthAction, ProviderAccount from authentication.socialaccount.providers.oauth2.provider import OAuth2Provider class SalesforceAccount(ProviderAccount): ...
#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 Pods_BWTest_ExampleVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_BWTest_ExampleVersionS...
# 1. 导包 from celery import Celery # 2. 导入 项目 环境 import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "meiduo_mall.settings.dev") # 3. 实例 app = Celery('celer_tasks') # 4. 加载消息队列的配置 app.config_from_object('celery_tasks.config') # 5. 自动查找 任务 app.autodiscover_tasks(['celery_tasks.sms','celery_tasks.email'])
#!/usr/bin/env python3 """Common functions needed for warmups.""" from math import sqrt from functools import reduce def prime(n): """ Return True if x is prime, False otherwise. :param n: integer n :return: True or False """ if n == 2: return True if n % 2 == 0: return...
macDetailCallback("0018a6000000/24",[{"d":"2006-06-13","t":"add","a":"118 N. Howard St. #72\nBaltimore MD 21201\n\n","c":"UNITED STATES","o":"Persistent Systems, LLC"},{"d":"2015-08-27","t":"change","a":"118 N. Howard St. #72 Baltimore MD US 21201","c":"US","o":"Persistent Systems, LLC"}]);