Skip to content

Instantly share code, notes, and snippets.

View brun0xff's full-sized avatar

brunoathaíde brun0xff

View GitHub Profile
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.edu.ufam.brun0xff</groupId>
<artifactId>projeto1</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>projeto1</name>
/**
* Bespin: reference implementations of "big data" algorithms
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
//aloca.h
#ifndef ALOCA_H
#define ALOCA_H
#define BESTFIT 0
#define FIRSTFIT 1
#define NEXTFIT 2
//TAMANHO MÁXIMO DE ALOCACAO: 65535 (maior unsigned short)
#include <iostream>
#include "aloca.h"
using namespace std;
meualoc::meualoc(int tamanhoMemoria,int politicaMem)
{
memoria = (char *) malloc(sizeof(char) * tamanhoMemoria);
this->politicaMem = politicaMem;
#include <iostream>
using namespace std;
void setUnsignedShortIntToChar(char * mm, unsigned short n)
{
/*
Pega 8 bits menos significativos de n e coloca nos menos
significativos de low8bits preenchendo os mais significativos
de low8bits com 0000 0000
//aloca.h
#ifndef ALOCA_H
#define ALOCA_H
#define FIRSTFIT 0
#define BESTFIT 1
#define NEXTFIT 2
#define MAGIC_NUMBER 61616
#include <iostream>
#include "aloca.h"
using namespace std;
/*
Anda na lista de livres e checa se o bloco à esquerda do ~ponteiro ta livre,
retorna ponteiro pro node na lista de livres caso esteja livre, e retorna
NULL caso contrario
#!/usr/bin/python
# -*- coding: utf-8 -*-
code = """
\""" this is a comment \"""
#comment one
\""" this is another fucking comment \"""
a = 4
b = 2
\""" now im gonna to test my code \"""
#!/usr/bin/python
# -*- coding: utf-8 -*-
from nltk.tag import StanfordPOSTagger
from nltk.tokenize import word_tokenize
model = '/<PATH>/stanford-postagger-full-2016-10-31/models/english-bidirectional-distsim.tagger'
jar = '/<PATH>/stanford-postagger-full-2016-10-31/stanford-postagger.jar'
from mako.template import Template
from mako.runtime import Context
tpl_xml = '''
<doc>
% for i in data:
<p>${i}</p>
% endfor
</doc>
'''