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
def _getName(self): | |
retmod = "Module" | |
frame, module, line, function, context, index = inspect.stack()[2] | |
try: | |
self_argument = frame.f_code.co_varnames[0] # this should be self | |
instance = frame.f_locals[self_argument] | |
retmod = instance.__class__.__name__ | |
except IndexError: | |
retmod = inspect.getmodulename(module) | |
return retmod |
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 | |
import HTMLParser | |
import re | |
htmlparser = HTMLParser.HTMLParser() | |
numwords = 2 | |
def main(filename): | |
with open(str(filename)) as infile: |
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 | |
import HTMLParser | |
import re | |
import MySQLdb | |
htmlparser = HTMLParser.HTMLParser() | |
numwords = 2 | |
db = MySQLdb.connect(host="localhost", user="root", passwd="", db="wiki1") | |
cur = db.cursor() |
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 <GL/glew.h> | |
#include <GLFW/glfw3.h> | |
#include <glm/glm.hpp> | |
#include <glm/gtc/matrix_transform.hpp> | |
#include <glm/gtc/type_ptr.hpp> | |
#include <iostream> | |
// Shader sources | |
const char* vertexSource = | |
"#version 150\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
#!/bin/sh | |
# | |
# Shell script that configures gnome-terminal to use monokai.sh theme | |
# colors. Written for Ubuntu 11.10, untested on anything else. | |
# | |
# Monokai theme: https://github.com/oneKelvinSmith/monokai/blob/master/monokai.palette | |
# | |
# Adapted from these sources: | |
# https://gist.github.com/1280177 | |
# http://xorcode.com/guides/solarized-vim-eclipse-ubuntu/ |
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
/* | |
* Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved. | |
* | |
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | |
* | |
* This file contains Original Code and/or Modifications of Original Code | |
* as defined in and that are subject to the Apple Public Source License | |
* Version 2.0 (the 'License'). You may not use this file except in | |
* compliance with the License. The rights granted to you under the License | |
* may not be used to create, or enable the creation or redistribution of, |
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
.arch armv7-a | |
.fpu neon | |
.syntax unified | |
.global _start | |
_start: | |
mov r1, $0 | |
movt r1, $0x1002 //Primecell pl111 clcd is mapped to 0x10020000 | |
//setup primecell registers |
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
execute pathogen#infect() | |
filetype plugin indent on | |
set number | |
set autoindent | |
syntax enable | |
set background=dark | |
set t_Co=256 | |
colorscheme molokai | |
set background=dark | |
set mouse=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
/* | |
Attribution: https://bitbucket.org/motdplayer/sm-adplugin/src | |
Parsing fixed by gamingrobot | |
*/ | |
#if defined _easyjson_included | |
#endinput | |
#endif | |
#define _easyjson_included |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Slight] | |
"Colour0"="240,240,240" | |
"Colour1"="255,255,255" | |
"Colour2"="63,63,65" | |
"Colour3"="103,103,103" | |
"Colour4"="0,0,0" | |
"Colour5"="0,255,0" | |
"Colour6"="21,23,26" |
OlderNewer