text
stringlengths
3
1.05M
import omit from 'lodash/fp/omit'; import { TableRowColumn } from 'material-ui/Table'; import { mapProps } from 'recompose'; import styled, { css } from 'styled-components'; const locked = css` &::after { background: rgba(255, 255, 255, .5); bottom: 0; content: ""; left: 0; position: absolute; ...
from django.utils.translation import gettext as _ from celery import shared_task from my_router.views import fetch_new_info_save_and_set_cache @shared_task(bind=True, name="fetch_devices_and_set_cache") def fetch_devices_and_set_cache(self, router_id): fetch_new_info_save_and_set_cache(router_id) return {"me...
""" A module to manage software on Windows .. important:: If you feel that Salt should be using this module to manage packages on a minion, and it is using a different module (or gives an error similar to *'pkg.install' is not available*), see :ref:`here <module-provider-override>`. The following func...
import $ from 'jquery'; export class UserLookup { constructor(userUri, token) { this.uri = userUri; this.token = token; this.store = {}; } get(id) { let p = new Promise((res, rej) => { if(this.store[id]) { res(this.store[id]); } else { $.ajax({ url: this.uri + '/' + id, headers: {'Au...
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <unordered_set> #include <json/json.h> #include <ConcurrentContainers.h> #include <mariana-trench/CallGra...
import React, { useRef } from 'react' import './style.css' function Start() { // const [y, changeY] = useState(0) const ref1 = useRef(null) const ref2 = useRef(null) const ref3 = useRef(null) const ref4 = useRef(null) const ref5 = useRef(null) const ref6 = useRef(null) const ref7 = use...
import time import yaml import json import errno import re from twisted.python.filepath import FilePath, InsecurePath from twisted.internet import reactor from oonib import errors as e from oonib.handlers import OONIBHandler from oonib.policy.handlers import Policy from datetime import datetime from oonib import ran...
const T = TestMod.Test; React.createElement(T, null), React.createElement(TestMod.Test, null);
# License: BSD 3-Clause import hashlib import inspect import os import shutil import sys import time from typing import Dict, Union, cast import unittest import pandas as pd import openml from openml.tasks import TaskType from openml.exceptions import OpenMLServerException import logging class TestBase(unittest.Te...
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..utils import OneDToolPy def test_OneDToolPy_inputs(): input_map = dict( args=dict(argstr='%s', ), censor_motion=dict(argstr='-censor_motion %f %s', ), censor_prev_TR=dict(argstr='-censor_pr...
import os import torch from torch.utils.data import Dataset from torchvision.transforms import transforms import numpy as np import collections from PIL import Image import csv import random class MiniImagenet(Dataset): """ put mini-imagenet files as : root : |- images/*.jpg includes all imgeas ...
import csv import re import nltk import sys import myutils def extract_contents(ent): for (name, ext) in {'added': lambda x: x['entry']['content']['added'], 'removed': lambda x: x['entry']['content']['removed'], 'comment': lambda x: x['entry']['comment'],}.items():...
import torch import torch.nn as nn from torch.nn.functional import relu, avg_pool2d class MLP(nn.Module): """ Two layer MLP for MNIST benchmarks. """ def __init__(self, hiddens, config): super(MLP, self).__init__() self.W1 = nn.Linear(3072, hiddens) self.relu = nn.ReLU(inplace=True) self.dropout_1 = nn.Dr...
import { useAuth } from "../../../../Auth"; export default function useHeader() { const { authId } = useAuth(); return { authId }; }
import { Token, TEOF, TOP, TNUMBER, TSTRING, TPAREN, TCOMMA, TNAME } from './token'; export function TokenStream(parser, expression) { this.pos = 0; this.current = null; this.unaryOps = parser.unaryOps; this.binaryOps = parser.binaryOps; this.ternaryOps = parser.ternaryOps; this.consts = parser.consts; t...
#ifndef AOS_VISION_ROBOT_H_ #define AOS_VISION_ROBOT_H_ #include <functional> #include <memory> #include <thread> #include "aos/vision/events/udp.h" namespace aos { namespace vision { struct msg_data { double left_encoder; double right_encoder; }; class RobotInterface { public: RobotInterface(); void Se...
"""People Counter.""" """ Copyright (c) 2018 Intel Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modif...
const { ethers } = require("hardhat"); const { expect } = require("chai"); const { getCurrentBlock, skipBlock } = require("../utils"); const { MaxUint256 } = require("@ethersproject/constants"); describe("Project - Integration", () => { before(async () => { const accounts = await ethers.getSigners(); admin =...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import sys try: from setuptools import setup except ImportError: from distutils.core import setup def get_version(*file_paths): """Retrieves the version from django_dynamic_forms/__init__.py""" filename = os.path.join(os.path.dirname(_...
import {findComponentsDownward} from '@/util/assist'; export default { /** * 自定义指令 v-formitemshow * 需要在form元素上添加 v-formitemshow="tableColumnsNew" 表头控制列 * 那么表单元素会根据 表头控制信息显示对应的item。 * */ componentUpdated:(el, binding ,Vnode) => { let controlList = binding.value || []; if (controlList.length){ e...
/* * Dynomite - A thin, distributed replication layer for multi non-distributed storages. * Copyright (C) 2015 Netflix, Inc. * * author: Ioannis Papapanagiotou */ char *ascii_logo = " \n" ...
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the Lic...
import fse from 'fs-extra' import path from 'path' import os from 'os' export async function pathIsEmpty(dir) { try { const content = await fse.readdir(absolutify(dir)) return content.length === 0 } catch (err) { if (err.code === 'ENOENT') { return true } throw err } } export function...
""" The modules reponsive about the has files on the new directory created with the createPathGoesData, and if has a same File, check if are broken""" def checkFiles(path, singleFile): """ checkFiles(path,singleFile): That function will check if exist the file on the path create with the ...
#ifndef SSE2NEON_H #define SSE2NEON_H // This header file provides a simple API translation layer // between SSE intrinsics to their corresponding Arm/Aarch64 NEON versions // // This header file does not yet translate all of the SSE intrinsics. // // Contributors to this work are: // John W. Ratcliff <jratcliffscar...
#!/usr/bin/env python import gdal import env import poly ds = gdal.Open('/out/hpd/wpp/low.tif') if ds: hpd = ds.GetRasterBand(50).ReadAsArray() p2 = poly.poly(hpd, 'poly(logHPD.rs, 2)2') p1 = poly.poly(hpd, 'poly(logHPD.rs, 2)1') p0 = poly.poly(hpd, 'poly(logHPD.rs, 2)0')
from django import forms from .models import Profile class ProfileModelForm(forms.ModelForm): class Meta: model= Profile fields=('first_name', 'last_name', 'bio', 'avatar')
let query = require('../model/query'); let createConn = require('../model/createConnection'); let query2mongo = require('../query-to-mongo'); /** * Query dataset by query parameters and output JSON * Return null if error * @param collection * @param queryParams * @returns {Promise<*>} */ async function resultToJ...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: proto_config.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.pr...
const Discord = require("discord.js"); const db = require("wio.db"); module.exports.run = async (bot, message, args) => { let prefix = (await db.fetch(`prefix_${message.guild.id}`)) || "?"; if (!message.member.hasPermission("KICK_MEMBERS")) { const embed = new Discord.MessageEmbed() .setDescription("```Ne...
// @flow import React, { Component, Fragment } from 'react'; import Pagination from '../src'; const PAGES = [...Array(10)].map((_, i) => ({ label: i + 1, href: `page-${i + 1}`, })); type StateType = { onChangeEvent: { label: number, href: string, }, }; export default class extends Component<{}, State...
# -*- coding: utf-8 -*- # # Copyright (C) 2017-2018 KuraLabs S.R.L # # 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 appl...
/* @flow */ import React from 'react' import Home from './pages/Home' import { Provider } from 'react-redux' import createStore from '../createStore' export type Props = {} export default function App(_props: Props) { return ( <Provider store={createStore()}> <Home /> </Provider> ) }
/****************************************************************************** * Copyright 2016-2021 The Firmament 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 Lic...
from stream_framework.verbs.base import Comment as CommentVerb from stream_framework.verbs.base import Verb, register from lego.apps.articles.models import Article from lego.apps.comments.models import Comment from lego.apps.feed import activities, aggregator from lego.apps.users.models import User from lego.utils.tes...
# -*- coding: utf-8 -*- """ :authors: python273, Helow19274, klassik2k16 :license: Apache License, Version 2.0, see LICENSE file :copyright: (c) 2019 python273 """ from enum import Enum import six from .utils import sjson_dumps class VkKeyboardColor(Enum): """ Возможные цвета кнопок """ #: Синяя PR...
import torch import torch.nn as nn import torch.nn.functional as F import random class ChannelShuffle(nn.Module): def forward(self, x): y = torch.split(x, 1, dim=1) y = random.sample(y, len(y)) return torch.cat(y, dim=1) class Rish(nn.Module): def __init__(self): super(Rish, se...
var helpers = require('../../helpers'); module.exports = { title: 'Maximum Password Age', category: 'IAM', description: 'Ensures password policy requires passwords to be reset every 180 days', more_info: 'A strong password policy enforces minimum length, expirations, reuse, and symbol usage', link: 'http://docs.a...
const assert = require('assert'); const path = require('path'); const util = require('./utils'); var byteslicetest; const bytecode = "0x60606040526113da806100126000396000f36060604052361561018a5760e060020a600035046305088c8a811461018c5780630a53e81d146102355780630e6bda7a146102ec5780630fafb6cb1461033957806313420665146103...
//@ sourceMappingURL=subscription.map // Generated by CoffeeScript 1.6.1 var AttributeSetter, Subscription, Transaction, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = ch...
# python3 # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
import styled from 'styled-components'; export const BreadcrumbWrapper = styled.div` padding: 15px 30px 0; background-color: #fff; `; export const ServiceClassToolbarWrapper = styled.div` && > div { padding: 0 30px; } `;
import { makeExecutableSchema } from 'graphql-tools' import resolver from './schema-resolver' const schema = ` type TopicInfo { id: Int! title: String info: Int } type User { id: Int! name: String avatar: String gender: Int wechat: String website: String info: String createTime: Int lastAcces...
# uncompyle6 version 3.2.0 # Python bytecode 2.4 (62061) # Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] # Embedded file name: pirates.leveleditor.worldData.interior_spanish_senior_fantifico from pandac.PandaModules import Point3, VBase3, Vec4, Vec3 objectStruct ...
# -*- coding: utf-8 -*- """This is a generated class and is not intended for modification! """ from datetime import datetime from infobip.util.models import DefaultObject, serializable from infobip.api.model.Status import Status class SMSResponseDetails(DefaultObject): @property @serializable(name="to", typ...
// This file was generated based on C:/Users/JuanJose/AppData/Local/Fusetools/Packages/Fuse.Triggers/1.9.0/State.ScriptClass.uno. // WARNING: Changes might be lost if you edit this file directly. #pragma once #include <Fuse.Animations.IBase-d3bd6f2e.h> #include <Fuse.Animations.IUnwr-594abe9.h> #include <Fuse.Binding....
from .BaseApi import BaseApi from .NamedEndpoint import NamedEndpoint from .Endpoint import Endpoint from .UrlConfig import UrlConfig from . import league_of_legends, legends_of_runeterra, team_fight_tactics __all__ = [ "BaseApi", "NamedEndpoint", "Endpoint", "UrlConfig", "league_of_legends", ...
"""MEDREC_Project URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Clas...
// Store the width and heaight of the canvas var cWidth = 800; var cHeight = 600; // Store the number of squares to hold in our grid var gridSquaresX = 60; var gridSquaresY = 50; // Store the width of each grid square var gridSquareSizeX; var gridSquareSizeY; // Variable to hold all of our game objects var gameObjec...
import logging import time from typing import Any, Dict, Union, Tuple, Optional import pandas as pd from gluonts.dataset.common import ( Dataset, ) # TODO: this interface should not depend on GluonTS datasets import autogluon.core as ag from autogluon.core.models import AbstractModel from autogluon.common.savers...
import os from flask import Flask, flash, request, redirect, url_for, send_from_directory from werkzeug.utils import secure_filename from tempfile import gettempdir UPLOAD_FOLDER = os.path.join(gettempdir(), 'uploads') os.makedirs(UPLOAD_FOLDER, exist_ok=True) ALLOWED_EXTENSIONS = set(['txt', 'pdf', 'png', 'jpg', 'j...
import typescript from 'rollup-plugin-typescript2'; import pkg from './package.json'; import {terser} from "rollup-plugin-terser"; export default { input: 'src/index.ts', // our source file output: [ { file: 'build/rl-loadout-lib.min.js', format: 'umd', name: 'RL', // the global which can be ...
/*! Swipebox v1.2.9 | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */ ;( function ( window, document, $, undefined ) { $.swipebox = function( elem, options ) { // Default options var ui, defaults = { useCSS : true, useSVG : true, initialIndexOnArray : 0, ...
"""Tests for the Wolf SmartSet Service integration."""
import setuptools import pyscience with open('README.md', 'r') as fh: long_description = fh.read() setuptools.setup( name='pyscience', version=pyscience.__version__, author='Manuel Alcaraz Zambrano', description='python science programming', long_description=long_description, long_descript...
//@ ltl invariant negative: (AP(x_9 - x_11 > 15) U (AP(x_3 - x_19 > -17) U AP(x_15 - x_12 >= -20))); float x_0; float x_1; float x_2; float x_3; float x_4; float x_5; float x_6; float x_7; float x_8; float x_9; float x_10; float x_11; float x_12; float x_13; float x_14; float x_15; float x_16; float x_17; float x_18; f...
#include <stdint.h> #define MARSH_TEST_NAME stream_fmacc #define STREAM_SET_SCALE 0x7fedcab976543218ULL #define datatype uint64_t #include "stream_fmac.h"
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-libs"],{"00ee":function(A,e,t){var n=t("b622"),r=n("toStringTag"),o={};o[r]="z",A.exports="[object z]"===String(o)},"0366":function(A,e,t){var n=t("1c0b");A.exports=function(A,e,t){if(n(A),void 0===e)return A;switch(t){case 0:return function(){return A.c...
/* FreeRTOS Kernel V10.2.0 Copyright (C) 2017 Amazon.com, Inc. or its affiliates. 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 Software without restriction, including without limit...
module.exports = { model: require('./activityfeed.model'), ctrl: require('./activityfeed.controller'), routes: require('./activityfeed.route') }
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2017-18 Richard Hull and contributors # See LICENSE.rst for details. """ Tests for :py:class:`luma.emulator.clut`. """ from luma.emulator.clut import rgb2short def test_rgb2short(): assert rgb2short(100, 100, 100) == 59
console.log("loading utils.js ..."); //====================================================================================================================== function setInputFilter(textbox, inputFilter) { ["input", "keydown", "keyup", "mousedown", "mouseup", "select", "contextmenu", "drop"].forEach(function(event)...
# # This source file is part of the EdgeDB open source project. # # Copyright 2019-present MagicStack Inc. and the EdgeDB 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...
'use strict'; const depcheck = require('depcheck'); const ora = require('ora'); const _ = require('lodash'); function skipUnused(currentState) { return currentState.get('skipUnused') || // manual option to ignore this currentState.get('global') || // global modules currentStat...
"""File hooks.""" import os import random from pathlib import Path import logging import shutil from distutils.dir_util import copy_tree from typing import List, Union, Any from tackle.models import BaseHook, Field from tackle.exceptions import HookCallException logger = logging.getLogger(__name__) def create_direc...
import { Controller } from "stimulus" import Rails from "@rails/ujs"; export default class extends Controller { static targets = ['check'] static values = { url: String, completed: Boolean } onTodoCheckChanged() { if (this.checkTarget.checked) { this.completeTodo() } else { this.uncompleteTo...
/* * jdinput.c * * Copyright (C) 1991-1997, Thomas G. Lane. * Modified 2002-2009 by Guido Vollbeding. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * * This file contains input control logic for the JPEG decompressor. *...
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE124_Buffer_Underwrite__wchar_t_alloca_ncpy_02.c Label Definition File: CWE124_Buffer_Underwrite.stack.label.xml Template File: sources-sink-02.tmpl.c */ /* * @description * CWE: 124 Buffer Underwrite * BadSource: Set data pointer to before the allocated memory buffer...
import argparse from doom.app import create_app app = create_app() if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('--host', default='127.0.0.1', help='server host ip') parser.add_argument('--port', default=5000, help='server bindbing port') args = parser.parse_args...
# from metric.Metric import Metric from corai_util.tools import function_iterable from corai.src.classes.metric.metric import Metric class NNTrainParameters: def __init__(self, batch_size, epochs, device, criterion, optim_wrapper, metrics=()): """ Args: batch_size: batch size can be...
import "./service-worker"; import App from "./page/App.vue"; import i18n from "./i18n"; import VueMeta from "vue-meta"; import router from "./router"; import store from "./store"; import Vue from "vue/dist/vue.runtime"; Vue.use(VueMeta); new Vue({ el: "#app", router, store, i18n, render: h => h(App) });
import numpy as np from sklearn.datasets import load_iris from sklearn import tree iris=load_iris() test_idx=[0,50,100] #training data train_target=np.delete(iris.target, test_idx) train_data=np.delete(iris.data, test_idx, axis=0) #testing data test_target=iris.target[test_idx] test_data=iris.data[test_idx] clf=tre...
#ifndef GUARD_2_2_H #define GUARD_2_2_H int ex2_2(); #endif // !GUARD_2_2_H
document.addEventListener('keypress', (e) => { let modal = document.querySelector('.modal'); // assuming you have only 1 let html = document.querySelector('html'); modal.classList.remove('is-active'); html.classList.remove('is-clipped'); document.getElementById('userInput').focus(); }); up.compile...
""" This code requires first installing the pyax12 Python package. - http://pyax-12.readthedocs.io/en/latest/index.html Pyax12 is a Python 3 package which can be installed on a Linux/OSX machine like so: sudo pip3 install pyax12 Servos must already have an ID set before the below functions can be used. You'll need t...
# Generated by Django 4.0rc1 on 2021-12-09 22:46 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('store', '0005_alter_product_description'), ] operations = [ migrations.AlterField( model_name='pr...
# Copyright 2020 Max Planck Institute for Software Systems # 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 ...
# Copyright DataStax, 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 to in writing, softwa...
import shutil import psutil from network import * def check_disk_usage(disk): du = shutil.disk_usage(disk) perc = du.free / du.total *100 return perc > 20 def check_cpu_usage(): usage = psutil.cpu_percent(1) return usage < 20 if not check_disk_usage("/") or not check_cpu_usage(): ...
$(document).on('beforeSubmit', "#staff", function (event) { event.preventDefault(); // avoid to execute the actual submit of the form. var form = $(this); var data = form.serialize(); var url = form.attr('action'); //console.log(url); /*$.ajaxSetup({ ...
/** * FreeRDP: A Remote Desktop Protocol Implementation * Audio Output Virtual Channel * * Copyright 2009-2011 Jay Sorg * Copyright 2010-2011 Vic Lee * Copyright 2015 Thincast Technologies GmbH * Copyright 2015 DI (FH) Martin Haimberger <martin.haimberger@thincast.com> * * Licensed under the Apache License, Ve...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2011 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
window.onload = function () { var back_to_top_element = document.getElementById("back_to_top"), update_element = document.getElementById("update"); back_to_top_element.style.display = "none"; window.addEventListener("scroll", function () { if (document.body.scrollTop > 20 || document.docum...
import { LitElement, html, css } from "../web_modules/lit-element.js"; class ResponsiveImage extends LitElement { static get properties() { return { "aspect-ratio": { type: String }, "max-width" : { type: String }, "max-height" : { type: String } }; } static get styles() { ...
ZULIP_VERSION = "1.9.1+git" LATEST_MAJOR_VERSION = "1.9" LATEST_RELEASE_VERSION = "1.9.1" LATEST_RELEASE_ANNOUNCEMENT = "https://blog.zulip.org/2018/11/07/zulip-1-9-released/" # Bump the minor PROVISION_VERSION to indicate that folks should provision # only when going from an old version of the code to a newer version...
const multer = require("multer"); const crypto = require("crypto"); const { extname, resolve } = require("path"); export default { storage: multer.diskStorage({ destination: resolve(__dirname, "..", "..", "temp", "uploads"), filename: (req, file, cb) => { crypto.randomBytes(10, (error, res) => ...
/* * Marketplace specific configuration. */ export const amenities = [ { key: 'towels', label: 'Towels', }, { key: 'bathroom', label: 'Bathroom', }, { key: 'swimming_pool', label: 'Swimming pool', }, { key: 'own_drinks', label: 'Own drinks allowed', }, { key: 'ja...
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ import Rea...
/*! * MockJax - jQuery Plugin to Mock Ajax requests * * Version: 1.5.3 * Released: * Home: http://github.com/appendto/jquery-mockjax * Author: Jonathan Sharp (http://jdsharp.com) * License: MIT,GPL * * Copyright (c) 2011 appendTo LLC. * Dual licensed under the MIT or GPL licenses. * http://appendto.com...
#!/usr/bin/env python import argparse import json import os import random import numpy as np import ray from ray.tune import Trainable, run, sample_from from ray.tune.schedulers import AsyncHyperBandScheduler class MyTrainableClass(Trainable): """Example agent whose learning curve is a random sigmoid. The...
import string passports = [] requiredFields = ['ecl', 'pid', 'eyr', 'hcl', 'byr', 'iyr', 'hgt'] eyeColor = ['amb', 'blu', 'brn', 'gry', 'grn', 'hzl', 'oth'] samePassport = "" f = open("day04.txt", "r") lines = f.readlines() for line in lines: if line == lines[-1] and len(samePassport) != 0: samePassport +...
import React, { Component } from 'react'; import { Field, reduxForm } from 'redux-form'; import { Link } from 'react-router-dom'; import { connect } from 'react-redux'; import { createPost } from '../actions'; class PostsNew extends Component{ renderField(field){ const {meta:{touched,error}}= field; const c...
export default { functionlist: [{ 'n': 'SUMIF', 't': 0, 'd': '對範圍中符合指定條件的值求和。', 'a': '對範圍中符合指定條件的值求和。', 'm': [2, 3], 'p': [{ 'name' : '範圍', 'detail' : '要根據條件進行檢測的範圍。', 'example': 'A1:A10', 'require': 'm', '...
from django import forms from .models import Data from django.utils.translation import ugettext_lazy as _ class DataForm(forms.ModelForm): class Meta: model = Data fields = ['name', 'contact', 'manufacturer', 'model', 'price', 'description'] labels = { 'name': _('Customer Name...
#!/usr/bin/env python import wx # import wx from lxml import html import requests import PIL.Image import PIL.ImageTk import tkinter from io import BytesIO import webbrowser import csv import json import threading import math # TRAY_TOOLTIP = 'System Tray Demo' TRAY_ICON = 'icon.png' api_key = '7C28D264D4A05EB3ED8442...
class Helpers(object): """ Helpers for SQLAlchemy models """ """Helper which copies keys from item to course if the key exists in item For each `key` in keys set course[key] to item[key] if item[key] exists Attributes: item (drexel_register.items.Course: Item to get values from ...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import { Picker, Modal, View, ViewPropTypes, FlatList, Dimensions } from 'react-native'; import _ from 'lodash'; import { Text } from './Text'; import { List } from './List'; impo...
# Copyright 2013-2019 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 import * class RMinqa(RPackage): """Derivative-free optimization by quadratic approximation based on an ...
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); // tslint:disable:no-expression-statement const ava_1 = __importDefault(require("ava")); const Contao_1 ...
import nrrd import shutil import argparse import pandas as pd from time import time from PIL import Image, ImageFont, ImageDraw from six.moves import cPickle as pickle from maskrcnn_benchmark.config import cfg from maskrcnn_benchmark.data.build import build_dataset from maskrcnn_benchmark.config.paths_catalog import Da...