Git Product home page Git Product logo

socode's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

socode's Issues

TypeError

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'

Use of Third-Party Packages

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.

Please call my function

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.

Error in zgohr() (and subsequently in kisom())

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 vs. Space

Tab or space? 2 spaces or 4 spaces? I see inconsistent indentation in the code.

3boll function

the function of 3boll won't work since python doesn't like functionnames beginning with numbers

TypeError: 'instancemethod' object has no attribute '__getitem__'

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'

else if

python socode.py
File "socode.py", line 92
else if m > 0 and n == 0:
^
SyntaxError: invalid syntax
mike@sunshine ~/temp/foo/socod

(Occasional) error in hmason()

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.

Error in starefossen()

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.

Can't Run

Current master can't be ran. Do the goal of this repo to have everyone push without noticing if it is valid code?

Error in jpadilla()

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

Error!

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

Can't call json() on the request object?

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?

Too fast!

Sorry guys I tried manually merging even one guy's commit and the head moved too fast for even that!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.