Skip to content

Instantly share code, notes, and snippets.

Avatar
🤡

Cristian Lozano criloz

🤡
View GitHub Profile
View example
fn with_email(x){
x.email is r/^[\w\.\+\-]+\@[\w]+\.[a-z]{2,3}$/;
return with_email(x);
}
fn person(x){
x.name is str;
x.age is #nat number;
return person(x)
}
View gist:4fd73f02b0c0a6ef1c6da267083d1c12
fn with_email(x){
x.email is r/^[\w\.\+\-]+\@[\w]+\.[a-z]{2,3}$/;
return with_email(x);
}
fn person(x){
x.name is str;
x.age is #nat number;
return person(x)
}
View ex.js
genesis::functor functor(functor):functor;
functor morphism(morphism):morphism
genesis::morphism (functor)=> morphism{
//calculate the categories of the domain and codomain and the weight of the edge is the functor.body
return genesis::spiral_graph.add_edge(from: functor.domain->category, to: functor.codomain->category, weight: (domain)=>{
const result = functor(domain);
//decorate the result with the category of the codomain
genesis::spiral_graph.add_category(functor.codomain->category, to: result)
View replacement_data.json
[
{"to": "user@email"
"TemplateModel":{
variables...
}
}
]
View sls-preduction
sls invoke local -f cx_list_predictions -d '{"fecha": "2018-06-24 17:05:55", "id_app": "artucx", "connection_string": "dbname=ac user=postgres password=postgres host=10.43.121.2", "id_cliente": "vidasecurity", "id_prediction": "cxpred001", "id_statistic": "cxstat001", "id_training":"cxtrain001"}'
sls invoke local -f cx_prediction_state -d '{"fecha": "2018-06-24 17:05:55", "id_app": "artucx", "connection_string": "dbname=ac user=postgres password=postgres host=10.43.121.2", "id_cliente": "vidasecurity", "id_prediction": "cxpred001", "id_statistic": "cxstat001"}'
sls invoke local -f cx_prediction_results -d '{"fecha": "2018-06-24 17:05:55", "id_app": "artucx", "connection_string": "dbname=ac user=postgres password=postgres host=10.43.121.2", "id_cliente": "vidasecurity", "id_prediction": "cxpred001", "id_statistic": "cxstat001"}'
View futures_unordered.rs
extern crate futures;
extern crate hyper;
extern crate tokio_core;
#[macro_use]
extern crate serde_derive;
extern crate serde;
extern crate serde_json;
extern crate hyper_tls;
extern crate time;
use time::PreciseTime;
View wroking.rs
extern crate futures;
extern crate hyper;
extern crate tokio_core;
#[macro_use]
extern crate serde_derive;
extern crate serde;
extern crate serde_json;
extern crate hyper_tls;
extern crate time;
use time::PreciseTime;
View Cargo.toml
[dependencies]
futures="*"
hyper="*"
tokio-core="*"
serde_derive = "*"
serde_json = "*"
serde = "*"
hyper-tls="*"
time="*"
@criloz
criloz / gist:4c908204e215772188c8c5ab356a823d
Created Oct 11, 2017 — forked from debasishg/gist:8172796
A collection of links for streaming algorithms and data structures
View gist:4c908204e215772188c8c5ab356a823d
  1. General Background and Overview