text stringlengths 3 1.05M |
|---|
/*
Our operations are simple. We can just forward the actions one for one. Later on,
if we have more complex operations that require dispatching multiple actions, we can
write them and export them here.
*/
import { newGame, gameover, switchPlayer, winner, movePlayer, aiAlgorithm } from './actions';
import { i... |
# coding: utf-8
"""
Pure Storage FlashBlade REST 1.8 Python SDK
Pure Storage FlashBlade REST 1.8 Python SDK, developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/).
OpenAPI spec version: 1.8
Contact: i... |
function HTMLActuator() {
this.tileContainer = document.querySelector(".tile-container");
this.scoreContainer = document.querySelector(".score-container");
this.bestContainer = document.querySelector(".best-container");
this.messageContainer = document.querySelector(".game-message");
this.score = 0;
... |
import os
import math
import numpy as np
most_common_word = 3000
#avoid 0 terms in features
smooth_alpha = 1.0
class_num =2 #we have only two classes: ham and spam
class_log_prior = [0.0, 0.0] #probability for two classes
feature_log_prob = np.zeros((class_num, most_common_word)) #feature parameterized probab... |
#!/usr/bin/env python3
import argparse
import json
import os
import random
import secrets
import string
import subprocess
import traceback
from collections import defaultdict
from concurrent.futures import ThreadPoolExecutor
from datetime import datetime
from enum import Enum
from pathlib import Path
from threading im... |
webpackJsonp([1],{98:function(e,t,o){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function n(... |
// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --experimental-wasm-type-reflection --experimental-wasm-reftypes
load('test/mjsunit/wasm/wasm-module-builder.js');
(function TestTableType()... |
import React from "react";
import { FlatList, Text, View, TouchableHighlight, Image } from "react-native";
import styles from "./styles";
import { getRecipes, getCategoryName } from "../../data/MockDataAPI";
export default class RecipesListScreen extends React.Component {
static navigationOptions = ({ navigation }) =... |
function CustomSchemeManager() {
this.scheme = null;
this.query = null
this.androidPackageName = null;
this.iosMarketUrl = null;
this.iosAppID = null;
this.ua = navigator.userAgent.toLowerCase();
}
CustomSchemeManager.prototype.run = function(query) {
if(query != null && query != '')
this.query = qu... |
const inherits = require('util').inherits
const Component = require('react').Component
const h = require('react-hyperscript')
const connect = require('react-redux').connect
const actions = require('./actions')
const extension = require('../../app/scripts/lib/extension')
module.exports = connect(mapStateToProps)(InfoSc... |
import React from 'react';
import Counter from '.';
export default { title: 'Basic' };
export const CounterAt_0 = () => {
return (<Counter count={0}/>);
};
export const CounterAt_10 = () => {
return (<Counter count={10}/>);
};
|
!function(e){"function"==typeof define&&define.amd?define(["jquery","moment"],e):"object"==typeof exports?module.exports=e(require("jquery"),require("moment")):e(jQuery,moment)}(function(e,a){!function(){function e(e,a,t){var n=e+" ";switch(t){case"m":return a?"jedna minuta":"jedne minute";case"mm":return n+=1===e?"min... |
var SatriaBajaHitam=function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','... |
import React from "react";
const dom = () => [
{
type: "math",
subtype: "summationSymbol",
children: [{ text: "\ud609" }],
},
{
children: [
{
text: "",
},
],
},
];
const Element = (attributes, children) => {
return <span {...attributes}>{children}</span>;
};
const ico... |
# -*- coding: utf-8 -*-
# @Time : 2021/11/12/21:40:30
# @Author : Vater Hu
# @FileName: CirMatCoder
# @Software: Pycharm
# @QQ: 1107818699 |
/* eslint-env node */
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"extends": ["eslint:recommended"],
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"overrides": [
{
... |
var output = [
{
"3d-cube": 16,
"3d-morph": 6,
"3d-raytrace": 19,
"access-binary-trees": 4,
"access-fannkuch": 8,
"access-nbody": 4,
"access-nsieve": 3,
"bitops-3bit-bits-in-byte": 1,
"bitops-bits-in-byte": 2,
"bitops-bitwise-and": 2,
"bitops-nsieve-bits": 4,
"controlflow... |
from hashlib import md5
from plone.supermodel import loadString
from zope import schema
from zope.interface import Interface
from zope.interface.common.mapping import IMapping
from xml.parsers.expat import ExpatError
from uu.record.interfaces import IRecord
# various package globals:
PKGNAME = 'uu.dynamicschema'
D... |
const express = require('express');
const app = express();
const { resolve } = require('path');
const bodyParser = require('body-parser');
// Replace if using a different env file or config
require('dotenv').config({ path: './.env' });
if (
!process.env.STRIPE_SECRET_KEY ||
!process.env.STRIPE_PUBLISHABLE_KEY ||
... |
def config_JointEmbeder():
conf = {
# data_params
'dataset_name':'CodeSearchDataset', # name of dataset to specify a data loader
#training data
'train_name':'train.name.h5',
'train_api':'train.apiseq.h5',
'train_tokens':'train.tokens.h5',
... |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
/*jshint globalstrict:true, trailing:false, unused:true, node:true */
"use strict";
var parse = function(headers, body) {
if (body.model == 'Block') return;
var firstName = body.attributes.created_by.first_name;
var lastName = body.attributes.created_by.last_name;
var title = body.attributes.title;
var url ... |
from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
from fontTools import ttLib
from fontTools.misc import sstruct
from fontTools.misc.fixedTools import fixedToFloat, floatToFixed
from fontTools.misc.textTools import safeEval
from fontTools.ttLib import TTLibError
from . i... |
var movie = require('../model/movie');
//根据电影名字获取电影详情
exports.getDetail = function(req, res) {
var moviename = req.body.moviename;
console.log(moviename);
movie.find({moviename: moviename}, function(err, movies) {
if (err) {
console.log('ERROR IN FIND: ' + err);
return res.json({err: 'Error hap... |
#!/usr/bin/env node
const program = require('commander');
const chalk = require('chalk');
program.parse(process.argv);
const ScaffoldManager = require('../src/scaffoldManager');
const name = program.args[0];
const scaffoldManager = new ScaffoldManager();
if (name) {
if (scaffoldManager.workerConflict(name)){
consol... |
addEventListener('DOMContentLoaded', () => {
const contadores = document.querySelectorAll('.contador_cantidad');
const velocidad = 100;
var tiempo = 100;
const animarContadores = () => {
for (const contador of contadores) {
const actualizar_contador = () => {
let ca... |
__all__ = ['Monitor', 'get_monitor_files', 'load_results']
import gym
from gym.core import Wrapper
import time
from glob import glob
import csv
import os.path as osp
import json
import numpy as np
class Monitor(Wrapper):
EXT = "monitor.csv"
f = None
def __init__(self, env, filename, allow_... |
const gameState = {
difficulty: 'normal',
level: 1,
maxLevel: 10,
score: 0,
roundLenght: 6
}
function activateTile(tile) {
tile.classList.add("active");
}
const gameBody = document.getElementById("game-body");
const scoreCounter = document.getElementById("score");
const timer = document.getEle... |
import os
import logging
basedir = os.path.dirname(__file__)
ettus_fpgadir = os.path.join(basedir, '..', 'fpga', 'usrp3', 'lib')
ettus_coregendir = os.path.join(basedir, '..', 'fpga', 'usrp3', 'lib', 'coregen')
ettus_rfnocdir = os.path.join(basedir, '..', 'fpga', 'usrp3', 'lib', 'rfnoc')
default_part = 'xc7a2... |
from sympy import Order, S, log, limit, lcm_list, im, re, Dummy, Piecewise
from sympy.core import Add, Mul, Pow
from sympy.core.basic import Basic
from sympy.core.compatibility import iterable
from sympy.core.expr import AtomicExpr, Expr
from sympy.core.function import expand_mul
from sympy.core.numbers import _sympify... |
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
import os
import r... |
'use strict';
var config = require('../config');
var gulp = require('gulp');
var templateCache = require('gulp-angular-templatecache');
// Views task
gulp.task('templates', function() {
// Put our index.html in the dist folder
gulp.src('dev/templates/*.html')
.pipe(gulp.dest('build/templat... |
// =======================
// LED ===================
// =======================
var GpioStone = require('./gpio_stone_node');
var gpioStone = new GpioStone();
gpioStone.setOn(11);
|
module.exports = {
title: 'Ostracon',
base: process.env.VUEPRESS_BASE,
head: [
['script', { src: 'https://polyfill.io/v3/polyfill.min.js?features=es6' }],
['script', { id: 'MathJax-script', src: 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js', async: "async"}],
['script', { }, 'window.Ma... |
module.exports = {
access_bank: {
"name": "Access Bank",
"slug": "access-bank",
"code": "044",
"longcode": "044150149",
"gateway": "etz"
},
citibank_nigeria: {
"name": "Citibank Nigeria",
"slug": "citibank-nigeria",
"code": "023",
"longcode": "023150005",
"gateway": ""
},... |
import React from "react"
const ArrowLeftIcon = ({ fill = "#332e54" }) => {
return (
<svg width="24" height="24">
<rect width="24" height="24" fill="none" rx="0" ry="0" />
<path
fillRule="evenodd"
clipRule="evenodd"
d="M11.1199 12.0025L16.0599 7.0625C16.6499 6.4725 16.6499 5.5... |
(self["webpackChunk"] = self["webpackChunk"] || []).push([["resource/js/components/register"],{
/***/ "./node_modules/@babel/runtime/regenerator/index.js":
/*!**********************************************************!*\
!*** ./node_modules/@babel/runtime/regenerator/index.js ***!
\********************************... |
import asyncio
import bilibiliCilent
class Rafflehandler:
instance = None
def __new__(cls, *args, **kw):
if not cls.instance:
cls.instance = super(Rafflehandler, cls).__new__(cls, *args, **kw)
cls.instance.list_activity = []
cls.instance.list_TV = []
return... |
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else {
var a = factory();
for(var i in a) (typeof exports === 'object' ? exports : roo... |
module.exports = require("../../../../lib/logic.cores/0-window.api");
|
const pageCacheName = 'PAGE_CACHE';
const apiCacheName = 'API_CACHE';
const cacheFileList = ['/index.html'];
function matchHtml(url) {
return self.location.href.includes(url);
}
function matchApi(url) {
return url !== self.location.href;
}
self.addEventListener('install', e => {
console.log('Service Worker 状态... |
var a01121 =
[
[ "FPCUTPT", "a03746.html", "a03746" ],
[ "check_pitch_sync2", "a01121.html#ae7f609989fe2f9abecbebbd6c4ded665", null ],
[ "check_pitch_sync3", "a01121.html#a393be41deafc890bf9dc5ef3131bb2d0", null ]
]; |
/*
* Copyright 2012 Amadeus s.a.s.
* 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... |
let links = {
order_page: '',
application_domain: ''
};
async function initializePayment(encrypted_data, linksResponse){
console.log(JSON.parse(linksResponse));
links.application_domain = JSON.parse(linksResponse)['application_domain'];
links.order_page = JSON.parse(linksResponse)['order_page'];
let dado... |
module.exports = {
future: {
purgeLayersByDefault: true,
removeDeprecatedGapUtilities: true,
defaultLineHeights: true,
standardFontWeights: true,
},
purge: {
layers: ['utilities'],
content: ['./src/**/*.html', './src/**/*.tsx', './src/**/*.jsx', './src/**/*.scss', './src/**/*.css'],
},
... |
/**
* @fileoverview 异步文件上传组件
* @author 剑平(明河)<minghe36@126.com>,紫英<daxingplay@gmail.com>
**/
KISSY.add(function (S, Node, RichBase,JSON,UA,IframeType, AjaxType, FlashType, HtmlButton, SwfButton, Queue) {
var LOG_PREFIX = '[uploader]:';
var EMPTY = '';
var $ = Node.all;
var UPLOADER_FILES = 'text/uplo... |
/*jshint esversion: 8 */
import { NotImplementedError } from '../extensions/index.js';
/**
* Create name of dream team based on the names of its members
*
* @param {Array} members names of the members
* @return {String | Boolean} name of the team or false
* in case of incorrect members
*
* @example
*
* c... |
/**
* Created by Alex on 16/09/2015.
*/
const Decal = function (options) {
this.target = options.target;
this.size = options.size;
this.material = options.material;
};
export default Decal; |
"""Route handlers for the ``/auth/api/v1`` API.
All the route handlers are intentionally defined in a single file to encourage
the implementation to be very short. All the business logic should be defined
in manager objects and the output formatting should be handled by response
models.
"""
from __future__ import an... |
import React, { PureComponent } from 'react';
import { connect } from 'dva';
import {Row, Col, Button, DatePicker, Select,Modal, Checkbox} from "antd"
import { routerRedux } from 'dva/router';
import styles from './InverterDetail.less';
import {
Bar,
} from 'components/Charts';
const { MonthPicker, WeekPicker } = ... |
// I don't know why I need to use this global var in order to make slug conflict work
var wizardModelGlobal;
/**
* Viewmodel of the wizard screen.
*
* @param {ListingViewModel} listingModel
* @since m2m
*/
Types.page.relationships.viewmodels.WizardViewModel = function (listingModel) {
var self = this;
w... |
from django.contrib.auth import get_user_model
from django.db import Error, models
User = get_user_model()
class VerificationCode(models.Model):
user = models.OneToOneField(
User, primary_key=True, on_delete=models.CASCADE)
code = models.CharField(max_length=6, unique=True, db_index=True)
created... |
import TabsPane from './src/main.vue'
TabsPane.install = (Vue) => {
Vue.component(TabsPane.name, TabsPane)
}
export default TabsPane
|
# 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... |
$.noty.layouts.bottomCenter = {
name : 'bottomCenter',
options : { // overrides options
},
container: {
object : '<ul id="noty_bottomCenter_layout_container" />',
selector: 'ul#noty_bottomCenter_layout_container',
style : function() {
$(this).css({
... |
/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
* http://jqueryvalidation.org/
* Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
!function (a) {
"function" == typeof define && define.amd ? define(["jquery", "../jquery.validate.min.js"], a) : a(jQuery)
}(function (a) {
a.extend(a.validator.messages, {
... |
window.peopleAlsoBoughtJSON = [{"cover":"41BUYlD-sfL","asin":"B00VN0Q8XY","subHeading":"A Novel","title":"Armada","authors":"Ernest Cline","narrators":"Wil Wheaton","length":"11 hrs and 50 mins"},{"cover":"51+1PNQIB+L","asin":"B002V5A12Y","subHeading":"Special 20th Anniversary Edition","title":"Ender's Game","authors":... |
class ovhTaskFollowModalCtrl {
constructor($uibModalInstance, tasks) {
this.$uibModalInstance = $uibModalInstance;
this.tasks = tasks;
this.isOpenState = {};
this.isOpenState[tasks[0].task_id] = true;
}
dismiss() {
this.$uibModalInstance.dismiss();
}
}
angular.module('managerApp').controll... |
var searchData=
[
['zf',['zf',['../unionxed__flag__set__s.html#a96fcc2f1ad7f3b08c058b13b7c433fdb',1,'xed_flag_set_s']]]
];
|
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html
# useful for handling different item types with a single interface
from itemadapter import ItemAdapter
import pymysql
import pymongo
class GuaziMys... |
// ours
const fetch = require('./util/fetch')
const getToken = require('./util/get-access-token')
const URL = 'https://cloudresourcemanager.googleapis.com/v1/projects'
const projectsLs = async ctx => {
const token = await getToken(ctx)
if (!token) {
return 1
}
const { projects } = await fetch({ url: URL... |
import { quadtree } from 'd3-quadtree';
const applyQuadtree = (context, opt, finalState) => {
return quadtree()
.x(d => d.x)
.y(d => d.y)
.extent([[-1, -1], [context.canvas.width + 1, context.canvas.height + 1]])
.addAll(finalState);
};
export default applyQuadtree;
|
// @flow
import {version} from '../../package.json';
import {extend, bindAll, warnOnce, uniqueId} from '../util/util';
import browser from '../util/browser';
import window from '../util/window';
const {HTMLImageElement, HTMLElement, ImageBitmap} = window;
import DOM from '../util/dom';
import {getImage, getJSON, Resou... |
import OstIndexDB from "../../common-js/OstIndexedDB";
import OstError from "../../common-js/OstError";
const SE_DB_NAME = 'SecureEnclaveDB';
const STORES = {
KEY_STORE_TABLE:'KEY_STORE_TABLE',
};
const LOG_TAG = "SecureEnclave";
class SecureEnclave {
constructor(userId) {
this.userId = userId;
this.kmDB = O... |
/**
* Kendo UI v2019.3.1023 (http://www.telerik.com/kendo-ui)
* Copyright 2019 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.... |
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... |
import axios from "axios";
export default {
getAnswers:function(question_id){
return axios.get(`/getAnswers/${question_id}`);
},
getSortedAnswers:function({value,type,question_id}){
return axios.get(`/getSortedAnswers/${question_id}/?sortBy=${value}&type=${type}`);
}
}; |
const mongoose = require('mongoose');
const Course = new mongoose.Schema({
title: {
type: String,
required: true,
trim: true
},
fee: {
type: Number,
required: true
},
duration: {
type: String,
required: true,
trim: true
... |
var GithubApi = require('github');
function checking(login, pass, mail) {
return new Promise(function(resolve, reject) {
var github = new GithubApi({
version: "3.0.0",
debug: false,
protocol: "https",
host: "api.github.com",
timeout: 5000,
... |
const {
GraphQLString,
GraphQLList,
GraphQLNonNull,
GraphQLInputObjectType,
} = require('graphql');
/**
* @name exports
* @summary Consentactor Input Schema
*/
module.exports = new GraphQLInputObjectType({
name: 'Consentactor_Input',
description: '',
fields: () => ({
_id: {
type: require('./element.inpu... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-267f8d9c"],{"1da1":function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));r("d3b7");function n(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function o(t){return function(){var e=thi... |
// This wrapper was auto-generated.
define(["goog", "box2d.Testbed.Test"], function (goog, box2d) {
/*
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from ... |
import React from 'react';
import {Redirect} from '@docusaurus/router';
const path = require('path');
function To(props) {
let {location} = props;
let {to, forComponent} = props.dest;
if ( forComponent ) {
if ( location.hash && location.hash.length > 1 ) {
to = path.join(to, location.hash.slice(1));
... |
# main imports
import os, sys
import argparse
import numpy as np
# image processing
from PIL import Image
def reduce_image(image, size):
"""Reduce image from its center
Arguments:
image {PIL} -- PIL image expected
size {tuple(int,int)} -- tuple of 2 elements int (width, height)
"""
... |
/* eslint-disable import-order-alphabetical/order */
import { HEARTBEAT, ALARM_KEY } from '../../constants'
import { alarmReducer, initAlarms } from '.'
jest.mock('../notifications')
jest.mock('./heartbeat')
const { createNotification } = require('../notifications')
const { onHeartBeat, addHeartBeat } = require('./hea... |
/**
* http://usejsdoc.org/
*/
const HazelcastClient = require('hazelcast-client').Client;
const Config = require('hazelcast-client').Config;
let listener = require('./listener');
//let config = new Config.ClientConfig();
//config.networkConfig.addresses = [{host: '127.0.0.1', port: '5701'}];
let initConfig = (nea... |
import './config/database';
import server from './config/server';
const PORT = process.env.PORT || 5000;
server.listen(PORT, () => {
console.log(`app running on port ${PORT}`);
}); |
// Catching DOM
const startButton = document.querySelector('#start-btn');
const nextButton = document.querySelector('#next-btn');
const questionContainerElement = document.getElementById('question-container');
const questionElement = document.getElementById('question');
const answerButtonsElement = document.getElementB... |
# -*- coding: UTF-8 -*-
"""
Kaggle Challenge:
"http://www.kaggle.com/c/acquire-valued-shoppers-challenge/"
'Reduce the data and generate features' by Triskelion
After a forum post by BreakfastPirate
Very mediocre and hacky code, single-purpose, but pretty fast
Some refactoring by Zygmunt Zając <zygmunt@fastml.com>
... |
var driver__hmc5883l__shot_8c =
[
[ "hmc5883l_shot_deinit", "group__hmc5883l__example__driver.html#gafd33dd8c84e3dc4219a7a427c3dbe131", null ],
[ "hmc5883l_shot_init", "group__hmc5883l__example__driver.html#ga57a07e6759d0653ff6f3dafb17a901e6", null ],
[ "hmc5883l_shot_read", "group__hmc5883l__example__drive... |
const express = require('express');
const { addRoutes } = require('./add_routes');
const requestQueues = express.Router();
const ROUTES = [
{ id: 'get-or-create-queue', method: 'POST', path: '/' },
{ id: 'list-queues', method: 'GET', path: '/' },
{ id: 'get-queue', method: 'GET', path: '/:queueId' },
... |
import React from 'react'
import fetch from './fetch'
import config from '../../config'
const styles = {
action: {
margin: '10px 0',
width: '70%'
},
error: {
color: '#e74c3c'
},
largeFace: {
color: '#ecf0f1',
fontSize: '10em',
margin: '50px 0px'
},
appBar: {
backgroundColor: ... |
#!/usr/bin/env python3
"""Convert a Keras model to frugally-deep format.
"""
import base64
import datetime
import hashlib
import json
import sys
import numpy as np
from tensorflow.keras import backend as K
from tensorflow.keras.layers import Input, Embedding
from tensorflow.keras.models import Model, load_model
__au... |
import botBuilder from 'botbuilder';
const ACTION_KEY = '__action';
export default function (actionModel, dispatcher) {
const steps = [];
steps.push(initializeStep(actionModel));
Object.keys(actionModel).forEach(addPromptSteps);
steps.push(dispatcherAction(dispatcher));
return steps;
functi... |
import React from "react";
import "./Header.css"
export default ({black}) => {
return (
<header className={black ? 'black' : ''}>
<div className="header--logo">
<a href="/">
<img src="https://logodownload.org/wp-content/uploads/2014/10/netflix-logo-5.... |
/**
* @file betFlip command
* @author Sankarsan Kampa (a.k.a k3rn31p4nic)
* @license MIT
*/
let recentUsers = [];
exports.exec = async (Bastion, message, args) => {
try {
let cooldown = 60;
if (!recentUsers.includes(message.author.id)) {
if (!args.money || args.money < 1 || !/^(heads|tails)$/i.te... |
var createError = require('http-errors');
var express = require('express');
var path = require('path');
var cookieParser = require('cookie-parser');
var logger = require('morgan');
var CubejsServerCore = require('@cubejs-backend/server-core');
var indexRouter = require('./routes/index');
require('dotenv').config();
... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Ajoute le texte de la licence au début des fichiers C/C++
# Le texte est ajouté juste après la première ligne qui
# doit contenir la chaîne 'encode_header'
import os
import io
import argparse
import codecs
# Chaîne à détecter en début de fichier
encode_header = "// -*... |
import {mount} from 'enzyme';
import {BentoFacebook} from '#bento/components/bento-facebook/1.0/component';
import {serializeMessage} from '#core/3p-frame-messaging';
import {createRef} from '#preact';
import * as Preact from '#preact';
import {WithAmpContext} from '#preact/context';
import {waitFor} from '#testing... |
"use strict";
var marko_template = module.exports = require("marko/src/html").t(__filename),
marko_componentType = "/marko-test$1.0.0/compiler/fixtures-html/style-empty/template.marko",
components_helpers = require("marko/src/runtime/components/helpers"),
marko_renderer = components_helpers.r,
marko_de... |
/*
* Flow Template Utilities
*
* Copyright 2021 Dapper Labs, 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 requir... |
module.exports = function(router) {
// Load helper functions
var tools = require('../tools.js')
// ADD extra routing here if needed.
// require('./extra-stories.js')(router)
const fs = require('fs');
// CHANGE VERSION TO THE VERSION
const version = 'beta/v2'
const base_url = version + "/EXP-8648-keep... |
function isObject(input) {
return Object.prototype.toString.call(input) === "[object Object]";
}
function isRepresentableAsJSON(input) {
if (
input == null ||
typeof input === "boolean" ||
typeof input === "number" ||
typeof input === "string"
) {
return true;
}
if (isObject(input)) {
... |
var width = 400;
var height = 80;
var margin = 10;
var foodScale = d3.scaleBand()
.domain(['Carrots', 'Bananas', 'Sausages', 'Pickles', 'Aubergines', 'Artichokes', 'Spinach', 'Cucumber'])
.range([margin, width - 40 - margin]);
// Decorate
var axis = fc.axisBottom(foodScale)
.decorate(function(s) {
... |
import { findResource } from '../helpers';
export const selectReportByFilterValues = ({ reports }, filterValues) => findResource(reports, filterValues);
export const selectRunByReport = ({ reportRunsByHref }, report) => report && reportRunsByHref[report.href];
export const selectIsFetchingTaskByRun = ({ fetchingTask... |
import moment from 'moment'
const articles = [
{
title: 'Vince vs 2020 (the year in review)',
previewText:
'The year 2020 for me (and for everybody else on the planet I’m sure) has been one like no other, crowned with a global pandemic from a deadly virus it’s no surprise everybody that’s made it this ... |
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'about', 'en-ca', {
copy: 'Copyright © $1. All rights reserved.',
dlgTitle: 'About CKEditor',
help: 'Check $1 for help.', // MISSING
moreInfo... |
import nuke
import pyblish.api
import openpype.api
class ValidateKnobs(pyblish.api.ContextPlugin):
"""Ensure knobs are consistent.
Knobs to validate and their values comes from the
Controlled by plugin settings that require json in following structure:
"ValidateKnobs": {
"enabled": ... |
# MIT License
#
# Copyright (c) 2017 Arkadiusz Netczuk <dev.arnet@gmail.com>
#
# 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
# t... |
/**
* @file base64ToGallery PhoneGap/Cordova plugin
* @author Tommy-Carlos Williams
* @author Simba Zhang <solderzzc@gmail.com>
* @author StefanoMagrassi <stefano.magrassi@gmail.com>
* @copyright Tommy-Carlos Williams 2012. All rights reserved.
* @license MIT
*/
var exec = require('cordova/exec');
var assign = ... |