git clone https://gist.github.com/ishu3101/6fb35afd237e42ef25f9
mv 6fb35afd237e42ef25f9 ConvertTo-Markdown
cd ConvertTo-Markdown
@Grab(group = 'org.apache.mahout', module = 'mahout-core', version = '0.9') | |
import org.apache.mahout.cf.taste.impl.common.FastByIDMap | |
import org.apache.mahout.cf.taste.impl.common.FastIDSet | |
import org.apache.mahout.cf.taste.impl.model.file.FileDataModel | |
import org.apache.mahout.cf.taste.impl.recommender.GenericItemBasedRecommender | |
import org.apache.mahout.cf.taste.impl.similarity.TanimotoCoefficientSimilarity | |
//you can get this data from here: http://files.grouplens.org/datasets/movielens/ml-100k.zip | |
def mlDir = new File(getClass().protectionDomain.codeSource.location.path).parent+'/ml-100k' |
/** | |
* Copyright 2013 Kai Sternad | |
* 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 License is distributed on an "AS IS" BASIS, |
#!/bin/bash | |
################################################################################ | |
# Script for installing Odoo on Ubuntu 14.04, 15.04 and 16.04 (could be used for other version too) | |
# Author: Yenthe Van Ginneken | |
#------------------------------------------------------------------------------- | |
# This script will install Odoo on your Ubuntu 14.04 server. It can install multiple Odoo instances | |
# in one Ubuntu because of the different xmlrpc_ports | |
#------------------------------------------------------------------------------- | |
# Make a new file: | |
# sudo nano odoo-install.sh |
// Create WebRTC peer and setup event handlers | |
let peer = new RTCPeerConnection(iceConfig) | |
// Subject for the websocket signalling server | |
let socketSubject = Observable.webSocket({ | |
// deserialize each binary message received | |
resultSelector: e => deserialize(e.data) | |
}) | |
// Filter for only icecandidate messages | |
.filter(msg => msg && msg.header && msg.header.event === 'icecandidate' && msg.body && msg.body.candidate) |
clear | |
############## | |
# Am I root? # | |
############## | |
if [ "x$(id -u)" != 'x0' ]; then | |
echo 'Error: this script can only be executed by root.' | |
echo 'Try re-run the script after switched to root account by type "sudo su"' | |
exit 1 | |
fi |
<template> | |
<div id="app"> | |
<!-- <img src="./assets/logo.png"> | |
<HelloWorld msg="Welcome to Your Vue.js App"/> --> | |
<div class="reveal"> | |
<div class="slides"> | |
<section>Single Horizontal Slide</section> | |
<section> | |
<section>Vertical Slide 1</section> | |
<section>Vertical Slide 2</section> |
""" | |
Update: (07.29.2022): Fix: train_test_split import | |
============================================================== | |
Restricted Boltzmann Machine features for digit classification | |
============================================================== | |
For greyscale image data where pixel values can be interpreted as degrees of | |
blackness on a white background, like handwritten digit recognition, the | |
Bernoulli Restricted Boltzmann machine model (:class:`BernoulliRBM | |
<sklearn.neural_network.BernoulliRBM>`) can perform effective non-linear |
import numpy as np | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
import math | |
class UpperConfidenceBound: | |
def __init__(self, dataframe, N, m): | |
self.__dataset = dataframe | |
self.__N = N | |
self.__m = m |
def text = "Going to convert this to Base64 encoding!" | |
// Encode | |
def encoded = text.bytes.encodeBase64().toString() | |
println encoded | |
// Decode | |
byte[] decoded = encoded.decodeBase64() | |
println new String(decoded) |