(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
class TestModel(unittest.TestCase): | |
def setUp(self): | |
self.order = Order() | |
def init_mock(self): | |
ary = dict() | |
ary["cached_pdf"] = PropertyMock(return_value='StoryTree/tests/fixtures/1.pdf') | |
ary["backcover"] = mock.Mock(return_value=image) | |
ary["frontcover"] = mock.Mock(return_value=image) | |
ary["input_files"] = mock.Mock(return_values=['']) |
<?php | |
class IoC { | |
protected static $registry = array(); | |
protected static $shared = array(); | |
// Register | |
public static function register($name, Closure $resolve) | |
{ | |
static::$registry[$name] = $resolve; |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>VilliMagg</string> | |
<key>name</key> | |
<string>Larapaste</string> | |
<key>settings</key> | |
<array><dict><key>name</key><string>mon_color</string><key>scope</key><string>mcol_46A609FF</string><key>settings</key><dict><key>background</key><string>#46A609FF</string><key>caret</key><string>#FFFFFFFF</string><key>foreground</key><string>#FFFFFFFF</string></dict></dict> |
# The MIT License | |
# | |
# Copyright (c) 2014 Vu Nhat Minh | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
pip install virtualenv # skip if you already have virtualenv | |
virtualenv venv | |
source venv/bin/activate # use the brand new virtualenv. | |
pip install rainbowstream # It may go long here | |
# Long output here ... | |
rainbow | |
# Note: if you are really want to use system's python, | |
# you can just "sudo pip install rainbowstream" and everything should be fine. |
{ | |
"IMAGE_SHIFT" : 30, // or higher to reduce image from 2 side | |
"IMAGE_MAX_HEIGHT" : 30, // or lower to control the max height | |
} |
DTVD >>> bhh : 500yen (questionable) | |
DTVD >>> bhh : 500yen (2014-07-09 16:00:00) |
#!/usr/bin/env python3 | |
import sys | |
import csv | |
import plistlib | |
import os | |
csv_file = sys.argv[1] | |
with open(csv_file, 'r', encoding='utf-8') as f: | |
result = list(csv.DictReader(f)) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.