Skip to content

Instantly share code, notes, and snippets.

View ivancorrales's full-sized avatar
🐾
Doing what I love to do!

Iván Corrales Solera ivancorrales

🐾
Doing what I love to do!
View GitHub Profile
@ivancorrales
ivancorrales / sample.go
Created December 15, 2018 08:51
stream.Count / stream.IndexOf / stream.LastIndexOf / stream.Contains
package main
import (
"fmt"
"github.com/wesovilabs/koazee"
)
var numbers = []int{1, 5, 4, 3, 2, 7, 1, 8, 2, 3}
func main() {
@ivancorrales
ivancorrales / sample.go
Last active December 15, 2018 09:11
stream.Take / stream.Filter / stream.RemoveDuplicates
package main
import (
"fmt"
"github.com/wesovilabs/koazee"
)
var animals = []string{"lynx", "dog", "cat", "monkey", "dog", "fox", "tiger", "lion"}
func main() {
@ivancorrales
ivancorrales / sample.go
Created December 15, 2018 08:36
stream.Sort / stream.Reverse
package main
import (
"fmt"
"github.com/wesovilabs/koazee"
"strings"
)
var animals = []string{"lynx", "dog", "cat", "monkey", "fox", "tiger", "lion"}
@ivancorrales
ivancorrales / sample.go
Last active December 15, 2018 08:15
stream.Add / stream.Drop / stream.DeleteAt / stream.Pop
package main
import (
"fmt"
"github.com/wesovilabs/koazee"
)
var numbers = []int{1, 5, 4, 3, 2, 7, 1, 8, 2, 3}
func main() {
@ivancorrales
ivancorrales / sample.go
Last active December 15, 2018 07:55
Koazee operations: At, First and Last
package main
import (
"fmt"
"github.com/wesovilabs/koazee"
)
var numbers = []int{1, 5, 4, 3, 2, 7, 1, 8, 2, 3}
func main() {
@ivancorrales
ivancorrales / performance.go
Created November 26, 2018 06:28
Benchmark test to demonstrate loc doesn't means performance
package loc
import (
"os"
"testing"
)
const maxElements = 1000
var elements = make([]int, maxElements)
@ivancorrales
ivancorrales / performance.go
Created November 26, 2018 06:28
Benchmark test to demonstrate loc doesn't means performance
package loc
import (
"os"
"testing"
)
const maxElements = 1000
var elements = make([]int, maxElements)
version: '3'
services:
mollydb:
image: wesovilabs/mollydb:0.0.1-alpha
volumes:
- "./mollydb/data:/var/mollydb/storage/ms"
ports:
- 7000:9090
@ivancorrales
ivancorrales / setup.sh
Last active April 2, 2018 01:34
Setting up environment for mollydb sample
git clone https://github.com/wesovilabs/mollydb.git
cd samples/001-microservices_configuration
docker-compose docker-compose.yml up -d
from utils import Bullying
import csv
NUM_RECORDS = 10000000
INPUT_DATA_FILE_PATH= './../data/input_data.csv'
def generate_array(iterations = NUM_RECORDS):
array = [None] * NUM_RECORDS
for r in range(iterations):