Skip to content

Instantly share code, notes, and snippets.

Marco André Mendes marrcandre

View GitHub Profile
View For e listas
/usr/bin/python3.6 /opt/pycharm-2019.1.1/helpers/pydev/pydevconsole.py --mode=client --port=33969
import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['/home/marco/Dropbox/aulas/2019/2019-1/programação1/lista exercicios com teste'])
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
Type "copyright", "credits" or "license" for more information.
IPython 5.5.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
View rsa.py
import random
def euclides(e, phi):
'''documentação da função'''
r, r1 = e, phi
d, v = 1, 0
u1, v1 = 0, 1
while r1 != 0:
View combina_trajetorias.py
import unittest
import itertools
class CombinaTrajetoriasTests(unittest.TestCase):
def test_combina_3_trajetorias(self):
trajetorias = (801, 802, 803)
trajetorias_combinadas = {801:[(801,802),(801,803)],
802:[(802,801),(802,803)],
803:[(803,801),(803,802)]
}
View pontos.txt
862,23.793360,38.021434,(2002, 9, 14),(9, 19, 33)
862,23.790908,38.023185,(2002, 9, 14),(9, 20, 3)
862,23.789749,38.024204,(2002, 9, 14),(9, 20, 33)
862,23.789749,38.026004,(2002, 9, 14),(9, 21, 3)
862,23.791630,38.029113,(2002, 9, 14),(9, 21, 33)
862,23.936230,37.960323,(2002, 9, 16),(10, 7, 36)
862,23.947121,37.959564,(2002, 9, 16),(10, 9, 6)
862,23.949181,37.959125,(2002, 9, 16),(10, 9, 36)
862,23.952711,37.958743,(2002, 9, 16),(10, 10, 6)
862,23.957340,37.957244,(2002, 9, 16),(10, 10, 36)
@marrcandre
marrcandre / atualiza-12.04.sh
Created Aug 13, 2012
Roteiro de pós-instalação do Ubuntu 12.04
View atualiza-12.04.sh
#!/bin/bash
#Antes de reinstalar:
sudo cp ~/.bashrc ~/.bash_history /etc/apt/sources.list /dados/dados/Dropbox/docpriv/backupUbuntu/
##Repositórios
#Backup do sources.list antigo
sudo cp /etc/apt/sources.list /etc/apt/sources.list.original
#Abre o arquivo sources.list para edição
sudo gedit /etc/apt/sources.list
You can’t perform that action at this time.