text
stringlengths
3
1.05M
import argparse import os class FsExistsType: def __call__(self, prospective_dir): if not os.path.exists(prospective_dir): raise argparse.ArgumentTypeError("{0} does not exist".format(prospective_dir)) return prospective_dir
#!/usr/bin/python # (c) 2019, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
$(document).ready(function () { $("#pageTitle").html(""); $("#pageTitle").html("Create New Policy"); $("#btnGoback").on("click", function () { window.location.href = "/admin/policies/list"; }); })
from ._architecture import Architecture from . import _generator_base from . import _generator_vs from ._build_options import BuildOptions from ._helpers import _check_type from ._toolchain import Toolchain class Configuration(object): def __init__(self, generator, name, name_build, build_options, toolchain...
import requests import pytest @pytest.fixture(scope="session") def metrics(): pass def test_annual_commit_count_ranked_by_new_repo_in_repo_group(metrics): response = requests.get('http://localhost:5000/api/unstable/repo-groups/20/annual-commit-count-ranked-by-new-repo-in-repo-group/') data = response.json...
module.exports = { networks: { development: { host: "127.0.0.1", port: 7545, network_id: "*" }, ropsten: { host: "localhost", port: 8545, network_id: 3, gas: 4700000 }, main: { host: "localhost", port: 8545, network_id: 1, gas: 4700...
const path = require('path') const ghpages = require('gh-pages') const config = require('config') const chalk = require('chalk') const token = process.env.GH_TOKEN const date = new Date().toISOString() const { github } = config.get('deploy') let remoteURL = '' if (token) { remoteURL = `https://${token}@github.com...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
# -*- coding: utf-8 -*- import os # url for a public google spreadsheet with all reminders texts as csv CSV_URL = 'https://docs.google.com/spreadsheets/d/1rhZRohjtg3-yVXXbcvTcCgep93pCxbstJR-9gZe5XNU/pub?output=csv' # Yo API Token for the account sending reminders (https://dev.justyo.co) YO_API_TOKEN = os.environ.get...
from typing import Any, Dict, Optional, Union, cast import httpx from ...client import Client from ...models.get_invoice_discounts_by_id_response_200 import ( GetInvoiceDiscountsByIdResponse200, ) from ...types import Response def _get_kwargs( document_id: int, *, client: Client, ) -> Dict[str, Any]...
const { detectNetworkName } = require('./detectNetwork'); const { connectContract, connectContracts } = require('./connectContract'); const { knownMainnetWallet, ensureAccountHasEther, ensureAccountHasSNX, ensureAccountHassUSD, } = require('./ensureAccountHasBalance'); const { exchangeSynths } = require('./exchange...
!(function(e, t) { "object" == typeof exports && "undefined" != typeof module ? (module.exports = t()) : "function" == typeof define && define.amd ? define(t) : (e.Sweetalert2 = t()); })(this, function() { "use strict"; function q(e) { return (q = "functio...
from __future__ import print_function import sys import numpy as np import netCDF4 as nc from .base_grid import BaseGrid class Jra55RiverGrid(BaseGrid): def __init__(self, h_grid_def, description='JRA55 river regular grid', calc_areas=True): self.type = 'Arakawa A' self.full_name = 'JRA55_rive...
import datetime # 这个文件用来处理数据库返回的数据<class 'list'> list的元素是dict test_list =[{'mlmethod': 'svc', 'total': 52, 'feamethod': 'sift', 'created': datetime.datetime(2017, 4, 25, 23, 12, 53), 'unitag': '1493133167337', 'id': 1, 'correct': 49, 'classify': 'glass'}, {'mlmethod': 'svc', 'total': 119, 'feamethod': 'sift', 'created'...
/*JSTZ.min.js*/ var jstz=function(){function f(a){a=-a.getTimezoneOffset();return null!==a?a:0}function h(){return f(new Date(2010,0,1,0,0,0,0))}var b={timezone_name:"",uses_dst:"",utc_offset:0,utc_name:"",hemisphere:""};return function(){var a=h(),e=f(new Date(2010,5,1,0,0,0,0)),d=a-e;0>d&&(b.utc_offset=a);0<d&&(b.utc...
#!/usr/bin/python # -*- coding: utf-8 -*- #!/usr/bin/python # -*- coding: utf-8 -*- import Queue import time from concurrent.futures import ThreadPoolExecutor def foo(i): time.sleep(2) print '>>>>time---', time.ctime() return i + 100 def bar(arg): print '----exec done:', arg, tim...
class BotClassifier(object): # Class constructor def __init__(self, trainData, method = 'tf-idf'): #self.tweets, self.bot = trainData['text'], trainData['bot'] self.method = method def train(self): self.tokenize() print('im doing training!') def tokenize(self): ...
from compass import s1_rdr2geo, s1_geo2rdr, s1_resample, s1_geocode_slc from compass.utils.geo_runconfig import GeoRunConfig from compass.utils.runconfig import RunConfig from compass.utils.yaml_argparse import YamlArgparse def run(run_config_path: str, grid_type: str): """ Run CSLC with user-defined options....
const runeURL = "https://rune-registry.web.app/registry/hotg-ai/mobilenet_v2_1/rune.rune"; var runtime; let input; let output; //create capability and output classes class ImageCapability { parameters = {}; generate(dest,id) { dest.set(input, 0); } setPara...
#!/usr/bin/python import sys begin = int(sys.argv[1]) end = int(sys.argv[2]) print "between %i and %i" % (begin, end) threshold = float(sys.argv[3]) print "averaging over %f" % (threshold) def avg_peak(values): sum = 0 count = 0 #print '---' for value in values: if value > threshold: ...
// // SUUIBasedUpdateDriver.h // Sparkle // // Created by Andy Matuschak on 5/5/08. // Copyright 2008 Andy Matuschak. All rights reserved. // #ifndef SUUIBASEDUPDATEDRIVER_H #define SUUIBASEDUPDATEDRIVER_H #import <Cocoa/Cocoa.h> #import "SUBasicUpdateDriver.h" #import "SUUpdateAlert.h" @class SUStatusController...
# Copyright 2010-2011 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, 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...
import React, { useState } from 'react' import { NavLink } from 'react-router-dom' import { Container, Wrapper, Text, InputGroup, Input, Button, Correct, Error, Message, } from '../../styles/Form.element' import { Loader } from '../../components/imports' import { useAuth } from '../../global/exports' ...
import { dateToString } from 'shlack/utils/date'; import { module, test } from 'qunit'; module('Unit | Utility | date', function () { // Replace this with your real tests. test('string inputs', function (assert) { assert.equal( dateToString('04/05/1983'), 'Apr 5, 1983 00:00.00 AM', 'MM/...
#include <string.h> #include "sha384.h" extern void crypto_sha384_sha512_init(sha512_ctx_t *ctx, int is_384); /* * SHA-384 process init */ void crypto_sha384_init( sha512_ctx_t *ctx ) { crypto_sha384_sha512_init(ctx, 1); } /* * SHA-384 process buffer */ void crypto_sha384_update( sha512_ctx_t *ctx, ...
import Document, { Html, Head, Main, NextScript, } from 'next/document'; export default class MyDocument extends Document { render() { const GA_TRACKING_ID = process.env.GTAG; return ( <Html lang="en" style={{ scrollBehavior: '' }}> <Head> <link href="https://fonts.googleapis.com/cs...
#!/usr/bin/env python import rospy from nav_msgs.msg import OccupancyGrid from std_msgs.msg import Int16 from geometry_msgs.msg import Twist from nav_msgs.msg import Odometry from sensor_msgs.msg import LaserScan import math import tf import numpy as np from std_msgs.msg import String ## developping... def distance_...
/** * dojox - A version of dojox.js framework that ported to running on skylarkjs. * @author Hudaokeji, Inc. * @version v0.9.0 * @link https://github.com/skylark-integration/dojox/ * @license MIT */ define(["dojo","dijit","dojox","dijit/_editor/_Plugin","dijit/form/Button","dojo/_base/declare","dojo/string"],func...
'use strict'; const fs = require('fs'); const path = require('path'); module.exports = function (plop) { const javaDestinationInputRoot = '../java-destination'; const pythonSourceInputRoot = '../source-python'; const singerSourceInputRoot = '../source-singer'; const basesDir = '../../bases'; const outputDir...
from flask import Flask, Blueprint, request from flask_restful import Resource, Api from prometheus_flask_exporter import PrometheusMetrics app = Flask(__name__) blueprint = Blueprint('api_v1', __name__, url_prefix='/api/v1') restful_api = Api(blueprint) metrics = PrometheusMetrics(app) class Test(Resource): st...
/** @jsx h */ import { List } from 'immutable' export const input = cnxml` <para id="p1">Some text<list id="l1"> <item>List item</item> </list>More text<figure id="f1"> <media alt="This should not be inline"> <image src="f1.png" /> </media> </figure>Even more text</para> ` ...
""" Django settings for apartment_notifier project. Generated by 'django-admin startproject' using Django 3.1. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ from p...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var React = tslib_1.__importStar(require("react")); var styled_icon_1 = require("@styled-icons/styled-icon"); exports.PhonelinkOff = React.forwardRef(function (props, ref) { var attrs = { "fill": "cu...
# Copyright 2017 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 required by applicable law or ...
// This is a generated source file for Chilkat version 9.5.0.76 #ifndef _C_CkByteData_H #define _C_CkByteData_H #include "chilkatDefs.h" #include "Chilkat_C.h" CK_VISIBLE_PUBLIC HCkByteData CkByteData_Create(void); CK_VISIBLE_PUBLIC void CkByteData_Dispose(HCkByteData handle); CK_VISIBLE_PUBLIC BOOL CkByteData_getSe...
import React, {Component} from 'react'; // import {connect} from 'react-redux'; export default class Output extends React.Component { // renderMediaID(mediaData){ // return( // // <div>{mediaData.media_id}</div> // <div>Output</div> // ); // } // <div className='url-output'> {this.st...
/* * Copyright (C) 2002-2006 Manuel Novoa III <mjn3@uclibc.org> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #define L_wctype_l #define __UCLIBC_DO_XLOCALE #include "_wctype.c"
/* eslint-disable import/no-mutable-exports,max-len */ import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only' import { getWeb3 } from 'helpers/web3' import * as bitcoin from 'bitcoinjs-lib' import * as ghost from 'bitcoinjs-lib' import abi from 'human-standard-token-abi' import Channel from 'ipfs-pubsub...
'use strict'; // MODULES // var main = require( './../lib/index.js' ); var chai = require( 'chai' ); var expect = chai.expect; var path = require( 'path' ); // FIXTURES // var file = path.normalize( __dirname + '/fixtures/test.txt' ); var fileBin = path.normalize( __dirname + '/fixtures/test.bin' ); var fileOther ...
/* global describe expect it */ import { deleteFile } from '../../../src/utils/storage' const fakeFirebase = { _: { authUid: '123', config: { userProfile: 'users', disableRedirectHandling: true, }, }, storage: () => ({ ref: () => ({ delete: () => Promise.resolve({ val: () => { so...
import React, { Component } from 'react'; import * as PropTypes from 'prop-types'; import { compose, pathOr } from 'ramda'; import { createFragmentContainer } from 'react-relay'; import graphql from 'babel-plugin-relay/macro'; import { withStyles } from '@material-ui/core/styles'; import Typography from '@material-ui/c...
from platform import system as system_os import argparse from os import system, environ from googleapiclient.discovery import build class Youtube: def __init__(self, query, count): self.query = query self.api_key = environ.get("YOUTUBE_API") self.response: dict self.count = count ...
import httpClient from '@/api/httpClient'; const createTranslation = (body) => { const endpoint = `/translations`; return httpClient.post(endpoint, body); }; const indexTranslation = () => { const endpoint = `/translations/lawyer`; return httpClient.get(endpoint); }; const showTranslationProcess = (translati...
//Creation a rotation effect of arrow up to down: var simTooltip = document.getElementsByClassName("simple-tooltip"), arrow = document.getElementsByClassName("arrow"), dropList = document.getElementsByClassName("visible-content"), contentList = document.getElementsByClassName("contentOfList"); simTooltip[0].addEventLi...
from jsonrpc import ServiceProxy access = ServiceProxy("http://127.0.0.1:2668") pwd = raw_input("Enter old wallet passphrase: ") pwd2 = raw_input("Enter new wallet passphrase: ") access.walletpassphrasechange(pwd, pwd2)
import React from 'react' import { ExampleComponent } from 'npm-tester' import 'npm-tester/dist/index.css' const App = () => { return <ExampleComponent text="Create React Library Example 😄" /> } export default App
compliments = ["You have very smooth hair.","You deserve a promotion.","Good effort!","What a fine sweater!","I appreciate all of your opinions.","I like your style.","Your T-shirt smells fresh.","I love what you've done with the place.","You are like a spring flower; beautiful and vivacious.","I am utterly disarmed by...
import React, { useState, useEffect } from 'react'; import ReactDOM from 'react-dom'; import { Column } from '@ant-design/charts'; const DemoColumn = () => { const data = [ { type: '分类一', value: 27, }, { type: '分类二', value: 25, }, { type: '分类三', value: 18, ...
/*! * Bootstrap v3.3.7 (http://getbootstrap.com) * Copyright 2011-2017 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ /*! * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=379d67bc9d795cdf2f00ef632b124f87) * Config saved to config.jso...
# -*- coding:UTF-8 -*- # @Time: 2019/8/25 17:01 # @Author: wyd # @File: day09 list3 = [ {'name': 'admin', 'hobby': '抽烟'}, {'name': 'admin', 'hobby': '喝酒'}, {'name': 'admin', 'hobby': '烫头'}, {'name': 'admin', 'hobby': 'Massage'}, {'name': 'root', 'hobby': '喊麦'}, {'name': 'root', 'hobby': '街舞'}, ...
jQuery(function(a){a.datepicker.regional.km={closeText:"ធ្វើរួច",prevText:"មុន",nextText:"បន្ទាប់",currentText:"ថ្ងៃនេះ",monthNames:["មករា","កុម្ភៈ","មីនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"],monthNamesShort:["មករា","កុម្ភៈ","មីនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុល...
/** * Front End Interview Questions: map() vs filter() vs reduce() * * Q: What do map(), filter() and reduce() do? */ const nums = [1, 2, 3, 4, 5]; const numsAddOne = nums.map((value) => value + 1); console.log(numsAddOne) // [2, 3, 4, 5, 6] const evenNums = nums.filter((value) => value % 2 === 0 ); console.log...
# pylint: disable=eval-used # pylint: disable=unused-import import os import numpy as np import plotly.graph_objects as go import pytest from scipy.spatial.transform import Rotation as R import magpylib as magpy from magpylib._src.display.base_traces import make_Prism magpy.defaults.display.backend = "plotly" def ...
import re import codecs def extractTitle(text): tt = text.split('\n') text = "" for t in tt: if len(t) > 1: text += t+"\n" title = re.search(r'PICES SCIENTIFIC REPORT(\s*)No\.(\s*)([0-9]+),?(\s*)[0-9]{4}([a-zA-z0-9:\.,\-\s/\\()]+)( \n)*', text, re.IGNORECASE|re.UNICODE) if title is None: return '' _titl...
import machine import utime import vl53l0x # declare pins SDA_PIN = const(4) SCL_PIN = const(5) # define software I2C bus (needed for ESP8266). # alternatively hardware I2C bus (ESP32 only) can be used by passing 0 or 1 to # constructor, i.e.: i2c = I2C(0, scl=Pin(5), sda=Pin(4), freq=100000) # any input pins can be ...
'use strict'; /** * Module dependencies. */ var taxesPolicy = require('../policies/taxes.server.policy'), taxes = require('../controllers/taxes.server.controller'); module.exports = function (app) { // Taxes collection routes app.route('/api/taxes').all(taxesPolicy.isAllowed) .get(taxes.list) .post(ta...
#ifndef QTIPCSERVER_H #define QTIPCSERVER_H // Define AMITY-Qt message queue name #define BITCOINURI_QUEUE_NAME "AMITYURI" void ipcScanRelay(int argc, char *argv[]); void ipcInit(int argc, char *argv[]); #endif // QTIPCSERVER_H
'use strict'; class Model { /** * * @param {Object} schema mongo schema */ constructor(schema) { this.schema = schema; } /** * * @param {String} _id optional for mongo record id * @return {*} return record by id if _id !empty else will get all records */ read(_id)...
from . whie_button import WhiteButton from app.packages.pyside_or_pyqt import * class PomoButton(WhiteButton): def __init__(self, parent, name, icon, width, height): WhiteButton.__init__(self, parent, name, icon, width, height) self.is_original = True self.icon_original = icon sel...
/* * Arm SCP/MCP Software * Copyright (c) 2017-2018, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause * * Description: * Software defined memory map shared between SCP and AP cores. */ #ifndef SOFTWARE_MMAP_H #define SOFTWARE_MMAP_H #include <fwk_macros.h> #incl...
// Copyright (c) 2000-2005 Quadralay Corporation. All rights reserved. // function WWHPopupFormat_Translate(ParamText) { return ParamText; } function WWHPopupFormat_Format(ParamWidth, ParamTextID, ParamText) { var FormattedText = ""...
/****************************** RMX SDK ******************************\ * Copyright (c) 2007 Vincent E. Milum Jr., All rights reserved. * * * * See license.txt for more information * * ...
function(view, data, actionIndex, rowIndex, event) { if (data == null) { data = $(view.getId("form")).serialize(); } showLoading(); got.ajax({ cache : true, type : "POST", url : "getGridData", dataType : "json", data : data, async : true, error : function(res, ts, e) { hideLoading();...
/* Напиши фукцнию findLongestWord(string), которая принимает параметром произвольную строку (в строке будут только слова и пробелы) и возвращает самое длинное слово в этой строке. */ 'use strict'; const findLongestWord = function (string) { const arrayFromString = string.split(' '); for (let i = 1; i < ar...
from flask_wtf import FlaskForm from wtforms import StringField,TextAreaField,SubmitField,SelectField from wtforms.validators import Required class UpdateProfile(FlaskForm): bio = TextAreaField('Write a brief bio about you.',validators = [Required()]) submit = SubmitField('Save') class PitchForm(FlaskForm): ...
import Path from '@stephenbunch/path'; export default class SchemaPath { constructor( path, type ) { this.name = path; this.pathType = type; this.accessor = new Path( path ); } get( object ) { return this.accessor.get( object ); } set( object, value ) { this.accessor.set( object, value ...
server_ip = "127.0.0.1" server_port = "5000" server_url = "http://" + server_ip + ':' + server_port print("Running tests on:", server_url) data = { "content": "This is a test data" } no_id = 'no_such_id' truth = { "content": "This is a test truth" }
#include<stdio.h> void main() { int x = 10, y = 15, temp; temp = x; x = y; y = temp; printf("x = %d and y = %d", x, y); }
# -*- coding: utf-8 -*- # # Copyright 2016 Google LLC. 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 Announcement from './Announcment'; export default Announcement;
#! /usr/bin/env python from seleniumrequests import Chrome from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.chrome.options import Options import time import argparse MAX_POSTS = 5000 def run_delete(): parser = argparse.ArgumentParser() parser.add_argument("-E", ...
from area53 import route53 from boto.route53.exception import DNSServerError from kubernetes import client, config from datetime import datetime import socket import time import os # Configs can be set in Configuration class directly or using helper utility config.load_kube_config() v1 = client.CoreV1Api() ret = v1.l...
from flask_restful import Resource, reqparse from models.user import UserModel class UserRegister(Resource): parser = reqparse.RequestParser() parser.add_argument('username', type=str, required=True, help="This field cannot be bl...
function Todo() { /* // calling something All.call(this, param); */ this.todos = []; this.displayTodos = function () { // ul to display todo var displayedTodoField = document.getElementById("displayedTodoField"); // call the functionto reove all li items when displaying ...
/**************************************************************************** * boards/arm/tiva/lm3s8962-ek/src/lm_oled.c * * Copyright (C) 2010, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without * modificat...
#! /usr/bin/jython # -*- coding: utf-8 -*- # # jython_common/jython_xml_manipulate.py # # May/31/2012 import xml.dom.minidom import datetime # import java import sys reload(sys) sys.setdefaultencoding('utf-8') from java.lang import * # -------------------------------------------------------------------- import xml...
#!/usr/bin/env python2.7 """ Copyright 2014 Justin Gallardo 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 i...
var express = require("express"); var router = express.Router(); var bagel = require("../models/bagel.js"); router.get("/", function(req, res) { bagel.selectAll(function(data) { var bagelsObject = { bagels: data }; console.log(bagelsObject); res.render("index", bagelsObject); })...
import array import collections import os import hightime import numpy import pytest import nidigital instruments = ['PXI1Slot2', 'PXI1Slot5'] test_files_base_dir = os.path.join(os.path.dirname(__file__), 'test_files') @pytest.fixture(scope='function') def multi_instrument_session(): with nidigital.Session(res...
from userInfoapp.models import UserInfo from django.contrib import admin class UserInfoAdmin(admin.ModelAdmin): list_display = ["id", "user", "user_visit", "user_fdate", "user_ldate"] admin.site.register(UserInfo, UserInfoAdmin)
/* * Copyright (C) 2014 * * 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 the License, or (at your option) any later version. * * This program is distribute...
from . import rollout
#!/usr/bin/env python3 import os import subprocess import sys def y_n(q): while True: ri = input('{} (y/n): '.format(q)) if ri.lower() in ['yes', 'y']: return True elif ri.lower() in ['no', 'n']: return False def update_deps(): print("Attempting to update dependencies...") try: ...
#! /usr/bin/env python from __future__ import absolute_import from __future__ import print_function import logging from barf import BARF from barf.core.reil import ReilMnemonic logger = logging.getLogger(__name__) def check_path_satisfiability(code_analyzer, path, start_address): """Check satisfiability ...
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You...
//PRUEBA// // SDK de Mercado Pago const mercadopago = require ('mercadopago'); // Agrega credenciales mercadopago.configure({ access_token: 'PROD_ACCESS_TOKEN' }); // SDK de Mercado Pago const mercadopago = require ('mercadopago'); // Agrega credenciales mercadopago.configure({ access_token: 'PROD_ACCESS_TOKEN' }...
from __future__ import unicode_literals import frappe def execute(): columns = ("one_fm_applicant_civil_id", "one_fm_passport_applicant_number", "one_fm_previous_company_authorized_signatory", "one_fm_recruiter") for column in columns: if column in frappe.db.get_table_columns("Job Applicant"): ...
class SSHConfig(object): """A SSH configuration""" def __init__(self, hostname, username, port, identityfile): """Create a new object :param hostname: The hostname of the SSH server :param username: The username to use for login :param port: The port where the SSH server is lis...
""" Utils and wrappers for scoring parsers. """ from classla.models.common.utils import ud_scores def score(system_conllu_file, gold_conllu_file, verbose=True): """ Wrapper for UD parser scorer. """ evaluation = ud_scores(gold_conllu_file, system_conllu_file) el = evaluation['LAS'] p = el.precision ...
from collections import OrderedDict import numpy as np import torch import torch.optim as optim from torch import nn as nn import rlkit.torch.pytorch_util as ptu from rlkit.core.eval_util import create_stats_ordered_dict from rlkit.torch.torch_rl_algorithm import TorchTrainer class DQNTrainer(TorchTrainer): def...
 $(document).ready(function () { $("a[data-post]").click(function (e) { e.preventDefault(); var $this = $(this); var message = $this.data("post"); if (message && !confirm(message)) return; $("<form>") .attr("method", "post") .attr("actio...
import { MOSTRAR_ALERTA, OCULTAR_ALERTA } from '../types'; // Muestra una alerta export function mostrarAlerta(alerta) { return (distpach) => { distpach(crearAlerta(alerta)) } } const crearAlerta = alerta => ({ type: MOSTRAR_ALERTA, payload: alerta }) // Ocultar Alerta export function ...
/** * ueditor完整配置项 * 可以在这里配置整个编辑器的特性 */ /**************************提示******************************** * 所有被注释的配置项均为UEditor默认值。 * 修改默认配置请首先确保已经完全明确该参数的真实用途。 * 主要有两种修改方案,一种是取消此处注释,然后修改成对应参数;另一种是在实例化编辑器时传入对应参数。 * 当升级编辑器时,可直接使用旧版配置文件替换新版配置文件,不用担心旧版配置文件中因缺少新功能所需的参数而导致脚本报错。 **************************提示***************...
#! /usr/bin/env python ############################################################################## ## DendroPy Phylogenetic Computing Library. ## ## Copyright 2010-2015 Jeet Sukumaran and Mark T. Holder. ## All rights reserved. ## ## See "LICENSE.rst" for terms and conditions of usage. ## ## If you use this wo...
# Copyright 2017 The Forseti Security 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 ap...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ic_change_circle_twotone = void 0; var ic_change_circle_twotone = { "viewBox": "0 0 24 24", "children": [{ "name": "rect", "attribs": { "fill": "none", "height": "24", "width": "24" }, "children...
import { ShaderLib } from 'three'; import BaseAnimationMaterial from './BaseAnimationMaterial'; /** * Extends THREE.PointsMaterial with custom shader chunks. * * @param {Object} parameters Object containing material properties and custom shader chunks. * @constructor */ function PointsAnimationMaterial(parameters...
# Copyright 2019 The TensorFlow 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 applica...
import React, { Fragment, useEffect, useReducer, useContext } from 'react'; import PropTypes from 'prop-types'; import { useDispatch, useSelector, shallowEqual } from 'react-redux'; import { Button } from '@patternfly/react-core'; import { sortable, wrappable, cellWidth, breakWord } from '@patternfly/react-table'; imp...
/* Copyright 2003, 2004, 2005, 2006 PathScale, Inc. All Rights Reserved. File modified October 3, 2003 by PathScale, Inc. to update Open64 C/C++ front-ends to GNU 3.3.1 release. */ /* Output Dwarf2 format symbol table information from the GNU C compiler. Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998...