text
stringlengths
3
1.05M
import React from 'react' import { Header } from "./components/Header"; import { Balance } from './components/Balance'; import { IncomeExpenses } from "./components/IncomeExpenses"; import { TransactionList } from "./components/TransactionList"; import { AddTransaction } from "./components/AddTransaction"; import { Glo...
import 'bootstrap/js/src/alert' import 'bootstrap/js/src/button' import 'bootstrap/js/src/carousel' import 'bootstrap/js/src/collapse' import 'bootstrap/js/src/dropdown' import 'bootstrap/js/src/modal' import 'bootstrap/js/src/popover' import 'bootstrap/js/src/scrollspy' import 'bootstrap/js/src/tab' import 'bootst...
""" Support code for the C{landscape-message} utility, which sends a text message to the Landscape web UI via the landscape-client's dbus messaging service (see L{landscape.plugins.dbus_message}). """ import sys from landscape.lib.log import log_failure from landscape.reactor import LandscapeReactor from landscape.br...
import random import networkx as nx from .abstract_cascade import abstract_cascade class NodeWithHighestActiveNabours(abstract_cascade): def next(self): if self.step < self.iterations and len(self.n) > 0: if self.decision(0.85): node = random.sample(self.a, 1)[0] ...
export const PROPS = [ propString('Caption', 'Health'), propEnum('Style', 'SOLID', [ {value: 'SOLID', label: 'Solid color bar'}, {value: 'STRIPES', label: 'Color bar divided into stripes'}, {value: 'CIRCLE', label: 'Circle filled from bottom'}, ]), propString('Variable', "health"...
const { Comment } = require('../models'); const commentData = [ { "comment_text": "Second Approve Handlebars Rocks", "post_id": "3", "user_id": "3" }, { "comment_text": "Second Approve Test Rocks", "post_id": "2", "user_id": "2" }, { "comment_te...
from .gallery import Gallery from .gallery_action import GalleryAction
from typing import Dict, List, Optional, Tuple import os from dataclasses import dataclass from jinja2 import Environment, FileSystemLoader, select_autoescape import markdown from .word_link import WordLinkExtension from .model import Language class DictusGenerator: def __init__( self, langs: Lis...
import Icon from '../components/Icon.vue' Icon.register({"calendar-o":{"width":1664,"height":1792,"paths":[{"d":"M128 1664h1408v-1024h-1408v1024zM512 448v-288q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v288q0 14 9 23t23 9h64q14 0 23-9t9-23zM1280 448v-288q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v288q0 14 9 23t23 9h64q14 0 23-9t9-...
"""Test cases for building an C extension and running it.""" import ast import glob import os.path import platform import re import subprocess import contextlib import shutil import sys from typing import Any, Iterator, List, cast from mypy import build from mypy.test.data import DataDrivenTestCase fro...
# Copyright 2021 Huawei Technologies Co., Ltd # # 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...
/** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc */ import * as tslib_1 from "tslib"; import { NgbCalendarHijri } from './ngb-calendar-hijri'; import { NgbDate } from '../ngb-date'; import { Injectable } from '@angular/core'; /** * Checks if islamic year is a lea...
# This Python script was used to collect the data for following paper/conference: # # Heaton, J. (2016, April). Comparing Dataset Characteristics that Favor the Apriori, # Eclat or FP-Growth Frequent Itemset Mining Algorithms. In SoutheastCon 2015 (pp. 1-6). IEEE. # # http://www.jeffheaton.com # # Generate benchmark ...
# Create your views here. from django.http import HttpResponseRedirect from django.shortcuts import render, get_object_or_404 from django.urls import reverse from django.views import generic from .models import Question, Choice class IndexView(generic.ListView): template_name = 'polls/index.html' context_obj...
# generated by datamodel-codegen: # filename: schema/api/catalogVersion.json # timestamp: 2021-10-31T08:53:25+00:00 from __future__ import annotations from typing import Optional from pydantic import BaseModel, Field from ..type import basic class CatalogApplicationSoftwareVersion(BaseModel): version: Op...
import VueOwlCarousel from './Carousel.vue'; module.exports = { install: function(Vue, options) { Vue.component('vue-owl-carousel', VueOwlCarousel); }, };
from django.contrib import admin from job_board.forms import SiteConfigForm from job_board.models.category import Category from job_board.models.company import Company from job_board.models.country import Country from job_board.models.job import Job from job_board.models.site_config import SiteConfig class SiteConfi...
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * class PerlDevelOverloadinfo(PerlPackage): """Returns information about overloaded operat...
// -*- C++ -*- // Module: LOG4CPLUS // File: log4judpappender.h // Created: 7/2012 // Author: Siva Chandran P // // // Copyright 2012-2015 Siva Chandran P // // 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 co...
import math import numpy as np import pandas as pd import pytest import cudf from cudf.core._compat import PANDAS_GE_110 from cudf.tests.utils import assert_eq @pytest.mark.parametrize( "data,index", [ ([], []), ([1, 1, 1, 1], None), ([1, 2, 3, 4], pd.date_range("2001-01-01", "2001-0...
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Rain Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the wallet keypool and interaction with wallet encryption/locking.""" import time from test_framewo...
import unittest from necroassembler.cpu.mos6502 import AssemblerMOS6502, InvalidMode, UnsupportedModeForOpcode from necroassembler.exceptions import InvalidOpCodeArguments, NotInBitRange class TestMOS6502(unittest.TestCase): def setUp(self): self.asm = AssemblerMOS6502() def test_lda_immediate(self)...
/**************************************************************************//** * @file main.c * @version V2.00 * $Revision: 1 $ * $Date: 15/02/25 3:30p $ * @brief Show how to use timer0 to create various delay time. * @note * Copyright (C) 2013 Nuvoton Technology Corp. All rights reserved. ****...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
import test from 'ava'; import args from '../lib/args'; test('Bad Slug', t => { process.env.GH_TOKEN = '12345'; process.env.REPO_SLUG = 'snugug'; return args().then(() => { t.fail('Should Not Pass'); }).catch(e => { t.is(e.message, 'REPO_SLUG needs to contain user and repo name (e.g. \'snugug/reparo\'...
import { useState, useReducer } from 'react'; import axios from 'axios'; import { LOGIN_URL, LOGOUT_URL } from '../../Urls/AuthenticationUrl'; import authenticationReducer from '../../reducers/authentication/authenticationReducer'; import { LOGIN_USER } from '../../constants/AuthenticationTypes'; import { LOADING_STOPS...
var _ = require('underscore'); var Model = require('../../core/model'); var BOUNDING_BOX_FILTER_WAIT = 300; module.exports = Model.extend({ initialize: function (mapAdapter) { this._bounds = {}; if (mapAdapter) { this._mapAdapter = mapAdapter; this.setBounds(this._mapAdapter.getBounds()); ...
from rest_framework import generics, permissions, pagination from django.db.models import Q from rest_framework.response import Response from datetime import date from .models import Usuario from .permissions import IsOwnerOrReadOnly from .serializers import PostSerializer class PostPageNumberPagination(pagination....
from math import sin,radians, cos, tan A = float(input('Digite o ângulo que você deseja:')) print(f'O ângulo de {A} tem o SENO de {sin(radians(A)):.2f}') print(f'O ângulo de {A} tem o COSSENO de {cos(radians(A)):.2f}') print(f'O ângulo de {A} tem a TANGENTE de {tan(radians(A)):.2f}')
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ DETR model and criterion classes. """ import torch import torch.nn.functional as F from torch import nn import utils.box_ops as box_ops from utils.detr_misc import (NestedTensor, nested_tensor_from_tensor_list, accuracy,...
'use strict'; polarity.export = PolarityComponent.extend({ details: Ember.computed.alias('block.data.details'), timezone: Ember.computed('Intl', function() { return Intl.DateTimeFormat().resolvedOptions().timeZone; }) });
// The MIT License (MIT) // // Copyright (c) 2015 FPT Software // // 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, co...
import React from 'react' import { graphql } from 'react-apollo' import { gql } from 'apollo-boost' function PostUpvoter ({ upvote, votes, id }) { return ( <button onClick={() => upvote(id, votes + 1)}> {votes} <style jsx>{` button { background-color: transparent; border: ...
/* * Id: fbrop.h,v 1.1 1999/11/02 03:54:45 keithp Exp $ * * Copyright © 1998 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both t...
'''Train Adversarially Robust Models with Feature Scattering''' from __future__ import print_function import math import sys sys.path.append("/home1/machen/meta_perturbations_black_box_attack") from torch import nn import argparse import os import time import numpy as np import torch.backends.cudnn as cudnn import to...
import React from 'react'; import ReactDOM from 'react-dom'; import C from '../js/business.logic/constants'; import QualityPrintPage from '../js/components/pages/quality/QualityPrintPage'; import renderer from 'react-test-renderer'; let result; const qualityProps = { currentPage: "QualityPrintPage", dimension...
import numpy as np import pytest from deepctr.models import xDeepFM from ..utils import check_model @pytest.mark.parametrize( 'hidden_size,cin_layer_size,cin_split_half,cin_activation,sparse_feature_num,dense_feature_dim', [((), (), True, 'linear', 1, 2), ((16,), (), True, 'linear', 1, 1), ((), (16,), True, '...
# Copyright 2015 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. """Utility classes to define and coordinate CrOS Chromite builder display. """ import re from collections import OrderedDict, namedtuple from common.cros_...
#!/usr/bin/env python import os import imp from multiprocessing import Process, Queue import bottle import prometheus_client as prom mod = imp.load_source('function', '/kubeless/%s.py' % os.getenv('MOD_NAME')) func = getattr(mod, os.getenv('FUNC_HANDLER')) func_port = os.getenv('FUNC_PORT', 808...
import api from '../api'; export default { fetchCategory: (state) => { return api.category.fetchCategoryList().then(categoryList => { state.commit('setCategories', categoryList); }); }, fetchTags: state => { return api.tag.fetchTagsList().then(tags => { state.commit('setTags', tags); ...
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs"; import _class_static_private_field_spec_get from "@swc/helpers/src/_class_static_private_field_spec_get.mjs"; import _class_static_private_field_spec_set from "@swc/helpers/src/_class_static_private_field_spec_set.mjs"; var A = function() { "us...
import os from tqdm import tqdm import cv2 from PIL import Image, ImageDraw, ImageFont import glob import sys import numpy as np import random from sklearn.metrics import average_precision_score, roc_auc_score, r2_score num_emotion = {1:'Peace', 2:'Affection', 3:'Esteem', 4:'Anticipation', 5:'Engagement', 6:'Confidenc...
# Functions from the following NumPy document # http://docs.scipy.org/doc/numpy/reference/routines.linalg.html # "NOQA" to suppress flake8 warning from cupy.linalg import decomposition # NOQA from cupy.linalg import eigenvalue # NOQA from cupy.linalg import norms # NOQA from cupy.linalg.norms import norm # NOQA fr...
(function() { var long2know; try { long2know = angular.module("long2know") } catch (err) { long2know = null; } if (!long2know) { angular.module('long2know.services', ['ngResource', 'ngAnimate']); angular.module('long2know.controllers', []); angular.module('long2know.directives', []); ...
import _extends from 'babel-runtime/helpers/extends'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _createClass from 'babel-runtime/helpers/createClass'; import _inherits from 'babel-runtime/helpers/i...
// This file was procedurally generated from the following sources: // - src/dstr-assignment/obj-prop-elem-init-yield-ident-valid.case // - src/dstr-assignment/default/for-of.template /*--- description: When a `yield` token appears within the Initializer of an AssignmentElement and outside of a generator function body,...
#!/usr/bin/python3 import re def top_3_words(t): t = t.lower() #m = re.compile(r"\'?[a-z]{1,}\'?[a-z]{0,}|[a-z]{1,}\'?\'?[a-z]{1,}\'?|[a-z]\'[a-z]{1,}\'[a-z]{1,}") m = re.compile(r"\'?[a-z]{1,}\'?[a-z]{0,}|[a-z]{1,}\'\'[a-z]{1,}\'?") wl = m.findall(t) wd = dict() for w in wl: if w ...
/* Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'list', 'pl', { bulletedlist: 'Lista wypunktowana', numberedlist: 'Lista numerowana' } );
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var ORM = require("sequelize"); var model_options_1 = require("./model-options"); function initPerson(sequelize) { return sequelize.define('Person', { alias: { type: ORM.STRING, allowNull: true }, bio: { type: ORM.TEXT }, ...
'use strict' const { buildFasta } = require('./fasta/build') const wrap = require('word-wrap') function* parseGenbankEntry(data) { let current = '' for (let line of data.split(/\n/)) { // this whole loop is just so that we can get the "multi-line" values stuck // back into the keys they belong to. // skip th...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.findLinkEntities = undefined; var _propTypes = require('prop-types'); var _propTypes2 = _interopRequireDefault(_propTypes); var _react = require('react'); var _react2 = _interopRequireDefault(_react); var _constants = require('...
import re import sys from pathlib import Path from setuptools import find_packages, setup CURRENT_DIR = Path(sys.argv[0] if __name__ == "__main__" else __file__).resolve().parent def read_reqs(reqs_path: Path): return re.findall(r"(^[^#-][\w]+[-~>=<.\w]+)", reqs_path.read_text(), re.MULTILINE) # -------------...
# -*- coding: utf-8 -*- """053 - Números Primos Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1UKs7ZT3tPyvaBSdsS5ttZR0R8Zs2Ts6r """ lim = int(input('Digite um valor limite para calcular todos os números primos até ele: ')) for n in range(1, lim + 1):...
#!/usr/bin/python import json import sys #if any changes to this plugin kindly increment the plugin version here. PLUGIN_VERSION=1 #Setting this to true will alert you when there is a network problem while posting plugin data to server HEARTBEAT="true" #Config Section RABBITMQ_HOST='localhost' RABBITMQ_PORT="1567...
# 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, software # distributed under the Li...
"use strict"; const assert = require("assert").strict; const events = require("events"); const libLink = require("@clusterio/lib/link"); const libErrors = require("@clusterio/lib/errors"); const libSchema = require("@clusterio/lib/schema"); const mock = require("../../mock"); describe("lib/link/link", function() { ...
import homework.divisor_master as dm do_this = True while do_this: a = int(input("Введите нижнюю границу диапазона ")) b = int(input("Введите верхнюю границу диапазона ")) c = int(input(f"Введите число для обработки в заданном диапазоне от {a} до {b} ")) num = dm.set_num_range(c, a, b) if dm.is_p...
import psycopg2 import pandas as pd import sqlalchemy import json import requests import pprint import argparse parser = argparse.ArgumentParser() parser.add_argument("user", type=str, help="username to access postgresql database") parser.add_argument("password", type=str, help="password to access ...
# PrEd algorithm import numpy as np import networkx as nx import math import matplotlib.pyplot as plt import os import imageio import time from datetime import datetime from scipy.spatial import Delaunay def pred(G, pos, delta, gamma, iterations): folder_name = datetime.now() folder_name =...
var gulp = require('gulp'), browserSync = require('browser-sync').create(), reload = browserSync.reload, less = require('gulp-less'), cssmin = require('gulp-cssmin'), rename = require('gulp-rename'), uglify = require('gulp-uglify'), babel = require('gulp-babel'); // LESS gulp.task('less', f...
import threading import time import cv2 as cv from datetime import date from flask import Flask from flask import render_template from flask import Response from .utils import visualization_utils as vis_util category_index = {0: { "id": 0, "name": "Pedestrian", }} # TODO: json file for detector config clas...
""" Django settings for metrico_api project. Generated by 'django-admin startproject' using Django 3.0.7. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import o...
/* Process machine description and calculate constant conditions. Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ...
#!/usr/bin/python # -*- coding: UTF-8 -*- count = 0 while count < 5: print count, " is less than 5" count = count + 1 else: print count, " is not less than 5"
#!/usr/bin/env python #--------Include modules--------------- import rospy from visualization_msgs.msg import Marker from nav_msgs.msg import OccupancyGrid from geometry_msgs.msg import PointStamped from getfrontier import getfrontier #----------------------------------------------------- # Subscribers' callbacks---...
# -*- coding: utf-8 -*- import io import os import pathlib import pickle import re import sys import tempfile from pathlib import Path from typing import Any, Dict, List, Optional, Type from pytest import mark, param, raises from omegaconf import MISSING, DictConfig, ListConfig, OmegaConf from omegaconf._utils import...
const capabilities = require("./capabilities"); const DreameValetudoRobot = require("./DreameValetudoRobot"); const entities = require("../../entities"); const Logger = require("../../Logger"); const ValetudoRestrictedZone = require("../../entities/core/ValetudoRestrictedZone"); const ValetudoSelectionPreset = require...
!function(i){var n={timeout:3e5,data:{},remove:function(e){delete n.data[e]},exist:function(e){return!!n.data[e]&&(new Date).getTime()-n.data[e]._<n.timeout},get:function(e){return n.data[e].data},set:function(e,t,a){n.remove(e),n.data[e]={_:(new Date).getTime(),data:t},a&&"function"==typeof a&&a(t)}};i.ajaxPrefilter(f...
from cohortextractor import StudyDefinition, patients, codelist, codelist_from_csv # NOQA import pandas as pd placeholder_med_codes = codelist_from_csv( "codelists/opensafely-asthma-inhaler-steroid-medication.csv", system="snomed", column="id", ) copd_codes = codelist_from_csv( "codelists/opensafely-...
/** * DisseminationTalk.js * * @description :: TODO: You might write a short summary of how this model works and what it represents here. * @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models */ module.exports = { attributes: { document: { model: 'document', ...
'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, NotSupported } = require ('./base/errors'); // --------------------------------------------------------------------------- module.e...
import { stringify } from 'qs'; import request from '../utils/request'; export async function querySpiders() { return request('/api/spiders'); } export async function updateSpiders({ spiderName, name, value }) { return request(`/api/spiders/${spiderName}`, { method: 'POST', body: { name, value }, }); } ...
import airflow from airflow import DAG from acme.operators.dwh_operators import PostgresOperatorWithTemplatedParams from datetime import datetime, timedelta from airflow.operators.python_operator import PythonOperator from airflow.hooks import PostgresHook args = { 'owner': 'airflow', 'depends_on_past': False,...
# https://leetcode.com/problems/number-of-1-bits/ class Solution: def hammingWeight(self, n: int) -> int: c = 0 while n: n &= n - 1 c += 1 return c
export const globe = {"viewBox":"0 0 64 64","children":[{"name":"g","attribs":{"id":"GLOBE_1_","enable-background":"new "},"children":[{"name":"g","attribs":{"id":"GLOBE"},"children":[{"name":"g","attribs":{"id":"GLOBE"},"children":[{"name":"g","attribs":{},"children":[{"name":"g","attribs":{},"children":[{"name":"p...
# coding=utf-8 from __future__ import with_statement import os import re from django.conf import settings from django_extensions.management.utils import signalcommand from django_extensions.compat import CompatibilityBaseCommand as BaseCommand ANNOTATION_RE = re.compile("\{?#[\s]*?(TODO|FIXME|BUG|HACK|WARNING|NOTE|...
// // YYViewController.h // yyname // // Created by Yamyee on 12/29/2020. // Copyright (c) 2020 Yamyee. All rights reserved. // @import UIKit; @interface YYViewController : UIViewController @end
/* Copyright (c) 2001 Matej Pfajfar. * Copyright (c) 2001-2004, Roger Dingledine. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. * Copyright (c) 2007-2013, The Tor Project, Inc. */ /* See LICENSE for licensing information */ /** * \file onion_tap.c * \brief Functions to implement the original Tor ci...
#include "sys_types.h" #include "hal_misc.h" #include "mtos_msg.h" #include "ui_common.h" #include "nim.h" #include "pti.h" #include "dvb_svc.h" #include "ap_ota.h" #include "ui_ota_upgrade.h" #include "ui_ota_api.h" #include "ui_net_upg_api.h" enum ota_upgrade_ctrl_id { IDC_OTA_UPGRADE_STATE = 1, IDC_OTA_UPGRADE...
# Client QoS Spec File Interface # Author: Deyuan Guo, Chunkun Bo # Date: Dec 9, 2015 class QosSpec: def __init__(self, spec_tuple=None): if spec_tuple is None: self.SpecId = '' # (str) a unique string # hard requirements self.Availability = 99 # (int) an i...
import numpy as np import scipy import scipy.stats as stats from vowpalwabbit import pyvw import random import pandas as pd from itertools import product # This function modifies (context, action, cost, probability) to VW friendly format def to_vw_example_format(context, actions, cb_label=None): if cb_label is not...
# -*- coding: utf-8 -*- """ Created on Fri Jun 19 12:25:13 2020 @author: Telemachos Chatzitheodorou """ import os import sys sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) print('###########---Algos init---_###################d') from .Logger import get_logger __all__=['get_logger']
from gym.envs.registration import register import os def coeff_to_xml(coeff): return coeff[0], coeff[0], coeff[1], coeff[2] * 0.045, coeff[2] * 0.3, coeff[1] def get_coeff_env_name(coeff): return 'InvertedDoublePendulum2_{}_{}_{}-v2'.format(coeff[0], coeff[1], coeff[2]) def get_coeff_file_name(coeff): re...
// Copyright 2008 The Closure Library 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 requ...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "saleor.settings") # # print('pp ' + os.environ.get("PYTHONPATH")) from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
from bentoml.handlers import JsonHandler def test_json_handle_cli(capsys, tmpdir): def test_func(obj): return obj[0]["name"] handler = JsonHandler() json_file = tmpdir.join("test.json") with open(str(json_file), "w") as f: f.write('[{"name": "john","game": "mario","city": "sf"}]') ...
#!/usr/bin/env python from distutils.core import setup setup(name='PsychroLib', version='2.2.0', maintainer = 'The PsychroLib Developers', description='Library of psychrometric functions to calculate thermodynamic properties of air', author='D. Thevenard and D. Meyer', author_email='didi...
// // Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Jun 10 2020 10:03:13). // // Copyright (C) 1997-2019 Steve Nygard. // #import <objc/NSObject.h> @class CKKSCurrentKeyPointer, CKKSKey, NSArray, NSError, NSString; __attribute__((visibility("hidden"))) @interface CKK...
#! /usr/bin/env python import sys import copy import rospy import moveit_commander import moveit_msgs.msg import geometry_msgs.msg from math import pi from std_msgs.msg import String from moveit_commander.conversions import pose_to_list from geometry_msgs.msg import Pose # Initializing the node representing the robot...
//we create an action creator selectBook export function selectBook(book) { //needs to return an action, an object with a type property return { type: 'BOOK_SELECTED', payload: book } }
#pragma once #include "ui_searchwidget.h" #include <QPalette> #include <QWidget> class QShowEvent; class SearchWidget : public QWidget { Q_OBJECT public: SearchWidget(QWidget *parent=0); void setFound(bool f); void show(); signals: void searchNext(const QString &str, Qt::CaseSensitivity cs = Qt:...
# coding:utf-8 import numpy as np import matplotlib.pyplot as plt def relu(x): # relu函数 return np.maximum(0, x) def sigmoid(x): # sigmoid函数 return 1 / (1 + np.exp(-x)) def step_function(x): # 阶跃函数 return np.array(x > 0, dtype=np.int) # 先计算bool值,再转成int def show(x, y, ylim): # 画图 ...
// https://d3js.org Version 4.4.3. Copyright 2017 Mike Bostock. (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (factory((global.d3 = global.d3 || {}))); }(this, (function (exp...
$(document).ready(function () { $(".sortPriority").bind("click", function () { $( ".sortable" ).sortable({ connectWith: ".banners-sort" }).disableSelection(); $(this).hide(); $(".savePriority").show(); }); $(".savePriority").bind("click", function () { ...
/* eslint no-sync: 0 */ "use strict"; // deps // natives const { join } = require("path"); const assert = require("assert"); const { homedir } = require("os"); // locals const fs = require(join(__dirname, "..", "lib", "main.js")); // consts const DIR_TESTBASE = join(homedir(), "testlvl1"); const FILE_TE...
$(function() { $("#report_table").tablesorter({ widgets: ['zebra'], textExtraction: 'complex' }); $('.filter').change(function(){ var ff = $('#file_filter').val(), cf = $('#coverage_filter').val(); $('table#report_table tbody tr').each(function(i){ if ((this.className.split(" ").in...
import Vue from 'vue' import Router from 'vue-router' import Dashboard from '@/components/Dashboard' import Login from '@/components/Login' import Register from '@/components/Register' Vue.use(Router) export default new Router({ routes: [ { path: '/dashboard', name: 'Dashboard', component: Das...
# Copyright (c) 2021 - Jojo#7791 # Licensed under MIT from datetime import datetime import discord from redbot.core import commands from redbot.core.utils.chat_formatting import humanize_list from ..abc import TodoMixin class Miscellaneous(TodoMixin): """Miscellaneous todo commands""" @commands.group() ...
import numpy as np def net_2_wider_net(weights, bias, weights_next_layer, noise_std=0.01, new_layer_size=None, split_max_weight_else_random=True): """ Numpy implementation of net 2 wider net from http://arxiv.org/pdf/1511.05641.pdf Args: ...