text
stringlengths
3
1.05M
from setuptools import setup setup( name="Agilent83623B", version="0.0.0", author="Yuta Kawai", author_email="pygo3xmdy11u@gmail.com", packages=["Agilent83623B",], package_data={"Agilent83623B": [],}, include_package_data=True, install_requires=[], )
"""API for loading content from a markdown site source.""" import os import re from datetime import datetime from pytz import UTC import frontmatter import subprocess from functools import lru_cache as memoize from typing import NamedTuple from typing import Optional, List, Tuple, Iterable, Dict import git from arxiv....
from dist_zero import recorded, types, concrete_types from . import expression def _expr_class_by_name(name): result = recorded.__dict__.get(name, None) if result is None: return expression.__dict__[name] else: return result def _type_class_by_name(name): result = types.__dict__.get(name, None) if...
# Các thao tác trong file này đều có thể được thực hiện dễ dàng bằng thư viện pandas. Tuy nhiên # để các bạn làm quen hơn với Python, hãy cố gắng sử dụng những lệnh căn bản nhất của Python. Từ đó # hi vọng các bạn thấy được các thư viện như Pandas, Numpy giúp chúng ta tiết kiệm thời gian cho # những thao tác quen thuộc...
/* * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * ...
/** * Fragment Audio Server relay. * * This application allow to serve multiple Fragment Audio Server over the wire by splitting and distributing the incoming pixels data * This allow to distribute the sound synthesis computation over different computers or cores * See "simulation.htm" for the algorithms playgroun...
/************************************************* * Copyright (c) 2016 Ansible, Inc. * * All Rights Reserved *************************************************/ export default ['$scope', '$rootScope', '$log', 'Rest', 'Alert', 'ProjectList', 'Prompt', 'ProcessErrors', 'GetBasePath', 'ProjectUpdate', 'Wait',...
from __future__ import division, print_function import numpy as np import matplotlib.pyplot as plt import scipy.integrate as integrate import scipy.optimize as op import pdb def polynomial_pathlength(x,p_d): """Integrand for a path y(x) defined by a polynomial The line element ds is given by: ds...
# Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. DEPS = [ 'recipe_engine/json', 'recipe_engine/path', 'recipe_engine/python', 'recipe_engine/raw_io', 'recipe_engine/step', 'recipe_en...
import sys from script.TrustScore import TrustScore sys.path.append("..") import pandas as pd from matplotlib import pyplot def plotGraph(x, y,label): plot = pyplot.plot(x, y, 'b-') pyplot.xticks(rotation=45, ha='right') pyplot.xlabel("Timestamp") pyplot.ylabel(label) ax = pyplot.gca() ax....
const commonjs = require("rollup-plugin-commonjs"); const json = require("rollup-plugin-json"); const nodeResolve = require("rollup-plugin-node-resolve"); const pkg = require("./package.json"); module.exports = [ // CommonJS (for node) build and ES (for bundlers) build. { input: './lib/index.js', output: ...
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Module that contains tests for tpDcc.dccs.maya """ import pytest from tpDcc.dccs.maya import __version__ def test_version(): assert __version__.get_version()
module.exports = { // https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy // This option interrupts the configuration hierarchy at this file // Remove this if you have an higher level ESLint config file (it usually happens into a monorepos) root: true, parserOptions: { pa...
from datetime import datetime from sqlalchemy import Column, DateTime, Enum, ForeignKey, Integer from sqlalchemy.orm import relationship from sqlalchemy.sql import label from grouper.models.base.constants import OBJ_TYPES_IDX, REQUEST_STATUS_CHOICES from grouper.models.base.model_base import Model from grouper.models...
from django.contrib import admin # Register your models here. from tasfie.models import Tasfie class TasfieAdmin(admin.ModelAdmin): list_display = ( 'id', 'taghaza', 'bank', 'shomare', 'tarikh', 'mablagh', 'noe', ) list_filter = ( 'id', ...
import os import time import cv2 import random import colorsys import numpy as np import tensorflow as tf import pytesseract import core.utils as utils from core.config import cfg import re from PIL import Image from polytrack.general import cal_dist import itertools as it import tensorflow as tf physical_devices = tf...
import numpy as np from .VariableUnitTest import VariableUnitTest from gwlfe.Input.Animals import TotLAEU class TestTotLAEU(VariableUnitTest): def test_TotLAEU(self): z = self.z np.testing.assert_array_almost_equal( TotLAEU.TotLAEU_f(z.NumAnimals, z.AvgAnimalWt), TotLAEU....
import Errors from './Errors.js'; class Form { constructor(data) { this.originalData = data; for(let field in data){ this[field] = data[field] }; this.errors = new Errors(); } reset() { for(let field in this.originalData){ this[field] = '' }; ...
# =============================================================================== # Copyright 2016 Jake Ross # # 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...
/* Copyright (c) 2015, The Linux Foundation. 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 ...
const fs = require('fs'); const { SitemapStream, streamToPromise } = require('sitemap'); const formatXML = require('xml-formatter'); const { getContentFiles } = require('./util'); const siteUrl = 'https://cupandpen.com'; const sitemapPath = 'docs/sitemap.xml'; async function generateSitemap() { const contentFiles...
'use strict'; module.exports.StatusEnum = { CREATED: 'CREATED', PENDING: 'PENDING', READY: 'READY', UNKNOWN: 'UNKNOWN', getStatus: function (status) { if (!this.hasOwnProperty(status)) { return null; } return module.exports.StatusEnum[status]; } };
import logging import requests logger = logging.getLogger('ipfs') IPFS_TIMEOUT = 5 # Timeout in second IPFS_NUM_ATTEMPTS = 3 # A simple client to fetch content from IPFS gateways. class IpfsClient: def __init__(self, gatewayUrls): self._gatewayUrls = gatewayUrls def _get(self, path, json): ...
/* * 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 ...
import numpy as np from snowland.gis_tool import EARTH_RADIUS class GisHelper: @staticmethod def get_point_by_rate(line: np.ndarray, meters): """ 在line组成的折线中,获得距离起点距离为metres的点 """ return GisHelper.get_point_by_rate_index(line, meters)[0] @staticmethod def get_point_by_...
/* * Copyright (c) 2018, Intel Corporation * * 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 rights to use, copy, modify, merge, publis...
/**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may ...
import React from "react" import { Link } from "gatsby" import PropTypes from "prop-types" import MobileSocialLinks from "./MobileSocialLinks" import MobilePageLinks from "./MobilePageLinks" import SocialLinks from "./SocialLinks" import MobileBio from "./MobileBio" import "./header.css" const Header = ({ siteTitle,...
from sklearn.manifold import MDS import numpy as np import os import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import random def show_spaces(X,y,legend=False): fig = plt.figure(num="Knowledge Space",figsize=(8,8)) color={} for space_index,space_label in enumerate(X.keys()): X...
const path = require('path'); const routes = require('./controllers'); const express = require('express'); const session = require('express-session'); const exphbs = require('express-handlebars'); const sequelize = require('./config/connection'); const SequelizeStore = require('connect-session-sequelize')(session.Sto...
from django.contrib import admin from django.urls import include, path urlpatterns = [ path('admin/', admin.site.urls), path('', include('biography.urls')), ]
# Numpy # from calendar import c from sys import modules from numpy import linspace, arange, shape # Numpy common math function from numpy import exp # Numpy constant from numpy import pi class PhysicalChannel(): #channelTypes = ["PulseRO","PulseCtrl","CWRO","CWCtrl"] deviceTypes = ["DAC","ADC","SG","D...
import gym import gym_vgdl import numpy as np import math import time # Q-learning import itertools import sys import os.path import pickle from random import randint from collections import defaultdict from tiles import IHT,tiles,tileswrap,hashcoords,TilingsValueFunction from lib import plotting, py_asp, helper, i...
# coding=utf8 # Copyright (c) 2016 CineUse import os import logging import cgtk_log log = cgtk_log.cgtk_log(level=logging.INFO) class CgtkVersion(object): @classmethod def list_versions(cls): # todo: list all versions of this task pass @property def work_path(self): # todo...
const clarifai = require('clarifai'); const app = new Clarifai.App({ apiKey: process.env.API_CLARIFAI_KEY }); const handleApiCall = (req, res) => { app.models.predict("c0c0ac362b03416da06ab3fa36fb58e3", req.body.input) .then(data => { res.json(data); }) .catch(err => res.status(400).json('...
from flask import Blueprint # 创建蓝图对象 admin = Blueprint("admin", __name__) from . import api
(function() { 'use strict'; angular.module('Admin', [ 'ngAnimate', 'ngTouch', 'ngMessages', 'ui.bootstrap', 'ui.router', 'JtoolsGC', 'Admin.config', 'Admin.Dashboard', 'Admin.User', 'Entity.Id...
// @flow import { issueCommentUrlToId, pullCommentUrlToId, reviewCommentUrlToId, reviewUrlToId, } from "./urlIdParse"; describe("plugins/github/urlIdParse", () => { const issueComment = "https://github.com/example-owner/exa_mple-rep.o0/issues/350#issuecomment-394939349"; const pullComment = "https...
# ex17: More Files from sys import argv from os.path import exists script, from_file, to_file = argv print("Copying from %s to %s" % (from_file,to_file)) # we could do these two on one line too, how? in_file = open(from_file) indata = in_file.read() print("The input file is %d bytes long" % len(indata)) print("Do...
//! moment.js //! version : 2.5.1 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com (function (undefined) { /************************************ Constants ************************************/ var moment, VERSION = "2.5.1", global =...
__author__ = "Chris Lucian" # numpy is a data shaping and loading module import numpy as np # sklearn is a library of machne learning algorithms from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import metrics from sklearn.svm import SVC # Load the data from the CSV data = np.genfromtxt('iris.tx...
""" Copyright (c) 2018 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ import copy import glob import json import os import fnmatch import shutil import yaml from copy import deepcopy from osbs.build.build_reques...
var fs = require('fs'); var jison = require('jison'); var uglify = require('uglify-js'); // minification is slow so only run this on-demand if (!fs.existsSync('lib/dagre.min.js')) { var dagreRawSrc = read('node_modules/dagre/dist/dagre.min.js') fs.writeFileSync('lib/dagre.min.js', uglify.minify(dagreRawSrc).co...
// // ABI25_0_0EXContainerView.h // LottieReactABI25_0_0Native // // Created by Leland Richardson on 12/12/16. // Copyright © 2016 Airbnb. All rights reserved. // // import ABI25_0_0RCTView.h #if __has_include(<ReactABI25_0_0/ABI25_0_0RCTView.h>) #import <ReactABI25_0_0/ABI25_0_0RCTView.h> #elif __has_include("AB...
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See http://js.arcgis.com/3.34/esri/copyright.txt for details. //>>built define("esri/dijit/geoenrichment/SelectableTree","dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/Evented ./when dojo/store/util/QueryResults dojo/store/ut...
/* * @Description: Description * @Author: 艾欢欢<ahh666@qq.com> * @Date: 2021-03-24 20:02:35 * @LastEditTime: 2021-03-24 20:07:00 * @LastEditors: 艾欢欢<ahh666@qq.com> * @FilePath: \mock-server\server\config.js */ const mockDomain = 'http://127.0.0.1:8088' module.exports = mockDomain
/* * Stream Controller */ import BinarySearch from '../utils/binary-search'; import { BufferHelper } from '../utils/buffer-helper'; import Demuxer from '../demux/demuxer'; import Event from '../events'; import { FragmentState } from './fragment-tracker'; import { ElementaryStreamTypes } from '../loader/fragment'; imp...
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-18 05:46 from __future__ import unicode_literals from django.db import migrations, models import uuid class Migration(migrations.Migration): initial = True dependencies = [ ('accounts', '0001_initial'), ] operations = [ ...
from Xdmf import * if __name__ == "__main__": #//getLevelLimit begin exampleLevel = XdmfError.getLevelLimit() #these are considered integers in Python #//getLevelLimit end #//setLevelLimit begin XdmfError.setLevelLimit(XdmfError.FATAL) #//setLevelLimit end ...
"""Auto-generated file, do not edit by hand. ZA metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_ZA = PhoneMetadata(id='ZA', country_code=None, international_prefix=None, general_desc=PhoneNumberDesc(national_number_pattern='[134]\\d{2,4}', possible_number_pattern...
#Reddit Config file reddit = {'accessCode': 'Downtown-Regular2393', 'secretCode': 'Crashfire123@123'}
import os import pickle from typing import Callable, Any, Union from pathlib import Path def load_or_compute(func: Callable[[], Any], name: str, directory: Union[str, Path] = "") -> Any: """Attempt to load result of func from disc, not successful compute it. func is a...
# Copyright 2016 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Layout = undefined; var _react = require('react'); var _react2 = _interopRequireDefault(_react); var _reactCssThemr = require('react-css-themr'); var _classnames = require('classnames'); var _classnames2 = _interopRequireDefaul...
# -*- coding: utf-8 -*- # Copyright 2009 Google 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 requir...
import React from 'react' const polarToX = (angle, distance) => Math.cos(angle - Math.PI / 2) * distance const polarToY = (angle, distance) => Math.sin(angle - Math.PI / 2) * distance const points = (points) => { return points .map((point) => point[0].toFixed(4) + ',' + point[1].toFixed(4)) .join(' ') } c...
# -*- coding: utf-8 -*- """ This script shows how to apply 80-20 holdout train and validate regression model to predict MOS from the features """ import pandas import scipy.io import numpy as np import argparse import time import math import os import numpy as np from sklearn.impute import SimpleImputer from sklearn.mo...
#!/usr/bin/python3 # ****************************************************************************** # Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved. # licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. # You may obtain a c...
""" Copyright 2013, 2014 Ricardo Tubio-Pardavila 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 ...
var request = require('request'), retry = require('retry'), parse = require('url').parse; function shouldRetry(err, res) { return err; } module.exports = function(servers, options) { var hosts = servers.map(parse); var opts = Object.assign({shouldRetry: shouldRetry}, options); function failoverrequest(urlconfig...
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
// (C) Copyright 2015 Martin Dougiamas // // 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 agre...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from empleados import models as empleado from inventario import models as inventario from proveedores import models as proveedor # Create your models here. class Compra(models.Model): proveedor = models.ForeignKey(provee...
class DashboardController { constructor() { this.name = 'home'; } } export default DashboardController;
#!/usr/bin/env python """ Copyright (c) 2014-2018 Alex Forencich 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 rights to use, copy, modify,...
'use strict'; const EventEmitter = require('events') class MQTTSubscriptionMgr extends EventEmitter { constructor (mqtt) { super() this.connections = new Map() this.mqtt = mqtt } conn_client (url) { if (!this.connections.has(url)) { this.setup_client(url) } return this.connection...
""" Copyright (c) 2020 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ import copy import io import os import pathlib from ruamel.yaml import YAML from ruamel.yaml.comments import CommentedMap import pytest imp...
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/builtin/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = _interopRequireDefault(require("react")); var _createSvgIcon = _interopRequireDefault(require("./utils/c...
# coding=utf-8 from django.contrib import admin from petycja_norweskie.themes.models import Theme @admin.register(Theme) class ThemeAdmin(admin.ModelAdmin): list_display = ('name', 'description', 'authorship', 'prefix') readonly_fields = ('prefix',)
#!/usr/bin/env python3 import argparse from pathlib import Path import numpy as np import dns def main(): parser = argparse.ArgumentParser( description="Change the resolution of a state file by padding with zeros or removing modes.", prog="dnsbox change resolution", ) parser.add_argumen...
const samples = new Map() let sampleVar = null // BoundVar samples.set('Default', ` ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789!?. Pixel preview Resize to fit zenith zone Frame Group Feedback Reset Day day Month month Year year Hour hour Minute minute Second second Size Overlay Ork Grid...
/* * (C) 2012-2013 by Pablo Neira Ayuso <pablo@netfilter.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * This software has been sponsored by Sophos Astaro <http://www...
# _*_ coding: utf-8 _*_ """ Created by Allen7D on 2018/5/31. """ from flask import Blueprint from app.api.v1 import user, client, token, \ banner, theme, product, category, \ address, order, pay, config __author__ = 'Allen7D' def create_blueprint_v1(): bp_v1 = Blueprint('v1', __name__) # 将红图 user.api 注册进蓝图 bp...
import React from 'react'; import { Jumbotron } from 'reactstrap'; const Header = (props) => { return ( <div> <Jumbotron> <h1 className="display-4">Movie Recommendation System</h1> <p className="lead">QRI Hackthon Project</p> <hr className="my-2" /> <p>Welcome to our movie r...
// Autogenerated C header file for Multitouch #ifndef _JACDAC_SPEC_MULTITOUCH_H #define _JACDAC_SPEC_MULTITOUCH_H 1 #define JD_SERVICE_CLASS_MULTITOUCH 0x18d55e2b /** * Read-only. Capacitance of channels. The capacitance is continuously calibrated, and a value of `0` indicates * no touch, wheres a value of around ...
var height = screen.height; var min_width_tabela; if (height <= 720) { document.body.style.zoom = 0.65; min_width_tabela = '112px'; } else if (720 < height && height <= 800) { document.body.style.zoom = 0.7; min_width_tabela = '113px'; } else if (800 < height && height < 1024) { min_width_tabela = '...
from dataclasses import dataclass from datetime import datetime from typing import List, Optional from sodasql.scan.dialect import Dialect from sodasql.scan.group_value import GroupValue from sodasql.scan.scan import Scan from sodasql.scan.scan_column import ScanColumn from sodasql.soda_server_client.monitor_measurem...
import pandas as pd from rdflib import URIRef, BNode, Literal, Graph from rdflib.namespace import RDF, RDFS, FOAF, XSD from rdflib import Namespace import numpy as np import math import sys import argparse import json import html import requests from openpyxl import Workbook, load_workbook from openpyxl.styles import F...
import cv2 from screen import Screen from typing import Tuple, Union, List import numpy as np from logger import Logger import time import os from config import Config from utils.misc import load_template class TemplateFinder: def __init__(self, screen: Screen, scale_factor: float = None): """ :pa...
import {observable} from 'mobx' const p = observable({ id: 10208142238866391 }) export default p
'use strict' const { formatError, GraphQLError } = require('graphql') const createError = require('fastify-error') class ErrorWithProps extends Error { constructor (message, extensions, statusCode) { super(message) this.extensions = extensions this.statusCode = statusCode || 500 } } const FEDERATED_E...
from __future__ import annotations from typing import Optional from src.parsing import Types, Node, Context __all__ = ("walk",) def walk(root: Node, context: Context, *, fail_default: Optional[str] = None) -> str: try: output = "" last_conditional = None for node in root.children: ...
### General helper methods that don't fit anywhere else from simpleflake import simpleflake, parse_simpleflake import base64 def flake_id(): """Generate a new random Flake ID""" return simpleflake() def printable_id(fid): """Create a printable string for a Flake ID: 12 URL-safe characters""" return b...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ni-usb device classes @author: mhturner """ import nidaqmx from nidaqmx.types import CtrTime class NIUSB(): def __init__(self): pass class NIUSB6210(NIUSB): """ https://www.ni.com/en-us/support/model.usb-6210.html """ def __init__(self, ...
# # file: profiling.py # author: Mark Erb # from networkit import * import networkit as kit import os as os import sys, traceback import configparser from . import multiprocessing_helper from . import stat from . import plot from IPython.core.display import * import collections import math import fnmatch import ran...
#!/usr/bin/env python3 # --------------------( LICENSE )-------------------- # Copyright (c) 2014-2022 Beartype authors. # See "LICENSE" for further details. ''' Project-wide **unbounded cache** utilities. This private submodule is *not* intended for importation by downstream callers. ''' #...
function canMakeSum(array, targetSum) { array.sort(); var left = 0; var right = array.length - 1; while (left < right) { var currentSum = array[left] + array[right]; if (currentSum < targetSum) { left++; } else if (currentSum > targetSum) { right--; } else { return true; ...
""" PRACTICE Exam 1, problem 3. Authors: David Mutchler, Vibha Alangar, Valerie Galluzzi, Mark Hays, Amanda Stouder, their colleagues and PUT_YOUR_NAME_HERE. """ # TODO: 1. PUT YOUR NAME IN THE ABOVE LINE. import rosegraphics as rg ######################################################################## # ...
#!/usr/bin/env python3 from __future__ import print_function import time import random from boardd_old import can_init, can_recv, can_send_many, can_health if __name__ == "__main__": can_init() while 1: c = random.randint(0, 3) if c == 0: print(can_recv()) elif c == 1: print(can_health()) ...
var fibonacci = function (n) { if (n === 0) { return 0; } if (n === 1) { return 1; } return fibonacci(n - 1) + fibonacci(n - 2); }; if (require.main === module) { // 如果是直接执行 main.js,则进入此处 // 如果 main.js 被其他文件 require,则此处不会执行。 console.log(process); var n = Number(proce...
window.onload = function(){ var songs = document.getElementById('songTable'); if(songs) { songs.addEventListener('click', (e) => { if(e.target.className === 'btn btn-danger delete-song') { if(confirm('Are you sure?')) { const id = e.target.getAttribute('d...
const express = require("express"); const axios = require("axios"); const keys = require("./../config/keys"); router = express.Router(); //auth helper const { ensureAuthenticated } = require("./../helpers/auth"); //mongo models const { Movie } = require("./../models/movie"); const { Rating } = require("./../models/ra...
# Specialization: Google IT Automation with Python # Course 01: Crash Course with Python # Week 2 Module Part 1 - Practice Quiz # Student: Shawn Solomon # Learning Platform: Coursera.org # Scripting examples encountered during the Module Part 1 Practice Quiz: # 01. In this scenario, two friends are eating din...
#pragma once #include <cstddef> #include <cstring> #include <string> #include "lycon/util/macros.h" namespace lycon { class FileNode; class String { public: typedef char value_type; typedef char &reference; typedef const char &const_reference; typedef char *pointer; typedef const char *const_...
class AverageMeter(object): """Computes and stores the average and current value""" def __init__(self): self.count = 0 self.sum = 0 self.avg = 0 self.val = 0 def reset(self): self.count = 0 self.sum = 0 self.avg = 0 self.val = 0 def upda...
from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import object from datetime import datetime import json import logging import six import pytest from urllib.error import URLError import ckan.plugins as p import ckanext.harvest.model as harves...
'use strict' const {argv:[,,...args]} = process, {num1,num2,operation} = require('./parse-args.js')(args), answer = require('./calc.js')(num1,num2,operation) console.log(answer)
/* global _nails, window._nails_admin */ class WidgetEditor { /** * Construct WidgetEditor */ constructor(adminController) { this.adminController = adminController; this.adminController.log('Constructing'); this.instantiated = false; this.$btns = $('.open-editor').add...
#!/usr/bin/python # # Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Generated by Django 3.1.5 on 2021-02-13 18:36 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('directory', '0022_auto_20210213_1957'), ] operations = [ migrations.AlterField( model_name='author', name='genre', ...