This file contains 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
# Silly little program to calculate my grades in Coursera's | |
# Programming for Everybody (Python) | |
__author__ = 'clamytoe' | |
from bs4 import BeautifulSoup | |
# global variable to hold all of the grades | |
class_grades = dict() | |
def parse_quiz(): |
This file contains 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
__author__ = 'muribe' | |
""" | |
Little utility that I cooked up to convert numbers between binary, hex, and decimal. | |
If a MAC address in the following format is entered: | |
00-11-8a-2d-ff-ff | |
It returns the following binary: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 urllib2 | |
fname = 'paper_icons.html' | |
handle = open(fname, 'r') | |
images = list() | |
count = 0 | |
for line in handle: | |
line = line.rstrip() | |
tags = line.split() |
This file contains 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
javascript:void((function()%7Bvar%20a,b;b=%22%3C%22+%22html%3E%5Cn%3Cbody%3EPasswords%20in%20this%20page:%3Cp%3E%5Cn%22;(function(c)%7Bvar%20d,e,f,g,h;for(d=0;d%3Cc.length;d++)%7Btry%7Barguments.callee(c.frames[d]);%7Dcatch(i)%7B%7D%7De=c.document.forms;for(f=0;f%3Ce.length;f++)%7Bg=e[f];for(h=0;h%3Cg.length;h++)%7Bif(g[h].type.toLowerCase()==%22password%22)b+=g[h].value+%22%3Cbr%3E%5Cn%22;%7D%7D%7D)(top);b+=%22%3C/body%3E%5Cn%3C/html%3E%5Cn%22;a=window.open(%22%22,%22%22,%22width=200,height=300%22).document;a.open();a.write(b);a.close();%7D)()) |
This file contains 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
# linkedin Python Community | |
# Python the Hard Way, Lesson 20 | |
# Sample code | |
from sys import argv | |
def print_all(f): | |
print(f.read()) | |
This file contains 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/bash | |
me=`whoami` | |
max=`cat /sys/class/backlight/radeon_bl0/max_brightness` | |
sudo chown ${me}:${me} /sys/class/backlight/radeon_bl0/brightness | |
sudo chmod o+x /sys/class/backlight/radeon_bl0/brightness | |
ls -al /sys/class/backlight/radeon_bl0/brightness | |
echo ${max} > /sys/class/backlight/radeon_bl0/brightness | |
sudo chmod 444 /sys/class/backlight/radeon_bl0/brightness | |
sudo chown root:root /sys/class/backlight/radeon_bl0/brightness |
This file contains 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 python3 | |
import sys | |
from os import system | |
from urllib.parse import unquote | |
def decode(url): | |
"""Decodes url encoded string""" | |
return unquote(url) |
This file contains 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/bash | |
XORG=${1:-/var/log/Xorg.0.log} | |
HOSTNAME=`hostname -s` | |
SYSSERIAL=`sudo /usr/sbin/dmidecode -s system-serial-number` | |
#SHORTSERIAL=${SYSSERIAL%% *} | |
/usr/bin/awk -F": " ' | |
BEGIN { | |
sys="'${HOSTNAME}'"; | |
sysserial="'${SYSSERIAL}'"; |
This file contains 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 python3.6 | |
from sys import argv, exit | |
def start_stop(process): | |
"""Starts/Stops a process | |
It stops the process that is passed to it by killing it's process ID. If no | |
process ID is found, then the process is started. | |
""" |
OlderNewer