Skip to content

Instantly share code, notes, and snippets.

View Ectsang's full-sized avatar
🎯
Focusing

Eric Ectsang

🎯
Focusing
View GitHub Profile
@mrmekon
mrmekon / analyze.py
Created May 5, 2012 01:35
Markov Chain Employee Performance Review Generator
#!/usr/bin/env python
import string
import random
import sys
import pickle
f = open("employee_review_corpus.txt", "r")
contents = f.read()
f.close()
@gitaarik
gitaarik / git_submodules.md
Last active July 2, 2024 10:44
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@ricardo-rossi
ricardo-rossi / ElasticSearch.sh
Last active December 1, 2023 04:55
Installing ElasticSearch on Ubuntu 14.04
#!/bin/bash
### USAGE
###
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7
### ./ElasticSearch.sh will fail because no version was specified (exit code 1)
###
### CLI options Contributed by @janpieper
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch
@azhawkes
azhawkes / docker-deploy-storm-cluster.sh
Last active November 27, 2015 09:00
Deploys a 3-node Storm cluster with Docker
#!/bin/bash
# Set these to the Docker hosts you want each container to run on
ZOOKEEPER_HOST=10.0.1.249
NIMBUS_HOST=10.0.1.250
SUPERVISOR_HOST=10.0.1.251
# Run ZooKeeper
$ export DOCKER_HOST=tcp://$ZOOKEEPER_HOST:5000
$ docker run -h zookeeper --name=zookeeper -d jplock/zookeeper
# Install BigchainDB on a VM with Vagrant
It's quite easy to provision and run a Vagrant VM:
* Install Vagrant in your host system following instructions [here](https://www.vagrantup.com/docs/installation/)
* In your VM-to-be's home directory create the `VagrantFile` and the bash script to provision the machine (`config.sh`)
**VagrantFile**
```
# -*- mode: ruby -*-
@fchollet
fchollet / classifier_from_little_data_script_3.py
Last active September 13, 2023 03:34
Fine-tuning a Keras model. Updated to the Keras 2.0 API.
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
@pandafulmanda
pandafulmanda / Python3 Virtualenv Setup.md
Last active June 28, 2024 18:01 — forked from akszydelko/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@checco
checco / rw_ro_access.sql
Last active March 22, 2024 08:32 — forked from oinopion/read-access.sql
How to create a read only user in AWS RDS PostgreSQL and a user with superuser privileges on AWS RDS PostgreSQL
--
-- Read only
--
-- Create a group
CREATE ROLE postgres_ro_group;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO postgres_ro_group;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO postgres_ro_group;