Skip to content

Instantly share code, notes, and snippets.

View jorgeramirez's full-sized avatar

Jorge Ramírez jorgeramirez

View GitHub Profile
@jorgeramirez
jorgeramirez / find_oracle_multi.py
Created May 27, 2019 19:44
find_oracle_multi.py
import sys
import itertools
import gc
import math
import datetime
import os
import threading
import multiprocessing
import concurrent.futures
import time
@jorgeramirez
jorgeramirez / get_mmr_regression_gain_multi.py
Created May 27, 2019 19:43
get_mmr_regression_gain_multi.py
from ast import literal_eval as make_tuple
import random
import math
import sys
import itertools
import gc
import math
import datetime
import os
import threading
@jorgeramirez
jorgeramirez / data_convert_example.py
Last active May 24, 2019 16:26
Adapted version of tensorflow data_convert_example.py script, for the NeuSum paper
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@jorgeramirez
jorgeramirez / ng-redux-persist.js
Created December 18, 2016 20:27
ng-redux + redux-persist
import angular from 'angular';
import ngRedux from 'ng-redux';
import {persistStore, autoRehydrate} from 'redux-persist';
angular.module('demo', [
ngRedux
])
.config(config)
.run(run);
#!/bin/bash
# screencast script with ffmpeg
# author: Jorge Ramírez <jorgeramirez1990 at gmail dot com>
# help: ./record-screen.sh <record-name>
DEST_DIR=./recordings
if [ ! -d "$DEST_DIR" ]; then
mkdir -p $DEST_DIR
@jorgeramirez
jorgeramirez / folding-css3.html
Created March 22, 2014 13:54
CSS3 Folding effect
<!DOCTYPE HTML>
<!-- based on: http://davidwalsh.name/folding-animation -->
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Folding Effect</title>
<link href='http://fonts.googleapis.com/css?family=Unkempt' rel='stylesheet' type='text/css'>
<style>
.container {
@jorgeramirez
jorgeramirez / autoyaourt.sh
Created September 10, 2012 22:25
Just a clone of autoyaourt script
#!/bin/bash
# From: https://code.google.com/p/autoyaourt/
wget https://aur.archlinux.org/packages/package-query/package-query.tar.gz
tar zxvf package-query.tar.gz
cd package-query
makepkg -si
cd ..
wget https://aur.archlinux.org/packages/yaourt/yaourt.tar.gz
tar zxvf yaourt.tar.gz
cd yaourt
@jorgeramirez
jorgeramirez / install.sh
Created September 9, 2012 17:34
yeoman installation script with Arch Linux support
#!/bin/bash
# install.sh: Installation script
# Note for maintenance: edit the version variables below for easy updating :D
NODEVER=0.8.8
YEOMANVER="yeoman-yeoman-df0bc33fc4e1cf575f3e97ba28778a7838cfb7d1"
# checking OS
LINUX=0
@jorgeramirez
jorgeramirez / unzipit.py
Created January 15, 2012 17:08
Simple script that unzips .zip files in cwd
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os, re
"""
Unzip each .zip file inside the current working directory.
@author: Jorge Ramírez <[email protected]>
"""