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 re | |
import os | |
FOLDER = 'files' | |
def get_paths(): | |
return [os.path.join(FOLDER, f) for f in os.listdir(FOLDER)] |
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 sum_hours(hours): | |
total_secs = 0 | |
for tm in hours: | |
time_parts = [int(s) for s in tm.split(':')] | |
total_secs += (time_parts[0] * 60 + time_parts[1]) * 60 | |
total_secs, _ = divmod(total_secs, 60) | |
hr, min = divmod(total_secs, 60) | |
return "%d:%02d" % (hr, min) |
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 datetime import timedelta | |
from time import strftime, gmtime | |
import re | |
import os | |
FOLDER = 'files' | |
def get_paths(): |
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 React, { createRef, useEffect, useState } | |
from 'react'; | |
import PropTypes from 'prop-types'; | |
import { FormControl, InputLabel, FormHelperText, Input } | |
from '@material-ui/core'; | |
import MaskedInput from 'react-text-mask'; | |
import { makeStyles } from '@material-ui/core/styles'; | |
const useStyles = makeStyles(theme => ({ | |
container: { |
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 React, { createRef, useEffect, useState } | |
from 'react'; | |
import { FormControl, InputLabel, FormHelperText, Input } | |
from '@material-ui/core'; | |
import { makeStyles } from '@material-ui/core/styles'; | |
const useStyles = makeStyles(theme => ({ | |
container: { | |
display: 'flex', | |
flexWrap: 'wrap', |
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 React, { createRef, useEffect, useState } from 'react'; | |
import { TextField } from '@material-ui/core'; | |
function App() { | |
const [value, setValue] = useState(''); | |
const handleChange = event => { | |
setValue(event.target.value); | |
}; | |
return ( | |
<div> |
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
qtd = input('Qtd de tentativas: ') | |
palavras = [] | |
for i in range(int(qtd)): | |
palavra = input('Digite a palavra: ') | |
tempo = "{0:.2f}".format(len(palavra)/100) | |
palavras.append( | |
dict(palavra=palavra, tempo=tempo) | |
) |
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
APA Caverna do Maroaga | |
APA Margem Direita do Rio Negro - Setor Paduari/Solimões | |
APA Guajuma | |
APA Margem Esquerda do Rio Negro - Setor Aturiá/Apuauzinho | |
APA Margem Esquerda do Rio Negro-Setor Tarumã-Açu/Tarumã Mirim | |
APA Nhamundá | |
FLOREST Canutama | |
FLOREST de Apuí - Mosaico Apuí | |
FLOREST de Aripuanã - Mosaico Apuí | |
FLOREST de Manicoré - Mosaico Apuí |
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
server { | |
listen 8003; | |
server_name ip_do_servidor; | |
location = /favicon.ico { | |
access_log off; log_not_found off; | |
} | |
location /static/ { | |
root /home/revista_virtual/revista_virtual; | |
} | |
location /media/ { |
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
[Unit] | |
Description=gunicorn revista_virtual daemon | |
After=network.target | |
[Service] | |
User=revista_virtual | |
Group=www-data | |
WorkingDirectory=/home/revista_virtual/revista_virtual | |
ExecStart=/home/revista_virtual/revista_virtual/venv/bin/gunicorn --workers 3 --bind unix:/home/revista_virtual/revista_virtual/revista_virtual.sock revista_virtual.wsgi:application |
NewerOlder