sricola / socode Goto Github PK
View Code? Open in Web Editor NEWA Coding Social Experiment
A Coding Social Experiment
Traceback (most recent call last):
File "socode.py", line 1261, in
jpadilla()
File "socode.py", line 401, in new_f
ret_val = f(_args, *_kwargs)
File "socode.py", line 523, in jpadilla
print 'Forked {} times'.format(repo['forks_count'])
TypeError: 'instancemethod' object has no attribute 'getitem'
Are third-party packages outside of Python's standard library permitted? Like anything from PyPi. Do they fall under the "anything and everything" in rule 2? I have an idea that uses BeautifulSoup but want to double check first.
I implemented a very nice voting function that nobody else used. So, I put a bounty on it that the next person to merge a pull request calling it can claim.
Traceback (most recent call last):
File "socode.py", line 1952, in <module>
kisom()
File "socode.py", line 645, in new_f
ret_val = f(*args, **kwargs)
File "socode.py", line 536, in kisom
zgohr(geoip['city'])
File "socode.py", line 645, in new_f
ret_val = f(*args, **kwargs)
File "socode.py", line 526, in zgohr
'/data/2.1/find/name?q=%s' % city).content)
File "C:\Users\Havan\Anaconda2\lib\json\__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "C:\Users\Havan\Anaconda2\lib\json\decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\Havan\Anaconda2\lib\json\decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
The underlying issue is in zgohr()
, probably because the http://api.openweathermap.org API requires an API key, which has not been provided in the URL request.
Tab or space? 2 spaces or 4 spaces? I see inconsistent indentation in the code.
the function of 3boll won't work since python doesn't like functionnames beginning with numbers
print 'Hello World! :)'
Long live Aaron Swartz!
Let's see that again...
I don't know Python; I don't belong here
We're no strangers to love
You Know the rules and so do I
A full commitment's what I'm thinking of
You wouldn't get this from any other guy
I just wanna tell you how I'm feeling
Gotta make you understand
Never gonna give you up.
Never gonna let you down.
Never gonna run around.
And desert you.
Never gonna make you cry,
Never gonna say goodbye,
Never gonna tell a lie and hurt you.
Created new window in existing browser session.
Traceback (most recent call last):
File "./socode.py", line 1037, in
jpadilla()
File "./socode.py", line 482, in jpadilla
print 'Forked {} times'.format(repo['forks_count'])
TypeError: 'instancemethod' object has no attribute 'getitem'
python socode.py
File "socode.py", line 92
else if m > 0 and n == 0:
^
SyntaxError: invalid syntax
mike@sunshine ~/temp/foo/socod
Traceback (most recent call last):
File "socode.py", line 1919, in <module>
hmason()
File "socode.py", line 228, in hmason
exec random.choice(re.findall('def (.*):', socode_source))
File "<string>", line 1, in <module>
File "socode.py", line 830, in GeneralZero
if inspect.isfunction(obj)])()
TypeError: nathanathan() takes at least 1 argument (0 given)
It is because this method picks out a random method from the socode.py file, and executes it. The problem is that it executes it without any args, and if it picks up a method that requires args, you get the above exception.
Traceback (most recent call last):
File "socode.py", line 1926, in <module>
starefossen()
File "socode.py", line 407, in starefossen
print requests.get('http://kdd2.1337fire.com/').content
File "C:\Users\Havan\Anaconda2\lib\site-packages\requests\api.py", line 70, in get
return request('get', url, params=params, **kwargs)
File "C:\Users\Havan\Anaconda2\lib\site-packages\requests\api.py", line 56, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\Havan\Anaconda2\lib\site-packages\requests\sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\Havan\Anaconda2\lib\site-packages\requests\sessions.py", line 596, in send
r = adapter.send(request, **kwargs)
File "C:\Users\Havan\Anaconda2\lib\site-packages\requests\adapters.py", line 487, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='kdd2.1337fire.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x00000000034EEB38>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))
Looks like the kdd2.1337fire.com site is no longer active.
Current master can't be ran. Do the goal of this repo to have everyone push without noticing if it is valid code?
Traceback (most recent call last):
File "socode.py", line 1943, in <module>
jpadilla()
File "socode.py", line 806, in jpadilla
print 'Forked {} times'.format(repo['forks_count'])
TypeError: 'instancemethod' object has no attribute '__getitem__'
It's because of this line of code
repo = requests.get('https://api.github.com/repos/sricola/socode').json
which should probably be
repo = requests.get('https://api.github.com/repos/sricola/socode').json()
Similar issue in ncammarata()
tweets = requests.get("https://search.twitter.com/search.json?q=a").json
In the function created by github user @ryannolson, a call against an outdated twitter API is made in attempt to print a message from twitter about socode. Should be upgraded to the new API so it will work.
After the Deleting home/dani... Just kidding
there's an error
Traceback (most recent call last):
File "projects/socode.py", line 1305, in <module>
rjwebb(5)
File "projects/socode.py", line 148, in rjwebb
r = get_user_page(user)
File "projects/socode.py", line 134, in get_user_page
return urllib2.urlopen(gh_url).read()
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 410: Gone
in function jpadilla, I get an error that json is just a regular dict...
Perhaps:
repo = requests.get('https://api.github.com/repos/sricola/socode').json
Would work better?
Sorry guys I tried manually merging even one guy's commit and the head moved too fast for even that!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.