Skip to content

Instantly share code, notes, and snippets.

View 0asa's full-sized avatar
🐽

Vincent Botta 0asa

🐽
View GitHub Profile
@0asa
0asa / usage.html
Last active April 18, 2023 15:49 — forked from aloncarmel/randombg.js
A minimal HTML example to grab a random background from unsplash.com using their API and apply to a div.
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" type="text/javascript"></script>
<script>
function GetRandomBackground()
{
var app_id = 'YOUR_APPLICATION_ID'
var url = 'https://api.unsplash.com/photos/random?client_id=' + app_id;
$.ajax({
url: url,
from pyspark import SparkContext
import numpy as np
from sklearn.cross_validation import train_test_split, Bootstrap
from sklearn.datasets import make_classification
from sklearn.metrics import accuracy_score
from sklearn.tree import DecisionTreeClassifier
def run(sc):
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'