This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| In [1]: def foo(foo,bar,baz=None): pass | |
| In [2]: foo('bar',baz='foo') | |
| --------------------------------------------------------------------------- | |
| TypeError Traceback (most recent call last) | |
| /tmp/<ipython-input-2-bdb4909afb85> in <module>() | |
| ----> 1 foo('bar',baz='foo') | |
| TypeError: foo() takes at least 2 arguments (2 given) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! -*- Coding: utf-8 -*- | |
| from gevent import monkey | |
| monkey.patch_all() | |
| import gevent | |
| import time | |
| from envoy import run | |
| from sys import exit, argv | |
| import subprocess | |
| import pip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import sys | |
| def catch_all(exc_type, exc_value, traceback): | |
| sys.stderr.write('[!] %s\n'%exc_value) | |
| sys.excepthook = catch_all | |
| if __name__ == '__main__': | |
| raise RuntimeError('CAN I HAZ COOKIE?') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #compdef hg | |
| # Zsh completion script for mercurial. Rename this file to _hg and copy | |
| # it into your zsh function path (/usr/share/zsh/site-functions for | |
| # instance) | |
| # | |
| # If you do not want to install it globally, you can copy it somewhere | |
| # else and add that directory to $fpath. This must be done before | |
| # compinit is called. If the file is copied to ~/.zsh.d, your ~/.zshrc | |
| # file could look like this: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Uncaught exception: SyntaxError: JSON.parse: Colon expected: recentl | |
| Error thrown at line 30, column 62976 in <anonymous function>(a) in https://twimg0-a.akamaihd.net/c/phoenix/en/bundle/t1-core.a65a5e07efea1d7bcdd8b5a1f5166b3b.js: | |
| twttr.cache.Simple.call(this),this._namespace=a,this._cache=JSON.parse(v(a)||"{}"),twttr.cache.LocalProvider._caches.push(this) | |
| called via Function.prototype.apply() from line 20, column 122264 in <anonymous function: klass>() in https://twimg0-a.akamaihd.net/c/phoenix/en/bundle/t1-core.a65a5e07efea1d7bcdd8b5a1f5166b3b.js: | |
| c.apply(this,arguments),twttr.each(d,function(a){new a(f,b)}) | |
| called from line 30, column 63886 in <anonymous function>(a) in https://twimg0-a.akamaihd.net/c/phoenix/en/bundle/t1-core.a65a5e07efea1d7bcdd8b5a1f5166b3b.js: | |
| this.name=a,this.cache=new twttr.cache.LocalProvider(":USER:"),this.user=this.cache.get(a)||this.cache.set(a,{login:(new Date).getTime(),store:{}}),this.clean() | |
| called via Function.prototype.apply() from line 20, column 122264 in <ano |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| starenka /tmp % cat meh.py [90% 05:31:21] | |
| import sys | |
| try: | |
| fap() | |
| except Exception, e: | |
| exc, mess, tb = sys.exc_info() #<-tady si ji ulozim | |
| #tady si ji vypisu | |
| import traceback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| starenka /tmp % cat meh.py [85% 05:12:53] | |
| import logging | |
| try: | |
| fap() | |
| except Exception, e: | |
| logging.exception('Abandon ship!!!') | |
| starenka /tmp % python meh.py [85% 05:14:08] | |
| ERROR:root:Abandon ship!!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| starenka /tmp % cat meh.py [77% 04:46:58] | |
| try: | |
| fap() | |
| except Exception as e: | |
| import traceback | |
| traceback.print_tb(e.__traceback__) | |
| print(str(e)) | |
| print(repr(e)) | |
| starenka /tmp % python3.2 meh.py [77% 04:47:11] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # pip install requests gevent | |
| import os, sys | |
| from optparse import OptionParser | |
| from requests import async | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import string, sys | |
| import requests | |
| from pyquery import PyQuery as pq | |
| country = sys.argv[1] if len(sys.argv) > 1 else 'czech-republic' | |
| for letter in string.uppercase: | |
| doc = pq(requests.get('http://www.london2012.com/country/%s/athletes/initial=%s/index.html' % (country, letter)).content) |