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
| python -c"import os,glob; print os.path.join('.', 'path/to/file') in sum([[f[0] for f in [glob.glob(os.path.join(d[0], pattern)) for d in os.walk('.')] if f] for pattern in open('.gitignore', 'r+').read().split('\n')], [])" |
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
| import re | |
| import string | |
| # find the first quote in a string | |
| quotere = re.compile( | |
| r"""(?P<quote>"[^\"\\]*(?:\\"|[^"])*") # Quote, possibly containing encoded | |
| # quotation mark | |
| \s*(?P<rest>.*)$ """, | |
| re.VERBOSE) |
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
| @login_required | |
| def linked_in(request): | |
| REDIRECT_URI = 'http://127.0.0.1:8000/linkedin' | |
| if 'clear' in request.GET: | |
| del request.session['linkedin'] | |
| print "clear." | |
| elif not 'linkedin' in request.session: | |
| request.session['person'] = request.GET.get('person') | |
| request.session['linkedin'] = 'authing' | |
| params = urllib.urlencode({ |
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
| QUERY PLAN | |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| Limit (cost=471953.26..471953.38 rows=50 width=77) (actual time=2523.902..2524.063 rows=50 loops=1) | |
| -> Sort (cost=471953.26..472037.42 rows=33664 width=77) (actual time=2523.898..2523.952 rows=50 loops=1) | |
| Sort Key: (max(date)) | |
| Sort Method: top-N heapsort Memory: 36kB | |
| -> GroupAggregate (cost=461030.36..470834.96 rows=33664 width=77) (actual time=2230.769..2520.320 rows=1681 loops=1) | |
| Filter: bool_or(is_inbox) | |
| -> Sort (cost=461030.36..461616.85 rows=234595 width=77) (actual time=1158.555..1430.159 rows=215157 loops=1) | |
| Sort Key: thread_id |
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
| omgmail=# \d mail_email | |
| Table "public.mail_email" | |
| Column | Type | Modifiers | |
| ---------------------+--------------------------+----------- | |
| id | uuid | not null | |
| account_id | integer | not null | |
| last_update | timestamp with time zone | not null | |
| uid | bigint | | |
| gm_msg_id | bigint | not null | |
| thread_id | bigint | not null |
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
| [ | |
| { | |
| "emails": [ | |
| { | |
| "bcc": [], | |
| "cc": [], | |
| "date": "2013-04-03T20:46:12", | |
| "sender": { | |
| "address": "[email protected]", | |
| "name": "Gmail Team" |
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
| <html> | |
| <head> | |
| <script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
| <script type="text/javascript"> | |
| google.load("visualization", "1", {packages:["corechart"]}); | |
| google.setOnLoadCallback(drawChart); | |
| function drawChart() { | |
| var data = new google.visualization.DataTable(); | |
| data.addColumn('number', 'price'); |
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
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=utf-8"/> | |
| <title> | |
| Google Visualization API Sample | |
| </title> | |
| <script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
| <script type="text/javascript"> | |
| google.load('visualization', '1', {packages: ['corechart']}); | |
| </script> |
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
| # i added this test | |
| def test_int_add_ovf_commutative(self): | |
| ops = """ | |
| [i0, i1] | |
| i2 = int_add_ovf(i0, i1) | |
| i3 = int_add_ovf(i1, i0) | |
| jump(i2, i3) | |
| """ | |
| expected = """ | |
| [i0, i1] |
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
| { | |
| "name":"Shopify", | |
| "pricing_tiers":[ | |
| { | |
| "price":"29", | |
| "period":"month", | |
| "features":{ | |
| "disabled":[ | |
| "Abandoned cart recovery", | |
| "Professional reports", |