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 initialize | |
@root_dir = File.expand_path(File.dirname(__FILE__) + '/../') | |
@options = Trollop::options do | |
opt :asdf, | |
:type => String, | |
:default => "#{@root_dir}/qwer" | |
end |
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
require 'trollop' | |
class Test | |
attr_reader :a | |
attr_reader :opts | |
def initialize | |
@a = 'qwer' | |
@opts = Trollop::options do | |
opt :monkey, "Use monkey mode" # a flag --monkey, defaulting to false | |
opt :goat, "Use goat mode", :default => true # a flag --goat, defaulting to true |
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__ = 'U_M0AZC' | |
import random | |
import matplotlib.pyplot as plt | |
def set_choices(doors=3): | |
correct_choice = -1 | |
choices = [0 for i in range(doors)] | |
random.seed() |
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
<!DOCTYPE html> | |
<!-- | |
Theme: Ashley v0.5 | |
Author: Jxnblk [http://jxnblk.com] | |
For: Tumblr [http://tumblr.com/] | |
Terms: Protected under Creative Commons. | |
--> | |
<html lang="en"> |
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
nmap <buffer> <silent> ]] :call search('\\c^\\<select\\>', 'W' )<CR> | |
nmap <buffer> <silent> [[ :call search('\\c^\\<select\\>', 'bW' )<CR> | |
" abbreviations | |
iab <buffer> maxdate DATE'5999-12-31' | |
iab <buffer> select SELECT | |
iab <buffer> from FROM | |
iab <buffer> and AND | |
iab <buffer> or OR | |
iab <buffer> on ON |
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
# rbd at mac-mini in ~/Sites/iseetheline.ru on git:master x [23:27:40] | |
$ python | |
Python 2.7.5 (default, Jun 8 2013, 12:45:21) | |
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from datetime import timedelta as t | |
>>> x = t(days=3) | |
>>> y = t(days=2) | |
>>> (x-y)*0.5 | |
Traceback (most recent call last): |
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
-- take step in eratosphen cell by removing all multipliers of x in xs | |
ec_step :: Integer -> [Integer] -> [Integer] | |
ec_step 1 xs = xs | |
ec_step x xs = [ j | j <- xs, mod j x /= 0 ] | |
-- eratosphen cell recursive | |
ec_recc :: ([Integer], [Integer]) -> ([Integer], [Integer]) | |
ec_recc (ps, []) = (ps, []) |
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
(ns ledger-reports.core | |
(:gen-class)) | |
(require '[clojure.data.csv :as csv] | |
'[clojure.java.io :as io]) | |
(defn read-csv | |
[filename] | |
(def csv |
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 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Notebook</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> |