Profile

Cover photo
Jim Mooney
Works at jkmsites.com
Attended wilkes college
Lives in apache junction, az
656 followers|115,093 views
AboutPostsPhotosYouTubeReviews

Stream

Jim Mooney

commented on a video on YouTube.
Shared publicly  - 
 
Well, she founds hospitals, orphanages, feeds the homeless, even here in hate-the-homeless land, so she walks her talk. Which is a Lot more than many religious people and most politicians, do. I have no opinion on the mystical stuff but we certainly need more people who do good instead of evil.
1
Add a comment...

Jim Mooney

commented on a channel on YouTube.
Shared publicly  - 
 
Re: Your article - Understanding the Aggressive US Stance towards Russia. I saw Proof of this fifty years ago when I was young. My brother had an old book of historical photographs. (From LIFE, I think). They showed US Marines marching through Red Square. I didn't understand it at the time since it was quite contrary to my school history, but I do now.
1
Add a comment...

Jim Mooney

Questions  - 
 
What am I doing wrong here? This works if I put "start" inside the function, but if I put it as a global I get an error. But it should be accessible to the function as a global:

UnboundLocalError: local variable 'start' referenced before assignment  
start = (1, 1)
def fib(between):
    while True:
        nextfib = start[-1] + start[-2]
        if start[-1] > between:
            print('lowfib =', start[-2], 'and highfib =', start[-1])
            break
        else:
            start = start[-1], nextfib

between = int(input("What is the between number?: "))
fib(between)
2
Jim Mooney's profile photoEmlyn O'Regan's profile photo
4 comments
 
You probably don't want to use an immutable if it needs to be mutable :-)
Add a comment...

Jim Mooney

Questions  - 
 
What am I missing here? (Py3.4.3). I thought send yielded the value sent in, but all I'm getting is the normal yield result.

>>> def nums(x):
...     for num in range(x):
...         yield num
...         
>>> p = nums(5)
>>> next(p)
0
>>> p.send(44)
1
>>> p.send(392)
2
>>>
1
Sidafa Conde's profile photoSean Clarke's profile photoCurtis Lusmore's profile photoJim Mooney's profile photo
4 comments
 
Thanks. The book didn't mention that. I'll ask for a partial refund ;')
Add a comment...

Jim Mooney

Questions  - 
 
Okay, I have a module func.py, that just prints "Here I am" I import it into a function and calling the function runs the print. The second time it doesn't. Okay, I know you can't re-import a module, but in this case it's being imported into a function that hides all the module names, and those names disappear when the function completes. So why am I not printing "Here I am" on the second call to the outer function? What am I missing here?
func.py
    print('Here I am')

>>> def outer():
...     import func
...     
>>> outer()
Here I am
>>> outer()
>>>             # nothing prints
>>>
1
BK Sarthak Das's profile photoJim Mooney's profile photoReuben Gow's profile photoGreg Swift's profile photo
7 comments
 
+Reuben Gow I understood that thats what he thought, but was trying to explain the difference between what he thought and how it does work.  Importing goes into the module's global namespace.  so recalling the function doesn't do anything.

there is a small note about it buried here:

"a module's namespace is more exciting...it includes anything that was imported into the module"

http://www.diveintopython.net/html_processing/locals_and_globals.html
Add a comment...

Jim Mooney

commented on a video on YouTube.
Shared publicly  - 
 
There are even some idiot PC "liberals" who think we should just Shut Up and dare not offend the Prophet. Screw that.
2
Add a comment...

Jim Mooney

commented on a video on YouTube.
Shared publicly  - 
 
It reminds me that birds evolved from dinosaurs.
2
Add a comment...
Have him in circles
656 people
The Game's profile photo
Abdullah yağar's profile photo
Hoàng Mai's profile photo
Jery Huntsun's profile photo
Jenny Simmons's profile photo
Acil Vale's profile photo
Shahadat Hossain (SAJIB)'s profile photo
Алина «Дариса Радостная» Медведева's profile photo
Asha Waterhouse's profile photo

Jim Mooney

commented on a video on YouTube.
Shared publicly  - 
 
So if nothing helps why am I watching this? I could be drinking a beer ;')
1
Billy Blackburn's profile photo
 
