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 sys | |
from gi.repository import Gtk, Gdk, WebKit | |
class BrowserTab(Gtk.VBox): | |
def __init__(self, *args, **kwargs): | |
super(BrowserTab, self).__init__(*args, **kwargs) | |
go_button = Gtk.Button("go to...") | |
go_button.connect("clicked", self._load_url) | |
self.url_bar = Gtk.Entry() |
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 sys, linecache | |
def tracefunc(frame, event, arg, indent=[0]): | |
if event == "call" or event == "return": | |
lineno = frame.f_lineno | |
filename = frame.f_globals["__file__"] | |
if filename == "<stdin>": | |
filename = "traceit.py" | |
if (filename.endswith(".pyc") or | |
filename.endswith(".pyo")): | |
filename = filename[:-1] |
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
remove Lock = Caps_Lock | |
remove Control = Control_L | |
keysym Control_L = Caps_Lock | |
keysym Caps_Lock = Control_L | |
add Lock = Caps_Lock | |
add Control = Control_L |
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
set incsearch " BUT do highlight as you type you search phrase | |
set laststatus=2 " always show the status line | |
set lazyredraw " do not redraw while running macros | |
set linespace=0 " don't insert any extra pixel lines betweens rows | |
set list " we do what to show tabs, to ensure we get them out of my files | |
set listchars=tab:>-,trail:. " show tabs and trailing | |
set matchtime=5 " how many tenths of a second to blink matching brackets for | |
set nohlsearch " do not highlight searched for phrases | |
set nostartofline " leave my cursor where it was | |
set novisualbell " don't blink |
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
(setq-default indent-tabs-mode nil) | |
(setq-default tab-width 4) | |
(setq indent-line-function 'insert-tab) | |
(mouse-wheel-mode t) | |
;; ========== Place Backup Files in Specific Directory ========== | |
;; Enable backup files. | |
(setq make-backup-files t) |
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
(setq-default indent-tabs-mode nil) | |
(setq-default tab-width 4) | |
(setq indent-line-function 'insert-tab) | |
(mouse-wheel-mode t) | |
;; ========== Place Backup Files in Specific Directory ========== | |
;; Enable backup files. | |
(setq make-backup-files t) |
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
An algorithm to sort a person's friend list, closest friends first. | |
Problem: Given the publicly available information on facebook, how to | |
sort the friend list in an order that list closest/most relevant friends | |
first? | |
We are assuming the following things are available (in no particular order): | |
1. Location information: All the locations | |
2. Schools/University attended | |
3. Birthday |
NewerOlder