text
stringlengths
3
1.05M
#!/usr/bin/env python3 import csv import sys import collections import datetime import itertools import os DIR_USAGECOST='in/usagecost' OUT_MONTHS='out/months.csv' OUT_ABSOLUTE='out/absolute.csv' def rows_folder(dirpath): for filename in os.listdir(dirpath): filepath = os.path.join(dirpath, filename) ...
# -*- coding: utf-8 -*- """ Created on Wed Jul 17 01:11:46 2019 @author: yoelr """ from .decorators import cost from .. import Unit __all__ = ('VentScrubber',) @cost('Flow rate', units='kg/hr', S=22608, CE=522, cost=215e3, n=0.6, BM=2.4) class VentScrubber(Unit): _N_ins = _N_outs = 2 _units = {'Flow r...
""" Get the lines and nodes from the predictor's intersection """ from collections import defaultdict from itertools import combinations import math import sympy TRIANGLE_LINES = {'x_axis', 'hypotenuse', 'y_axis'} def nodes2edge(n1, n2): """ Get the edge of two nodes """ return tuple(sorted([n1, n2]...
#coding: utf-8 #----------------------------------------------------------- # Um programa que calcula a soma entre os números ímpares # que são múltiplos de três entre um intervalo de 1 a 500 #----------------------------------------------------------- # Soma de ímpares múltiplos de três - Exercício #048 #---------...
jQuery(function($j) { var formState = { overrideBackends: false, backends: {} }; // Name of the cookie var cookieName; // Mostly just for debugging, store the cookie string value here // rather than in the sub-function scope var cook...
// Copyright 2020 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. #ifndef CHROME_BROWSER_APPS_APP_SERVICE_LACROS_APPS_H_ #define CHROME_BROWSER_APPS_APP_SERVICE_LACROS_APPS_H_ #include "base/memory/weak_ptr.h" #include ...
/* SPDX-License-Identifier: GPL-2.0 */ /* * Hantro VPU codec driver * * Copyright 2018 Google LLC. * Tomasz Figa <tfiga@chromium.org> * * Based on s5p-mfc driver by Samsung Electronics Co., Ltd. * Copyright (C) 2011 Samsung Electronics Co., Ltd. */ #ifndef HANTRO_H_ #define HANTRO_H_ #include <linux/platform_...
/*! @sentry/browser 5.27.3 (e0be154) | https://github.com/getsentry/sentry-javascript */ var Sentry=function(t){var e,n,r,s;function i(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return p(t,Error)}}function o(t){return"[object E...
#!/usr/bin/env python3 # Copyright 2017 Jian Wang # License: Apache 2.0. import os import argparse import sys import re tab_or_space = re.compile('[ \t]') parser = argparse.ArgumentParser(description="Validates word features file, produced by rnnlm/get_word_features.py.", epilog="...
"""3dframe models module.""" from .model import ModelData, ModelEdge, ModelVertex
/* * testcode/streamtcp.c - debug program perform multiple DNS queries on tcp. * * Copyright (c) 2008, NLnet Labs. All rights reserved. * * This software is open source. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions ...
import csv import os from glob import glob import numpy as np import pandas as pd from gluoncv.auto.data.dataset import ImageClassificationDataset def dataset_from_folder(root, exts=('.jpg', '.jpeg', '.png')): items = {'image': []} assert isinstance(root, str) root = os.path.abspath(os.path.expanduser(ro...
document.getElementById("bold").onclick = function() {document.execCommand("bold")} document.getElementById("underline").onclick = function() {document.execCommand("underline")} document.getElementById("italic").onclick = function() {document.execCommand("italic")} document.getElementById("strike").onclick = function()...
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise...
#!/usr/bin/env python # -*- encoding: utf-8 -*- """Tests for the web auth managers.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import base64 import mock from werkzeug import test as werkzeug_test from werkzeug import wrappers as werkzeug_wrappers ...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
// Stubbed test. describe('node-process-table Component', () => { it('base test', () => { expect(1).toEqual(1); }); });
# Copyright (c) 2019 bluelief. # This source code is licensed under the MIT license. import platform import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) from rapidrush.utils.version import ( git_commit_count, git_commit_date, git_commit_hash, git_de...
# ------------------------------------------------------------------------------ # Joyous template tags # ------------------------------------------------------------------------------ import datetime as dt import calendar from django import template from django.utils import timezone from django.utils.translation impor...
import React, { forwardRef } from 'react'; import PropTypes from 'prop-types'; const HardDrive = forwardRef(({ color = 'currentColor', size = 24, ...rest }, ref) => { return ( <svg ref={ref} xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24" fill...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Apr 12 11:55:13 2018 @author: Tuong Lam & Simon Nilsson """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import sys import os import pickle impo...
#!usr/bin/env python # -*- coding:utf-8 _*- """ 只是继承一下scrapy.Request,然后pass,好区分哪些Request需要处理,相当于改个名 """ import scrapy class FlhhkkRequest(scrapy.Request): """ flhhkkSpider专用Request类 """ pass
module.exports = { C2: 2200, }
#include <stdio.h> #include <string.h> #include "tabl.h" #include "column.h" static void render_column(void* _col, void* out) { struct column* col; col = _col; if (col->newline) fprintf((FILE*)out, "\n "); fprintf((FILE*)out, col->align == TABL_ALIGN_LEFT ? "%-*s " : "%*s ", col->width, ...
import os import json from .errors import Errors import requests from requests.auth import HTTPBasicAuth from PIL import Image class PysonConnect: def __init__(self, client_id=None, client_secret=None): if client_id == None: self.client_id = os.environ['epsonClientID'] else: ...
#!//usr/bin/env python import argparse import os from PIL import Image def tile_map(mapname, overlayname, min_level, max_level): """ Split a map image (with overlay) into tiles Args: mapname (str): the prefix for the map file(s). They should be in the form mapname_zoomlevel.png. e.g. ...
#pragma once #include "core/int.h" namespace Veng { typedef void* windowHandle; static const windowHandle INVALID_WINDOW_HANDLE = nullptr; struct WindowRect { i32 positionX; i32 positionY; i32 width; i32 height; }; struct WindowSize { i32 x; i32 y; }; class App { public: virtual ~App() {} virtual windo...
from prefect.backend.task_run import TaskRunView from prefect.backend.flow_run import FlowRunView from prefect.backend.flow import FlowView from prefect.backend.tenant import TenantView from prefect.backend.kv_store import set_key_value, get_key_value, delete_key, list_keys
/*************************************************************************************************/ /*! * \file svc_batt.h * * \brief Example Battery service implementation. * * $Date: 2017-02-08 14:15:55 -0600 (Wed, 08 Feb 2017) $ * $Revision: 11118 $ * * Copyright (c) 2011-20...
const myArr = [10, 20, 30]; console.log(myArr.indexOf(30)); const myArrLast = [10, 20, 30, 40, 50, 60]; console.log(myArrLast.lastIndexOf(10));
import os import sys os.environ['DJANGO_SETTINGS_MODULE'] = 'body.settings' sys.path.append(os.path.join(os.environ['OPENSHIFT_REPO_DIR'], 'wsgi', 'body')) virtenv = os.environ['APPDIR'] + '/virtenv/' os.environ['PYTHON_EGG_CACHE'] = os.path.join(virtenv, 'lib/python2.7/site-packages') virtualenv = os.path.join(virten...
import React from "react"; import { Link } from "react-router-dom"; import "./DashboardMenu.css"; const DashboardMenu = () => ( <div className="customer-menu"> <ul className="dashboard-menu"> <li> <Link to="/admin/add-category"> <i className="fas fa-plus" /> Add Category ...
# coding: utf-8 from flask import Blueprint, render_template app = Blueprint('subpage', __name__) @app.route('/subpage') def index(): return render_template('index.html', title='sub-page')
// @flow import {Color} from './values'; import type {FormattedSection} from './types/formatted'; import type {GlobalProperties, Feature, FeatureState} from './index'; const geometryTypes = ['Unknown', 'Point', 'LineString', 'Polygon']; class EvaluationContext { globals: GlobalProperties; feature: ?Feature; ...
import WalletServiceOriginal from "../../../../../src/renderer/services/wallet"; export default { generate: jest.fn(() => { return { address: "Address", passphrase: "passphrase" }; }), getAddressFromPublicKey: jest.fn(publicKey => `address of ${publicKey}`), getP...
//Chapter 3 //Temp 02 //绘制三角形 //相比绘制三个点 //1.gl_PointSize去掉 //2.webgl.drawArrays(webgl.TRIANGLES, 0, p_Counts); // 顶点着色器程序 var VSHADER_SOURCE = `attribute vec4 a_Position; // attribute float a_PointSize; void main() { gl_Position = a_Position; }`; // 片元着色器程序 var FSHADER_SOURCE = `void main() { gl_FragColor = vec...
/* * Copyright (c) 2021, Oracle and/or its affiliates. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2.0, * as published by the Free Software Foundation. * * This program is also distributed with certain software (includin...
/// /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. /// /// Auto-generated by Stone, do not modify. /// #import <Foundation/Foundation.h> #import "DBSerializableProtocol.h" @class DBFILESMoveIntoVaultError; NS_ASSUME_NONNULL_BEGIN #pragma mark - API Object /// /// The `MoveIntoVaultError` union. /// ///...
#!/usr/bin/env python3 # license: WTFPLv2 [http://www.wtfpl.net/] from argparse import ArgumentParser from collections import OrderedDict import csv import sys from prettytable import PrettyTable def sniff(fn): with open(fn) as fd: sn = csv.Sniffer() return sn.sniff(fd.read(1024)) def read_rows(fd, args): i...
"""Gopher protocol client interface.""" __all__ = ["send_selector","send_query"] import warnings warnings.warn("the gopherlib module is deprecated", DeprecationWarning, stacklevel=2) # Default selector, host and port DEF_SELECTOR = '1/' DEF_HOST = 'gopher.micro.umn.edu' DEF_PORT = 70...
exports["Compressor"] = Compressor; exports["DefaultsError"] = DefaultsError; exports["Dictionary"] = Dictionary; exports["JS_Parse_Error"] = JS_Parse_Error; exports["MAP"] = MAP; exports["OutputStream"] = OutputStream; exports["SourceMap"] = SourceMap; exports["TreeTransformer"] = TreeTransformer; exports["TreeWalker"...
from .abstract_storage_target import AbstractStorageTarget
# Software License Agreement (BSD License) # # Copyright (c) 2011, Willow Garage, Inc. # 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 ...
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def generateTrees(self, n: int) -> List[TreeNode]:
/** @constructor */ ScalaJS.c.scala_Enumeration$ValueSet = (function() { ScalaJS.c.scala_collection_AbstractSet.call(this); this.nnIds$4 = null; this.$$outer$f = null }); ScalaJS.c.scala_Enumeration$ValueSet.prototype = new ScalaJS.inheritable.scala_collection_AbstractSet(); ScalaJS.c.scala_Enumeration$ValueSet.p...
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
define({"topics" : [{"title":"Viewing Stage Events in Data Preview and Snapshot","shortdesc":"\n <p class=\"shortdesc\"></p>\n ","href":"datacollector\/UserGuide\/Event_Handling\/EventFramework-Title.html#concept_hfy_ryv_cy","attributes": {"data-id":"concept_hfy_ryv_cy",},"menu": {"hasChildren"...
import React from "react" import Layout from "../components/layout" import Image from "../components/image" import SEO from "../components/seo" import MainHeader from "../components/MainHeader" const IndexPage = () => ( <Layout> <SEO title="Home" /> <MainHeader /> </Layout> ) export default IndexPage
var $commentAddForm = $("#commentAddForm"); var $commentApproved = $("#commentApproved"); var $formValidator; var $font_element; $(function () { // 初始化验证器 initValidate(); $commentApproved.selectpicker(); $("#commentAddBtn").click(function () { var name = $(this).attr("name"); var flag = $formV...
import XEUtils from 'xe-utils' import VXETable from '../../v-x-e-table' import { UtilTools, DomTools, isEnableConf } from '../../tools' import { browse } from '../../tools/src/dom' export default { methods: { /** * 往表格中插入临时数据 * * @param {*} records */ _insert (records) { return this...
//===--- ModuleFormat.h - The internals of serialized modules ---*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
# Copyright (C) 2020 GreenWaves Technologies, SAS # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # This progr...
import numpy as np def off_to_pointcloud(path): f = open(path,'r') f.readline() num_vertices = int(f.readline().split()[0]) data_matrix = np.zeros([num_vertices,3]) for i in range(num_vertices): x = np.array([float(t) for t in f.readline().split()]) data_matrix[i,:]=x ...
## 2. Combining Model Predictions With Ensembles ## from sklearn.tree import DecisionTreeClassifier from sklearn.metrics import roc_auc_score columns = ["age", "workclass", "education_num", "marital_status", "occupation", "relationship", "race", "sex", "hours_per_week", "native_country"] clf = DecisionTreeClassifier...
# coding=utf-8 # Copyright (C) 2021+ Alice, Vigo, Spain """Public API of Alice Petisco Framework""" from petisco.base.application.application import Application from petisco.base.application.application_configurer import ApplicationConfigurer from petisco.base.application.controller.controller import Controller from p...
""" Plotting large distributions ============================ """ import seaborn as sns sns.set(style="whitegrid") networks = sns.load_dataset("brain_networks", index_col=0, header=[0, 1, 2]) networks = networks.T.groupby(level="network").mean().T order = networks.std().sort_values().index sns.lvplot(data=networks, ...
var extend=function(r,t){function e(){this.constructor=r}for(var o in t)hasProp.call(t,o)&&(r[o]=t[o]);return e.prototype=t.prototype,r.prototype=new e,r.__super__=t.prototype,r},hasProp={}.hasOwnProperty;define("module/Error/index",["App"],function(r){return r.module("Error",function(t,e,o,n,i,u){var p;return p=r.modu...
"""Cli.""" import logging import sys import threading import click from mayan_feeder import utils LOG = logging.getLogger(__name__) @click.command() @click.option( '-v', '--verbose', count=True, help='Can be used multiply times.' ) @click.version_option() def main(verbose: int) -> None: """Feed do...
#!/usr/bin/env python # -*- coding: utf-8 -*- import Adafruit_GPIO.I2C as I2C import time import threading import logging logging.basicConfig(format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p') # 0x5A is I2C address of MLX90614 TEPERATURE_ADDRESS = 0x5A class temperature_sensor: ...
# # Copyright (c) 2009-2015 Tom Keffer <tkeffer@gmail.com> # # See the file LICENSE.txt for your full rights. # """Publish weather data to RESTful sites such as the Weather Underground. GENERAL ARCHITECTURE Each protocol uses two classes: o A weewx service, that runs in the main th...
''' Contains functions for loading built-in datasets ''' import pandas as pd import os PATH_ED = 'data/ed_ts.csv' def load_emergency_dept(): ''' 344 simulated daily level attendenances at a single emergency department between 22/01/2017 and 31/02/2017 (dates are UK dd/mm/yyyy format) The return...
/* * This header is generated by classdump-dyld 1.0 * on Wednesday, March 22, 2017 at 9:04:34 AM Mountain Standard Time * Operating System: Version 10.1 (Build 14U593) * Image Source: /System/Library/Frameworks/ContactsUI.framework/ContactsUI * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limn...
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import unittest from extensions.front.mxnet.mx_reshape_reverse import MXReshapeReverse from mo.front.common.partial_infer.utils import int64_array from mo.utils.unittest.graph import build_graph class TestMXReshapeReverseTest(unittest...
import React from "react"; import ProgTime from "./ProgTime"; import EmptyHighlights from "./EmptyHighlights"; import progHighlights from "../../services/prog-highlights/prog-highlights"; const Highlights = function () { const [day, setDay] = React.useState(0); const RenderDay = () => { if (!progHighlights[...
const Employee = require('./Employee') //parent class class Intern extends Employee { constructor(name, id, email, school) { super(name, id, email) this.school = school } getSchool() { return this.school } getRole() { return "Intern" } } module.exports = Inter...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from typing import Optional import hypothesis.strategies as st import pytest import torch import torch.nn as nn from hypothesis import given, settings from opacus.layers import DPMultiheadAttention from .common import DPMod...
'use strict'; process.title = 'arrombot'; const Discordie = require('discordie'); const commands = require('./lib/commands'); const log = require('./lib/log'); const util = require('./lib/util'); process.on('unhandledRejection', log.warn); const config = require('./config.json'); const client = new Discordie({ autoR...
/* Copyright 2019 Diligent Graphics 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 * * THE SOFTWARE IS PROVIDED "AS...
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Geranium Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test running geraniumd with the -rpcbind and -rpcallowip options.""" import sys from test_framework....
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #include <inttypes.h> #include <string.h> int main() { int64_t N, S, L; int64_t * command, *initialArea, *searchArea; scanf ( "%lld", &N ); scanf ( "%lld", &S ); command = ( int64_t * ) malloc ( 3 * S * sizeof ( int64_t )...
def check_multiple_machine(): from ctypes import c_char, py_object, PYFUNCTYPE from pytransform import _pytransform, HT_HARDDISK def _get_license_data(): prototype = PYFUNCTYPE(py_object) dlfunc = prototype(('get_registration_code', _pytransform)) rcode = dlfunc().decode() i...
import sys, os, subprocess from bs4 import BeautifulSoup class SysTerrier(): def __init__(self, x): self.x = x self.model_f = os.path.join(self.x["TERRIER"], "models") self.model_map = {} with open(self.model_f, "r") as f: for l in f: ...
$(function(){ $("#productDiv").on("keyup","textarea",function(){var a=$(this);a.val().length>500?a.val(a.val().substring(0,500)):a.siblings(".word_count").children("span").text(500-a.val().length)}), $("#productForm").on("mouseenter",".new_product input",function(){$(".product_upload div").css("background...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ 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...
/* Copyright (c) <2003-2011> <Julio Jerez, Newton Game Dynamics> * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpo...
#include <stdio.h> #include <stdlib.h> #include <arm_neon.h> #include <unistd.h> #include <sys/time.h> #include <locale.h> #define UNROLL 5 #define EXE_TIME_IN_USEC(tvs,tve) ((tve.tv_sec - tvs.tv_sec) * 1e6 + (tve.tv_usec - tvs.tv_usec)) #define PRINT() \ do{ ...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** # Export this package's modules as members: from .catalog_database import * from .catalog_table import * from .classifier import * from...
/* * Copyright (c) 2016-present Invertase Limited & Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this library 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 sqlite3 class SubscribersDatabase: def __init__(self): self.conn = sqlite3.connect('subscribers.db', check_same_thread=False) self.cursor = self.conn.cursor() self.create_table() def create_table(self): self.cursor.execute('''CREATE TABLE IF NOT EXISTS Restaurants ...
# -*- coding: utf-8 -*- """ Testing class for field-optiongroup endpoints of the Castor EDC API Wrapper. Link: https://data.castoredc.com/api#/field-optiongroup @author: R.C.A. van Linschoten https://orcid.org/0000-0003-3052-596X """ import pytest from tests.test_api_endpoints.data_models import field_opt_model from ...
import os import re import sys import textwrap import click import pendulum import yaml from dagster import PipelineDefinition from dagster import __version__ as dagster_version from dagster import check, execute_pipeline from dagster.cli.workspace.cli_target import ( WORKSPACE_TARGET_WARNING, get_external_pip...
""" This file offers the methods to automatically retrieve the graph Ruminococcus sp. SR1/5. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--protein...
#!/usr/bin/env python from __future__ import absolute_import, division, print_function from future import standard_library standard_library.install_aliases() # noqa: E402 from PyTango.server import server_run from tango_simlib.tango_sim_generator import ( configure_device_models, get_tango_device_server, ) ...
const axios = require('axios') const c2f = (celsius) => (celsius * 9) / 5 + 32 const k2c = (kelvin) => kelvin - 273.15 const k2f = (kelvin) => c2f(k2c(kelvin)) const formatNumber = (num) => `${num}`.slice(0, 4) const formatDate = (date, timezone) => { return new Date((date + timezone) * 1000).toLocaleTimeString('en...
from collections import deque a = deque(range(1, int(input()) + 1)) while True: if len(a) == 1: break a.popleft() a.append(a.popleft()) print(a[0])
from txCascil.client.service_factory import ClientServiceFactory from txCascil.server.service_factory import ServerServiceFactory
"""Support for IHC devices.""" import logging import os.path import voluptuous as vol from homeassistant.components.binary_sensor import DEVICE_CLASSES_SCHEMA from homeassistant.components.ihc.const import ( ATTR_IHC_ID, ATTR_VALUE, CONF_AUTOSETUP, CONF_BINARY_SENSOR, CONF_DIMMABLE, CONF_INFO, CONF_INVERTING,...
/* * Driver for generic ESS AudioDrive ESx688 soundcards * Copyright (c) by Jaroslav Kysela <perex@suse.cz> * * * This program 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 version 2 of...
#!/usr/bin/env python from __future__ import absolute_import from .annotator import Annotator, AnnoTier from .annospan import AnnoSpan from .spacy_annotator import SpacyAnnotator from .date_annotator import DateAnnotator from . import utils import re def is_valid_number(num_string): """ Check that number can ...
# @desc **endswith()** returns True if a string ends with a specified substring. def ends_with(s1, s2): result = s2.endswith(s1) return result def main(): print(ends_with('o', 'Hello')) print(ends_with('ll', 'Hello')) print(ends_with('llo', 'Hello')) print(ends_with('5', '525')) print(end...
# Copyright 2021 The TensorFlow Ranking 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 ag...
module.exports = { 'lint': () => 'putout *.js' }
# 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, ...
// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- info: The Date.prototype property "getMilliseconds" has { DontEnum } attributes es5id: 15.9.5.24_A1_T3 description: Checking DontEnum attribute ---*/ if (Date.prototype.propertyIsE...
class Caesar(): ''' Attributes: - input - key - output Methods: - encode - decode ''' def __init__(self, input, key, output): self.input = input self.key = key self.output = output @property def encode(self): output = [] input = s...
import React, { useState,useEffect } from "react"; // @material-ui/core components import { makeStyles } from "@material-ui/core/styles"; // core components import GridItem from "components/Grid/GridItem.js"; import GridContainer from "components/Grid/GridContainer.js"; import Table from "components/Table/Table.js"; im...
# Copyright 2020 Efabless 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 law or agreed to in...
from django.utils.html import escape import jingo import jinja2 from tower import ugettext_lazy as _ from . import forms @jingo.register.function def SimpleSearchForm(request, search_cat): data = request.GET if search_cat and 'cat' not in request.GET: data = dict(request.GET, cat=search_cat) ret...
(function(){ 'use strict'; angular .module('bazingaApp') .controller('StateHomeController', StateHomeController); function StateHomeController() { var vm = this; vm.title = 'home'; } })();
'use strict' Object.defineProperty(exports, '__esModule', { value: true }) const contract = require('@truffle/contract') const ENSResolver = contract({ "contractName": "ENSResolver", "abi": [ { "inputs": [ { "internalType": "bytes32", "name": "node", "type": "bytes32" } ], "name": "a...