+Jim Mooney why not do both?
Add a comment...

Jim Mooney

Questions  - 
 
I was using requests to download python.org as a test, and saw there were no styles, since the style sheet links were relative, rather than being normalized to http://python.org/...

Is there a way to get requests to do this, or do I have to parse through the html and do it?
The official home of the Python Programming Language
1
John Beisley's profile photo
 
I don't know requests at all, but if it doesn't know about HTML then yes, you will have to parse it to get those URLs. Then use urljoin to get absolute URLs. For parsing some will suggest beautifulsoup, I'm more partial to lxml.html, I imagine either would work. There might be a scraping library that does this all for you.

https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urljoin
Add a comment...

Jim Mooney

Questions  - 
 
I'm looking at the methods in shutil. What is the asterisk for? i.e.
shutil.copy(src, dst, *, follow_symlinks=True)
1
Keith Dart's profile photo
 
That's Python 3. It means discard all remaining non-keyword arguments.
Add a comment...

Jim Mooney

Discussion  - 
1
Jim Mooney's profile photo
 
As Thomas Kuhn noted, any young scientist who thinks outside the box has his career ruined by the old fudds who run departments. Great scientists want to do science. Only the mediocre ones want to politic and run departments. They sit on new ideas until their generation dies. The current paradigm crushes anything that runs counter to it, even if there is experimental and observational evidence.
Add a comment...

Jim Mooney

commented on a video on YouTube.
Shared publicly  - 
 
The Dark Age Kingdom of Saudi Arabia is the source and fount of all this. Time we stopped kissing their rear because of OIL.
1
Arthur Holty's profile photo
 
Be careful what you wish for.

The best way is to ignore your rulers orders. They are in fact the same people that you rail against. Maybe you could join anonymous as a positive step..but then maybe you already have
Add a comment...
People
Have him in circles
656 people
The Game's profile photo
Abdullah yağar's profile photo
Hoàng Mai's profile photo
Jery Huntsun's profile photo
Jenny Simmons's profile photo
Acil Vale's profile photo
Shahadat Hossain (SAJIB)'s profile photo
Алина «Дариса Радостная» Медведева's profile photo
Asha Waterhouse's profile photo
Education
  • wilkes college
Basic Information
Gender
Male
Birthday
April 27
Story
Introduction
I started on the web by creating advocacy sites for disabled people who were cheated by crooked insurance companies. That's why I  know we Need a public option Insurers are horrible. They'll abuse you, cheat you and kill you to make an extra dollar. They do a lot more fraud than claimants do. But enough speeches. Right now I'm into advaita. Eckhardt Tolle stuff.
Work
Occupation
freelance webmaster
Employment
  • jkmsites.com
    freelance webmaster, present
  • lots
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
apache junction, az
Previously
wilkes-barre, pa - mass, ca, okinawa, north carolina, florida
They pay horrible cheap, and don't care if they waste your whole day sitting around - four hours is a short-time, even though half the cots are empty so they could easily speed it up by hiring more bloodletters. It's also dirty and nasty there. Not a good place to go. And they pay about one third what you get in Phoenix. Scummy place. Good to go there if you're on drugs and desperate and have nothing to do, though.
Public - a year ago
reviewed a year ago
Only place in town that has Scrapple, my favorite dish from PA (Scrapple is mystery meat from pigs, mixed with cornmeal, but I love it for breakfast ;')
Quality: GoodAppeal: GoodService: Good
Public - 2 years ago
reviewed 2 years ago
If you go there all they do is say they don't have any work. And you have to go real early so you might as well sleep in.
Public - 5 years ago
reviewed 5 years ago
5 reviews
Map
Map
Map
The phone number gives you a robot at the national center instead of the local lowes, who wants the zip code of that lowes, which isn't on the listing, then the robot hangs up. Retarded.
Public - 3 years ago
reviewed 3 years ago
This is now Homer's Flea Market and is much improved. Lots of tents with lots of unusual items. Most are used, but you can go to the big flea market and all they have there is shiny stuff made in Chinese factories, that breaks real easy ;')
Public - 6 years ago
reviewed 6 years ago