Framework | Link | Star | Fork | Templating |
---|---|---|---|---|
Python: Flask, | https://github.com/mitsuhiko/flask | 6887 | 1422 | jinja |
Ruby: Sinatra, | https://github.com/sinatra/sinatra | 5097 | 792 |
import cv2 | |
import cv2.cv as cv | |
def detect(img, cascade_fn='haarcascades/haarcascade_frontalface_alt.xml', | |
scaleFactor=1.3, minNeighbors=4, minSize=(20, 20), | |
flags=cv.CV_HAAR_SCALE_IMAGE): | |
cascade = cv2.CascadeClassifier(cascade_fn) | |
rects = cascade.detectMultiScale(img, scaleFactor=scaleFactor, |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>WebSocket Client</title> | |
<style> | |
#output { | |
border: solid 1px #000; | |
} | |
</style> | |
</head> |
This gist is the source code for http://gary.beagledreams.com/page/go-websocket-chat.html
Copyright (c) 2013 Gary Burd
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
This gist is the source code for http://gary.beagledreams.com/page/go-websocket-chat.html
Copyright (c) 2013 Gary Burd
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
document.pdf: table.tex | |
pdflatex document.tex | |
table.tex: | |
python table_generator.py | |
Something along these lines should do - | |
``` | |
env.Command ('document.tex', '', 'python table_generator.py') |
//Decodes Base64 | |
#include <openssl/bio.h> | |
#include <openssl/evp.h> | |
#include <string.h> | |
#include <stdio.h> | |
int calcDecodeLength(const char* b64input) { //Calculates the length of a decoded base64 string | |
int len = strlen(b64input); | |
int padding = 0; |
-spec get_timestamp() -> integer(). | |
get_timestamp() -> | |
{Mega, Sec, Micro} = os:timestamp(), | |
(Mega*1000000 + Sec)*1000 + round(Micro/1000). |
-module(pr_ring). | |
-compile(export_all). | |
start(M, N, Message) -> | |
io:format("Starting ~p processes and sending ~p ~p~n", [N,M,Message]), | |
ProcessList = spawn_ring(M, N, []), | |
io:format("Spawned ~p~n", [ProcessList]), | |
hd(ProcessList) ! { Message, ProcessList }. |
-module(ring). | |
-export([start/3, loop/0]). | |
%%% | |
%%% An implementation of an Erlang process ring. This is probably the | |
%%% Erlang equivalent of breaking your first board in Karate class. | |
%%% | |
start(NumMsgs, NumProcs, Msg) -> | |
UnlinkedRing = create_process([], NumProcs), |