Data Programming Course  Check-in [f6ddb73b2e]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:aggiunta la versione preliminare del tutorial su fossil
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f6ddb73b2eaee49c59bfcfa5af50c556c74a79d7
User & Date: EnricoGiampieri 2017-02-27 21:15:15
Context
2017-02-27
23:09
terminata la parte di lezione su fossil check-in: c44938df78 user: EnricoGiampieri tags: trunk
21:15
aggiunta la versione preliminare del tutorial su fossil check-in: f6ddb73b2e user: EnricoGiampieri tags: trunk
10:47
changed the reference link of the reveal.js position check-in: 5bc72bd894 user: EnricoGiampieri tags: trunk
Changes

Changes to Lezione 1 - controllo di versione.html.

11793
11794
11795
11796
11797
11798
11799
11800
11801


























































































































































































































































































































































































































































































































































































































































































































































































































































































































































11802
11803
11804
11805
11806
11807
11808
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>prova di matematica, da eliminare</p>
<p>$\int x^2 - x = 0$</p>



























































































































































































































































































































































































































































































































































































































































































































































































































































































































































</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>







|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Nel corso di questo modulo useremo due linguaggi di programmazione di alto livello, python e matlab.</p>
<p>Oltre a questi linguaggi ne esistono moltissimi altri, tutti appropriati all'uso:</p>
<ul>
<li>R</li>
<li>Julia</li>
<li>Mathematica</li>
<li>Scala</li>
<li>E tanti altri ancora</li>
</ul>

</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Vedremo anche nel corso delle lezioni vari concetti che vi torneranno utili qualsiasi sarà il linguaggio con cui deciderete di lavorare.</p>
<p>In particolare oggi inizieremo discutendo il controllo di versione.</p>
<p>Ma prima, che cosa sono i linguaggi di alto livello, e perché vale la pena usarli?</p>

</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="I-linguaggi-di-programmazione-ad-alto-livello">I linguaggi di programmazione ad alto livello<a class="anchor-link" href="#I-linguaggi-di-programmazione-ad-alto-livello">&#182;</a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Il termine "linguaggio di alto livello" è una forma colloquiale, non definita in senso formale, ma sono presenti varie proprietà che li accumunano.</p>
<p>Lo scopo comune è rendere <strong>molto</strong> più semplice lo sviluppo di codice. Tutto il tempo che non passo a cercare di ricordare come inizializzare un puntatore, lo posso spendere a rendere le mie analisi più interessanti</p>

</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<ul>
<li>nascondono la gestione diretta delle risorse del computer (memoria, puntatori, etc...)</li>
<li>forniscono una sintassi più intuitiva ed espressiva</li>
<li>arrivano corredati di molte funzioni e strutture dati di uso comune</li>
<li>rendono molto semplice installare librerie aggiuntive che ne espandono le funzionalità</li>
</ul>

</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Ciclo-di-vita-dell'analisi-dati">Ciclo di vita dell'analisi dati<a class="anchor-link" href="#Ciclo-di-vita-dell'analisi-dati">&#182;</a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Correttezza,-ripetibilit&#224;,-riproducibilit&#224;">Correttezza, ripetibilit&#224;, riproducibilit&#224;<a class="anchor-link" href="#Correttezza,-ripetibilit&#224;,-riproducibilit&#224;">&#182;</a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Controllo-di-versione-distribuito-e-Code-Source-Management">Controllo di versione distribuito e Code Source Management<a class="anchor-link" href="#Controllo-di-versione-distribuito-e-Code-Source-Management">&#182;</a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Introduzione-a-Fossil">Introduzione a Fossil<a class="anchor-link" href="#Introduzione-a-Fossil">&#182;</a></h2><p>si può scaricare dal suo sito web: <a href="https://www.fossil-scm.org/xfer/uv/download.html">Fossil-SCM</a></p>

</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[74]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">contextlib</span>
<span class="n">os</span><span class="o">.</span><span class="n">chdir</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">expanduser</span><span class="p">(</span><span class="s1">&#39;~/lavoro/fossilexample&#39;</span><span class="p">))</span>

