Open Source Summer School
Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
participants:ioan-stan [2012/06/11 23:42]
istan
participants:ioan-stan [2012/06/11 23:45] (current)
istan
Line 55: Line 55:
  
  
-Queue from LinkedList:+Tema 3 USO:
 <​code>​ <​code>​
-void Queue<T>::enqueue(struct proces<​T>​ e+#​!/​bin/​bash 
-{ +#Stan Ioan-Mihail 
- this->​queueList.addLast(e); +#311 CA 
-} + 
-template <​typename T> +cd $1 
-struct proces<​T>​ Queue<​T>​::dequeue() +git checkout master &/dev/null 
-+ 
- struct proces<​T>​ x+#task 1 
- x.pid this -> queueList.pFirst ​-> value.pid+#comenzile imi afiseaza toate linile unde apare cuvantul Author ; separ dupa delimitatorul " " -spatiu in coloane astfel de la 2 pana la final de linie mi se vor afisa practic numele + mailurile autorilor de commituri ​(apelul functiei cut ), nume pe care le sortez corespunzator si carora le numar aparitiile ( sort | uniq -c | uniq -g -r 
- x.timp_aparitie ​this -> queueList.pFirst ​-> value.timp_aparitie+if test  $2 = "​-n" ​ ; then 
- x.durata ​this -> queueList.pFirst ​-> value.durata+ if test $4 = "​top_contributors"​ ; then 
- x.prioritate ​this -> queueList.pFirst ​-> value.prioritate+ git log | grep "​Author:"​ | head -$3 |sed -e 's/^[ \t]*//'​| cut -n -d ' ' -f 2- | sort | uniq -c | sort -g -r | head -$5 
- this -> queueList.removeFirst()+#in cazul in care nu exista argumentul 5 ($5head - va afisa toate liniile fisierului astfel punctez doua situatii posibile ( cand sunt trimisi 4 sau 5 parametrii )  
- return x+#exista posibilitatea ca path-ul unui fisier sa fie deplasat spre dreapta cu delimitatorii tab sau spacepentru a lua in considerare acea situatie am apleat la functia sed  
-  + fi 
-}+elif test $2 = "​top_contributors"​ ; then 
 + if test $# -eq 3 ; then 
 + git log| grep "​Author:"|sed -e 's/^[ \t]*//'​| cut -n -d ' ' -f 2- | sort | uniq -c | sort -g -r |head -$3  
 + fi 
 +fi 
 +#task 2 
 +#caut liniile care incep cu caractere numerice din statistica numstat a git log-ului; caut practic fisierele dupa statistica insertions 
 +if test $2 = "​-n"​ ; then 
 + if test $4 = "​added_lines"​ ; then  
 + if test $# -eq 5; then 
 + git log -$3 --numstat | grep ^[0-9] | tr "​\t"​ " " | grep " $5" | cut -f 1 | awk '{contor+=$1} END {print contor}'​ 
 +#exista posibilitatea ca un fisier cautat intr-o lista cu grep sa se gaseasca in 2 ierarhi de foldere diferite astfel pentru a gasi exact path-ul cerut schimb tab-urile cu spatii si caut exact folderul cerut punand un spatiu inainte de nume  
 + else 
 + git log -$3 --numstat | grep ^[0-9] | cut -f 1 | awk '​{contor+=$1} END {print contor}'​ 
 +#functia awk imi va aduna tot ce se gaseste pe coloana 1 din "​fisierul"​ creat din succesiunea de pipe-uri 
 + fi 
 + fi 
 +else 
 + if test  $2 = "​added_lines" ​then 
 + if test $# -eq 3; then 
 +                        git log --numstat | grep ^[0-9] |tr "​\t"​ " " | grep " $3" | cut -f 1 | awk '​{contor+=$1} END {print contor}'​ 
 +        else 
 +                        git log --numstat | grep ^[0-9] | cut -f 1 | awk '​{contor+=$1} END {print contor}'​ 
 +  
 +                fi 
 + fi 
 +fi 
 +#task 3 
 +#realizez statistici dupa coloana deletions din statistica numstat 
 +if test $2 = "​-n" ​then 
 + if test $4 "​deleted_lines"​ ; then  
 + if test $# -eq 5; then 
 + git log -$3 --numstat | grep ^[0-9] |tr "​\t"​ " " | grep " $5" | awk '​{print $2, $1, $3}' | cut -d " " -f 1  | awk '​{contor+=$1} END {print contor}'​ 
 + else 
 + git log -$3 --numstat | grep ^[0-9] | awk '​{print $2, $1, $3}'| cut -d " " -f 1  | awk '​{contor+=$1} END {print contor}'​ 
 +#prima functie awk imi interschimba coloane 
 + fi 
 + fi 
 +else 
 + if test  $2 = "​deleted_lines" ​then 
 + if test $# -eq 3; then 
 +                        git log --numstat | grep ^[0-9] | tr "​\t"​ " " | grep " $3" | awk '​{print $2, $1, $3}' | cut -d " " -f 1  | awk '​{contor+=$1} END {print contor}'​ 
 +  
 +                else 
 +                        git log --numstat | grep ^[0-9]|tr "​\t"​ " " | awk '​{print $2, $1, $3}'| cut -d " " -f 1  | awk '​{contor+=$1} END {print contor}'​ 
 + fi 
 + fi 
 +fi 
 +#task 4 
 +#statistica numstat a git log imi afiseaza toate fisierele modificate in vreun felliniile cu path-ul fisierelor sunt cele care incep cu caractere numerice sau - ; wc -l numara liniile dintr-un fisier 
 +if test $2 "-n" ; then 
 + if test $4 = "​touched_files"​ ; then  
 + if test $# -eq 5then 
 + git log -$3 --numstat --author="​$5"​ | grep ^[0-9-] | cut -f 3 | sort | uniq | wc -l 
 + else 
 + git log -$3 --numstat | grep ^[0-9-] | cut -f 3 | sort | uniq | wc -l 
 + ​ fi 
 + fi 
 +else 
 + if test  $2 = "​touched_files" ​then 
 + if test $# -eq 3then 
 +                        git log --numstat --author="​$3"​ | grep ^[0-9-] | cut -f 3 | sort |uniq | wc -l 
 +                else 
 +                        git log --numstat | grep -E ^[0-9-] | cut -f 3 | sort | uniq | wc -l 
 +                fi 
 + fi 
 +fi 
 + 
 +#task 5 
 +#git log branch1..branch2 afiseaza commiturile din branch-ul 2 care nu se gasesc in primul 
 +if test $2 = "​diff_branches"​ ; then 
 + echo "​Commits only in branch $3:" 
 + git log $4..$3 --oneline |  cut -d " " -f 2- 
 + echo 
 + echo "​Commits only in branch $4:" 
 + git log $3..$4 --oneline |  cut -d " " -f 2- 
 +fi 
 </​code>​ </​code>​

OS

Calendar
  • June 6 - June 15: Application period
  • Monday, June 22, 2015: intro of OSSS - presentation of people involved
  • June 23-26, June 29-July 3, 2015: presentations and hackathons
  • Friday, July 3, 2015: presentation of project outcomes, diplomas and prizes, closing
Powered by

CS

ROSEdu

Systems

QR Code: URL of current page
QR Code: URL of current page Ioan-Mihail Stan (generated for current page)