This file contains hidden or 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 Control.Monad (when) | |
import Data.Char (toLower) | |
import Data.List (transpose) | |
import System.Random (randomIO) | |
wordsPath :: FilePath | |
wordsPath = "words.txt"-- "/usr/share/dict/words" | |
data GameState = GameState | |
{ _wordToGuess :: String |
This file contains hidden or 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
num = int(input("Digite Quantas notas: ")) | |
notas = map(lambda x: int(input("Digite uma nota: ")), range(num)) | |
media = sum(notas) / num | |
print("A media e':", media) | |
This file contains hidden or 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
install_opencv: | |
sudo dnf install --best --allowerasing \ | |
cmake python-devel numpy gcc gcc-c++ \ | |
python3-devel python3-numpy \ | |
gtk2-devel libdc1394-devel libv4l-devel ffmpeg-devel \ | |
gstreamer-plugins-base-devel libpng-devel libjpeg-turbo-devel \ | |
jasper-devel openexr-devel libtiff-devel libwebp-devel \ | |
tbb-devel eigen3-devel python-sphinx texlive git | |
if [ ! -d opencv/ ]; then \ |
This file contains hidden or 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
# estou com problema nessa funcao, por favor ajudem: | |
def hello_world(mensagem): | |
print(mensagem) |
This file contains hidden or 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
# gerar stream | |
cvlc screen:// :screen-fps=10 --sout '#transcode{vcodec=DIV3,vb=4000,scale=1,acodec=mp3,ab=32,channels=2}:std{access=mmsh,mux=asfh,dst=:2000}' | |
#tocar stream | |
cvlc mmsh://localhost:2000 |
This file contains hidden or 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
define [1 x i32] @topLevel([3 x i32] %inputArray, [1 x i32] %returnArray) { | |
bb0: | |
%node_1 = extractvalue [3 x i32] %inputArray, 0 | |
%node_2 = extractvalue [3 x i32] %inputArray, 1 | |
%node_3 = extractvalue [3 x i32] %inputArray, 2 | |
%node_8 = and i32 %node_1, %node_2 | |
%0 = xor i32 %node_8, 1 | |
%node_7 = and i32 %node_3, %0 | |
%1 = xor i32 %node_3, 1 | |
%node_6 = and i32 %1, %node_8 |
This file contains hidden or 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
-- Função fibonacci memoizada usando: | |
-- * recursão, | |
-- * funções de alta ordem | |
-- * avaliação preguiçosa | |
-- * listas infinitas | |
fibs = 1:1:(zipWith (+) fibs (tail fibs)) | |
-- imprimindo apenas os primeiros 10 valores da sequencia | |
main = print $ take 10 fibs |
This file contains hidden or 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
#!/bin/bash | |
import os,sqlite3 | |
con=sqlite3.connect('dic.db') | |
cur=con.cursor() | |
cur.execute(''' | |
create table if not exists Palavras( |
This file contains hidden or 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 <iostream> | |
#include <sstream> | |
#include <vector> | |
#include <deque> | |
using namespace std; | |
bool is_digit(const char c) { | |
return (c >= '0' && c <='9'); | |
} |
This file contains hidden or 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 <cstdio> | |
#include <algorithm> | |
using namespace std; | |
int main() { | |
int n; | |
scanf("%d", &n); | |
int xs[n]; | |
int p_tam = 0; |
OlderNewer