This file contains hidden or 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
| def hello(): | |
| print "Hello from Github gist!" | |
| if __name__ == '__main__': | |
| hello() |
This file contains hidden or 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
| from datetime import datetime | |
| class LRUCacheItem(object): | |
| """Data structure of items stored in cache""" | |
| def __init__(self, key, item): | |
| self.key = key | |
| self.item = item | |
| self.timestamp = datetime.now() |
This file contains hidden or 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
| class Node : | |
| def __init__( self, data ) : | |
| self.data = data | |
| self.next = None | |
| self.prev = None | |
| class LinkedList : | |
| def __init__( self ) : | |
| self.head = None |
This file contains hidden or 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
| package minhasarvores; | |
| public class ArvoreBinaria { | |
| Celula root; | |
| public ArvoreBinaria() { | |
| this.root = null; | |
| } | |
| public void insert(int value) { |
This file contains hidden or 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
| package fila; | |
| class ArrayFila implements Fila{ | |
| private static final int MAX = 100; | |
| private Object fila[]; // Fila | |
| private int size; // Numero de elemntos | |
| private int first; // Primeiro da fila | |
| private int last; // Ultimo da fila | |
| private int cap; // Capacidade | |
This file contains hidden or 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
| package listaligada; | |
| public class ExemploLista { | |
| public static void main(String args[]){ | |
| ListaLigada l = new ListaLigada(); | |
| for (int i=8; i>0; i--) { | |
| l.addFirst(i); | |
| } | |
| l.add(555, 5); |
This file contains hidden or 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
| public class Pilha { | |
| public Object[] pilha; | |
| public int posicaoPilha; | |
| public Pilha(){ | |
| // Definição da estrtutura de dados | |
| this.posicaoPilha = -1; | |
| this.pilha = new Object[100]; | |
| } |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "math/rand" | |
| "time" | |
| ) | |
| var first = [31]string{ | |
| "Asog", |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| func Sqrt(x float64) float64 { | |
| z := 1.0 | |
| var last float64 | |
| for i := 1; i < 10; i++ { |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta name="keywords" content="remark,remarkjs,markdown,slideshow,presentation" /> | |
| <meta name="description" content="A simple, in-browser, markdown-driven slideshow tool." /> | |
| <title>Remark</title> | |
| <style> | |
| @import url(https://fonts.googleapis.com/css?family=Droid+Serif); | |
| @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); |