Skip to content

Instantly share code, notes, and snippets.

View mianuddin's full-sized avatar
👍
:+(1/2 + 1/4 + 1/8 + 1/16 + ⋯):

Mian Uddin mianuddin

👍
:+(1/2 + 1/4 + 1/8 + 1/16 + ⋯):
View GitHub Profile
@mianuddin
mianuddin / random-forest.hy
Last active March 14, 2020 23:09
Classify MNIST with Random Forest Classifier
(import [tensorflow [keras]])
(import [numpy :as np])
(import [sklearn.ensemble [RandomForestClassifier]])
(import [sklearn.metrics [accuracy_score]])
(setv mnist keras.datasets.mnist)
(setv [[train-images train-labels] [test-images test-labels]] (.load_data mnist))
(print f"train-images: {(. train-images shape)}")
(print f"train-labels: {(. train-labels shape)}")
entries: # Scrapbook entries under here (2-space indent)
- title: succulents
note: A bunch of beautiful plants at a small shop in Cagayan de Oro, 🇵🇭 # Optional: specify a note
src: images/succulents.png
sticker: # Optional: specify a public sticker url
- stickerUrl: https://mianuddin.github.io/creative-kit-web-sample/images/succulents.png
- title: cat
note: I have a cute cat that looks just like this one!
src: images/cool-cat-sticker-creation.png
sticker:
{{#sticker}}
<meta property="snapchat:sticker" content="{{{stickerUrl}}}"/>
{{/sticker}}
<meta property="snapchat:sticker" content="https://mianuddin.github.io/creative-kit-web-sample/images/cool-cat-sticker-creation.png"/>
<meta property="og:site_name" content="Mian's Scrapbook">
<meta property="og:title" content="Scrapbook">
<meta property="og:site_name" content="{{firstName}}'s Scrapbook">
<meta property="og:title" content="{{title}}">
<meta property="og:site_name" content="{{firstName}}'s Scrapbook">
<meta property="og:title" content="Scrapbook">
<button
class="snapchat-share-button share-button--custom-style"
data-share-url="https://mianuddin.github.io/"
>
Share to Snapchat
</button>
<script>
window.snapKitInit = function () {
snap.creativekit.initalizeShareButtons(
document.getElementsByClassName('snapchat-share-button')
);
};
</script>
<!--  Place your Creative Kit for Web share button here -->
<div class="snapchat-creative-kit-share share-button"></div>