Skip to content

Instantly share code, notes, and snippets.

View alessandroleite's full-sized avatar

Alessandro Leite alessandroleite

View GitHub Profile
# It must install the library PrettyTable through the command:
# sudo -H pip install PrettyTable
# (for more information, please check: https://pypi.python.org/pypi/PrettyTable)
from prettytable import PrettyTable
import os
import platform
DEFAULT_LIMIT_VALUE = 1000.0
contas = []
@alessandroleite
alessandroleite / RoundRobinDatacenterBroker.java
Last active January 5, 2018 06:25
An example of DatacenterBroker that allocates the VMs following the Round-Robin algorithm.
package org.cloudbus.cloudsim.examples;
import java.util.List;
import org.cloudbus.cloudsim.DatacenterBroker;
import org.cloudbus.cloudsim.DatacenterCharacteristics;
import org.cloudbus.cloudsim.Log;
import org.cloudbus.cloudsim.Vm;
import org.cloudbus.cloudsim.core.CloudSim;
import org.cloudbus.cloudsim.core.CloudSimTags;
@alessandroleite
alessandroleite / mcc-simulators.md
Last active October 8, 2017 21:13
MCC Simulators

Mobile Cloud Computing (MCC) Simulators

  • Green Cloud Computing - GreenCloud can be used to develop novel solutions in monitoring, resource allocation, workload scheduling as well as optimization of communication protocols and network infrastructures. It is released under the General Public License Agreement and is an extension of the well-known NS2 network simulator.
  • ns-3 - it is a discrete-event network simulator for Internet systems, targeted primarily for research and educational use. It is released under the GNU GPLv2 license, and is publicly available for research, development, and use.
  • OMNEST - OMNEST simulation software has been chosen by R&D staff, researchers and engineers worldwide to investigate scenarios and design alternatives in various wired/wireless networks, interconnection networks, queueing-based performance models and other systems. OMNEST simulations can also be embedded into your own software prod
@alessandroleite
alessandroleite / javascript-material
Created June 24, 2013 12:45
Link to sites that help learn javascript parts that are not well explained
<a href="http://bonsaiden.github.io/JavaScript-Garden/" target="">http://bonsaiden.github.io/JavaScript-Garden/</a><br />
<a href="http://stackoverflow.com/questions/111102/how-do-javascript-closures-work?rq=1" target="">http://stackoverflow.com/questions/111102/how-do-javascript-closures-work?rq=1</a><br />
<a href="http://stackoverflow.com/questions/418799/what-does-colon-do-in-javascript" target="">http://stackoverflow.com/questions/418799/what-does-colon-do-in-javascript</a><br /> <a href="http://stackoverflow.com/questions/12064104/prototype-keyword-in-javascript" target="" title="Link: http://stackoverflow.com/questions/12064104/prototype-keyword-in-javascript">http://stackoverflow.com/questions/12064104/prototype-keyword-in-javascript</a><br /> <a href="http://web.archive.org/web/20080209105120/http://blog.morrisjohns.com/javascript_closures_for_dummies" target="">http://web.archive.org/web/20080209105120/http://blog.morrisjohns.com/javascript_closures_for_dummies</a><br /> <a href="http://stackoverf
@alessandroleite
alessandroleite / Predix.md
Last active August 23, 2016 21:26
Minimal Configuration to develop for Predix on Linux

Predix Linux Config

  • Oracle Java 8
  sudo apt-add-repository ppa:webupd8team/java
  sudo apt-get update
  sudo apt-get install -y oracle-java8-installer
@alessandroleite
alessandroleite / gist:4088216
Created November 16, 2012 15:31
Leituras Recomendadas de Orientação a Objetos
  1. The Art of Readable Code - http://www.amazon.com/The-Readable-Code-Dustin Boswell/dp/0596802293/ ; Edição em Português - A Arte de Escrever Programas Legíveis - (Capítulo de Exemplo: http://goo.gl/cQSTr, sumário: http://goo.gl/o1FBD).

  2. Growing Object-Oriented Software, Guided by Tests - http://www.amazon.com/Growing-Object-Oriented-Software-Guided-Tests/dp/0321503627/ - Um ótimo livro para aprender corretamente Orientação a Objetos juntamente com a prática de testes. Este livro mais o do Meilir Pages-Jones (título abaixo, 3) são leituras obrigatórias para todo desenvolvedor O.O. Por exemplo, muitos livros e cursos de O.O só retratam como características do paradigma, encapsulamento, polimorfismo, herança e abstração e esquecem de mencionar outras, também importantes, como covariância;

  3. Fundamentals of Object-Oriented Design in UML - http://www.amazon.com/Fundamentals-Object-Oriented-Design-Meilir-Page-Jones/dp/020169946X/

  4. Clean Code: A Handbook of Agile Software Craftsmanship - http://www.amazon

@alessandroleite
alessandroleite / CircularHostList.java
Created November 14, 2012 14:16
An implementation of Round-Robin VmAllocationPolicy of CloudSim framework
package org.cloudbus.cloudsim.examples;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import org.cloudbus.cloudsim.Host;
# Latex files
*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr
@alessandroleite
alessandroleite / Husband.java
Created March 6, 2013 14:06
Example of Observer Pattern with AspectJ
package example.types;
import java.util.Arrays;
import example.pattern.Observer;
import example.pattern.Subject;
public class Husband extends Person implements Observer {
private Person wife;
@alessandroleite
alessandroleite / Hosts.java
Created January 22, 2013 20:24
Hosts.java
package org.cloudbus.cloudsim.examples;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import org.cloudbus.cloudsim.Host;