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
# $1 - name of file, that contains urls list | |
# $2 - name of output pdf file | |
url_list=$1 | |
output=$2 | |
set -- $(cat $url_list); count=0; | |
pdf_list="" | |
for arg; | |
do |
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
levenshtein2 sa sb = last $ foldl transform [0..length sa] sb | |
where | |
transform xs@(x:xs') c = scanl compute (x+1) (zip3 sa xs xs') | |
where | |
compute z (c', x, y) = minimum [y+1, z+1, x + fromEnum (c' /= c)] |
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
module Main where | |
import System.IO | |
import Data.Typeable | |
main :: IO () | |
main = do | |
inh <- openFile "out.dat" ReadMode | |
outh <- openFile "converted.dat" WriteMode | |
mainloop inh outh 99 | |
hClose inh |
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
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-} | |
import Network.HTTP.Conduit | |
import Data.Conduit | |
import Data.Conduit.Binary (sinkFile) | |
import Data.Text (Text) | |
import Text.JSON.Generic | |
import Control.Monad.IO.Class (liftIO) | |
import Control.Applicative ((<$>), (<*>)) |
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
x = np.linspace(0,1,6) | |
y = np.linspace(0,1,6) | |
circle = X**2 + Y**2 <= 1**2 | |
distance_X = np.sqrt(np.abs(1**2 - Y**2)) - X | |
cond = (np.abs(distance_X) < 0.2) & (circle) | |
X[cond] = (X - distance_X)[cond] | |
plt.plot(X, Y, 'ro') | |
plt.show() |
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
xvfb-run --server-args="-screen 0, 1024x768x24" cutycapt --url=http://$1 --out=$2.png |
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
# django.core.handlers.base.py | |
def get_response(self, request): | |
"Returns an HttpResponse object for the given HttpRequest" | |
# debug_toolbar add own middleware that set urlconf for request (it's module) | |
# so handler403 doesn't work | |
response = None | |
# Apply request middleware |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
# -*- coding: utf8 -*- | |
import numpy as np | |
import math | |
nx = 61 | |
ny = 25 | |
nz = 25 |
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
XXkb.mainwindow.enable: yes | |
XXkb.mainwindow.label.enable: yes | |
XXkb.mainwindow.type: tray | |
XXkb.mainwindow.appicon: no | |
XXkb.mainwindow.geometry: 15x15+0+0 | |
XXkb.mainwindow.label.background: black | |
XXkb.mainwindow.label.foreground: white | |
XXkb.mainwindow.label.font: -misc-*-r-*-14-* | |
XXkb.mainwindow.label.text.1: En | |
XXkb.mainwindow.label.text.2: Ru |
NewerOlder