git clone https://gist.github.com/ishu3101/6fb35afd237e42ef25f9
mv 6fb35afd237e42ef25f9 ConvertTo-Markdown
cd ConvertTo-Markdown
| # Install Docker 20.10.7 on Ubuntu 20.04 focal | |
| sudo apt-get update | |
| sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release -y | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
| # This is for amd64_x86 architecture (checkout for other architectures: https://docs.docker.com/engine/install/ubuntu/) | |
| echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ | |
| $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null |
| // Dart is a C-Like strongly static typed language | |
| // variable are pass-reference-by-value | |
| // Everything is an Object | |
| /* | |
| * Data Type in Dart | |
| Data Type | Keyword | Description | |
| Number | int, double, num | Numbers in Dart are used to represent numeric literals | |
| Strings | String | Strings represent a sequence of characters |
| // We know we can apply type checking and compile static on all groovy classes, the good news you can do this on gradle build, so it'll be applied in every class in your project, this works in android project. | |
| /*/ In gradle project: | |
| apply plugin: 'groovy' | |
| compileGroovy.groovyOptions.configurationScript = file('gradle/config/groovyc.groovy') | |
| // In Android project (app/build.gradle) | |
| androidGroovy { | |
| options { | |
| configure(groovyOptions) { |
| # Simplest linear model with keras 2.1.3 (using tensorflow backed) it worked with python 3.5 | |
| import numpy as np | |
| import keras | |
| model = keras.Sequential( [keras.layers.Dense(units=1, input_shape=[1])] ) | |
| model.compile(optimizer='sgd', loss='mean_squared_error') | |
| # y = 2x - 1 | |
| xs = np.array([-1.0, 0.0, 1.0, 2.0, 3.0, 4.0]) | |
| ys = np.array([-3.0, -1.0, 1.0, 3.0, 5.0, 7.0]) |
| <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> |
| package demo | |
| import javax.script.* | |
| import org.renjin.script.* | |
| class App { | |
| static void main(String[] args){ | |
| // init values | |
| int[] values = [1,2,3] | |
| // Create a Renjin engine: |
| """ | |
| 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) |