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
execute pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
set cin | |
set ai | |
colorscheme darkblue | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 |
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 'optparse' | |
options = {} | |
optparse = OptionParser.new do |opts| | |
options[:verbose] = false | |
opts.banner = "Usage: #{$0} --option=value" | |
opts.on('-v', '--verbose') {options[:verbose] = true} | |
opts.on('-h', '--help') do | |
puts "Help message" |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: btsync | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: $local_fs $remote_fs | |
# Should-Start: $network | |
# Should-Stop: $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Multi-user daemonized version of btsync. |
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
rsync -av -e ssh [email protected]:~/logs/* ./logs/ # копирование с помощью rsync |
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
# Gemfile | |
gem 'rails_admin' | |
gem 'paperclip' |
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
[user] | |
name = Yan Mihailov | |
email = [email protected] | |
[push] | |
default = current | |
[color] | |
branch = auto | |
diff = auto | |
interactive = auto | |
status = auto |
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
=Algorithms | |
+ Дискретная математика для программистов Г. Хаггард | |
+ Concrete Mathematics: A Foundation for Computer Science Ronald L. Graham | |
+ Алгоритмы. Построение и анализ Томас Кормен | |
+ Искусство программирования. Том 1. Основные алгоритмы Дональд Кнут | |
+ The Algorithm Design Manual Steven S Skiena | |
+ Introduction to Distributed Algorithms Gerard Tel | |
+ Clever Algorithms: Nature-Inspired Programming Recipes Jason Brownlee |
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
package main | |
import "fmt" | |
func main(){ | |
a := 3 | |
if a == 3 { | |
fmt.Println("1. if-else, a == 3") | |
} else { | |
fmt.Println("1. if-else, a != 3") |
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
import timeit | |
time_python = timeit.timeit(""" | |
from itertools import groupby | |
from random import randint | |
import pandas as pd | |
accruals = [ | |
{'account': i, 'value': i * randint(0, 20), 'foo': randint(0, 10)} | |
for i in range(5000) |
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
package main | |
import "log" | |
func groupBy(vars []int) map[int][]int { | |
result := make(map[int][]int) | |
for _, value := range vars { | |
result[value] = append(result[value], value) | |
} |