This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var faker = require('faker'); | |
var fs = require('fs'); | |
var N = 3; | |
var path = "json"; | |
if (!fs.existsSync(path)){ | |
fs.mkdirSync(path); | |
} | |
faker.locale = "es"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;Constants | |
(define g 9.8) | |
;;Object Samplers | |
(define (sample-position) (uniform 1 1000)) | |
(define (sample-velocity) (uniform 1 10)) | |
(define (sample-object) | |
(list (sample-velocity) | |
(sample-velocity) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Alleles | |
(define greenColor (list "green" "R" true)) | |
(define yellowColor (list "yellow" "r" false)) | |
(define wrinkledShape (list "wrinkled" "Y" true)) | |
(define inflatedShape (list "inflated" "y" false)) | |
(define alleles (list greenColor yellowColor wrinkledShape inflatedShape)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import tensorflow as tf | |
import edward as ed | |
from edward.models import Bernoulli, Beta, Binomial | |
#Model | |
p = Beta(1.0, 1.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
//Ejemplo para ejecutar ls | wc -l | |
int main( int argc, char *argv[], char *env[] ) | |
{ | |
pid_t child_pid; | |
int pipe_fd[2]; | |
//obtengo el número del file descriptor de stdin y de stdout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Prior and Posterior Predictive, Second Example | |
clear; | |
%% Data | |
k = zeros(4,3); | |
k(1,:) = [0 0 0]; | |
k(2,:) = [1 0 1]; | |
k(3,:) = [1 4 6]; | |
k(4,:) = [2 3 6]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unistd.h> | |
#include <sys/types.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#define N 5 | |
void pexit(char *error) { | |
perror(error); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[4] pry(main)> ActionController::Parameters.new({discount:"false"}).require(:discount) | |
=> "false" | |
[5] pry(main)> ActionController::Parameters.new({discount:false}).require(:discount) | |
ActionController::ParameterMissing: param is missing or the value is empty: discount | |