Skip to content

Instantly share code, notes, and snippets.


iury IuryAlves

View GitHub Profile
#coding: utf-8
import json
with open('urls.json', 'r') as urls:
dic = json.load(urls, encoding='utf-8')
for item in dic['responseData']:
sub_item = dic['responseData']['results']
for s in sub_item:
# coding: utf-8
Zorak, Iury, Lucas Rogério, Willian, Lucas Campos, Bruno Henrique, Elias, Rafael, Bustalover, Jhonny, Plinio
import unittest
View mpi_example.c
#include <stdio.h>
#include <stdlib.h>
#include <mpi.h>
void print(int vector[], int process, int size){
// imprime todos os numeros no vetor
int i;
printf("processo: %d \n", process);
for(i = 0; i < size ; i++){
View gist:82ad68f804fbb0daa015
sudo apt-get install postfix
sudo apt-get install mailutils
sudo nano /etc/postfix/
sudo service postfix restart
mail -s "subject" < mensagem.txt
# See /usr/share/postfix/ for a commented, more complete version
View pre-commit
#!/usr/bin/env python
# Original at
import re
import subprocess
import sys
modified = re.compile('^(?:M|A)(\s+)(?P<name>.*)')
View dsadsa
# include <stdio.h>
# include <stdlib.h>
# include <ctype.h>
# include <string.h>
# include <stdbool.h>
# include <mpi.h>
# define MAX 100001
int VectorSort[MAX];
int size = 0;
View executar_comandos
executar paralelo: mpicc -pg mergesort_paralelo.c -o mergesortparalelo && mpirun.openmpi -np 8 ./mergesortparalelo
executar sequencial: gcc -pg mergesort_sequencial.c -o mergesortsequencial && ./mergesortsequencial
pegar tempo paralelo: gprof -b mergesortparalelo gmon.out | more
pegar tempo sequencial: gprof -b mergesortsequencial gmon.out | more
View buffer_vinculado.c
# include <stdio.h>
#define BUFFER_SIZE 5
struct _buffer{
int count; // numero de itens no buffer
int in; // próxima posiçãolivre
int out; // proxima posição cheia
int itens[BUFFER_SIZE];
# coding: utf-8
import unittest
from scheduling_algorithms import FCFS, SJF, SRTF, RoundRobin, FilaMultiNivelComFeedBack
from structures import Process, PCB
class ScheduleAlgorithm(unittest.TestCase):
def test_fcfs(self):
p1 = Process(PCB(24 ,0 ,1))