Skip to content

Instantly share code, notes, and snippets.

Avatar
🐾
Doing what I love to do!

Iván Corrales Solera ivancorrales

🐾
Doing what I love to do!
View GitHub Profile
View structure.ldif
dn: ou=People,dc=wesovilabs,dc=com
objectClass: organizationalUnit
objectClass: top
ou: People
dn: uid=ivan.corrales,ou=People,dc=wesovilabs,dc=com
objectClass: simpleSecurityObject
objectClass: organizationalPerson
objectclass: inetOrgPerson
View slapd.sh
#!/bin/sh
set -eu
status () {
echo "---> ${@}" >&2
}
echo "Running"
View eskorpion_demo_maths.exs
defmodule ExkorpionDemo.MathOperationsTest do
use Exkorpion
def sum(a,b) do
a + b
end
def subs a, b do
a - b
end
View exkorpion_demo.exs
defmodule ExkorpionSamples.MathExamplesTest do
use Exkorpion
def sum a, b do
a + b
end
def subs a, b do
a - b
end
View bullying.py
import random
from operator import itemgetter
GENRE = {
'F': 'Female',
'M': 'Male'
}
RANGE_9_11_MEN = {
View bullying_data_generator.py
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):
@ivancorrales
ivancorrales / setup.sh
Last active Apr 2, 2018
Setting up environment for mollydb sample
View setup.sh
git clone https://github.com/wesovilabs/mollydb.git
cd samples/001-microservices_configuration
docker-compose docker-compose.yml up -d
View docker-compose.yml
version: '3'
services:
mollydb:
image: wesovilabs/mollydb:0.0.1-alpha
volumes:
- "./mollydb/data:/var/mollydb/storage/ms"
ports:
- 7000:9090
@ivancorrales
ivancorrales / first-steps-with-erlang.erl
Created Jan 29, 2016
Basic example of creating a record and iterating over a list of elements.
View first-steps-with-erlang.erl
-module(poc).
-export([all/0,say_hello/1]).
-record(person,{name,genre,age}).
new_person(Name, Genre, Age) ->
#person{name=Name, genre=Genre, age=Age}.
isOlderThanAveragePeople(Age,AverageAge)->
Age>=AverageAge.
@ivancorrales
ivancorrales / performance.go
Created Nov 26, 2018
Benchmark test to demonstrate loc doesn't means performance
View performance.go
package loc
import (
"os"
"testing"
)
const maxElements = 1000
var elements = make([]int, maxElements)