Hi
Are there any recommendations for python ide's
currently I am using idle, which seems pretty decent but am open to any
suggestions
cheers
I personally prefer the Linux interpreter. Since you're asking.
Scott
On Sun, Feb 2, 2014 at 10:43 AM, Asokan Pichai wrote:
>
>
>
> On Sun, Feb 2, 2
is it? There is no explanation as
to what it does or what I'd do with it!
--dogehouse.org is a dogecoin mining pool that allows users to pool CPU/GPU
resources to make mining cryptocurrency more efficient.
Scurvy Scott: There's nothing really special about printing stuff, so
there'
Hi guys, I'm trying to figure out why my code won't output to terminal, but
will run just fine in interpreter.
I'm using python 2.7.3 on Debian Linux/Crunchbang.
Here is my code.
import requests
from bs4 import BeautifulSoup as beautiful
import sys
def dogeScrape(username, password):
payload
Hey all.. First of all here is my code:
import requests
from bs4 import BeautifulSoup as beautiful
payload = {'username': 'X', 'password': 'XX'}
r = requests.post("http://dogehouse.org/index.php?page=login";, data=payload)
soup = beautiful(r.text)
confirmed = str(soup.findAll('span',{'cl
Hello all.
I'm trying to create a program right now that will pull a dictionary from
urban dictionary, then use that dictionary as the basis for generating
words with specified letters.
Maybe I'm not articulating that well enough..
I'm not at all sure where to start and any guidance would be hel
Hello again wonderful python tutor mailing list.
I've got I guess more of a broad question than is usually asked on
this list and perhaps some of you might find it annoying, that's fine,
if it's inappropriate feel free to say so.
I want to start work on a new python project that would visit a
spe
argv[1]
infile = sys.argv[2]
outfile = sys.argv[3]
main(mystring, infile, outfile)
Look right to you? Looks okay to me, except maybe the three ORs in the
information line, is there a more pythonic way to accomplish that
task?
Scott
On Fri, Feb 1, 2013 at 8:31 PM, Scurvy Scott wrote:
&g
> Best practice is to check if your program is being run as a script before
> doing anything. That way you can still import the module for testing or
> similar:
>
>
> def main(mystring, infile, outfile):
># do stuff here
>
>
> if __name__ == '__main__':
># Running as a script.
>import s
One last question on this topic..
I'd like to call the files and the string form the command line like
Python whatever.py STRINGTOSEARCH NEWFILE FILETOOPEN
My understanding is that it would be accomplished as such
import sys
myString = sys.argv[1]
filetoopen = sys.argv[2]
newfile = sys.argv[3]
>
> Why not just use grep ?
>
Honestly this seemed like a good excuse to write some code and learn
some stuff, secondly, it honestly just didn't dawn on me.
Also, the code y'all both showed me was exactly what I was looking for
and I'm planning on using Nicks code as a template to improve upon.
A
Hey all how're things?
I'm hoping for some guidance on a problem I'm trying to work through.
I know this has been previously covered on this list but I'm hoping it
won't bother you guys to run through it again.
My basic program I'm attempting to create is like this..
I want to read from a large,
[SNIP]
Thank you guys so much, sorry for the delayed response. It's awesome
being able to learn a thing or two from people who know so much about
their craft. I've got the code working the way I envisioned it now and
probably couldn't without y'alls help.
I'm so glad this mailing list exists, tha
>> So here I extract out of your code (untested!) a generator which produces
>> an infinite series of Fibonacci numbers, one at a time:
>>
>> def fib():
>>
>> a, b = 0, 1
>> while True:
>> yield b
>>
>> a, b = b, a+b
>>
>>
>> This is untested, I may have got it wrong.
>>
>>
On Tue, Jan 15, 2013 at 4:01 PM, Steven D'Aprano wrote:
> On 16/01/13 10:40, Scurvy Scott wrote:
> [...]
>
>> Anyways, the problem I'm having is I'm not really sure how to search a
>> list
>> for multiple elements and remove just those elements. Below i
Hello guys, I'm using Ubuntu 12.10 and Python 2.7 right now. I'm working on
code using the Mingus module but this question isn't specific to this
module, per se.
What I'm trying to do is to generate the fibonacci numbers up to a given N
and then do modulo 12 on each number in order to create a lis
Wow, thanks Dave, et al., for explaining things the way they did. I'm not
trying to and apologize for top posting, gmail wasn't giving me the option
of replying to all. I definitely understand what was going on and why when
you all were explaining the code portions to me.
_
On Sun, Sep 16, 2012 at 5:23 PM, Dave Angel wrote:
> On 09/16/2012 07:56 PM, Scurvy Scott wrote:
> > scratch that, new code is below for your perusal:
> >
> > from Crypto.PublicKey import RSA
> > import hashlib
> >
> > def repeat_a_lot():
> > co
scratch that, new code is below for your perusal:
from Crypto.PublicKey import RSA
import hashlib
def repeat_a_lot():
count = 0
while count < 20:
m = RSA.generate(1024)
b = hashlib.sha1()
b.update(str(m))
a = b.hexdigest()
print a[:16] + '.onion'
Hello all, I'm just wondering how to run this block of code X amount of
times (a lot) and then store the ouput to a .txt file.
The code I've written is below.
from Crypto.PublicKey import RSA
import hashlib
m = RSA.generate(1024)
b = hashlib.sha1()
b.update(str(m))
a = b.hexdigest()
print a[:16]
possible = "234567abcdefghijklmnopqrstuvwxyz"
word_length = 16
print 'Running "every.py"'
word_list = []
def add_word(word):
if len(word)==word_length:
word_list.append(word)
print word
else:
for c in possible:
new_word = word + c
add_word(new
>
> That list would fill all the PC's on the planet a few billions times.
> The number of items in the list has 25 digits in it. print 32**16
>
> I actually should've specified that the list I'm trying to create would
not start at say "0001".
I'm attempting to generate all possible .on
Hello again python tutor list.
I have what I see as a somewhat complicated problem which I have no idea
where to begin. I'm hoping you fine folks can help me.
I'm trying to generate a list of every possible 16 character string
containing only 2-7 and a-z lowercase. I've seen some examples using re
First of all thank you guys for all your help. The manual is really no
substitute for having things explained in laymans terms as opposed to a
technical manual.
My question is this- I've been trying for a month to generate a list of all
possible 10 digit numbers. I've googled, looked on stackov
I'm fairly new to python having recently completed LPTHW. While randomly
reading stack overflow I've run into "lambda" but haven't seen an explanation
of what that is, how it works, etc.
Would anyone care to point me in the right direction?
Thanks in advance
Scott
__
Hello, I'm totally new to this list.
I've been learning python through codecademy.com which has een helping a
lot with it's step by step approach. I'm wondering if there are any others
like it? I've been looking at some other places that attempt to teach
python (google python course, code kata or
25 matches
Mail list logo