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
| # Author: Mike Cardillo, 2017 | |
| # Email: [email protected] | |
| # Desc: Control speed of the Razer 'wave' effect by sending custom values to | |
| # the razerkbd driver and varying the sleep() time. | |
| import pyshark | |
| import time | |
| import os, sys | |
| RAZERKBD_SYSFS_PATH = '/sys/bus/hid/drivers/razerkbd/0003:1532:0221.0013/' |
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/env python | |
| from BeautifulSoup import BeautifulSoup | |
| import json | |
| html_doc = open("/Users/mcardill/Desktop/Mike Cardillo.html") | |
| soup = BeautifulSoup(html_doc) | |
| allFriends = soup.findAll("div", { "class": "fsl fwb fcb" }) |
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 | |
| ''' bitcoin-addresses.py - Demonstration of rarity in multiple bitcoin address generations ''' | |
| import random | |
| import sqlite3 | |
| class AddressStore: | |
| _get_sql = 'SELECT val FROM addresses WHERE key = ?' | |
| _max_sql = 'SELECT MAX(rowid) FROM addresses' | |
| _set_sql = 'INSERT INTO addresses (key, val) VALUES (?, ?)' |
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
| <?php | |
| $exec = shell_exec('uptime'); | |
| $uptime = explode(' up ', $exec); | |
| $uptime = explode(',', $uptime[1]); | |
| if (strpos($uptime[0], 'day')) { | |
| $time = explode(':', $uptime[1]); | |
| echo('Current system uptime is ' . $uptime[0]. ', ' . $time[0] . ' hours, ' . $time[1] . ' minutes'); | |
| } elseif (strpos($uptime[0], ':')) { | |
| $time = explode(':', $uptime[0]); | |
| echo('Current system uptime is ' . $time[0] . ' hours, ' . $time[1] . ' minutes'); |
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/env python | |
| """{escher} -- one-file key-value storage. | |
| What? | |
| This is a toy application to manage persistent key-value string data. | |
| The file {escher} is *both* the application and it's data. | |
| When you run any of the commands bellow, the file will be executed and, | |
| after data change, it will rewrite itself with updated data. | |
| You can copy the file with whatever name to create multiple datasets. |