<span class="k">with</span> <span class="n">contextlib</span><span class="o">.</span><span class="n">suppress</span><span class="p">(</span><span class="ne">FileExistsError</span><span class="p">):</span>
    <span class="n">os</span><span class="o">.</span><span class="n">mkdir</span><span class="p">(</span><span class="s1">&#39;../fossilexample/&#39;</span><span class="p">)</span>
<span class="n">os</span><span class="o">.</span><span class="n">chdir</span><span class="p">(</span><span class="s1">&#39;../fossilexample/&#39;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">getcwd</span><span class="p">())</span>
<span class="k">with</span> <span class="n">contextlib</span><span class="o">.</span><span class="n">suppress</span><span class="p">(</span><span class="ne">FileNotFoundError</span><span class="p">):</span>
    <span class="n">os</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="s1">&#39;mytestrepo.fossil&#39;</span><span class="p">)</span>
<span class="kn">import</span> <span class="nn">shutil</span>
<span class="n">shutil</span><span class="o">.</span><span class="n">rmtree</span><span class="p">(</span><span class="s1">&#39;working_directory&#39;</span><span class="p">,</span> <span class="n">ignore_errors</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">listdir</span><span class="p">(</span><span class="s1">&#39;.&#39;</span><span class="p">))</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>/home/enrico/lavoro/fossilexample
[]
</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[75]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil init mytestrepo.fossil
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>project-id: 08090f56228b95bd9372d6d15fc632dcaaa91edb
server-id:  0f917f69c95b135b5e526bc91e8028ce98b09083
admin-user: enrico (initial password is &#34;b16604&#34;)
</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[76]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">%</span><span class="k">ls</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>mytestrepo.fossil
</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[77]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">%</span><span class="k">mkdir</span> -p working_directory
<span class="o">%</span><span class="k">cd</span> working_directory
<span class="o">%</span><span class="k">pwd</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>/home/enrico/lavoro/fossilexample/working_directory
</pre>
</div>
</div>

<div class="output_area">
<div class="prompt output_prompt">Out[77]:</div>



<div class="output_text output_subarea output_execute_result">
<pre>&#39;/home/enrico/lavoro/fossilexample/working_directory&#39;</pre>
</div>

</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[78]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil open ../mytestrepo.fossil
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>project-name: &lt;unnamed&gt;
repository:   /home/enrico/lavoro/fossilexample/working_directory/../mytestrepo.fossil
local-root:   /home/enrico/lavoro/fossilexample/working_directory/
config-db:    /home/enrico/.fossil
project-code: 08090f56228b95bd9372d6d15fc632dcaaa91edb
checkout:     e17a3d4a58fef68da694289aa32334d82bde5234 2017-02-27 20:27:38 UTC
tags:         trunk
comment:      initial empty check-in (user: enrico)
check-ins:    1
</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[79]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">%%</span><span class="k">writefile</span> test.txt
This is going to be my documentation
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>Writing test.txt
</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[80]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil status
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>repository:   /home/enrico/lavoro/fossilexample/working_directory/../mytestrepo.fossil
local-root:   /home/enrico/lavoro/fossilexample/working_directory/
config-db:    /home/enrico/.fossil
checkout:     e17a3d4a58fef68da694289aa32334d82bde5234 2017-02-27 20:27:38 UTC
tags:         trunk
comment:      initial empty check-in (user: enrico)
</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[81]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil extra
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>test.txt
</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[82]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil add test.txt
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>ADDED  test.txt
</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[83]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil status
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>repository:   /home/enrico/lavoro/fossilexample/working_directory/../mytestrepo.fossil
local-root:   /home/enrico/lavoro/fossilexample/working_directory/
config-db:    /home/enrico/.fossil
checkout:     e17a3d4a58fef68da694289aa32334d82bde5234 2017-02-27 20:27:38 UTC
tags:         trunk
comment:      initial empty check-in (user: enrico)
ADDED      test.txt
</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[84]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil commit -m <span class="s2">&quot;il primo file di un grande progetto!&quot;</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>New_Version: 2dab9716e96fab6bcf87e8d8e17b3a672bfea4eb
</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[85]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil status
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>repository:   /home/enrico/lavoro/fossilexample/working_directory/../mytestrepo.fossil
local-root:   /home/enrico/lavoro/fossilexample/working_directory/
config-db:    /home/enrico/.fossil
checkout:     2dab9716e96fab6bcf87e8d8e17b3a672bfea4eb 2017-02-27 20:34:25 UTC
parent:       e17a3d4a58fef68da694289aa32334d82bde5234 2017-02-27 20:27:38 UTC
tags:         trunk
comment:      il primo file di un grande progetto! (user: enrico)
</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>a questo punto potete vedere cosa succere lanciando il comando</p>

<pre><code>fossil ui</code></pre>

</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="timeline">timeline<a class="anchor-link" href="#timeline">&#182;</a></h3><p><img src="./immagini/interfaccia_fossil_1.png" alt="timeline"></p>

</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="file-list">file list<a class="anchor-link" href="#file-list">&#182;</a></h3><p><img src="./immagini/interfaccia_fossil_2.png" alt="file list"></p>

</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[86]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">%%</span><span class="k">writefile</span> test.txt
This is going to be my documentation
I&#39;m adding more lines: the more, the merrier!
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>Overwriting test.txt
</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[87]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil status
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>repository:   /home/enrico/lavoro/fossilexample/working_directory/../mytestrepo.fossil
local-root:   /home/enrico/lavoro/fossilexample/working_directory/
config-db:    /home/enrico/.fossil
checkout:     2dab9716e96fab6bcf87e8d8e17b3a672bfea4eb 2017-02-27 20:34:25 UTC
parent:       e17a3d4a58fef68da694289aa32334d82bde5234 2017-02-27 20:27:38 UTC
tags:         trunk
comment:      il primo file di un grande progetto! (user: enrico)
EDITED     test.txt
</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[89]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil diff test.txt
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>Index: test.txt
==================================================================
--- test.txt
+++ test.txt
@@ -1,1 +1,2 @@
 This is going to be my documentation
+I&#39;m adding more lines: the more, the merrier!

</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[90]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil commit -m <span class="s2">&quot;espansa la documentazione&quot;</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>New_Version: 1856bb82f3515646637061c6e062c117fc646192
</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="nuova-timeline">nuova timeline<a class="anchor-link" href="#nuova-timeline">&#182;</a></h3><p><img src="./immagini/interfaccia_fossil_3.png" alt="timeline nuova"></p>

</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="approfondimenti-sull'edit">approfondimenti sull'edit<a class="anchor-link" href="#approfondimenti-sull'edit">&#182;</a></h3><p><img src="./immagini/interfaccia_fossil_4.png" alt="info edit"></p>

</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>mi sono accorto di aver fatto un errore!</p>
<p>come posso rimediare?</p>
<p>Per prima cosa, lascio traccia della decisione: apro un ticket.</p>

</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="preparazione-del-ticket">preparazione del ticket<a class="anchor-link" href="#preparazione-del-ticket">&#182;</a></h3><p><img src="./immagini/interfaccia_fossil_5.png" alt="ticket preparation"></p>

</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="la-lista-dei-ticket">la lista dei ticket<a class="anchor-link" href="#la-lista-dei-ticket">&#182;</a></h3><p><img src="./immagini/interfaccia_fossil_6.png" alt="ticket list"></p>

</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[95]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil <span class="nb">help</span> revert
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>Usage: fossil revert ?-r REVISION? ?FILE ...?

Revert to the current repository version of FILE, or to
the version associated with baseline REVISION if the -r flag
appears.

If FILE was part of a rename operation, both the original file
and the renamed file are reverted.

Revert all files if no file name is provided.

If a file is reverted accidently, it can be restored using
the &#34;fossil undo&#34; command.

Options:
  -r REVISION    revert given FILE(s) back to given REVISION

See also: redo, undo, update
</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[97]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil revert -r  2dab9716e9 test.txt
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>REVERT   test.txt
 &#34;fossil undo&#34; is available to undo changes to the working checkout.
</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[98]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil status
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>repository:   /home/enrico/lavoro/fossilexample/working_directory/../mytestrepo.fossil
local-root:   /home/enrico/lavoro/fossilexample/working_directory/
config-db:    /home/enrico/.fossil
checkout:     1856bb82f3515646637061c6e062c117fc646192 2017-02-27 20:42:51 UTC
parent:       2dab9716e96fab6bcf87e8d8e17b3a672bfea4eb 2017-02-27 20:34:25 UTC
tags:         trunk
comment:      espansa la documentazione (user: enrico)
EDITED     test.txt
</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[99]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil diff test.txt
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>Index: test.txt
==================================================================
--- test.txt
+++ test.txt
@@ -1,2 +1,1 @@
 This is going to be my documentation
-I&#39;m adding more lines: the more, the merrier!

</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[100]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil commit -m <span class="s2">&quot;riportato l&#39;ordine nel repository!&quot;</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>New_Version: 488479276df60e9fd055d5dbe07ee6c37b30beb3
</pre>
</div>
</div>

</div>
</div>

</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>ora non mi rimane che chiudere il ticket e continuare il mio lavoro</p>

</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="branching">branching<a class="anchor-link" href="#branching">&#182;</a></h3><p>una funzionalità molto potente per il controllo di versione è la possibilità di fare branching.</p>
<p>Questo significa che nel mio database esistono nello stesso momento due versioni diverse dello stesso progetto, e posso passare da un all'altra senza problemi.</p>
<p>Un grosso vantaggio del modello di DVCS di fossil è che posso usare diverse cartelle per diversi branch, ed avere il tutto sincronizzato!</p>

</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="un-caso-tipico-di-branching">un caso tipico di branching<a class="anchor-link" href="#un-caso-tipico-di-branching">&#182;</a></h3><p>avete appena raggiunto un risultato pubblicabile con le vostre analisi, e volete prepararvi per pubblicarle.</p>
<p>Questo significa che non altererete più il codice in modo sostanziale (volete mantenere l'integrità dei risultati), ma magari aggiusterete i grafici ed i report.</p>
<p>Allo stesso momento, i vostri collaboratori vi chiedono di fare delle modifiche piuttosto importanti del codice.
Come potete fare?</p>
<p>Usando due diverse branch siete in grado di dividere il lavoro senza fare confusione, ma mantenendo tutto sempre sotto controllo (e con la possibilità di far passare i risultati da un branch all'altro con <strong>revert</strong>).</p>

</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>

Changes to Lezione 1 - controllo di versione.ipynb.

1
2
3
4
5


6
7
8
9
10
11
12
13
14
15
16


17
18
19
20
21
22
23
24
25
26
27



28
29
30
31
32
33

34
35































































































































































































































































































































































































































































































































































































































































































































































































































































36
37
38
39
40
41
42
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {


    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "# Modulo di scrittura software e Gestione Dati"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {


    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "Questo modulo ha lo scopo di introdurvi alle basi della programmazione ed alla sua applicazione al campo scientifico."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {



    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "prova di matematica, da eliminare\n",

    "\n",
    "$\\int x^2 - x = 0$"































































































































































































































































































































































































































































































































































































































































































































































































































































   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true





>
>











>
>











>
>
>





<
>

<
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

40
41

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "# Modulo di scrittura software e Gestione Dati"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "Questo modulo ha lo scopo di introdurvi alle basi della programmazione ed alla sua applicazione al campo scientifico."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true,
    "deletable": true,
    "editable": true,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [

    "Nel corso di questo modulo useremo due linguaggi di programmazione di alto livello, python e matlab.\n",
    "\n",

    "Oltre a questi linguaggi ne esistono moltissimi altri, tutti appropriati all'uso:\n",
    "\n",
    "* R\n",
    "* Julia\n",
    "* Mathematica\n",
    "* Scala\n",
    "* E tanti altri ancora"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "Vedremo anche nel corso delle lezioni vari concetti che vi torneranno utili qualsiasi sarà il linguaggio con cui deciderete di lavorare.\n",
    "\n",
    "In particolare oggi inizieremo discutendo il controllo di versione.\n",
    "\n",
    "Ma prima, che cosa sono i linguaggi di alto livello, e perché vale la pena usarli?"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true,
    "deletable": true,
    "editable": true,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## I linguaggi di programmazione ad alto livello"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "Il termine \"linguaggio di alto livello\" è una forma colloquiale, non definita in senso formale, ma sono presenti varie proprietà che li accumunano. \n",
    "\n",
    "Lo scopo comune è rendere **molto** più semplice lo sviluppo di codice. Tutto il tempo che non passo a cercare di ricordare come inizializzare un puntatore, lo posso spendere a rendere le mie analisi più interessanti"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "* nascondono la gestione diretta delle risorse del computer (memoria, puntatori, etc...)\n",
    "* forniscono una sintassi più intuitiva ed espressiva\n",
    "* arrivano corredati di molte funzioni e strutture dati di uso comune\n",
    "* rendono molto semplice installare librerie aggiuntive che ne espandono le funzionalità"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Ciclo di vita dell'analisi dati"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Correttezza, ripetibilità, riproducibilità"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true,
    "deletable": true,
    "editable": true,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Controllo di versione distribuito e Code Source Management"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Introduzione a Fossil\n",
    "\n",
    "si può scaricare dal suo sito web: [Fossil-SCM](https://www.fossil-scm.org/xfer/uv/download.html)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "skip"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/home/enrico/lavoro/fossilexample\n",
      "[]\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "import contextlib\n",
    "os.chdir(os.path.expanduser('~/lavoro/fossilexample'))\n",
    "\n",
    "with contextlib.suppress(FileExistsError):\n",
    "    os.mkdir('../fossilexample/')\n",
    "os.chdir('../fossilexample/')\n",
    "print(os.getcwd())\n",
    "with contextlib.suppress(FileNotFoundError):\n",
    "    os.remove('mytestrepo.fossil')\n",
    "import shutil\n",
    "shutil.rmtree('working_directory', ignore_errors=True)\n",
    "print(os.listdir('.'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "project-id: 08090f56228b95bd9372d6d15fc632dcaaa91edb\n",
      "server-id:  0f917f69c95b135b5e526bc91e8028ce98b09083\n",
      "admin-user: enrico (initial password is \"b16604\")\n"
     ]
    }
   ],
   "source": [
    "!fossil init mytestrepo.fossil"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "mytestrepo.fossil\r\n"
     ]
    }
   ],
   "source": [
    "%ls"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/home/enrico/lavoro/fossilexample/working_directory\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "'/home/enrico/lavoro/fossilexample/working_directory'"
      ]
     },
     "execution_count": 77,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%mkdir -p working_directory\n",
    "%cd working_directory\n",
    "%pwd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "project-name: <unnamed>\n",
      "repository:   /home/enrico/lavoro/fossilexample/working_directory/../mytestrepo.fossil\n",
      "local-root:   /home/enrico/lavoro/fossilexample/working_directory/\n",
      "config-db:    /home/enrico/.fossil\n",
      "project-code: 08090f56228b95bd9372d6d15fc632dcaaa91edb\n",
      "checkout:     e17a3d4a58fef68da694289aa32334d82bde5234 2017-02-27 20:27:38 UTC\n",
      "tags:         trunk\n",
      "comment:      initial empty check-in (user: enrico)\n",
      "check-ins:    1\n"
     ]
    }
   ],
   "source": [
    "!fossil open ../mytestrepo.fossil"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Writing test.txt\n"
     ]
    }
   ],
   "source": [
    "%%writefile test.txt\n",
    "This is going to be my documentation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "repository:   /home/enrico/lavoro/fossilexample/working_directory/../mytestrepo.fossil\r\n",
      "local-root:   /home/enrico/lavoro/fossilexample/working_directory/\r\n",
      "config-db:    /home/enrico/.fossil\r\n",
      "checkout:     e17a3d4a58fef68da694289aa32334d82bde5234 2017-02-27 20:27:38 UTC\r\n",
      "tags:         trunk\r\n",
      "comment:      initial empty check-in (user: enrico)\r\n"
     ]
    }
   ],
   "source": [
    "!fossil status"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "test.txt\r\n"
     ]
    }
   ],
   "source": [
    "!fossil extra"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ADDED  test.txt\r\n"
     ]
    }
   ],
   "source": [
    "!fossil add test.txt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "repository:   /home/enrico/lavoro/fossilexample/working_directory/../mytestrepo.fossil\n",
      "local-root:   /home/enrico/lavoro/fossilexample/working_directory/\n",
      "config-db:    /home/enrico/.fossil\n",
      "checkout:     e17a3d4a58fef68da694289aa32334d82bde5234 2017-02-27 20:27:38 UTC\n",
      "tags:         trunk\n",
      "comment:      initial empty check-in (user: enrico)\n",
      "ADDED      test.txt\n"
     ]
    }
   ],
   "source": [
    "!fossil status"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "New_Version: 2dab9716e96fab6bcf87e8d8e17b3a672bfea4eb\r\n"
     ]
    }
   ],
   "source": [
    "!fossil commit -m \"il primo file di un grande progetto!\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "repository:   /home/enrico/lavoro/fossilexample/working_directory/../mytestrepo.fossil\r\n",
      "local-root:   /home/enrico/lavoro/fossilexample/working_directory/\r\n",
      "config-db:    /home/enrico/.fossil\r\n",
      "checkout:     2dab9716e96fab6bcf87e8d8e17b3a672bfea4eb 2017-02-27 20:34:25 UTC\r\n",
      "parent:       e17a3d4a58fef68da694289aa32334d82bde5234 2017-02-27 20:27:38 UTC\r\n",
      "tags:         trunk\r\n",
      "comment:      il primo file di un grande progetto! (user: enrico)\r\n"
     ]
    }
   ],
   "source": [
    "!fossil status"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "a questo punto potete vedere cosa succere lanciando il comando\n",
    "\n",
    "    fossil ui"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "### timeline\n",
    "\n",
    "![timeline](./immagini/interfaccia_fossil_1.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "### file list\n",
    "\n",
    "![file list](./immagini/interfaccia_fossil_2.png)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Overwriting test.txt\n"
     ]
    }
   ],
   "source": [
    "%%writefile test.txt\n",
    "This is going to be my documentation\n",
    "I'm adding more lines: the more, the merrier!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "repository:   /home/enrico/lavoro/fossilexample/working_directory/../mytestrepo.fossil\n",
      "local-root:   /home/enrico/lavoro/fossilexample/working_directory/\n",
      "config-db:    /home/enrico/.fossil\n",
      "checkout:     2dab9716e96fab6bcf87e8d8e17b3a672bfea4eb 2017-02-27 20:34:25 UTC\n",
      "parent:       e17a3d4a58fef68da694289aa32334d82bde5234 2017-02-27 20:27:38 UTC\n",
      "tags:         trunk\n",
      "comment:      il primo file di un grande progetto! (user: enrico)\n",
      "EDITED     test.txt\n"
     ]
    }
   ],
   "source": [
    "!fossil status"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Index: test.txt\r\n",
      "==================================================================\r\n",
      "--- test.txt\r\n",
      "+++ test.txt\r\n",
      "@@ -1,1 +1,2 @@\r\n",
      " This is going to be my documentation\r\n",
      "+I'm adding more lines: the more, the merrier!\r\n",
      "\r\n"
     ]
    }
   ],
   "source": [
    "!fossil diff test.txt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "New_Version: 1856bb82f3515646637061c6e062c117fc646192\r\n"
     ]
    }
   ],
   "source": [
    "!fossil commit -m \"espansa la documentazione\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "### nuova timeline\n",
    "\n",
    "![timeline nuova](./immagini/interfaccia_fossil_3.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "### approfondimenti sull'edit\n",
    "\n",
    "![info edit](./immagini/interfaccia_fossil_4.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "mi sono accorto di aver fatto un errore!\n",
    "\n",
    "come posso rimediare?\n",
    "\n",
    "Per prima cosa, lascio traccia della decisione: apro un ticket."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "### preparazione del ticket\n",
    "\n",
    "![ticket preparation](./immagini/interfaccia_fossil_5.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "### la lista dei ticket\n",
    "\n",
    "![ticket list](./immagini/interfaccia_fossil_6.png)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Usage: fossil revert ?-r REVISION? ?FILE ...?\r\n",
      "\r\n",
      "Revert to the current repository version of FILE, or to\r\n",
      "the version associated with baseline REVISION if the -r flag\r\n",
      "appears.\r\n",
      "\r\n",
      "If FILE was part of a rename operation, both the original file\r\n",
      "and the renamed file are reverted.\r\n",
      "\r\n",
      "Revert all files if no file name is provided.\r\n",
      "\r\n",
      "If a file is reverted accidently, it can be restored using\r\n",
      "the \"fossil undo\" command.\r\n",
      "\r\n",
      "Options:\r\n",
      "  -r REVISION    revert given FILE(s) back to given REVISION\r\n",
      "\r\n",
      "See also: redo, undo, update\r\n"
     ]
    }
   ],
   "source": [
    "!fossil help revert"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "fragment"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "REVERT   test.txt\r\n",
      " \"fossil undo\" is available to undo changes to the working checkout.\r\n"
     ]
    }
   ],
   "source": [
    "!fossil revert -r  2dab9716e9 test.txt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "repository:   /home/enrico/lavoro/fossilexample/working_directory/../mytestrepo.fossil\n",
      "local-root:   /home/enrico/lavoro/fossilexample/working_directory/\n",
      "config-db:    /home/enrico/.fossil\n",
      "checkout:     1856bb82f3515646637061c6e062c117fc646192 2017-02-27 20:42:51 UTC\n",
      "parent:       2dab9716e96fab6bcf87e8d8e17b3a672bfea4eb 2017-02-27 20:34:25 UTC\n",
      "tags:         trunk\n",
      "comment:      espansa la documentazione (user: enrico)\n",
      "EDITED     test.txt\n"
     ]
    }
   ],
   "source": [
    "!fossil status"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "fragment"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Index: test.txt\r\n",
      "==================================================================\r\n",
      "--- test.txt\r\n",
      "+++ test.txt\r\n",
      "@@ -1,2 +1,1 @@\r\n",
      " This is going to be my documentation\r\n",
      "-I'm adding more lines: the more, the merrier!\r\n",
      "\r\n"
     ]
    }
   ],
   "source": [
    "!fossil diff test.txt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "metadata": {
    "collapsed": false,
    "slideshow": {
     "slide_type": "fragment"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "New_Version: 488479276df60e9fd055d5dbe07ee6c37b30beb3\r\n"
     ]
    }
   ],
   "source": [
    "!fossil commit -m \"riportato l'ordine nel repository!\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "fragment"
    }
   },
   "source": [
    "ora non mi rimane che chiudere il ticket e continuare il mio lavoro"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "### branching\n",
    "\n",
    "una funzionalità molto potente per il controllo di versione è la possibilità di fare branching.\n",
    "\n",
    "Questo significa che nel mio database esistono nello stesso momento due versioni diverse dello stesso progetto, e posso passare da un all'altra senza problemi.\n",
    "\n",
    "Un grosso vantaggio del modello di DVCS di fossil è che posso usare diverse cartelle per diversi branch, ed avere il tutto sincronizzato!"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### un caso tipico di branching\n",
    "\n",
    "avete appena raggiunto un risultato pubblicabile con le vostre analisi, e volete prepararvi per pubblicarle.\n",
    "\n",
    "Questo significa che non altererete più il codice in modo sostanziale (volete mantenere l'integrità dei risultati), ma magari aggiusterete i grafici ed i report.\n",
    "\n",
    "Allo stesso momento, i vostri collaboratori vi chiedono di fare delle modifiche piuttosto importanti del codice.\n",
    "Come potete fare?\n",
    "\n",
    "Usando due diverse branch siete in grado di dividere il lavoro senza fare confusione, ma mantenendo tutto sempre sotto controllo (e con la possibilità di far passare i risultati da un branch all'altro con **revert**)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true

Changes to Lezione 1 - controllo di versione.slides.html.

11874
11875
11876
11877
11878
11879
11880
11881
11882
















































































































































































































































































































































































































































































































































































































































































































































































































































































































11883
11884
11885
11886
11887
11888
11889
</div>
</div></section></section><section><section>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>prova di matematica, da eliminare</p>
<p>$\int x^2 - x = 0$</p>

















































































































































































































































































































































































































































































































































































































































































































































































































































































































</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>







|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
</div>
</div></section></section><section><section>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Nel corso di questo modulo useremo due linguaggi di programmazione di alto livello, python e matlab.</p>
<p>Oltre a questi linguaggi ne esistono moltissimi altri, tutti appropriati all'uso:</p>
<ul>
<li>R</li>
<li>Julia</li>
<li>Mathematica</li>
<li>Scala</li>
<li>E tanti altri ancora</li>
</ul>

</div>
</div>
</div></section></section><section><section>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Vedremo anche nel corso delle lezioni vari concetti che vi torneranno utili qualsiasi sarà il linguaggio con cui deciderete di lavorare.</p>
<p>In particolare oggi inizieremo discutendo il controllo di versione.</p>
<p>Ma prima, che cosa sono i linguaggi di alto livello, e perché vale la pena usarli?</p>

</div>
</div>
</div></section></section><section><section>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="I-linguaggi-di-programmazione-ad-alto-livello">I linguaggi di programmazione ad alto livello<a class="anchor-link" href="#I-linguaggi-di-programmazione-ad-alto-livello">&#182;</a></h2>
</div>
</div>
</div></section></section><section><section>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Il termine "linguaggio di alto livello" è una forma colloquiale, non definita in senso formale, ma sono presenti varie proprietà che li accumunano.</p>
<p>Lo scopo comune è rendere <strong>molto</strong> più semplice lo sviluppo di codice. Tutto il tempo che non passo a cercare di ricordare come inizializzare un puntatore, lo posso spendere a rendere le mie analisi più interessanti</p>

</div>
</div>
</div></section></section><section><section>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<ul>
<li>nascondono la gestione diretta delle risorse del computer (memoria, puntatori, etc...)</li>
<li>forniscono una sintassi più intuitiva ed espressiva</li>
<li>arrivano corredati di molte funzioni e strutture dati di uso comune</li>
<li>rendono molto semplice installare librerie aggiuntive che ne espandono le funzionalità</li>
</ul>

</div>
</div>
</div></section></section><section><section>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Ciclo-di-vita-dell'analisi-dati">Ciclo di vita dell'analisi dati<a class="anchor-link" href="#Ciclo-di-vita-dell'analisi-dati">&#182;</a></h2>
</div>
</div>
</div></section></section><section><section>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Correttezza,-ripetibilit&#224;,-riproducibilit&#224;">Correttezza, ripetibilit&#224;, riproducibilit&#224;<a class="anchor-link" href="#Correttezza,-ripetibilit&#224;,-riproducibilit&#224;">&#182;</a></h2>
</div>
</div>
</div></section></section><section><section>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Controllo-di-versione-distribuito-e-Code-Source-Management">Controllo di versione distribuito e Code Source Management<a class="anchor-link" href="#Controllo-di-versione-distribuito-e-Code-Source-Management">&#182;</a></h2>
</div>
</div>
</div></section></section><section><section>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Introduzione-a-Fossil">Introduzione a Fossil<a class="anchor-link" href="#Introduzione-a-Fossil">&#182;</a></h2><p>si può scaricare dal suo sito web: <a href="https://www.fossil-scm.org/xfer/uv/download.html">Fossil-SCM</a></p>

</div>
</div>
</div></section></section><section><section>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[75]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil init mytestrepo.fossil
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>project-id: 08090f56228b95bd9372d6d15fc632dcaaa91edb
server-id:  0f917f69c95b135b5e526bc91e8028ce98b09083
admin-user: enrico (initial password is &#34;b16604&#34;)
</pre>
</div>
</div>

</div>
</div>

</div></section></section><section><section>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[76]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">%</span><span class="k">ls</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>mytestrepo.fossil
</pre>
</div>
</div>

</div>
</div>

</div></section></section><section><section>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[77]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">%</span><span class="k">mkdir</span> -p working_directory
<span class="o">%</span><span class="k">cd</span> working_directory
<span class="o">%</span><span class="k">pwd</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>/home/enrico/lavoro/fossilexample/working_directory
</pre>
</div>
</div>

<div class="output_area">
<div class="prompt output_prompt">Out[77]:</div>



<div class="output_text output_subarea output_execute_result">
<pre>&#39;/home/enrico/lavoro/fossilexample/working_directory&#39;</pre>
</div>

</div>

</div>
</div>

</div></section></section><section><section>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[78]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil open ../mytestrepo.fossil
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>project-name: &lt;unnamed&gt;
repository:   /home/enrico/lavoro/fossilexample/working_directory/../mytestrepo.fossil
local-root:   /home/enrico/lavoro/fossilexample/working_directory/
config-db:    /home/enrico/.fossil
project-code: 08090f56228b95bd9372d6d15fc632dcaaa91edb
checkout:     e17a3d4a58fef68da694289aa32334d82bde5234 2017-02-27 20:27:38 UTC
tags:         trunk
comment:      initial empty check-in (user: enrico)
check-ins:    1
</pre>
</div>
</div>

</div>
</div>

</div></section></section><section><section>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[79]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">%%</span><span class="k">writefile</span> test.txt
This is going to be my documentation
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>Writing test.txt
</pre>
</div>
</div>

</div>
</div>

</div></section></section><section><section>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[80]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil status
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>repository:   /home/enrico/lavoro/fossilexample/working_directory/../mytestrepo.fossil
local-root:   /home/enrico/lavoro/fossilexample/working_directory/
config-db:    /home/enrico/.fossil
checkout:     e17a3d4a58fef68da694289aa32334d82bde5234 2017-02-27 20:27:38 UTC
tags:         trunk
comment:      initial empty check-in (user: enrico)
</pre>
</div>
</div>

</div>
</div>

</div></section></section><section><section>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[81]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil extra
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>test.txt
</pre>
</div>
</div>

</div>
</div>

</div></section></section><section><section>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[82]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil add test.txt
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>ADDED  test.txt
</pre>
</div>
</div>

</div>
</div>

</div></section></section><section><section>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[83]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil status
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>repository:   /home/enrico/lavoro/fossilexample/working_directory/../mytestrepo.fossil
local-root:   /home/enrico/lavoro/fossilexample/working_directory/
config-db:    /home/enrico/.fossil
checkout:     e17a3d4a58fef68da694289aa32334d82bde5234 2017-02-27 20:27:38 UTC
tags:         trunk
comment:      initial empty check-in (user: enrico)
ADDED      test.txt
</pre>
</div>
</div>

</div>
</div>

</div></section></section><section><section>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[84]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil commit -m <span class="s2">&quot;il primo file di un grande progetto!&quot;</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>New_Version: 2dab9716e96fab6bcf87e8d8e17b3a672bfea4eb
</pre>
</div>
</div>

</div>
</div>

</div></section></section><section><section>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[85]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil status
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>repository:   /home/enrico/lavoro/fossilexample/working_directory/../mytestrepo.fossil
local-root:   /home/enrico/lavoro/fossilexample/working_directory/
config-db:    /home/enrico/.fossil
checkout:     2dab9716e96fab6bcf87e8d8e17b3a672bfea4eb 2017-02-27 20:34:25 UTC
parent:       e17a3d4a58fef68da694289aa32334d82bde5234 2017-02-27 20:27:38 UTC
tags:         trunk
comment:      il primo file di un grande progetto! (user: enrico)
</pre>
</div>
</div>

</div>
</div>

</div></section></section><section><section>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>a questo punto potete vedere cosa succere lanciando il comando</p>

<pre><code>fossil ui</code></pre>

</div>
</div>
</div></section></section><section><section>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="timeline">timeline<a class="anchor-link" href="#timeline">&#182;</a></h3><p><img src="./immagini/interfaccia_fossil_1.png" alt="timeline"></p>

</div>
</div>
</div></section></section><section><section>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="file-list">file list<a class="anchor-link" href="#file-list">&#182;</a></h3><p><img src="./immagini/interfaccia_fossil_2.png" alt="file list"></p>

</div>
</div>
</div></section></section><section><section>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[86]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">%%</span><span class="k">writefile</span> test.txt
This is going to be my documentation
I&#39;m adding more lines: the more, the merrier!
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>Overwriting test.txt
</pre>
</div>
</div>

</div>
</div>

</div></section></section><section><section>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[87]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil status
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>repository:   /home/enrico/lavoro/fossilexample/working_directory/../mytestrepo.fossil
local-root:   /home/enrico/lavoro/fossilexample/working_directory/
config-db:    /home/enrico/.fossil
checkout:     2dab9716e96fab6bcf87e8d8e17b3a672bfea4eb 2017-02-27 20:34:25 UTC
parent:       e17a3d4a58fef68da694289aa32334d82bde5234 2017-02-27 20:27:38 UTC
tags:         trunk
comment:      il primo file di un grande progetto! (user: enrico)
EDITED     test.txt
</pre>
</div>
</div>

</div>
</div>

</div></section></section><section><section>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[89]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil diff test.txt
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>Index: test.txt
==================================================================
--- test.txt
+++ test.txt
@@ -1,1 +1,2 @@
 This is going to be my documentation
+I&#39;m adding more lines: the more, the merrier!

</pre>
</div>
</div>

</div>
</div>

</div></section></section><section><section>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[90]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil commit -m <span class="s2">&quot;espansa la documentazione&quot;</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>New_Version: 1856bb82f3515646637061c6e062c117fc646192
</pre>
</div>
</div>

</div>
</div>

</div></section></section><section><section>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="nuova-timeline">nuova timeline<a class="anchor-link" href="#nuova-timeline">&#182;</a></h3><p><img src="./immagini/interfaccia_fossil_3.png" alt="timeline nuova"></p>

</div>
</div>
</div></section></section><section><section>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="approfondimenti-sull'edit">approfondimenti sull'edit<a class="anchor-link" href="#approfondimenti-sull'edit">&#182;</a></h3><p><img src="./immagini/interfaccia_fossil_4.png" alt="info edit"></p>

</div>
</div>
</div></section></section><section><section>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>mi sono accorto di aver fatto un errore!</p>
<p>come posso rimediare?</p>
<p>Per prima cosa, lascio traccia della decisione: apro un ticket.</p>

</div>
</div>
</div></section></section><section><section>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="preparazione-del-ticket">preparazione del ticket<a class="anchor-link" href="#preparazione-del-ticket">&#182;</a></h3><p><img src="./immagini/interfaccia_fossil_5.png" alt="ticket preparation"></p>

</div>
</div>
</div></section></section><section><section>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="la-lista-dei-ticket">la lista dei ticket<a class="anchor-link" href="#la-lista-dei-ticket">&#182;</a></h3><p><img src="./immagini/interfaccia_fossil_6.png" alt="ticket list"></p>

</div>
</div>
</div></section></section><section><section>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[95]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil <span class="nb">help</span> revert
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>Usage: fossil revert ?-r REVISION? ?FILE ...?

Revert to the current repository version of FILE, or to
the version associated with baseline REVISION if the -r flag
appears.

If FILE was part of a rename operation, both the original file
and the renamed file are reverted.

Revert all files if no file name is provided.

If a file is reverted accidently, it can be restored using
the &#34;fossil undo&#34; command.

Options:
  -r REVISION    revert given FILE(s) back to given REVISION

See also: redo, undo, update
</pre>
</div>
</div>

</div>
</div>

</div><div class="fragment">
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[97]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil revert -r  2dab9716e9 test.txt
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>REVERT   test.txt
 &#34;fossil undo&#34; is available to undo changes to the working checkout.
</pre>
</div>
</div>

</div>
</div>

</div></div></section></section><section><section>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[98]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil status
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>repository:   /home/enrico/lavoro/fossilexample/working_directory/../mytestrepo.fossil
local-root:   /home/enrico/lavoro/fossilexample/working_directory/
config-db:    /home/enrico/.fossil
checkout:     1856bb82f3515646637061c6e062c117fc646192 2017-02-27 20:42:51 UTC
parent:       2dab9716e96fab6bcf87e8d8e17b3a672bfea4eb 2017-02-27 20:34:25 UTC
tags:         trunk
comment:      espansa la documentazione (user: enrico)
EDITED     test.txt
</pre>
</div>
</div>

</div>
</div>

</div><div class="fragment">
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[99]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil diff test.txt
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>Index: test.txt
==================================================================
--- test.txt
+++ test.txt
@@ -1,2 +1,1 @@
 This is going to be my documentation
-I&#39;m adding more lines: the more, the merrier!

</pre>
</div>
</div>

</div>
</div>

</div></div><div class="fragment">
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[100]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>fossil commit -m <span class="s2">&quot;riportato l&#39;ordine nel repository!&quot;</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">
<div class="prompt"></div>

<div class="output_subarea output_stream output_stdout output_text">
<pre>New_Version: 488479276df60e9fd055d5dbe07ee6c37b30beb3
</pre>
</div>
</div>

</div>
</div>

</div></div><div class="fragment">
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>ora non mi rimane che chiudere il ticket e continuare il mio lavoro</p>

</div>
</div>
</div></div></section></section><section><section>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="branching">branching<a class="anchor-link" href="#branching">&#182;</a></h3><p>una funzionalità molto potente per il controllo di versione è la possibilità di fare branching.</p>
<p>Questo significa che nel mio database esistono nello stesso momento due versioni diverse dello stesso progetto, e posso passare da un all'altra senza problemi.</p>
<p>Un grosso vantaggio del modello di DVCS di fossil è che posso usare diverse cartelle per diversi branch, ed avere il tutto sincronizzato!</p>

</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h3 id="un-caso-tipico-di-branching">un caso tipico di branching<a class="anchor-link" href="#un-caso-tipico-di-branching">&#182;</a></h3><p>avete appena raggiunto un risultato pubblicabile con le vostre analisi, e volete prepararvi per pubblicarle.</p>
<p>Questo significa che non altererete più il codice in modo sostanziale (volete mantenere l'integrità dei risultati), ma magari aggiusterete i grafici ed i report.</p>
<p>Allo stesso momento, i vostri collaboratori vi chiedono di fare delle modifiche piuttosto importanti del codice.
Come potete fare?</p>
<p>Usando due diverse branch siete in grado di dividere il lavoro senza fare confusione, ma mantenendo tutto sempre sotto controllo (e con la possibilità di far passare i risultati da un branch all'altro con <strong>revert</strong>).</p>

</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>

Added immagini/interfaccia_fossil_1.png.

cannot compute difference between binary files

Added immagini/interfaccia_fossil_2.png.

cannot compute difference between binary files

Added immagini/interfaccia_fossil_3.png.

cannot compute difference between binary files

Added immagini/interfaccia_fossil_4.png.

cannot compute difference between binary files

Added immagini/interfaccia_fossil_5.png.

cannot compute difference between binary files

Added immagini/interfaccia_fossil_6.png.

cannot compute difference between binary files