This file contains 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
import base64 | |
import json | |
import requests | |
URL = 'https://api.imgur.com/3/image' | |
AUTHORIZATION = 'Client-ID c9a6efb3d7932fd' | |
with open("download.png", 'rb') as f: |
This file contains 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
#Downloads and installs latest version of Anaconda3 | |
latestVer=$(curl 'https://repo.anaconda.com/archive/' | grep -oP 'href="Anaconda3-\K[0-9]+\.[0-9]+' | sort -t. -rn -k1,1 -k2,2 -k3,3 | head -1) | |
curl "https://repo.anaconda.com/archive/Anaconda3-${latestVer}-Linux-x86_64.sh" > /tmp/install_anaconda.sh | |
bash /tmp/install_anaconda.sh -b -p |
This file contains 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 PIL import Image | |
from glob import glob | |
import shutil | |
import random | |
import os | |
files = glob("500x500/*/*") | |
outputPath = "output3/" | |
newSize = [400, 400] |
This file contains 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 glob import glob | |
import shutil | |
import random | |
import os | |
classes = glob("500x500/*") | |
outputPath = "output/" | |
test_percentage = 0.1 | |
This file contains 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
g++ main.cpp -o output `pkg-config --cflags --libs opencv` |
This file contains 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
pi@raspberrypi:~/cellular_automata $ make | |
g++ main.c -O0 -o main -std=c++11 | |
./main | |
Regra: 30 | |
Iteracoes: 100000 | |
Celulas: 64 | |
Total: 1128036912ns | |
pi@raspberrypi:~/cellular_automata $ make | |
g++ main.c -O0 -o main -std=c++11 | |
./main |
This file contains 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
#include<stdio.h> | |
#include<stdlib.h> | |
#include <sys/time.h> | |
#include <math.h> | |
#include<time.h> | |
#include <chrono> | |
#include <iostream> | |
#define BOOL(x) (!(!(x))) |
This file contains 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
//===================================================================== | |
// BIBLIOTECAS | |
//===================================================================== | |
#include <iostream> | |
#include <fstream> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <vector> |
This file contains 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
//Add the following imports to the activity code | |
import com.google.android.gms.ads.AdListener; | |
import com.google.android.gms.ads.AdRequest; | |
import com.google.android.gms.ads.AdView; |
This file contains 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
fixed = "" | |
with open('trec10.res') as f: | |
previous = "" | |
for line in f: | |
print(line) | |
if line.split()[2] == previous: | |
continue | |
previous = line.split("\t")[2] | |
fixed += line |
NewerOlder