I tried the following:
Am_cor=np.vectorize(Am_cor)
#plt.plot(t, signal, color='blue', label='Original signal')
fig=plt.figure()
plt.xlabel('Time(minute)')
plt.ylabel('$ Re()$')
plt.xlim([t[0], t[-1]])
plt.ylim((-.3*a1-a1,a1+.3*a1))
plt.grid()
plt.plot(t,Am_cor(t),'o-',label='with parallax', marke
Dave, you clearly don't know codecademy.
Please be nice to him.
Also, I recommend the codecademy forums. They have a lot of material about
every exercise.
On Apr 23, 2013 11:50 PM, "Dave Angel" wrote:
> On 04/23/2013 03:39 PM, Roelof Wobben wrote:
>
>> Im trying to learn python by a course at cod
On Tue, Apr 23, 2013 at 11:01 PM, Lolo Lolo wrote:
> Scripts\activate.bat ... returns this error:
>
> 'Scripts' is not recognized as an internal or external command,
> operable program or batch file.
> it might want a program or command to run the bat fine
Scripts\activate.bat is a relative path,
>> Run Scripts\activate.bat if your shell is cmd, or Scripts\activate.ps1
>> if you're using PowerShell. These are shell scripts. Do not run them
>> with Python.
I have to get some sleep but i believe i got the installation in the right
version it also insta
On 04/23/2013 03:39 PM, Roelof Wobben wrote:
Im trying to learn python by a course at codeacademy. Now I have this code :
def shut_down(s):
s = s.lower()
if s == "yes":
return "Shutting down..."
elif s == "no" :
return "Shutdown aborted!"
else:
retu
On Tue, Apr 23, 2013 at 5:59 PM, Lolo Lolo wrote:
> found the activate file inside a folder name Scripts (instead of bin) and
> and tried the same command, but now i get this error:
>
> File "Scripts/activate", line 4
> deactivate () {
> ^
> SyntaxError: invalid syntax
Run
On 23/04/13 22:59, Lolo Lolo wrote:
File "Scripts/activate", line 4
deactivate () {
^
SyntaxError: invalid syntax
That's a bash/zsh script not a Python one. You will need to find a
Windows equivalent bat file or cmd file or maybe wsh.
No idea if such a thing exist
>> The dot (.) command is used to source a file, It executes Unix like commands
>> in bin/activate. Not relevant when you're on windows. >> Is there a .bat or
>> .cmd file instead?
oh i had no idea.. i found the activate file inside a folder name Scripts
(instead of bin) and and tried the sam
Lolo Lolo wrote:
[snip]
> since im on windows i used dir instead of ls, but this line:
>
> $ . bin/activate
>
> is not recognised as a command. If i try to open it wth python cmd says no
> such file or directory
>
[snip]
Instead of trying `. bin/activate` try `bin/activate`
(note the lack of "
Subject: Re: [Tutor] trouble installing library
>
>guys having got the install to work, a part of the process fails me.. the full
>code instruction is:
>
>$ virtualenv --no-site-packages gmapenv
>$ cd gmapenv
>$ ls
>bin/ include/ lib/
>$ . bin/activate
>
>since im on windows i used di
Albert-Jan Roskam wrote:
> > On 24/04/13 00:14, Albert-Jan Roskam wrote:
> >> Hello,
> >>
> >> Is there a better, *built-in* alternative for the code below? The
> >> recursion
> > works,
> >> but it feels like reinventing the wheel.
> >
> > What makes you think it is reinventing the wheel?
>
>
guys having got the install to work, a part of the process fails me.. the full
code instruction is:
$ virtualenv --no-site-packages gmapenv
$ cd gmapenv
$ ls
bin/ include/ lib/
$ . bin/activate
since im on windows i used dir instead of ls, but this line:
$ . bin/activate
is not recog
On 23 April 2013 21:17, Danny Yoo wrote:
> Hi Roelof,
>
> On Tue, Apr 23, 2013 at 1:39 PM, Roelof Wobben wrote:
>> Im trying to learn python by a course at codeacademy.
>>
>> Now I have this code :
>>
>> def shut_down(s):
>> s = s.lower()
>> if s == "yes":
>> return "Shutting down
Thanks for your response guys:
>> what happens if you cd to the directory where you untarred the file, then
>> run "python setup.py install"
This seems to have done the trick!
>> It's an honour to be communicating with the world's last Vista user ;-)))
lol And this was very uncalled for
Hi Roelof,
On Tue, Apr 23, 2013 at 1:39 PM, Roelof Wobben wrote:
> Im trying to learn python by a course at codeacademy.
>
> Now I have this code :
>
> def shut_down(s):
> s = s.lower()
> if s == "yes":
> return "Shutting down..."
> elif s == "no" :
> return "Shutdown
On 23/04/2013 20:39, Roelof Wobben wrote:
Im trying to learn python by a course at codeacademy.
Now I have this code :
def shut_down(s):
s = s.lower()
if s == "yes":
return "Shutting down..."
elif s == "no" :
return "Shutdown aborted!"
else:
return
ImportError: No module named virtualenv
>
>what happens if you cd to the directory where you untarred the file, then run
>"python setup.py install"Did you download the right version (for Python3)?
>Am i installing it correctly? can anyone offer any help? Im on Windows Vista,
>and i have both pyt
According to the documentation in:
http://www.virtualenv.org/en/latest/
and:
https://pypi.python.org/pypi/virtualenv
the "Installation" section in the documentation walks through what you
need to do to install the software.
Can you use Python's package managment system "pip" to handle
im not sure if anyone is familiar with virtualenv but im tryng to follow a
tutorial that has asked me to install virtualenv. i downloaded it in the form
of a tar file and extracted it. There was no .exe file to install. The tutorial
asks for me to type this code :
$ virtualenv --no-site-package
You're missing a dot (.)
*Sorry, I didn't understand you.*
- Karan Goel
The Real Reason Things Keep Going Wrong:
At the beginning of time, God set a Magic Top Spinning... and spinning...
and spinning... and spinning... and spinning... and spinning... and
spinning..
Im trying to learn python by a course at codeacademy. Now I have this code :
def shut_down(s):
s = s.lower()
if s == "yes":
return "Shutting down..."
elif s == "no" :
return "Shutdown aborted!"
else:
return "Sorry, I didn't understand you"
But when I run
> Subject: Re: [Tutor] string.Template
>
> On 24/04/13 00:14, Albert-Jan Roskam wrote:
>> Hello,
>>
>> Is there a better, *built-in* alternative for the code below? The recursion
> works,
>> but it feels like reinventing the wheel.
>
> What makes you think it is reinventing the wheel?
Hi
On Apr 23, 2013, at 2:19 PM, Chris “Kwpolska” Warrick wrote:
> On Sat, Apr 20, 2013 at 10:33 PM, Pat Collins
> wrote:
>> Any help appreciated.
>>
>>
>> #!/usr/bin/env python
>> """
>> number.py Demonstrates collecting a number from the user.
>> """
>>
>> number_string1 = float(input("Give me
Pat Collins wrote:
> Any help appreciated.
>
>
> #!/usr/bin/env python
> """
> number.py Demonstrates collecting a number from the user.
> """
>
> number_string1 = float(input("Give me a number: "))
> number1 = (number_string1)
number_string1 is not a string as you have already converted
it to
On 20/04/2013 21:33, Pat Collins wrote:
Any help appreciated.
#!/usr/bin/env python
"""
number.py Demonstrates collecting a number from the user.
"""
number_string1 = float(input("Give me a number: "))
number1 = (number_string1)
Why not number1 = float(input("Give me a number: ")) ?
numbe
On Sat, Apr 20, 2013 at 10:33 PM, Pat Collins wrote:
> Any help appreciated.
>
>
> #!/usr/bin/env python
> """
> number.py Demonstrates collecting a number from the user.
> """
>
> number_string1 = float(input("Give me a number: "))
> number1 = (number_string1)
>
> number_string2 = float(input("Gi
Any help appreciated.
#!/usr/bin/env python
"""
number.py Demonstrates collecting a number from the user.
"""
number_string1 = float(input("Give me a number: "))
number1 = (number_string1)
number_string2 = float(input("Give me another number: "))
number2 = (number_string2)
print number1, "time
On 24/04/13 00:47, Chris “Kwpolska” Warrick wrote:
1. locals() is hacky and you shouldn’t use it.
Actually this, or something like this, is exactly one of the use-cases for the
locals() function.
Using locals() as a read-only mapping of name:value pairs is perfectly safe.
It's only unsafe i
On 24/04/13 00:14, Albert-Jan Roskam wrote:
Hello,
Is there a better, *built-in* alternative for the code below? The recursion
works,
but it feels like reinventing the wheel.
What makes you think it is reinventing the wheel? The following looks like a
perfectly sensible use for recursion. If
On Tue, Apr 23, 2013 at 4:14 PM, Albert-Jan Roskam wrote:
> Hello,
>
> Is there a better, *built-in* alternative for the code below? The recursion
> works,
> but it feels like reinventing the wheel.
>
> import string
>
> def translate(template, *args):
> """Recursively $-substitute using as
Hello,
Is there a better, *built-in* alternative for the code below? The recursion
works,
but it feels like reinventing the wheel.
import string
def translate(template, *args):
"""Recursively $-substitute using as a replacement"""
syntax = string.Template(template).substitute(*args)
On 23/04/13 02:47, Jim Mooney wrote:
Okay, what am I doing wrong here?
primeList = [1]
numList = list(range(2,101))
for e in numList:
for f in primeList:
if numList[e] % primeList[f] != 0: #list index out of range
for lops in Python do not generate indexes they return the actual
ent
32 matches
Mail list logo