Skip to content

Instantly share code, notes, and snippets.

View orYoffe's full-sized avatar
🇺🇦
Stand with Ukraine

Or Yoffe orYoffe

🇺🇦
Stand with Ukraine
View GitHub Profile
@orYoffe
orYoffe / setup_android_studio.sh
Created April 11, 2020 07:54 — forked from bmc08gt/setup_android_studio.sh
Android Studio bash installation script
#!/bin/bash
# only works atm if only one jdk package in downloads
DOWNLOADS=$HOME/Downloads
CURRENT_VERSION=$(java -version 2>&1)
JDK=` ls $DOWNLOADS | grep "jdk"`
STUDIO_URL=http://dl.google.com/android/studio/install/0.3.2/android-studio-bundle-132.893413-linux.tgz
if [ "uname -m" == "i386" -o "uname -m" == "i686" ]; then
ARCH=32
else
@orYoffe
orYoffe / git_newrepo
Created April 11, 2020 07:45 — forked from c0ldlimit/git_newrepo
Git: Push a new or existing repo to Github
# Create a new repository on the command line
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/c0ldlimit/vimcolors.git
git push -u origin master
# Push an existing repository from the command line
@orYoffe
orYoffe / iris-tensorflow-js.js
Created April 11, 2020 05:15 — forked from learncodeacademy/iris-tensorflow-js.js
Solving Iris with Tensorflow.js and Iris JSON dataset
import * as tf from "@tensorflow/tfjs"
import "@tensorflow/tfjs-node"
import iris from "./iris.json"
import irisTesting from "./iris-testing.json"
// convert/setup our data
const trainingData = tf.tensor2d(iris.map(item => [
item.sepal_length, item.sepal_width, item.petal_length, item.petal_width,
]))
const outputData = tf.tensor2d(iris.map(item => [
@orYoffe
orYoffe / download-multiple-files.js
Created March 29, 2020 06:43 — forked from noelvo/download-multiple-files.js
Download multiple files then compress to one zip file using JSZip & JSZip-utils
var zip = new JSZip();
var count = 0;
var zipFilename = "zipFilename.zip";
var urls = [
'http://image-url-1',
'http://image-url-2',
'http://image-url-3'
];
urls.forEach(function(url){