An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
#include <stdio.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
#include <unistd.h> | |
int main (int argc, char *argv[]) | |
{ | |
int opcao; // Opção passada pelo usuário ao programa. | |
int indice; // Usado para pegar argumentos que não são opções | |
// Nem argumentos usados em opções. |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
hello: hello.cpp | |
g++ -std=c++0x -o hello hello.cpp -lOpenCL |
# **************** READ THIS FIRST ****************** | |
# | |
# This is not a script for you to run. I repeat, do not download and run this! | |
# | |
# This is only a guide to show the required steps for successful UEFI + GRUB2 installation | |
# Many of the choices are examples or assumptions; don't blindly type shit into your machine | |
# until/unless you at least read the comments around each command | |
# | |
# These steps assume you've booted in UEFI mode by preparing your USB stick per these instructions: | |
# https://wiki.archlinux.org/index.php/UEFI#Archiso |
A palavra stream significa corrente. Em geral, qualquer conexão de rede é uma stream, e existem vários tipos de protocolos para streams. Esses protocolos definem como os dados fluem na corrente.
No PHP, vários protocolos são suportados de forma transparente:
<?php
#!/usr/bin/env zsh | |
# This script prints a bell character when a command finishes | |
# if it has been running for longer than $zbell_duration seconds. | |
# If there are programs that you know run long that you don't | |
# want to bell after, then add them to $zbell_ignore. | |
# | |
# This script uses only zsh builtins so its fast, there's no needless | |
# forking, and its only dependency is zsh and its standard modules | |
# |
class DeBruijnGraph: | |
""" A de Bruijn multigraph built from a collection of strings. | |
User supplies strings and k-mer length k. Nodes of the de | |
Bruijn graph are k-1-mers and edges correspond to the k-mer | |
that joins a left k-1-mer to a right k-1-mer. """ | |
@staticmethod | |
def chop(st, k): | |
""" Chop a string up into k mers of given length """ | |
for i in xrange(0, len(st)-(k-1)): |