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
library(igraph) | |
library(ggplot2) | |
rails <- read.csv("data/rails_edges.csv") | |
rails$repository1 <- substring(rails$repository1, 20) | |
rails$repository2 <- substring(rails$repository2, 20) | |
cntrb <- cbind(rails$repository2, rails$contributor_cnt) | |
rails <- rails[, c("repository1", "repository2", "actors_cnt")] | |
rbind(cntrb, c("rails/rails", 2049)) -> cntrb | |
cntrb <- as.data.frame(cntrb) | |
cntrb$V2 <- as.numeric(as.character(cntrb$V2)) |
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 | |
# HOWTO: | |
# replace ps292408/s292408 with your logins | |
# put "cd zad2/ && chmod +x run.sh && ./run.sh" in .bashrc on nvidia1/nvidia2 | |
# generate pubkey on nvidia-host and put in on students and vice versa. add server fingerprint etc | |
# on students: | |
# # mkdir repo && cd repo && git init --bare | |
# put this file in hooks/post-receive and chmod +x it | |
# on your dev station: |
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
#first element visible onscreen | |
el = $(".entity").filter((i, e) -> $(e).offset().top + $(e).outerHeight() - $(".entity").first().offset().top > $(window).scrollTop()).first() | |
prev = el.offset().top |
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
angular.module('future', []).directive('ngIf', [function() { | |
return { | |
transclude: 'element', | |
priority: 600, | |
terminal: true, | |
restrict: 'A', | |
$$tlb: true, | |
compile: function ($element, $attr, $transclude) { | |
return function link($scope, $element, $attr, ctrl){ | |
var block, childScope; |
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
//prosty datepicker, np. do daty urodzenia. Template na dole strony | |
.directive('datePicker', function($locale){ | |
var strToDate = function(date){ | |
if (_.isString(date)){ | |
var parts = date.split('-'); | |
return new Date(Date.UTC(parseInt(parts[0]), parseInt(parts[1], 10) - 1, parseInt(parts[2]))); | |
} | |
return date; | |
}; | |
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
cat in40 | awk '{$1=""; print $0}' > in0 | |
name=`echo -n $1 | sed s/' '//g` | |
echo $name | |
mkdir models${name} | |
for file in labels/*; do | |
echo $file | |
i=`echo -n $file | sed s/labels.//` | |
paste $file in0 -d " " > "in${i}" | |
../svmlight/svm_perf_learn "$1" "in${i}" "models${name}/model${i}" | |
rm "in${i}"; |
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
s = "en3pG3+nz+A2acXKrsyDouhViP9EDQS4JQK6uJqM3rBjKEBKC3yc=AA1=LUQqRPHvQ4dopgkbb/axClP3smzVcaTkRsCqHSG5aKFQ2TbOae0t5r4nWrCVesGK1Z3yEq+dClrDwXXOiAMyW09WdCS+CaKcfu=6kv9dUFBcS4KsUIgwMiXimoBpJZSWlBzILVf4zVA=7GjRP8RXn6uKjbjAPkpFEs/mYJpeOpEnhQfPhjoscgjfL5/SQsU6+jaAf5pg9MQzZdQAEJt7Jm1541fEmnumpjmJMd/MTJ5vzBttBBA7b5rbjDX0nHdTWn8C5suYKfNyYzc6x8S6FIepoEBsMS2mKhx5BRH5jSBrYRem4iQgYARzGnCFot3jPhp3cHj7qjXBWfZZASz8YJqi2d+r393AmdGm1L9NfU2f=FJprbLwJpuE7uT7xAlQA3Ry8aHRNgNkffP29Iqb2DSoQ0PK+9LX0t37HIAhI5zvoP6b4J7yQZEQDgeNlnPQMvSjw9pLWAxQ1VUY+NMU5BLZ2Bxuma1cIsHxcx4PwHcg0u1HYPJAWM2WK=xhJP5aQSc6oNMQK4s2=6guQRVFll6rvWkXTebrdsws7m/Kpa29spUFl8XzFx0ondEMCF3byAyWj875wAI3Hn8ZY92ddTAKj0s+a4X7qSti2lA0GzePHjBjMCD5g9kZYLtB94kkbVZ6eCle/xtto4LHH8GElc5YoUi=mk3nmQ5iOL1zMWfDyRUMLq+HCXbQL9NTejNa/yTdL3sayJOlMW1T7/Jmaz1FMbfBRFzruHeMT41=Zu3nYZJ3nIP22qKrFzNkt/24RuQ+7IMVCI2ngh2Yr8qLiL7QjSThRJPxA1wIJXwR2wqGiMhOqpun4DyQ5b/fTw1eTavpbFg6+tvqS4GKOt6p=bPoTV0GHIBBlXgHF/GUss90N0mXMKKiGwHhn/kyz=FxN0j=mfQUuUQa7lrZLjr10sqflWTwskIUkp1Cd8GYU4PaeWxiMBYFne4/8gJDt+dcZj |
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
### put this in your .bash_profile, .zshrc or whatever | |
pman () { man -t "$*" | open -fa Preview; } | |
pman pthread |
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
BEGIN; | |
CREATE TABLE "autor" ( | |
"id" serial NOT NULL PRIMARY KEY, | |
"imie" varchar(255) NOT NULL, | |
"nazwisko" varchar(255) NOT NULL, | |
"rok_urodzenia" integer NOT NULL, | |
"rok_smierci" integer | |
) | |
; | |
CREATE TABLE "wydawnictwo" ( |
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
SELECT e.id, e.rok_wydania, e.lokalizacja_id as lokalizacja_nazwa, e.lokalizacja_id as l_ident, | |
e.wydawnictwo_id as wydawnictwo_name, e.wydawnictwo_id as w_ident, | |
fullname(u.imie, u.nazwisko) as user_fullname, u.id as u_ident, | |
k.tytul as ksiazka_tytul, k.tytul as k_ident, | |
fullname(a.imie, a.nazwisko) as autor_fullname, a.id as a_ident, | |
wyp.id as wyp_ident, wyp.id IS NOT NULL as wypozyczony | |
FROM egzemplarz e LEFT OUTER JOIN wypozyczenia wyp ON wyp.egzemplarz = e.id AND wyp.data_zwrotu IS NULL | |
LEFT OUTER JOIN uzytkownik u ON wyp.uzytkownik = u.id | |
JOIN ksiazka k ON e.ksiazka_id = k.tytul | |
JOIN autor a ON a.id = k.autor_id; |