Skip to content

Instantly share code, notes, and snippets.

View Wesitos's full-sized avatar

Pedro Palacios Avila Wesitos

View GitHub Profile
;;Crea una hoja del arbol
(defn hoja [val]
{:v val :l nil :r nil}
)
;;Calcula la profundidad de un arbol
(defn depth [arbol]
(if (nil? arbol)
0
(let [left (:l arbol)
right (:r arbol)]
from __future__ import division #no probs with division
#from math import exp
#A partir de ahora importaremos las funciones matematicas desde numpy
from numpy import exp
#Asi, la vida es bella
#e:epsilon, v:nu, d: delta, a: alpha
def QF(e,v,pd,d):
reset
#constantes
e = 1e-6
v = 0.98
pd = 4e-8
d = 0.92
#Mierda
f(x,y)= (1 - (1- exp(-2*y**2/x)+pd)*(1-exp(-2*((1-exp(-2*y**2/x))/(1-exp(-2*y**2/x)+pd)*(1-d)*(2*v-1))**2)))**x - e
#Valor de prueba
reset
#constantes
e = 1e-6
v = 0.98
pd = 4e-8
d = 0.92
#Mierda
f(x,y)= (1 - (1- exp(-2*y**2/x)+pd)*(1-exp(-2*((1-exp(-2*y**2/x))/(1-exp(-2*y**2/x)+pd)*(1-d)*(2*v-1))**2)))**x - e
#Valor de prueba
{
"postulacion":{
"cargo":"ALCALDE PROVINCIAL",
"lugar":"LIMA - LIMA - ",
"designacion":"NO OBLIGATORIO PARA ORGANIZACION POLITICA LOCAL PROVINCIAL O DISTRITAL"
},
"datosPersonales":{
"dni":"08051943",
"apellidoPaterno":"VILLARAN",
"apellidoMaterno":"DE LA PUENTE",
@Wesitos
Wesitos / unwrap.py
Last active August 29, 2015 14:05
Unwraps all selected objects in blender
import bpy
obj_list = bpy.context.selected_objects
for obj in obj_list:
bpy.ops.object.mode_set(mode='OBJECT')
bpy.context.scene.objects.active = obj
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.uv.unwrap(method='ANGLE_BASED', margin=0.0)
bpy.ops.object.mode_set(mode='OBJECT')
@Wesitos
Wesitos / code.tex
Created September 26, 2014 07:04
Incrustar codigo en un archivo LaTeX usando listings
\usepackage{listings}
\usepackage{color}
\definecolor{gray97}{gray}{.97}
\definecolor{gray75}{gray}{.75}
\definecolor{gray45}{gray}{.45}
\lstset{
frame=Ltb,
framerule=0pt,
aboveskip=0.5cm,
var modelo = [
{
nombre: "Mesa Comedor",
path1: "/obj/mesa-comedor.obj",
loaded1: false,
path2: null,
loaded2: false,
loaded: false,
},
#include<stdio.h>
long long ocurrencias(long long n, char cif, long long suma);
int main()
{
char cif;
long long num;
do
[
{ "url": "http://qhapaq-nan.org/chemin-rural-a-shaullo-chico.html",
"text": "Camino Rural en Chico Shaullo",
"lat":-7.173431,
"lon":-78.434569,
},
{
"url": "http://qhapaq-nan.org/chemin-supplante-par-la-route-au-cerro-arenas.html",
"text": "Sendero suplantado por carretera Cerro Arenas",
"lat":-7.181667,