Skip to content

Instantly share code, notes, and snippets.

View nrubin's full-sized avatar

Noam Rubin nrubin

View GitHub Profile
curl -vvv http://miencargo.911post.com/
* Trying 74.208.236.90...
* TCP_NODELAY set
* Connected to miencargo.911post.com (74.208.236.90) port 80 (#0)
> GET / HTTP/1.1
> Host: miencargo.911post.com
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 302 Found
import csv
f = open('asinstoretag.csv','r')
r = csv.reader(f)
next(r)
print "itemid,destination_product_id,source"
for l in r:
var = l[3].replace('PGLQDqXJCijyeutnXoi4uF_','')
print "%s,%s,amazon" % (var,var)
# to use: python process_asins.py > processeds_asins.csv
POST /v0/account/:account_id/requests/create_batch
{
"requests": [
{
"options": {
"needs_review": true,
"sku": "my-unique-sku-123"
},
"source": "amazon",
"product_id": "B0000000A1"
@nrubin
nrubin / HipsterImages.py
Created October 2, 2014 23:13
Downloads a bunch of hipster images from some website. Resumable. Can throttle if you want, but not enabled right now.
#let's download some hipster images
import requests
from bs4 import BeautifulSoup
import numpy as np
import time
import os
def throttle():
t = 80*np.random.randn()+200
while t < 0:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main (void){
int n = 10000;
char* s1 = (char *) malloc(sizeof(char) * n);
char* s2 = (char *) malloc(sizeof(char) * n);
strcpy(s1,"Hello World!");
strcpy(s2,strcat(s1,s1+1));
@nrubin
nrubin / ls.bat
Created March 12, 2013 16:33
Barebones ls on Windows
@ECHO OFF
:: written by noam rubin (@nrubin)
:: I want my ls back!
if "%1" =="" ( :: no parameter, open current directory
dir /B "%CD%"
) else (
dir /B "%1%"
@nrubin
nrubin / matlab.sublime-build
Last active August 17, 2017 14:21
Build System for Sublime Text 2 for MATLAB files on Windows
{
"cmd": ["C:\\Program Files\\MATLAB\\R2012b\\bin\\matlab", "-nosplash", "-nodesktop", "-r", "run('$file_name')"],
"selector": "source.m"
}