achicandolo un poquito mas #2

Merged
merged 1 commit into from Jun 22, 2012

Conversation

Projects
None yet
2 participants
Contributor

dimartiro commented Jun 22, 2012

recien me di cuenta que se podia achicar otro poquito

RodrigoEspinosa added a commit that referenced this pull request Jun 22, 2012

@RodrigoEspinosa RodrigoEspinosa merged commit 1219c0f into RodrigoEspinosa:master Jun 22, 2012

Owner

RodrigoEspinosa commented Jun 22, 2012

Impresionante Python che

Contributor

dimartiro commented Jun 22, 2012

se.. es mi lenguaje favorito :P siempre intengo hacer mucho con poco

Owner

RodrigoEspinosa commented Jun 22, 2012

Excelentísimo

Contributor

dimartiro commented Jun 22, 2012

y se podria escribir menos inclusive, pero no estoy seguro si funciona en versiones anteriores a 3.2, que es la que mas uso

Owner

RodrigoEspinosa commented Jun 22, 2012

Menos todavía??

Contributor

dimartiro commented Jun 22, 2012

si.. el line que se usa en el for, se puede modificar dentro de el, porque python genera una copia y lo aisla

Owner

RodrigoEspinosa commented Jun 22, 2012

Copadísimo! Che te hablé por Skype

Contributor

dimartiro commented Jun 22, 2012

from random import randint

openFile = "calle.bmp"
outfile = "glitched.bmp"

with open(outfile,"wb") as out:
    for line in open(openFile, "rb"):
        rand = randint(1,10000)
        if (rand in [2,4,6,8]):
            line *= rand
        out.write(line)



algo asi

Contributor

dimartiro commented Jun 22, 2012

no estoy en skype.. estoy en clase

Owner

RodrigoEspinosa commented Jun 22, 2012

Que copada clase jaja

Contributor

dimartiro commented Jun 22, 2012

jjajajja sii estamos medio al pedo.. programacion python

Owner

RodrigoEspinosa commented Jun 22, 2012

Re cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment