Skip to content

Instantly share code, notes, and snippets.

View categulario's full-sized avatar
🚲
Always remote

Abraham Toriz Cruz categulario

🚲
Always remote
View GitHub Profile
@synapticarbors
synapticarbors / tsp-portrait2.py
Last active April 30, 2018 15:00
Traveling Salesman Portrait
'''
This script is based on the original work of Randal S. Olson (randalolson.com) for the Traveling Salesman Portrait project.
http://www.randalolson.com/2018/04/11/traveling-salesman-portrait-in-python/
Please check out the original project repository for information:
https://github.com/rhiever/Data-Analysis-and-Machine-Learning-Projects
The script was updated by Joshua L. Adelman, adapting the work of Antonio S. Chinchón described in the following blog post:
https://fronkonstin.com/2018/04/17/pencil-scribbles/
@jedisct1
jedisct1 / spectre.c
Last active January 27, 2020 04:20 — forked from ErikAugust/spectre.c
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@RicardoLara
RicardoLara / KLexer.java
Last active December 15, 2015 03:19
Motor de Karel en Java... Incompleto y con Dudas Existenciales.
package karelmovil;
import java.util.LinkedList;
import java.io.BufferedReader;
import java.io.IOException;
public class KLexer {
public final char ESTADO_ESPACIO = ' ';
public final char ESTADO_PALABRA = 'a';
public final char ESTADO_COMENTARIO = '#';
public final char ESTADO_NUMERO = '0';
@categulario
categulario / primos_una_linea.py
Created May 23, 2012 00:04
Lista de números primos del 1 al 100 en python (una sola línea)
#Lista de numeros primos entre 1 y 100 en una sola linea
c = [i for i in xrange(2,101) if (i%2!=0 or i==2) and (i%3!=0 or i==3) and (i%5!=0 or i==5) and (i%7!=0 or i==7)]
print c