Skip to content

Instantly share code, notes, and snippets.

View sheilagomes's full-sized avatar

Sheila Gomes sheilagomes

  • VTEX
  • Joinville, SC, Brazil
View GitHub Profile
# Script que recebe um arquivo com números separados por espaços
# O script soma os números e cria um arquivo de saída com os resultados
saida =[]
with open('entrada.txt','r') as arquivoEntrada, open('saida.txt','w') as arquivoSaida:
for linha in arquivoEntrada:
numeros = str(linha).split(' ')
resultado = int(numeros[0])+int(numeros[1])
saida.append(resultado)
arquivoSaida.write(f'{str(resultado)}\n')
string1 = input("Digite uma letra: ")
string2 = input("Digite uma palavra: ")
contagem = 0
for letra in string2:
if letra == string1:
contagem +=1
print(string1,string2,contagem)
@sheilagomes
sheilagomes / index.html
Created December 19, 2020 01:33
Insert dashes
<html>
<body>
<h3>Type a word or series of words to see them hyphenated separately:</h3>
<p>(press ENTER to see the result)</p>
<input type="text" id="words" name="words">
<p class="teste"></p>
<script src="index.js"></script>
</body>
</html>
@sheilagomes
sheilagomes / TMX2Corpus.py
Created January 16, 2018 16:05 — forked from amake/TMX2Corpus.py
A script to convert TMXs into parallel corpuses for machine translation (e.g. Moses) training
'''
Created on Dec 19, 2013
A script to convert TMXs into parallel corpuses for machine
translation (e.g. Moses: http://www.statmt.org/moses/) training.
Pass in either paths to TMX files, or directories containing TMX files.
The script will recursively traverse directories and process all TMXs.
To perform tokenization or to filter the output, use the convert() method
@sheilagomes
sheilagomes / raspa_cnj.py
Created December 9, 2017 18:59 — forked from fmasanori/raspa_cnj.py
Raspa os mandados relativos aos presos de uma UF
#A ideia inicial partiu deste código https://gist.github.com/duarteguilherme/25a80afd502035c55b45ed85dc8977e0
import requests
import json
import csv
headers = {
'Host': 'www.cnj.jus.br',
'Connection': 'keep-alive',
'Content-Length': '213',
'Accept': 'application/json, text/plain, */*',
'Origin': 'http://www.cnj.jus.br',