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
/** | |
* Redirect away from attachment and author pages | |
* Add this snippet to your functions or filters php files, as appropriate (if in doubt, the bottom of functions.php will do) | |
* Feel free to message thisOlivier on github/stackOverflow if you get stuck | |
* | |
*/ | |
add_action('template_redirect', function() { | |
if (is_attachment() || is_author()) { | |
global $post; | |
if ($post && $post->post_parent) { |
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 python | |
# ---------- | |
# To use | |
# 1) Save this script onto your computer in a file called `bankStatementMappingScript.py` | |
# 2) Make sure the statement to be transformed is named ‘statement.csv’ and is in the same directory as the script | |
# 3) Run this script with `$ python bankStatementMappingScript.py` | |
# Note) This script will output a new file called ‘transformedStatement.csv’. Running the script again will replace the new file. | |
# ---------- | |
# Helper functions are at the head, script body at the bottom. |
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
class Player(object): | |
def __init__ (self, playerNo): | |
self.name = "Player {}".format(playerNo) | |
self.cards = {} | |
def play (self): | |
print "\n---------\nYour hand contains:" | |
listHand = [] | |
for key in self.cards: | |
suit = self.cards[key].suit |
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
class Classroom(object): | |
def __init__(self, name = "Generic Classroom"): | |
self.name = name | |
self.room = [] | |
def add(self, childObj): | |
self.room.append(childObj) | |
return self | |
def allSpeak(self): |
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
<!DOCTYPE html> | |
<HTML> | |
<HEAD> | |
<title>A title</title> | |
<style> | |
body { | |
font-size: 15px; | |
font-family: sans-serif; | |
} | |
.icons { |
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
var engageSections = { | |
bind: function() { | |
var this2 = this; | |
$('.title-box').click(function() { | |
this2.open($(this)); | |
}); | |
$('.close-section').click(function() { | |
this2.close($(this)); | |
}); | |
}, |