Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import java.io.IOException;
import java.util.*;
import os
import sys
import shutil
import argparse
import numpy as np
from scipy.misc import imsave
from keras.preprocessing.image import ImageDataGenerator
# Given an expression, computes its "complexity".
use strict;
use warnings;
use feature 'say';
use Data::Dumper;
use Perlito5::Compiler;
use Perlito5::Perl5::Emitter;
use Perlito5::Perl5::PrettyPrinter;
use Data::Dumper;
use Perlito5::AST;
from __future__ import print_function
import time
import requests
BASE_URL = 'https://api.clever.com'
OAUTH_TOK = 'DEMO_TOKEN'
Say your code resides in a dir called project/ locally and you want to push it up to an empty repo on github. Then, if your repo is called, say, foo, get its URL, e.g., https://github.com/sneha/foo.git and do
git remote add origin https://github.com/sneha/foo.git
from your project/ dir. After that, add files using `git add`. Use the followinng for all files:
git add .
Then commit changes
@yati-sagade
yati-sagade / The doc
Created May 14, 2012 13:49
not completely up-to-date, but more-or-less okay
Cloud.js
Cloud.js aims to be a compute-cloud implementation where users can submit jobs to be executed possibly in parallel on the server. The concept is similar to that of PiCloud.
The user first registers and obtains an API key and the client library.
From hereon, a request from the client library on behalf of the user or directly from the user will be assumed to be qualified with the mentioned API key, unless noted otherwise.
The client first submits a "job" using the HTTP(S) POST method on the RESTful interface exposed by the server. This can be done directly or using the client library.
A job consists of:
# For example, to mount my Windows(NTFS) C:\ on /media/C I use this line:
/dev/sda1 /media/C ntfs defaults 0 0
# So it is basically
#/dev/devicename /path/to/mountpoint <fstype> defaults 0 0
#
# There can be as many spaces as you like between the fields - the last 3 fields can be repeated
# for most devices.
# The mount-point (2nd field) should exist.
# To see the changes after changing /etc/fstab w/o rebooting, execute `mount -a' as root.