Para estudar para a prova:
- Singleton
- Facade
- Observer
- Strategy
- Template Method
- Adapter
- Composite
import argparse | |
import obd | |
# Configure cli parser | |
parser = argparse.ArgumentParser() | |
parser.add_argument('port', help='enter the OBD port to retrieve data') | |
parser.add_argument( | |
'-d', | |
'--debug', |
wget https://www.apachefriends.org/xampp-files/7.1.1/xampp-linux-x64-7.1.1-0-installer.run -O xampp-installer.run | |
chmod +x xampp-installer.run | |
sudo ./xampp-installer.run | |
rm xampp-installer.run |
from random import random | |
from pprint import pprint | |
def round_robin_gen(teams, away_home=False): | |
if len(teams) % 2 != 0: | |
teams.append(None) | |
matches = [] | |
for it in range(len(teams) - 1): |
sudo pacman -Syyu | |
sudo pacman -Sc --noconfirm | |
sudo pacman -R $(pacman -Qdtq) |
#include <iostream> | |
#include <fstream> | |
#include <sstream> | |
#include <vector> | |
#include <map> | |
struct Proc { | |
int pid; | |
int ppid; | |
double memory; |
#include <iostream> | |
using namespace std; | |
class Base { | |
public: | |
Base() {} | |
virtual ~Base() {}; | |
virtual ostream &print(ostream &o) const = 0; |
#include <iostream> | |
using namespace std; | |
class Base { | |
public: | |
Base() {} | |
virtual ~Base() = 0; | |
ostream& print(ostream &o) const { | |
o << "id: " << id << "\n"; |
#include <thread> | |
#include <cstdio> | |
#include <chrono> | |
#include <vector> | |
#include <sched.h> | |
#include <unistd.h> | |
using namespace std; | |
#define NUMTHREADS 10 |
sudo apt-get -y update && sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev && cd /tmp && wget http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p481.tar.gz && tar -xvzf ruby-2.0.0-p481.tar.gz && cd ruby-2.0.0-p481/ && ./configure --prefix=/usr/local && make && sudo make install && gem install jekyll bundle |