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
| ok | |
| doctest (test_zipped_doctest) ... 1 tests with zero failures | |
| Finding tests in test_zipped_doctest.sample_func | |
| Trying: | |
| print(sample_func(22)) | |
| Expecting: | |
| 44 | |
| ok | |
| doctest (test_zipped_doctest) ... 1 tests with zero failures | |
| Finding tests in test_zipped_doctest.test_DocTest |
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
| #include <stdio.h> | |
| /* count digits, white space, others */ | |
| main() | |
| { | |
| int c, i, nwhite, nother; | |
| int ndigit[10]; | |
| nwhite = nother = 0; | |
| for (i = 0; i < 10; ++i) | |
| ndigit[i] = 0; | |
| while ((c = getchar()) != EOF) |
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
| #include <stdio.h> | |
| /* count digits, white space, others */ | |
| int main() | |
| { | |
| int c, i, nwhite, nother; | |
| int ndigit[10]; | |
| nwhite = nother = 0; | |
| for (i = 0; i < 10; ++i) | |
| ndigit[i] = 0; | |
| while ((c = getchar()) != EOF) |
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
| localhost:/home/vikash # hwinfo --gfxcard | |
| 09: PCI 02.0: 0300 VGA compatible controller (VGA) | |
| [Created at pci.319] | |
| Unique ID: _Znp.j5duo6BuBmF | |
| SysFS ID: /devices/pci0000:00/0000:00:02.0 | |
| SysFS BusID: 0000:00:02.0 | |
| Hardware Class: graphics card | |
| Model: "Intel Mobile 4 Series Chipset Integrated Graphics Controller" | |
| Vendor: pci 0x8086 "Intel Corporation" | |
| Device: pci 0x2a42 "Mobile 4 Series Chipset Integrated Graphics Controller" |
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
| <a href="http://en.wikipedia.org/wiki/Lsof">lsof</a> | |
| ---- | |
| show open files | |
| lsof -nPp <pid> | |
| <a href="http://linux.die.net/man/1/strace">strace</a> | |
| ------ |
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
| [ This is a rough draft ] | |
| [Thanks Branes and Xeon3d ] | |
| [ Get proxy settings changed ] | |
| [ $100 to download various useful apps from Appstore] | |
| Links to look for | |
| http://www.makeuseof.com/tag/15-musthave-free-apps-mac/ | |
| http://www.macstories.net/roundups/my-must-have-25-mac-apps/ | |
| http://paid.musthavemacapps.com/ |
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/python | |
| import datetime | |
| import subprocess | |
| import sys | |
| import os | |
| class Commit(object): | |
| def __init__(self, repo): | |
| """Initialization |
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
| <!DOCTYPE html><!-- Author: Vikash Agrawal <vikashagrawal1990@gmail.com --><html><head> | |
| <title>Stickfigure</title> | |
| <style> | |
| #BodyX | |
| { | |
| width: auto; | |
| height: 200px; | |
| display: block; | |
| padding: 30px; | |
| -moz-transition: -moz-transform 2s; |
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
| from flask import Flask, url_for | |
| app = Flask(__name__) | |
| @app.route('/') | |
| def index(): | |
| url_for('hello_world') | |
| return 'Index Page' | |
| @app.route('/hello') |
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
| # Pass file-names as command line arguments. | |
| # say python parser foo.txt bar.txt baz.txt | |
| #self.id for foo.txt = 1, bar.txt = 2, baz.txt = 3 | |
| import re | |
| import sys | |
| import hashlib | |
| from collections import defaultdict | |
| class Parser(object): | |
| def __init__(self, *args): |