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
def createBook(title,author,year): | |
outFile = open('database.txt', 'wt') | |
outFile.write("[book]\n") | |
outFile.write("title: " + title + "\n") | |
outFile.write("author: " + author + "\n") | |
outFile.write("year: " + year + "\n") | |
outFile.close() | |
print("Welcome to Shellf!") | |
print("Answer the questions to add your book do the database.") |
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
#!/usr/bin/python | |
import os # To check if database.txt exists | |
import argparse # Happily handles arguments and options | |
# My lovely arguments (working on them) | |
parser = argparse.ArgumentParser() | |
parser.add_argument("-a", "--author", help="the author of the book", action="store", required=True) | |
parser.add_argument("-t", "--title", help="the title of the book", action="store", required=True) | |
parser.add_argument("-y", "--year", help="the year the book was published", action="store", required=True) | |
parser.add_argument("-p", "--publisher", help="the company that published the book", action="store", required=True) |
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
#!/bin/bash | |
TESTA=$(grep 'EQ_HAS_HYPO' $1) | |
if [ '$TESTA' == 'EQ_HAS_HYPO' ] ; then | |
ALIGN='EQ_HAS_HYPO' | |
else | |
ALIGN='EQ_SYNONYM' | |
fi | |
CHAVE=$(grep 'Chave' $1 | awk -F" " '{print $2}') |
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
def is_prime(n): | |
count = 2 | |
if n < count: | |
return False | |
else: | |
while count < n: | |
if n % count == 0: | |
return False | |
else: | |
count += 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
#!/bin/bash | |
IP=$(curl canihazip.com/s/ 2> /dev/null) | |
IP_FILE="/tmp/ip.txt " | |
if [ ! -f $IP_FILE ] | |
then | |
# If $IP_FILE doesn't exist, create one and mail me. | |
echo $IP > $IP_FILE | |
echo -e "A new /tmp/ip.txt file was created @ cookie.\n\ |
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
// Outputs the uppercase initials of a name | |
#include <stdio.h> | |
#include <cs50.h> | |
#include <string.h> | |
#include <ctype.h> | |
#define FIRSTLETTER 0 | |
int main(void) | |
{ | |
// Get user input |
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
/** | |
* caesar.c | |
* | |
* Rafael Beraldo | |
* rberaldo@cabaladada.org | |
* | |
* Encrypts text with the Caesar cipher | |
*/ | |
#include <stdio.h> |
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
/** | |
* vigenere.c | |
* | |
* Rafael Beraldo | |
* rberaldo@cabaladada.org | |
* | |
* Encrypts text with the Vigenère cipher | |
*/ | |
#include <stdio.h> |
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
! ------------------------------------------------------------------------------ | |
! ROFI Color theme | |
! ------------------------------------------------------------------------------ | |
rofi.color-enabled: true | |
rofi.color-window: #2f1e2e, #a39e9b, #815ba4 | |
rofi.color-normal: #2f1e2e, #a39e9b, #41323f, #e96ba8, #ffffff | |
rofi.color-active: #2f1e2e, #a39e9b, #41323f, #e96ba8, #66c6ff | |
rofi.color-urgent: #2f1e2e, #a39e9b, #41323f, #e96ba8, #890661 |
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
\documentclass{article} | |
\usepackage{enumerate} | |
\begin{document} | |
\newcounter{meu-contador} % criamos um novo contador | |
\begin{enumerate} | |
\item um | |
\item dois | |
\item três |
OlderNewer