[{"data":1,"prerenderedAt":6681},["ShallowReactive",2],{"content-query-Docfzxic9S":3},[4,594,998,1896,3782,4012,4345,4458,4606,5017,5958,6106,6547],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":8,"tags":10,"body":11,"_type":588,"_id":589,"_source":590,"_file":591,"_stem":592,"_extension":593},"/tutorials/bash-101","tutorials",false,"","Bash 101","bash",{"type":12,"children":13,"toc":577},"root",[14,23,61,88,108,113,119,129,162,166,172,189,213,218,241,246,270,273,279,290,319,332,365,368,374,385,412,432,435,441,452,477,488,515,518,524,535,550,571],{"type":15,"tag":16,"props":17,"children":19},"element","h3",{"id":18},"bash-commands",[20],{"type":21,"value":22},"text","Bash commands",{"type":15,"tag":24,"props":25,"children":26},"p",{},[27,29,36,38,44,46,52,53,59],{"type":21,"value":28},"Once you are logged in to a Bash terminal, you can type commands to perform a number of tasks. A command is usually a single word, such as ",{"type":15,"tag":30,"props":31,"children":33},"code",{"className":32},[],[34],{"type":21,"value":35},"cd",{"type":21,"value":37}," or ",{"type":15,"tag":30,"props":39,"children":41},{"className":40},[],[42],{"type":21,"value":43},"ls",{"type":21,"value":45},", and it can include options that changes its functions, such as ",{"type":15,"tag":30,"props":47,"children":49},{"className":48},[],[50],{"type":21,"value":51},"ls -l",{"type":21,"value":37},{"type":15,"tag":30,"props":54,"children":56},{"className":55},[],[57],{"type":21,"value":58},"tar -xfv",{"type":21,"value":60},".",{"type":15,"tag":24,"props":62,"children":63},{},[64,66,71,73,78,80,86],{"type":21,"value":65},"Options often occur after dashes: ",{"type":15,"tag":30,"props":67,"children":69},{"className":68},[],[70],{"type":21,"value":51},{"type":21,"value":72}," runs the ",{"type":15,"tag":30,"props":74,"children":76},{"className":75},[],[77],{"type":21,"value":43},{"type":21,"value":79}," command (list all files in the current directory) with the options to output a long list of files (",{"type":15,"tag":30,"props":81,"children":83},{"className":82},[],[84],{"type":21,"value":85},"-l",{"type":21,"value":87},", outputs one file per line).",{"type":15,"tag":24,"props":89,"children":90},{},[91,93,99,100,106],{"type":21,"value":92},"Most commands also include the option ",{"type":15,"tag":30,"props":94,"children":96},{"className":95},[],[97],{"type":21,"value":98},"--help",{"type":21,"value":37},{"type":15,"tag":30,"props":101,"children":103},{"className":102},[],[104],{"type":21,"value":105},"-h",{"type":21,"value":107},". This options is useful to learn how to use a command, as well as to get more information about it.",{"type":15,"tag":24,"props":109,"children":110},{},[111],{"type":21,"value":112},"Next, we will go over some basic commands.",{"type":15,"tag":16,"props":114,"children":116},{"id":115},"listing-items-in-a-local-directory",[117],{"type":21,"value":118},"Listing items in a local directory",{"type":15,"tag":24,"props":120,"children":121},{},[122,127],{"type":15,"tag":30,"props":123,"children":125},{"className":124},[],[126],{"type":21,"value":43},{"type":21,"value":128},": Lists a directory, including file info and size in human-readable format.",{"type":15,"tag":130,"props":131,"children":134},"pre",{"className":132,"code":133,"language":10,"meta":8,"style":8},"language-bash shiki shiki-themes github-light monokai monokai github-light monokai","username@host:~$ ls -lh\n",[135],{"type":15,"tag":30,"props":136,"children":137},{"__ignoreMap":8},[138],{"type":15,"tag":139,"props":140,"children":143},"span",{"class":141,"line":142},"line",1,[144,150,156],{"type":15,"tag":139,"props":145,"children":147},{"style":146},"--shiki-default:#6F42C1;--shiki-dark-mode:#A6E22E;--shiki-sky-dark-mode:#A6E22E;--shiki-light-mode:#6F42C1;--shiki-blue-mode:#A6E22E",[148],{"type":21,"value":149},"username@host:~$",{"type":15,"tag":139,"props":151,"children":153},{"style":152},"--shiki-default:#032F62;--shiki-dark-mode:#E6DB74;--shiki-sky-dark-mode:#E6DB74;--shiki-light-mode:#032F62;--shiki-blue-mode:#E6DB74",[154],{"type":21,"value":155}," ls",{"type":15,"tag":139,"props":157,"children":159},{"style":158},"--shiki-default:#005CC5;--shiki-dark-mode:#AE81FF;--shiki-sky-dark-mode:#AE81FF;--shiki-light-mode:#005CC5;--shiki-blue-mode:#AE81FF",[160],{"type":21,"value":161}," -lh\n",{"type":15,"tag":163,"props":164,"children":165},"hr",{},[],{"type":15,"tag":16,"props":167,"children":169},{"id":168},"change-directory",[170],{"type":21,"value":171},"Change directory",{"type":15,"tag":24,"props":173,"children":174},{},[175,180,182,188],{"type":15,"tag":30,"props":176,"children":178},{"className":177},[],[179],{"type":21,"value":35},{"type":21,"value":181},": Changes the current directory of the shell to ",{"type":15,"tag":30,"props":183,"children":185},{"className":184},[],[186],{"type":21,"value":187},"/data/files",{"type":21,"value":60},{"type":15,"tag":130,"props":190,"children":192},{"className":132,"code":191,"language":10,"meta":8,"style":8},"username@host:~$ cd /data/files\n",[193],{"type":15,"tag":30,"props":194,"children":195},{"__ignoreMap":8},[196],{"type":15,"tag":139,"props":197,"children":198},{"class":141,"line":142},[199,203,208],{"type":15,"tag":139,"props":200,"children":201},{"style":146},[202],{"type":21,"value":149},{"type":15,"tag":139,"props":204,"children":205},{"style":152},[206],{"type":21,"value":207}," cd",{"type":15,"tag":139,"props":209,"children":210},{"style":152},[211],{"type":21,"value":212}," /data/files\n",{"type":15,"tag":24,"props":214,"children":215},{},[216],{"type":21,"value":217},"Changes to the directory one level above.",{"type":15,"tag":130,"props":219,"children":221},{"className":132,"code":220,"language":10,"meta":8,"style":8},"username@host:~$ cd ..\n",[222],{"type":15,"tag":30,"props":223,"children":224},{"__ignoreMap":8},[225],{"type":15,"tag":139,"props":226,"children":227},{"class":141,"line":142},[228,232,236],{"type":15,"tag":139,"props":229,"children":230},{"style":146},[231],{"type":21,"value":149},{"type":15,"tag":139,"props":233,"children":234},{"style":152},[235],{"type":21,"value":207},{"type":15,"tag":139,"props":237,"children":238},{"style":152},[239],{"type":21,"value":240}," ..\n",{"type":15,"tag":24,"props":242,"children":243},{},[244],{"type":21,"value":245},"Changes to the user's home directory.",{"type":15,"tag":130,"props":247,"children":249},{"className":132,"code":248,"language":10,"meta":8,"style":8},"username@host:$ cd ~\n",[250],{"type":15,"tag":30,"props":251,"children":252},{"__ignoreMap":8},[253],{"type":15,"tag":139,"props":254,"children":255},{"class":141,"line":142},[256,261,265],{"type":15,"tag":139,"props":257,"children":258},{"style":146},[259],{"type":21,"value":260},"username@host:$",{"type":15,"tag":139,"props":262,"children":263},{"style":152},[264],{"type":21,"value":207},{"type":15,"tag":139,"props":266,"children":267},{"style":152},[268],{"type":21,"value":269}," ~\n",{"type":15,"tag":163,"props":271,"children":272},{},[],{"type":15,"tag":16,"props":274,"children":276},{"id":275},"copying-a-file",[277],{"type":21,"value":278},"Copying a file",{"type":15,"tag":24,"props":280,"children":281},{},[282,288],{"type":15,"tag":30,"props":283,"children":285},{"className":284},[],[286],{"type":21,"value":287},"cp",{"type":21,"value":289},": Copy a file from to another directory.",{"type":15,"tag":130,"props":291,"children":293},{"className":132,"code":292,"language":10,"meta":8,"style":8},"username@host:~$ cp original_file.txt /data/files/new_file.txt\n",[294],{"type":15,"tag":30,"props":295,"children":296},{"__ignoreMap":8},[297],{"type":15,"tag":139,"props":298,"children":299},{"class":141,"line":142},[300,304,309,314],{"type":15,"tag":139,"props":301,"children":302},{"style":146},[303],{"type":21,"value":149},{"type":15,"tag":139,"props":305,"children":306},{"style":152},[307],{"type":21,"value":308}," cp",{"type":15,"tag":139,"props":310,"children":311},{"style":152},[312],{"type":21,"value":313}," original_file.txt",{"type":15,"tag":139,"props":315,"children":316},{"style":152},[317],{"type":21,"value":318}," /data/files/new_file.txt\n",{"type":15,"tag":24,"props":320,"children":321},{},[322,324,330],{"type":21,"value":323},"To copy a directory, include option ",{"type":15,"tag":30,"props":325,"children":327},{"className":326},[],[328],{"type":21,"value":329},"-r",{"type":21,"value":331},":",{"type":15,"tag":130,"props":333,"children":335},{"className":132,"code":334,"language":10,"meta":8,"style":8},"username@host:~$ cp -r original_folder /data/files/new_folder\n",[336],{"type":15,"tag":30,"props":337,"children":338},{"__ignoreMap":8},[339],{"type":15,"tag":139,"props":340,"children":341},{"class":141,"line":142},[342,346,350,355,360],{"type":15,"tag":139,"props":343,"children":344},{"style":146},[345],{"type":21,"value":149},{"type":15,"tag":139,"props":347,"children":348},{"style":152},[349],{"type":21,"value":308},{"type":15,"tag":139,"props":351,"children":352},{"style":158},[353],{"type":21,"value":354}," -r",{"type":15,"tag":139,"props":356,"children":357},{"style":152},[358],{"type":21,"value":359}," original_folder",{"type":15,"tag":139,"props":361,"children":362},{"style":152},[363],{"type":21,"value":364}," /data/files/new_folder\n",{"type":15,"tag":163,"props":366,"children":367},{},[],{"type":15,"tag":16,"props":369,"children":371},{"id":370},"moving-a-file",[372],{"type":21,"value":373},"Moving a file",{"type":15,"tag":24,"props":375,"children":376},{},[377,383],{"type":15,"tag":30,"props":378,"children":380},{"className":379},[],[381],{"type":21,"value":382},"mv",{"type":21,"value":384},": Moves a file to a destination.",{"type":15,"tag":130,"props":386,"children":388},{"className":132,"code":387,"language":10,"meta":8,"style":8},"username@host:~$ mv original_file.txt /data/files/new_file.txt\n",[389],{"type":15,"tag":30,"props":390,"children":391},{"__ignoreMap":8},[392],{"type":15,"tag":139,"props":393,"children":394},{"class":141,"line":142},[395,399,404,408],{"type":15,"tag":139,"props":396,"children":397},{"style":146},[398],{"type":21,"value":149},{"type":15,"tag":139,"props":400,"children":401},{"style":152},[402],{"type":21,"value":403}," mv",{"type":15,"tag":139,"props":405,"children":406},{"style":152},[407],{"type":21,"value":313},{"type":15,"tag":139,"props":409,"children":410},{"style":152},[411],{"type":21,"value":318},{"type":15,"tag":24,"props":413,"children":414},{},[415,417,423,425,430],{"type":21,"value":416},"You ",{"type":15,"tag":418,"props":419,"children":420},"strong",{},[421],{"type":21,"value":422},"do not",{"type":21,"value":424}," need option ",{"type":15,"tag":30,"props":426,"children":428},{"className":427},[],[429],{"type":21,"value":329},{"type":21,"value":431}," to move directories:",{"type":15,"tag":163,"props":433,"children":434},{},[],{"type":15,"tag":16,"props":436,"children":438},{"id":437},"deleting-a-file",[439],{"type":21,"value":440},"Deleting a file",{"type":15,"tag":24,"props":442,"children":443},{},[444,450],{"type":15,"tag":30,"props":445,"children":447},{"className":446},[],[448],{"type":21,"value":449},"rm",{"type":21,"value":451},": Deletes a file.",{"type":15,"tag":130,"props":453,"children":455},{"className":132,"code":454,"language":10,"meta":8,"style":8},"username@Host:~$ rm file.txt\n",[456],{"type":15,"tag":30,"props":457,"children":458},{"__ignoreMap":8},[459],{"type":15,"tag":139,"props":460,"children":461},{"class":141,"line":142},[462,467,472],{"type":15,"tag":139,"props":463,"children":464},{"style":146},[465],{"type":21,"value":466},"username@Host:~$",{"type":15,"tag":139,"props":468,"children":469},{"style":152},[470],{"type":21,"value":471}," rm",{"type":15,"tag":139,"props":473,"children":474},{"style":152},[475],{"type":21,"value":476}," file.txt\n",{"type":15,"tag":24,"props":478,"children":479},{},[480,482,487],{"type":21,"value":481},"To delete a directory, include option ",{"type":15,"tag":30,"props":483,"children":485},{"className":484},[],[486],{"type":21,"value":329},{"type":21,"value":331},{"type":15,"tag":130,"props":489,"children":491},{"className":132,"code":490,"language":10,"meta":8,"style":8},"username@host:~$ rm -r my_folder\n",[492],{"type":15,"tag":30,"props":493,"children":494},{"__ignoreMap":8},[495],{"type":15,"tag":139,"props":496,"children":497},{"class":141,"line":142},[498,502,506,510],{"type":15,"tag":139,"props":499,"children":500},{"style":146},[501],{"type":21,"value":149},{"type":15,"tag":139,"props":503,"children":504},{"style":152},[505],{"type":21,"value":471},{"type":15,"tag":139,"props":507,"children":508},{"style":158},[509],{"type":21,"value":354},{"type":15,"tag":139,"props":511,"children":512},{"style":152},[513],{"type":21,"value":514}," my_folder\n",{"type":15,"tag":163,"props":516,"children":517},{},[],{"type":15,"tag":16,"props":519,"children":521},{"id":520},"print-current-working-directory",[522],{"type":21,"value":523},"Print current working directory",{"type":15,"tag":24,"props":525,"children":526},{},[527,533],{"type":15,"tag":30,"props":528,"children":530},{"className":529},[],[531],{"type":21,"value":532},"pwd",{"type":21,"value":534}," outputs the absolute address of the current working directory.",{"type":15,"tag":130,"props":536,"children":538},{"className":132,"code":537,"language":10,"meta":8,"style":8},"pwd\n",[539],{"type":15,"tag":30,"props":540,"children":541},{"__ignoreMap":8},[542],{"type":15,"tag":139,"props":543,"children":544},{"class":141,"line":142},[545],{"type":15,"tag":139,"props":546,"children":548},{"style":547},"--shiki-default:#005CC5;--shiki-dark-mode:#66D9EF;--shiki-sky-dark-mode:#66D9EF;--shiki-light-mode:#005CC5;--shiki-blue-mode:#66D9EF",[549],{"type":21,"value":537},{"type":15,"tag":130,"props":551,"children":553},{"className":132,"code":552,"language":10,"meta":8,"style":8},"/home/\u003Cuser>/\u003Cmy_folder>/\n",[554],{"type":15,"tag":30,"props":555,"children":556},{"__ignoreMap":8},[557],{"type":15,"tag":139,"props":558,"children":559},{"class":141,"line":142},[560,565],{"type":15,"tag":139,"props":561,"children":562},{"style":146},[563],{"type":21,"value":564},"/home/",{"type":15,"tag":139,"props":566,"children":568},{"style":567},"--shiki-default:#24292E;--shiki-dark-mode:#F8F8F2;--shiki-sky-dark-mode:#F8F8F2;--shiki-light-mode:#24292E;--shiki-blue-mode:#F8F8F2",[569],{"type":21,"value":570},"\u003Cuser>/\u003Cmy_folder>/\n",{"type":15,"tag":572,"props":573,"children":574},"style",{},[575],{"type":21,"value":576},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark-mode .shiki span {color: var(--shiki-dark-mode);background: var(--shiki-dark-mode-bg);font-style: var(--shiki-dark-mode-font-style);font-weight: var(--shiki-dark-mode-font-weight);text-decoration: var(--shiki-dark-mode-text-decoration);}html.dark-mode .shiki span {color: var(--shiki-dark-mode);background: var(--shiki-dark-mode-bg);font-style: var(--shiki-dark-mode-font-style);font-weight: var(--shiki-dark-mode-font-weight);text-decoration: var(--shiki-dark-mode-text-decoration);}html .sky-dark-mode .shiki span {color: var(--shiki-sky-dark-mode);background: var(--shiki-sky-dark-mode-bg);font-style: var(--shiki-sky-dark-mode-font-style);font-weight: var(--shiki-sky-dark-mode-font-weight);text-decoration: var(--shiki-sky-dark-mode-text-decoration);}html.sky-dark-mode .shiki span {color: var(--shiki-sky-dark-mode);background: var(--shiki-sky-dark-mode-bg);font-style: var(--shiki-sky-dark-mode-font-style);font-weight: var(--shiki-sky-dark-mode-font-weight);text-decoration: var(--shiki-sky-dark-mode-text-decoration);}html .light-mode .shiki span {color: var(--shiki-light-mode);background: var(--shiki-light-mode-bg);font-style: var(--shiki-light-mode-font-style);font-weight: var(--shiki-light-mode-font-weight);text-decoration: var(--shiki-light-mode-text-decoration);}html.light-mode .shiki span {color: var(--shiki-light-mode);background: var(--shiki-light-mode-bg);font-style: var(--shiki-light-mode-font-style);font-weight: var(--shiki-light-mode-font-weight);text-decoration: var(--shiki-light-mode-text-decoration);}html .blue-mode .shiki span {color: var(--shiki-blue-mode);background: var(--shiki-blue-mode-bg);font-style: var(--shiki-blue-mode-font-style);font-weight: var(--shiki-blue-mode-font-weight);text-decoration: var(--shiki-blue-mode-text-decoration);}html.blue-mode .shiki span {color: var(--shiki-blue-mode);background: var(--shiki-blue-mode-bg);font-style: var(--shiki-blue-mode-font-style);font-weight: var(--shiki-blue-mode-font-weight);text-decoration: var(--shiki-blue-mode-text-decoration);}",{"title":8,"searchDepth":578,"depth":578,"links":579},2,[580,582,583,584,585,586,587],{"id":18,"depth":581,"text":22},3,{"id":115,"depth":581,"text":118},{"id":168,"depth":581,"text":171},{"id":275,"depth":581,"text":278},{"id":370,"depth":581,"text":373},{"id":437,"depth":581,"text":440},{"id":520,"depth":581,"text":523},"markdown","content:tutorials:bash-101.md","content","tutorials/bash-101.md","tutorials/bash-101","md",{"_path":595,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":596,"description":597,"tags":10,"body":598,"_type":588,"_id":995,"_source":590,"_file":996,"_stem":997,"_extension":593},"/tutorials/bash-screen","Using screen in a Bash terminal","We can use the screen (Manual here) facility to keep jobs running on the background in a remote server.",{"type":12,"children":599,"toc":993},[600,624,631,643,667,670,676,695,700,827,839,842,848,875,878,884,903,926,939,962,965,971,989],{"type":15,"tag":24,"props":601,"children":602},{},[603,605,611,613,622],{"type":21,"value":604},"We can use the ",{"type":15,"tag":30,"props":606,"children":608},{"className":607},[],[609],{"type":21,"value":610},"screen",{"type":21,"value":612}," (",{"type":15,"tag":614,"props":615,"children":619},"a",{"href":616,"rel":617},"https://www.gnu.org/software/screen/manual/screen.html",[618],"nofollow",[620],{"type":21,"value":621},"Manual here",{"type":21,"value":623},") facility to keep jobs running on the background in a remote server.",{"type":15,"tag":625,"props":626,"children":628},"h4",{"id":627},"starting-a-new-screen-with-a-name",[629],{"type":21,"value":630},"Starting a new screen with a name",{"type":15,"tag":24,"props":632,"children":633},{},[634,636,642],{"type":21,"value":635},"The following creates a screen named ",{"type":15,"tag":30,"props":637,"children":639},{"className":638},[],[640],{"type":21,"value":641},"my_screen",{"type":21,"value":60},{"type":15,"tag":130,"props":644,"children":646},{"className":132,"code":645,"language":10,"meta":8,"style":8},"screen -S my_screen\n",[647],{"type":15,"tag":30,"props":648,"children":649},{"__ignoreMap":8},[650],{"type":15,"tag":139,"props":651,"children":652},{"class":141,"line":142},[653,657,662],{"type":15,"tag":139,"props":654,"children":655},{"style":146},[656],{"type":21,"value":610},{"type":15,"tag":139,"props":658,"children":659},{"style":158},[660],{"type":21,"value":661}," -S",{"type":15,"tag":139,"props":663,"children":664},{"style":152},[665],{"type":21,"value":666}," my_screen\n",{"type":15,"tag":163,"props":668,"children":669},{},[],{"type":15,"tag":625,"props":671,"children":673},{"id":672},"listing-all-available-screens",[674],{"type":21,"value":675},"Listing all available screens",{"type":15,"tag":130,"props":677,"children":679},{"className":132,"code":678,"language":10,"meta":8,"style":8},"screen -ls\n",[680],{"type":15,"tag":30,"props":681,"children":682},{"__ignoreMap":8},[683],{"type":15,"tag":139,"props":684,"children":685},{"class":141,"line":142},[686,690],{"type":15,"tag":139,"props":687,"children":688},{"style":146},[689],{"type":21,"value":610},{"type":15,"tag":139,"props":691,"children":692},{"style":158},[693],{"type":21,"value":694}," -ls\n",{"type":15,"tag":24,"props":696,"children":697},{},[698],{"type":21,"value":699},"Will output something similar to:",{"type":15,"tag":130,"props":701,"children":703},{"className":132,"code":702,"language":10,"meta":8,"style":8},"There are screens on:\n        455780.another_screen   (02/21/2024 07:24:46 PM)        (Detached)\n        455604.my_screen        (02/21/2024 07:24:41 PM)        (Attached)\n2 Sockets in /run/screen/S-mauricio.\n",[704],{"type":15,"tag":30,"props":705,"children":706},{"__ignoreMap":8},[707,730,768,803],{"type":15,"tag":139,"props":708,"children":709},{"class":141,"line":142},[710,715,720,725],{"type":15,"tag":139,"props":711,"children":712},{"style":146},[713],{"type":21,"value":714},"There",{"type":15,"tag":139,"props":716,"children":717},{"style":152},[718],{"type":21,"value":719}," are",{"type":15,"tag":139,"props":721,"children":722},{"style":152},[723],{"type":21,"value":724}," screens",{"type":15,"tag":139,"props":726,"children":727},{"style":152},[728],{"type":21,"value":729}," on:\n",{"type":15,"tag":139,"props":731,"children":732},{"class":141,"line":578},[733,738,743,748,753,758,763],{"type":15,"tag":139,"props":734,"children":735},{"style":146},[736],{"type":21,"value":737},"        455780.another_screen",{"type":15,"tag":139,"props":739,"children":740},{"style":567},[741],{"type":21,"value":742},"   (02/21/2024 ",{"type":15,"tag":139,"props":744,"children":745},{"style":152},[746],{"type":21,"value":747},"07:24:46",{"type":15,"tag":139,"props":749,"children":750},{"style":152},[751],{"type":21,"value":752}," PM",{"type":15,"tag":139,"props":754,"children":755},{"style":567},[756],{"type":21,"value":757},")        (",{"type":15,"tag":139,"props":759,"children":760},{"style":146},[761],{"type":21,"value":762},"Detached",{"type":15,"tag":139,"props":764,"children":765},{"style":567},[766],{"type":21,"value":767},")\n",{"type":15,"tag":139,"props":769,"children":770},{"class":141,"line":581},[771,776,781,786,790,794,799],{"type":15,"tag":139,"props":772,"children":773},{"style":146},[774],{"type":21,"value":775},"        455604.my_screen",{"type":15,"tag":139,"props":777,"children":778},{"style":567},[779],{"type":21,"value":780},"        (02/21/2024 ",{"type":15,"tag":139,"props":782,"children":783},{"style":152},[784],{"type":21,"value":785},"07:24:41",{"type":15,"tag":139,"props":787,"children":788},{"style":152},[789],{"type":21,"value":752},{"type":15,"tag":139,"props":791,"children":792},{"style":567},[793],{"type":21,"value":757},{"type":15,"tag":139,"props":795,"children":796},{"style":146},[797],{"type":21,"value":798},"Attached",{"type":15,"tag":139,"props":800,"children":801},{"style":567},[802],{"type":21,"value":767},{"type":15,"tag":139,"props":804,"children":806},{"class":141,"line":805},4,[807,812,817,822],{"type":15,"tag":139,"props":808,"children":809},{"style":146},[810],{"type":21,"value":811},"2",{"type":15,"tag":139,"props":813,"children":814},{"style":152},[815],{"type":21,"value":816}," Sockets",{"type":15,"tag":139,"props":818,"children":819},{"style":152},[820],{"type":21,"value":821}," in",{"type":15,"tag":139,"props":823,"children":824},{"style":152},[825],{"type":21,"value":826}," /run/screen/S-mauricio.\n",{"type":15,"tag":24,"props":828,"children":829},{},[830,832,837],{"type":21,"value":831},"Notice that ",{"type":15,"tag":30,"props":833,"children":835},{"className":834},[],[836],{"type":21,"value":641},{"type":21,"value":838}," is attached (currently active).",{"type":15,"tag":163,"props":840,"children":841},{},[],{"type":15,"tag":625,"props":843,"children":845},{"id":844},"detaching-from-a-screen",[846],{"type":21,"value":847},"Detaching from a screen",{"type":15,"tag":24,"props":849,"children":850},{},[851,853,859,861,867,868,874],{"type":21,"value":852},"You can detach a screen, and keep it running on the background, with ",{"type":15,"tag":30,"props":854,"children":856},{"className":855},[],[857],{"type":21,"value":858},"Ctrl",{"type":21,"value":860},"+",{"type":15,"tag":30,"props":862,"children":864},{"className":863},[],[865],{"type":21,"value":866},"A",{"type":21,"value":860},{"type":15,"tag":30,"props":869,"children":871},{"className":870},[],[872],{"type":21,"value":873},"D",{"type":21,"value":60},{"type":15,"tag":163,"props":876,"children":877},{},[],{"type":15,"tag":625,"props":879,"children":881},{"id":880},"reattaching-to-an-existing-screen",[882],{"type":21,"value":883},"Reattaching to an existing screen",{"type":15,"tag":24,"props":885,"children":886},{},[887,889,894,896,901],{"type":21,"value":888},"The following can be used to go back to a previously created screen named ",{"type":15,"tag":30,"props":890,"children":892},{"className":891},[],[893],{"type":21,"value":641},{"type":21,"value":895},".\n",{"type":15,"tag":418,"props":897,"children":898},{},[899],{"type":21,"value":900},"*Note",{"type":21,"value":902},": This will detach the screen from another existing session, if any.",{"type":15,"tag":130,"props":904,"children":906},{"className":132,"code":905,"language":10,"meta":8,"style":8},"screen -rd my_screen\n",[907],{"type":15,"tag":30,"props":908,"children":909},{"__ignoreMap":8},[910],{"type":15,"tag":139,"props":911,"children":912},{"class":141,"line":142},[913,917,922],{"type":15,"tag":139,"props":914,"children":915},{"style":146},[916],{"type":21,"value":610},{"type":15,"tag":139,"props":918,"children":919},{"style":158},[920],{"type":21,"value":921}," -rd",{"type":15,"tag":139,"props":923,"children":924},{"style":152},[925],{"type":21,"value":666},{"type":15,"tag":24,"props":927,"children":928},{},[929,931,937],{"type":21,"value":930},"If you do not give the screen a name when creating it, you can reattach to it using its id (see the ",{"type":15,"tag":30,"props":932,"children":934},{"className":933},[],[935],{"type":21,"value":936},"screen -ls",{"type":21,"value":938}," above to find the screen id):",{"type":15,"tag":130,"props":940,"children":942},{"className":132,"code":941,"language":10,"meta":8,"style":8},"screen -rd 455780\n",[943],{"type":15,"tag":30,"props":944,"children":945},{"__ignoreMap":8},[946],{"type":15,"tag":139,"props":947,"children":948},{"class":141,"line":142},[949,953,957],{"type":15,"tag":139,"props":950,"children":951},{"style":146},[952],{"type":21,"value":610},{"type":15,"tag":139,"props":954,"children":955},{"style":158},[956],{"type":21,"value":921},{"type":15,"tag":139,"props":958,"children":959},{"style":158},[960],{"type":21,"value":961}," 455780\n",{"type":15,"tag":163,"props":963,"children":964},{},[],{"type":15,"tag":625,"props":966,"children":968},{"id":967},"exiting-closing-a-screen",[969],{"type":21,"value":970},"Exiting (closing) a screen",{"type":15,"tag":24,"props":972,"children":973},{},[974,976,981,982,987],{"type":21,"value":975},"You can close a screen with ",{"type":15,"tag":30,"props":977,"children":979},{"className":978},[],[980],{"type":21,"value":858},{"type":21,"value":860},{"type":15,"tag":30,"props":983,"children":985},{"className":984},[],[986],{"type":21,"value":873},{"type":21,"value":988},". This will terminate the screen permanently, that is, you will not be able to reattach to it.",{"type":15,"tag":572,"props":990,"children":991},{},[992],{"type":21,"value":576},{"title":8,"searchDepth":578,"depth":578,"links":994},[],"content:tutorials:bash-screen.md","tutorials/bash-screen.md","tutorials/bash-screen",{"_path":999,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":1000,"description":8,"tags":10,"body":1001,"_type":588,"_id":1893,"_source":590,"_file":1894,"_stem":1895,"_extension":593},"/tutorials/data-ocelot","Corpus data on Ocelot",{"type":12,"children":1002,"toc":1891},[1003,1061,1064,1141,1144,1638,1641,1887],{"type":15,"tag":1004,"props":1005,"children":1006},"ul",{},[1007,1013,1026,1050],{"type":15,"tag":1008,"props":1009,"children":1010},"li",{},[1011],{"type":21,"value":1012},"Written by Mauricio Gruppi on Jan 26, 2024",{"type":15,"tag":1008,"props":1014,"children":1015},{},[1016,1018,1024],{"type":21,"value":1017},"Here you will find information about the corpus data in ",{"type":15,"tag":30,"props":1019,"children":1021},{"className":1020},[],[1022],{"type":21,"value":1023},"Ocelot",{"type":21,"value":1025}," and how to access it using the shell.",{"type":15,"tag":1008,"props":1027,"children":1028},{},[1029,1034,1036,1042,1044],{"type":15,"tag":418,"props":1030,"children":1031},{},[1032],{"type":21,"value":1033},"Note",{"type":21,"value":1035},": Once you sign in through ",{"type":15,"tag":30,"props":1037,"children":1039},{"className":1038},[],[1040],{"type":21,"value":1041},"ssh",{"type":21,"value":1043},", you be in your home folder, the absolute path for which is ",{"type":15,"tag":30,"props":1045,"children":1047},{"className":1046},[],[1048],{"type":21,"value":1049},"/home/\u003Cyour_username>/",{"type":15,"tag":1008,"props":1051,"children":1052},{},[1053,1055],{"type":21,"value":1054},"The corpus data resides in ",{"type":15,"tag":30,"props":1056,"children":1058},{"className":1057},[],[1059],{"type":21,"value":1060},"/data/corpora",{"type":15,"tag":163,"props":1062,"children":1063},{},[],{"type":15,"tag":1004,"props":1065,"children":1066},{},[1067,1080,1129],{"type":15,"tag":1008,"props":1068,"children":1069},{},[1070,1072,1078],{"type":21,"value":1071},"Run ",{"type":15,"tag":30,"props":1073,"children":1075},{"className":1074},[],[1076],{"type":21,"value":1077},"cd /data/corpora",{"type":21,"value":1079}," to change the working directory to the data folder.",{"type":15,"tag":1008,"props":1081,"children":1082},{},[1083,1085,1090,1092],{"type":21,"value":1084},"E.g.: changing the working directory to ",{"type":15,"tag":30,"props":1086,"children":1088},{"className":1087},[],[1089],{"type":21,"value":1060},{"type":21,"value":1091},":\n",{"type":15,"tag":130,"props":1093,"children":1095},{"className":132,"code":1094,"language":10,"meta":8,"style":8},"mgouveag@ocelot:~$ cd /data/corpora \nmgouveag@ocelot:/data/corpora$ \n",[1096],{"type":15,"tag":30,"props":1097,"children":1098},{"__ignoreMap":8},[1099,1121],{"type":15,"tag":139,"props":1100,"children":1101},{"class":141,"line":142},[1102,1107,1111,1116],{"type":15,"tag":139,"props":1103,"children":1104},{"style":146},[1105],{"type":21,"value":1106},"mgouveag@ocelot:~$",{"type":15,"tag":139,"props":1108,"children":1109},{"style":152},[1110],{"type":21,"value":207},{"type":15,"tag":139,"props":1112,"children":1113},{"style":152},[1114],{"type":21,"value":1115}," /data/corpora",{"type":15,"tag":139,"props":1117,"children":1118},{"style":567},[1119],{"type":21,"value":1120}," \n",{"type":15,"tag":139,"props":1122,"children":1123},{"class":141,"line":578},[1124],{"type":15,"tag":139,"props":1125,"children":1126},{"style":146},[1127],{"type":21,"value":1128},"mgouveag@ocelot:/data/corpora$\n",{"type":15,"tag":1008,"props":1130,"children":1131},{},[1132,1134,1139],{"type":21,"value":1133},"Your terminal is now pointed to the directory ",{"type":15,"tag":30,"props":1135,"children":1137},{"className":1136},[],[1138],{"type":21,"value":1060},{"type":21,"value":1140}," - you can think of it as \"opening\" the folder using a graphical interface",{"type":15,"tag":163,"props":1142,"children":1143},{},[],{"type":15,"tag":1004,"props":1145,"children":1146},{},[1147,1543,1548,1592,1597,1610,1623,1628,1633],{"type":15,"tag":1008,"props":1148,"children":1149},{},[1150,1152,1158,1160],{"type":21,"value":1151},"To list all the files and folders in the current directory, run ",{"type":15,"tag":30,"props":1153,"children":1155},{"className":1154},[],[1156],{"type":21,"value":1157},"ls -lh",{"type":21,"value":1159},". E.g.:\n",{"type":15,"tag":130,"props":1161,"children":1163},{"className":132,"code":1162,"language":10,"meta":8,"style":8},"mgouveag@ocelot:/data/corpora$ ls -lh\ntotal 32K\ndrwxrwxr-x  4 mgouveag data 4.0K Jan 24 19:34 coca\ndrwxrwxr-x  3 mgouveag data 4.0K Jan 24 19:28 coha\ndrwxrwxr-x  2 mgouveag data 4.0K Jan 24 19:27 compressed\ndrwxrwxr-x 11 mgouveag data 4.0K Jan 25 10:59 congress_text\ndrwxr-xr-x  2 mgouveag data 4.0K Jan 24 12:55 english-us-uk\ndrwxrwxr-x  3 mgouveag data 4.0K Jan 24 18:45 gutenberg\ndrwxr-xr-x  2 mgouveag data 4.0K Jan 24 13:00 nela\ndrwxr-xr-x  6 mgouveag data 4.0K Jan 24 12:53 semeval-2020-task1\n",[1164],{"type":15,"tag":30,"props":1165,"children":1166},{"__ignoreMap":8},[1167,1183,1196,1244,1286,1329,1373,1416,1458,1500],{"type":15,"tag":139,"props":1168,"children":1169},{"class":141,"line":142},[1170,1175,1179],{"type":15,"tag":139,"props":1171,"children":1172},{"style":146},[1173],{"type":21,"value":1174},"mgouveag@ocelot:/data/corpora$",{"type":15,"tag":139,"props":1176,"children":1177},{"style":152},[1178],{"type":21,"value":155},{"type":15,"tag":139,"props":1180,"children":1181},{"style":158},[1182],{"type":21,"value":161},{"type":15,"tag":139,"props":1184,"children":1185},{"class":141,"line":578},[1186,1191],{"type":15,"tag":139,"props":1187,"children":1188},{"style":146},[1189],{"type":21,"value":1190},"total",{"type":15,"tag":139,"props":1192,"children":1193},{"style":152},[1194],{"type":21,"value":1195}," 32K\n",{"type":15,"tag":139,"props":1197,"children":1198},{"class":141,"line":581},[1199,1204,1209,1214,1219,1224,1229,1234,1239],{"type":15,"tag":139,"props":1200,"children":1201},{"style":146},[1202],{"type":21,"value":1203},"drwxrwxr-x",{"type":15,"tag":139,"props":1205,"children":1206},{"style":158},[1207],{"type":21,"value":1208},"  4",{"type":15,"tag":139,"props":1210,"children":1211},{"style":152},[1212],{"type":21,"value":1213}," mgouveag",{"type":15,"tag":139,"props":1215,"children":1216},{"style":152},[1217],{"type":21,"value":1218}," data",{"type":15,"tag":139,"props":1220,"children":1221},{"style":152},[1222],{"type":21,"value":1223}," 4.0K",{"type":15,"tag":139,"props":1225,"children":1226},{"style":152},[1227],{"type":21,"value":1228}," Jan",{"type":15,"tag":139,"props":1230,"children":1231},{"style":158},[1232],{"type":21,"value":1233}," 24",{"type":15,"tag":139,"props":1235,"children":1236},{"style":152},[1237],{"type":21,"value":1238}," 19:34",{"type":15,"tag":139,"props":1240,"children":1241},{"style":152},[1242],{"type":21,"value":1243}," coca\n",{"type":15,"tag":139,"props":1245,"children":1246},{"class":141,"line":805},[1247,1251,1256,1260,1264,1268,1272,1276,1281],{"type":15,"tag":139,"props":1248,"children":1249},{"style":146},[1250],{"type":21,"value":1203},{"type":15,"tag":139,"props":1252,"children":1253},{"style":158},[1254],{"type":21,"value":1255},"  3",{"type":15,"tag":139,"props":1257,"children":1258},{"style":152},[1259],{"type":21,"value":1213},{"type":15,"tag":139,"props":1261,"children":1262},{"style":152},[1263],{"type":21,"value":1218},{"type":15,"tag":139,"props":1265,"children":1266},{"style":152},[1267],{"type":21,"value":1223},{"type":15,"tag":139,"props":1269,"children":1270},{"style":152},[1271],{"type":21,"value":1228},{"type":15,"tag":139,"props":1273,"children":1274},{"style":158},[1275],{"type":21,"value":1233},{"type":15,"tag":139,"props":1277,"children":1278},{"style":152},[1279],{"type":21,"value":1280}," 19:28",{"type":15,"tag":139,"props":1282,"children":1283},{"style":152},[1284],{"type":21,"value":1285}," coha\n",{"type":15,"tag":139,"props":1287,"children":1289},{"class":141,"line":1288},5,[1290,1294,1299,1303,1307,1311,1315,1319,1324],{"type":15,"tag":139,"props":1291,"children":1292},{"style":146},[1293],{"type":21,"value":1203},{"type":15,"tag":139,"props":1295,"children":1296},{"style":158},[1297],{"type":21,"value":1298},"  2",{"type":15,"tag":139,"props":1300,"children":1301},{"style":152},[1302],{"type":21,"value":1213},{"type":15,"tag":139,"props":1304,"children":1305},{"style":152},[1306],{"type":21,"value":1218},{"type":15,"tag":139,"props":1308,"children":1309},{"style":152},[1310],{"type":21,"value":1223},{"type":15,"tag":139,"props":1312,"children":1313},{"style":152},[1314],{"type":21,"value":1228},{"type":15,"tag":139,"props":1316,"children":1317},{"style":158},[1318],{"type":21,"value":1233},{"type":15,"tag":139,"props":1320,"children":1321},{"style":152},[1322],{"type":21,"value":1323}," 19:27",{"type":15,"tag":139,"props":1325,"children":1326},{"style":152},[1327],{"type":21,"value":1328}," compressed\n",{"type":15,"tag":139,"props":1330,"children":1332},{"class":141,"line":1331},6,[1333,1337,1342,1346,1350,1354,1358,1363,1368],{"type":15,"tag":139,"props":1334,"children":1335},{"style":146},[1336],{"type":21,"value":1203},{"type":15,"tag":139,"props":1338,"children":1339},{"style":158},[1340],{"type":21,"value":1341}," 11",{"type":15,"tag":139,"props":1343,"children":1344},{"style":152},[1345],{"type":21,"value":1213},{"type":15,"tag":139,"props":1347,"children":1348},{"style":152},[1349],{"type":21,"value":1218},{"type":15,"tag":139,"props":1351,"children":1352},{"style":152},[1353],{"type":21,"value":1223},{"type":15,"tag":139,"props":1355,"children":1356},{"style":152},[1357],{"type":21,"value":1228},{"type":15,"tag":139,"props":1359,"children":1360},{"style":158},[1361],{"type":21,"value":1362}," 25",{"type":15,"tag":139,"props":1364,"children":1365},{"style":152},[1366],{"type":21,"value":1367}," 10:59",{"type":15,"tag":139,"props":1369,"children":1370},{"style":152},[1371],{"type":21,"value":1372}," congress_text\n",{"type":15,"tag":139,"props":1374,"children":1376},{"class":141,"line":1375},7,[1377,1382,1386,1390,1394,1398,1402,1406,1411],{"type":15,"tag":139,"props":1378,"children":1379},{"style":146},[1380],{"type":21,"value":1381},"drwxr-xr-x",{"type":15,"tag":139,"props":1383,"children":1384},{"style":158},[1385],{"type":21,"value":1298},{"type":15,"tag":139,"props":1387,"children":1388},{"style":152},[1389],{"type":21,"value":1213},{"type":15,"tag":139,"props":1391,"children":1392},{"style":152},[1393],{"type":21,"value":1218},{"type":15,"tag":139,"props":1395,"children":1396},{"style":152},[1397],{"type":21,"value":1223},{"type":15,"tag":139,"props":1399,"children":1400},{"style":152},[1401],{"type":21,"value":1228},{"type":15,"tag":139,"props":1403,"children":1404},{"style":158},[1405],{"type":21,"value":1233},{"type":15,"tag":139,"props":1407,"children":1408},{"style":152},[1409],{"type":21,"value":1410}," 12:55",{"type":15,"tag":139,"props":1412,"children":1413},{"style":152},[1414],{"type":21,"value":1415}," english-us-uk\n",{"type":15,"tag":139,"props":1417,"children":1419},{"class":141,"line":1418},8,[1420,1424,1428,1432,1436,1440,1444,1448,1453],{"type":15,"tag":139,"props":1421,"children":1422},{"style":146},[1423],{"type":21,"value":1203},{"type":15,"tag":139,"props":1425,"children":1426},{"style":158},[1427],{"type":21,"value":1255},{"type":15,"tag":139,"props":1429,"children":1430},{"style":152},[1431],{"type":21,"value":1213},{"type":15,"tag":139,"props":1433,"children":1434},{"style":152},[1435],{"type":21,"value":1218},{"type":15,"tag":139,"props":1437,"children":1438},{"style":152},[1439],{"type":21,"value":1223},{"type":15,"tag":139,"props":1441,"children":1442},{"style":152},[1443],{"type":21,"value":1228},{"type":15,"tag":139,"props":1445,"children":1446},{"style":158},[1447],{"type":21,"value":1233},{"type":15,"tag":139,"props":1449,"children":1450},{"style":152},[1451],{"type":21,"value":1452}," 18:45",{"type":15,"tag":139,"props":1454,"children":1455},{"style":152},[1456],{"type":21,"value":1457}," gutenberg\n",{"type":15,"tag":139,"props":1459,"children":1461},{"class":141,"line":1460},9,[1462,1466,1470,1474,1478,1482,1486,1490,1495],{"type":15,"tag":139,"props":1463,"children":1464},{"style":146},[1465],{"type":21,"value":1381},{"type":15,"tag":139,"props":1467,"children":1468},{"style":158},[1469],{"type":21,"value":1298},{"type":15,"tag":139,"props":1471,"children":1472},{"style":152},[1473],{"type":21,"value":1213},{"type":15,"tag":139,"props":1475,"children":1476},{"style":152},[1477],{"type":21,"value":1218},{"type":15,"tag":139,"props":1479,"children":1480},{"style":152},[1481],{"type":21,"value":1223},{"type":15,"tag":139,"props":1483,"children":1484},{"style":152},[1485],{"type":21,"value":1228},{"type":15,"tag":139,"props":1487,"children":1488},{"style":158},[1489],{"type":21,"value":1233},{"type":15,"tag":139,"props":1491,"children":1492},{"style":152},[1493],{"type":21,"value":1494}," 13:00",{"type":15,"tag":139,"props":1496,"children":1497},{"style":152},[1498],{"type":21,"value":1499}," nela\n",{"type":15,"tag":139,"props":1501,"children":1503},{"class":141,"line":1502},10,[1504,1508,1513,1517,1521,1525,1529,1533,1538],{"type":15,"tag":139,"props":1505,"children":1506},{"style":146},[1507],{"type":21,"value":1381},{"type":15,"tag":139,"props":1509,"children":1510},{"style":158},[1511],{"type":21,"value":1512},"  6",{"type":15,"tag":139,"props":1514,"children":1515},{"style":152},[1516],{"type":21,"value":1213},{"type":15,"tag":139,"props":1518,"children":1519},{"style":152},[1520],{"type":21,"value":1218},{"type":15,"tag":139,"props":1522,"children":1523},{"style":152},[1524],{"type":21,"value":1223},{"type":15,"tag":139,"props":1526,"children":1527},{"style":152},[1528],{"type":21,"value":1228},{"type":15,"tag":139,"props":1530,"children":1531},{"style":158},[1532],{"type":21,"value":1233},{"type":15,"tag":139,"props":1534,"children":1535},{"style":152},[1536],{"type":21,"value":1537}," 12:53",{"type":15,"tag":139,"props":1539,"children":1540},{"style":152},[1541],{"type":21,"value":1542}," semeval-2020-task1\n",{"type":15,"tag":1008,"props":1544,"children":1545},{},[1546],{"type":21,"value":1547},"Here is a brief explanation of what this list means:",{"type":15,"tag":1008,"props":1549,"children":1550},{},[1551,1553,1558,1560,1566,1568,1574,1576,1582,1584,1590],{"type":21,"value":1552},"The leftmost sequence of characters, such as ",{"type":15,"tag":30,"props":1554,"children":1556},{"className":1555},[],[1557],{"type":21,"value":1203},{"type":21,"value":1559}," indicates permissions of the respective file. The leading ",{"type":15,"tag":30,"props":1561,"children":1563},{"className":1562},[],[1564],{"type":21,"value":1565},"d",{"type":21,"value":1567}," indicates the item is a directory, ",{"type":15,"tag":30,"props":1569,"children":1571},{"className":1570},[],[1572],{"type":21,"value":1573},"r",{"type":21,"value":1575}," ,",{"type":15,"tag":30,"props":1577,"children":1579},{"className":1578},[],[1580],{"type":21,"value":1581},"w,",{"type":21,"value":1583}," and ",{"type":15,"tag":30,"props":1585,"children":1587},{"className":1586},[],[1588],{"type":21,"value":1589},"x",{"type":21,"value":1591}," indicate read, write and execute permissions for the owner, the group and all users in the system (you do not need to worry about these right now).",{"type":15,"tag":1008,"props":1593,"children":1594},{},[1595],{"type":21,"value":1596},"The second number is the number of hard links to the file (not relevant here)",{"type":15,"tag":1008,"props":1598,"children":1599},{},[1600,1602,1608],{"type":21,"value":1601},"The third column is the owner of the file. Here, it is myself (",{"type":15,"tag":30,"props":1603,"children":1605},{"className":1604},[],[1606],{"type":21,"value":1607},"mgouveag",{"type":21,"value":1609},").",{"type":15,"tag":1008,"props":1611,"children":1612},{},[1613,1615,1621],{"type":21,"value":1614},"The fourth column is the group of the folder. We are all part of group ",{"type":15,"tag":30,"props":1616,"children":1618},{"className":1617},[],[1619],{"type":21,"value":1620},"data",{"type":21,"value":1622},", which allows us to access these files.",{"type":15,"tag":1008,"props":1624,"children":1625},{},[1626],{"type":21,"value":1627},"The fifth column is the size of the file (folders are always 4KB in Unix).",{"type":15,"tag":1008,"props":1629,"children":1630},{},[1631],{"type":21,"value":1632},"The sixth column is the date and time of creation.",{"type":15,"tag":1008,"props":1634,"children":1635},{},[1636],{"type":21,"value":1637},"The seventh and final column is the name of the file. Note that folders are also considered files.",{"type":15,"tag":163,"props":1639,"children":1640},{},[],{"type":15,"tag":1004,"props":1642,"children":1643},{},[1644,1649,1721,1749,1771,1793],{"type":15,"tag":1008,"props":1645,"children":1646},{},[1647],{"type":21,"value":1648},"In this section, I will briefly explain each of the corpora.",{"type":15,"tag":1008,"props":1650,"children":1651},{},[1652,1658],{"type":15,"tag":16,"props":1653,"children":1655},{"id":1654},"coca-corpus-of-contemporary-american-english",[1656],{"type":21,"value":1657},"COCA - Corpus of Contemporary American English",{"type":15,"tag":1004,"props":1659,"children":1660},{},[1661,1666,1679,1699],{"type":15,"tag":1008,"props":1662,"children":1663},{},[1664],{"type":21,"value":1665},"This corpus contains texts from the year 1990 through 2012 across different categories: academic, spoken, fiction, magazine, and news.",{"type":15,"tag":1008,"props":1667,"children":1668},{},[1669,1671,1677],{"type":21,"value":1670},"The folder ",{"type":15,"tag":30,"props":1672,"children":1674},{"className":1673},[],[1675],{"type":21,"value":1676},"coca/text_files",{"type":21,"value":1678}," holds all such text files",{"type":15,"tag":1008,"props":1680,"children":1681},{},[1682,1684,1690,1692,1698],{"type":21,"value":1683},"To peek a file you can use the ",{"type":15,"tag":30,"props":1685,"children":1687},{"className":1686},[],[1688],{"type":21,"value":1689},"head",{"type":21,"value":1691}," command. For instance, the following will print the first few lines of file ",{"type":15,"tag":30,"props":1693,"children":1695},{"className":1694},[],[1696],{"type":21,"value":1697},"w_acad_2010.txt",{"type":21,"value":331},{"type":15,"tag":1008,"props":1700,"children":1701},{},[1702],{"type":15,"tag":130,"props":1703,"children":1705},{"className":132,"code":1704,"language":10,"meta":8,"style":8},"head coca/text_files/w_acad_2010.txt\n",[1706],{"type":15,"tag":30,"props":1707,"children":1708},{"__ignoreMap":8},[1709],{"type":15,"tag":139,"props":1710,"children":1711},{"class":141,"line":142},[1712,1716],{"type":15,"tag":139,"props":1713,"children":1714},{"style":146},[1715],{"type":21,"value":1689},{"type":15,"tag":139,"props":1717,"children":1718},{"style":152},[1719],{"type":21,"value":1720}," coca/text_files/w_acad_2010.txt\n",{"type":15,"tag":1008,"props":1722,"children":1723},{},[1724,1730],{"type":15,"tag":16,"props":1725,"children":1727},{"id":1726},"coha-corpus-of-historical-american-english",[1728],{"type":21,"value":1729},"COHA - Corpus of Historical American English",{"type":15,"tag":1004,"props":1731,"children":1732},{},[1733,1738],{"type":15,"tag":1008,"props":1734,"children":1735},{},[1736],{"type":21,"value":1737},"Similar to COCA, except that it includes data from a longer period (from 1820-2010).",{"type":15,"tag":1008,"props":1739,"children":1740},{},[1741,1743],{"type":21,"value":1742},"Files are in ",{"type":15,"tag":30,"props":1744,"children":1746},{"className":1745},[],[1747],{"type":21,"value":1748},"coha/text_files",{"type":15,"tag":1008,"props":1750,"children":1751},{},[1752,1758],{"type":15,"tag":16,"props":1753,"children":1755},{"id":1754},"nela-news-landscape",[1756],{"type":21,"value":1757},"NELA - News Landscape",{"type":15,"tag":1004,"props":1759,"children":1760},{},[1761,1766],{"type":15,"tag":1008,"props":1762,"children":1763},{},[1764],{"type":21,"value":1765},"A corpus of contemporary news, containing millions of news articles from hundreds of news outlets from years 2018-2023.",{"type":15,"tag":1008,"props":1767,"children":1768},{},[1769],{"type":21,"value":1770},"This corpus is in a database, not plain text files",{"type":15,"tag":1008,"props":1772,"children":1773},{},[1774,1780],{"type":15,"tag":16,"props":1775,"children":1777},{"id":1776},"congressional-record-congress_text",[1778],{"type":21,"value":1779},"Congressional Record (congress_text)",{"type":15,"tag":1004,"props":1781,"children":1782},{},[1783,1788],{"type":15,"tag":1008,"props":1784,"children":1785},{},[1786],{"type":21,"value":1787},"Transcripts of the congressional speeches from the 43rd through the 114th US congress.",{"type":15,"tag":1008,"props":1789,"children":1790},{},[1791],{"type":21,"value":1792},"Years 1873 - 2017",{"type":15,"tag":1008,"props":1794,"children":1795},{},[1796,1802],{"type":15,"tag":16,"props":1797,"children":1799},{"id":1798},"project-gutenberg",[1800],{"type":21,"value":1801},"Project Gutenberg",{"type":15,"tag":1004,"props":1803,"children":1804},{},[1805,1810,1821,1826,1831,1876],{"type":15,"tag":1008,"props":1806,"children":1807},{},[1808],{"type":21,"value":1809},"Over 71,000 books ranging including fiction and non-fiction",{"type":15,"tag":1008,"props":1811,"children":1812},{},[1813,1815],{"type":21,"value":1814},"Data in: ",{"type":15,"tag":30,"props":1816,"children":1818},{"className":1817},[],[1819],{"type":21,"value":1820},"gutenberg/data/raw/",{"type":15,"tag":1008,"props":1822,"children":1823},{},[1824],{"type":21,"value":1825},"Metadata for each book is available",{"type":15,"tag":1008,"props":1827,"children":1828},{},[1829],{"type":21,"value":1830},"E.g.: to take a peek into the first 100 lines of Lewis Carrol's Alice's Adventures in Wonderland:",{"type":15,"tag":1008,"props":1832,"children":1833},{},[1834,1863],{"type":15,"tag":130,"props":1835,"children":1837},{"className":132,"code":1836,"language":10,"meta":8,"style":8},"head -n 100 gutenberg/data/raw/PG11_raw.txt\n",[1838],{"type":15,"tag":30,"props":1839,"children":1840},{"__ignoreMap":8},[1841],{"type":15,"tag":139,"props":1842,"children":1843},{"class":141,"line":142},[1844,1848,1853,1858],{"type":15,"tag":139,"props":1845,"children":1846},{"style":146},[1847],{"type":21,"value":1689},{"type":15,"tag":139,"props":1849,"children":1850},{"style":158},[1851],{"type":21,"value":1852}," -n",{"type":15,"tag":139,"props":1854,"children":1855},{"style":158},[1856],{"type":21,"value":1857}," 100",{"type":15,"tag":139,"props":1859,"children":1860},{"style":152},[1861],{"type":21,"value":1862}," gutenberg/data/raw/PG11_raw.txt\n",{"type":15,"tag":1004,"props":1864,"children":1865},{},[1866],{"type":15,"tag":1008,"props":1867,"children":1868},{},[1869,1871],{"type":21,"value":1870},"Make sure your current directory is ",{"type":15,"tag":30,"props":1872,"children":1874},{"className":1873},[],[1875],{"type":21,"value":1060},{"type":15,"tag":1008,"props":1877,"children":1878},{},[1879,1881],{"type":21,"value":1880},"The metadata about all the books is in ",{"type":15,"tag":30,"props":1882,"children":1884},{"className":1883},[],[1885],{"type":21,"value":1886},"gutenberg/metadata/metadata.csv",{"type":15,"tag":572,"props":1888,"children":1889},{},[1890],{"type":21,"value":576},{"title":8,"searchDepth":578,"depth":578,"links":1892},[],"content:tutorials:data-ocelot.md","tutorials/data-ocelot.md","tutorials/data-ocelot",{"_path":1897,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":1898,"description":8,"tags":1620,"body":1899,"_type":588,"_id":3779,"_source":590,"_file":3780,"_stem":3781,"_extension":593},"/tutorials/nela-data","NELA data on Ocelot",{"type":12,"children":1900,"toc":3777},[1901,1949,1954,2021,2026,2072,2077,2082,2140,2145,2646,2658,2757,2762,3151,3164,3201,3773],{"type":15,"tag":1004,"props":1902,"children":1903},{},[1904,1908,1919,1938],{"type":15,"tag":1008,"props":1905,"children":1906},{},[1907],{"type":21,"value":1012},{"type":15,"tag":1008,"props":1909,"children":1910},{},[1911,1913,1918],{"type":21,"value":1912},"Here you will find information about the NELA data in ",{"type":15,"tag":30,"props":1914,"children":1916},{"className":1915},[],[1917],{"type":21,"value":1023},{"type":21,"value":1025},{"type":15,"tag":1008,"props":1920,"children":1921},{},[1922,1926,1927,1932,1933],{"type":15,"tag":418,"props":1923,"children":1924},{},[1925],{"type":21,"value":1033},{"type":21,"value":1035},{"type":15,"tag":30,"props":1928,"children":1930},{"className":1929},[],[1931],{"type":21,"value":1041},{"type":21,"value":1043},{"type":15,"tag":30,"props":1934,"children":1936},{"className":1935},[],[1937],{"type":21,"value":1049},{"type":15,"tag":1008,"props":1939,"children":1940},{},[1941,1943],{"type":21,"value":1942},"The current NELA databases are in ",{"type":15,"tag":30,"props":1944,"children":1946},{"className":1945},[],[1947],{"type":21,"value":1948},"/data/nela/databases/",{"type":15,"tag":24,"props":1950,"children":1951},{},[1952],{"type":21,"value":1953},"To check which databases are available list all files in this directory:",{"type":15,"tag":130,"props":1955,"children":1957},{"className":132,"code":1956,"language":10,"meta":8,"style":8},"ls -lh /data/nela/databases\nmbfc.db  nela_eng.db  nela_ps.db  nela_ptbr.db  nela_small.db  nela_small.sql  nela_us-local.db  pro-science.db\n",[1958],{"type":15,"tag":30,"props":1959,"children":1960},{"__ignoreMap":8},[1961,1978],{"type":15,"tag":139,"props":1962,"children":1963},{"class":141,"line":142},[1964,1968,1973],{"type":15,"tag":139,"props":1965,"children":1966},{"style":146},[1967],{"type":21,"value":43},{"type":15,"tag":139,"props":1969,"children":1970},{"style":158},[1971],{"type":21,"value":1972}," -lh",{"type":15,"tag":139,"props":1974,"children":1975},{"style":152},[1976],{"type":21,"value":1977}," /data/nela/databases\n",{"type":15,"tag":139,"props":1979,"children":1980},{"class":141,"line":578},[1981,1986,1991,1996,2001,2006,2011,2016],{"type":15,"tag":139,"props":1982,"children":1983},{"style":146},[1984],{"type":21,"value":1985},"mbfc.db",{"type":15,"tag":139,"props":1987,"children":1988},{"style":152},[1989],{"type":21,"value":1990},"  nela_eng.db",{"type":15,"tag":139,"props":1992,"children":1993},{"style":152},[1994],{"type":21,"value":1995},"  nela_ps.db",{"type":15,"tag":139,"props":1997,"children":1998},{"style":152},[1999],{"type":21,"value":2000},"  nela_ptbr.db",{"type":15,"tag":139,"props":2002,"children":2003},{"style":152},[2004],{"type":21,"value":2005},"  nela_small.db",{"type":15,"tag":139,"props":2007,"children":2008},{"style":152},[2009],{"type":21,"value":2010},"  nela_small.sql",{"type":15,"tag":139,"props":2012,"children":2013},{"style":152},[2014],{"type":21,"value":2015},"  nela_us-local.db",{"type":15,"tag":139,"props":2017,"children":2018},{"style":152},[2019],{"type":21,"value":2020},"  pro-science.db\n",{"type":15,"tag":24,"props":2022,"children":2023},{},[2024],{"type":21,"value":2025},"To open a database in SQLite 3:",{"type":15,"tag":130,"props":2027,"children":2029},{"className":132,"code":2028,"language":10,"meta":8,"style":8},"sqlite3 /data/nela/databases/\u003Cdatabase_name>.db\n",[2030],{"type":15,"tag":30,"props":2031,"children":2032},{"__ignoreMap":8},[2033],{"type":15,"tag":139,"props":2034,"children":2035},{"class":141,"line":142},[2036,2041,2046,2052,2057,2062,2067],{"type":15,"tag":139,"props":2037,"children":2038},{"style":146},[2039],{"type":21,"value":2040},"sqlite3",{"type":15,"tag":139,"props":2042,"children":2043},{"style":152},[2044],{"type":21,"value":2045}," /data/nela/databases/",{"type":15,"tag":139,"props":2047,"children":2049},{"style":2048},"--shiki-default:#D73A49;--shiki-dark-mode:#F92672;--shiki-sky-dark-mode:#F92672;--shiki-light-mode:#D73A49;--shiki-blue-mode:#F92672",[2050],{"type":21,"value":2051},"\u003C",{"type":15,"tag":139,"props":2053,"children":2054},{"style":152},[2055],{"type":21,"value":2056},"database_nam",{"type":15,"tag":139,"props":2058,"children":2059},{"style":567},[2060],{"type":21,"value":2061},"e",{"type":15,"tag":139,"props":2063,"children":2064},{"style":2048},[2065],{"type":21,"value":2066},">",{"type":15,"tag":139,"props":2068,"children":2069},{"style":152},[2070],{"type":21,"value":2071},".db\n",{"type":15,"tag":24,"props":2073,"children":2074},{},[2075],{"type":21,"value":2076},"You are now on a SQLite 3 shell. Here are some basic commands you can run to explore the database:",{"type":15,"tag":24,"props":2078,"children":2079},{},[2080],{"type":21,"value":2081},"List all the tables in the database:",{"type":15,"tag":130,"props":2083,"children":2085},{"className":132,"code":2084,"language":10,"meta":8,"style":8},"sqlite> .tables\nlinks        log          newsdata     source_feed  tweet        videos     \n",[2086],{"type":15,"tag":30,"props":2087,"children":2088},{"__ignoreMap":8},[2089,2107],{"type":15,"tag":139,"props":2090,"children":2091},{"class":141,"line":142},[2092,2097,2102],{"type":15,"tag":139,"props":2093,"children":2094},{"style":146},[2095],{"type":21,"value":2096},"sqlite",{"type":15,"tag":139,"props":2098,"children":2099},{"style":567},[2100],{"type":21,"value":2101},"> ",{"type":15,"tag":139,"props":2103,"children":2104},{"style":152},[2105],{"type":21,"value":2106},".tables\n",{"type":15,"tag":139,"props":2108,"children":2109},{"class":141,"line":578},[2110,2115,2120,2125,2130,2135],{"type":15,"tag":139,"props":2111,"children":2112},{"style":146},[2113],{"type":21,"value":2114},"links",{"type":15,"tag":139,"props":2116,"children":2117},{"style":152},[2118],{"type":21,"value":2119},"        log",{"type":15,"tag":139,"props":2121,"children":2122},{"style":152},[2123],{"type":21,"value":2124},"          newsdata",{"type":15,"tag":139,"props":2126,"children":2127},{"style":152},[2128],{"type":21,"value":2129},"     source_feed",{"type":15,"tag":139,"props":2131,"children":2132},{"style":152},[2133],{"type":21,"value":2134},"  tweet",{"type":15,"tag":139,"props":2136,"children":2137},{"style":152},[2138],{"type":21,"value":2139},"        videos\n",{"type":15,"tag":24,"props":2141,"children":2142},{},[2143],{"type":21,"value":2144},"List the database schema:",{"type":15,"tag":130,"props":2146,"children":2148},{"className":132,"code":2147,"language":10,"meta":8,"style":8},"sqlite> .schema\nCREATE TABLE newsdata (id text primary key,date text,source text,title text,content text,author text,url text,published text,published_utc integer,collection_utc integer);\nCREATE TABLE tweet (id text primary key,article_id text,embedded_html text, tweet_id text, url text, author text, text text, date integer);\nCREATE TABLE source_feed (source TEXT, url TEXT, most_recent INTEGER, created_at DATETIME DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY(source, url));\nCREATE TABLE log (time_start TEXT, time_end TEXT, articles INT, sources INT, sources_total INT);\nCREATE TABLE videos (id INTEGER PRIMARY KEY, article_id TEXT, src TEXT, provider TEXT, embed_code TEXT);\nCREATE TABLE links (id INTEGER PRIMARY KEY, article_id, src TEXT, domain TEXT);\n",[2149],{"type":15,"tag":30,"props":2150,"children":2151},{"__ignoreMap":8},[2152,2168,2255,2347,2446,2513,2588],{"type":15,"tag":139,"props":2153,"children":2154},{"class":141,"line":142},[2155,2159,2163],{"type":15,"tag":139,"props":2156,"children":2157},{"style":146},[2158],{"type":21,"value":2096},{"type":15,"tag":139,"props":2160,"children":2161},{"style":567},[2162],{"type":21,"value":2101},{"type":15,"tag":139,"props":2164,"children":2165},{"style":152},[2166],{"type":21,"value":2167},".schema\n",{"type":15,"tag":139,"props":2169,"children":2170},{"class":141,"line":578},[2171,2176,2181,2186,2191,2195,2200,2205,2210,2215,2220,2225,2230,2235,2240,2245,2250],{"type":15,"tag":139,"props":2172,"children":2173},{"style":146},[2174],{"type":21,"value":2175},"CREATE",{"type":15,"tag":139,"props":2177,"children":2178},{"style":152},[2179],{"type":21,"value":2180}," TABLE",{"type":15,"tag":139,"props":2182,"children":2183},{"style":152},[2184],{"type":21,"value":2185}," newsdata",{"type":15,"tag":139,"props":2187,"children":2188},{"style":567},[2189],{"type":21,"value":2190}," (id ",{"type":15,"tag":139,"props":2192,"children":2193},{"style":152},[2194],{"type":21,"value":21},{"type":15,"tag":139,"props":2196,"children":2197},{"style":152},[2198],{"type":21,"value":2199}," primary",{"type":15,"tag":139,"props":2201,"children":2202},{"style":152},[2203],{"type":21,"value":2204}," key,date",{"type":15,"tag":139,"props":2206,"children":2207},{"style":152},[2208],{"type":21,"value":2209}," text,source",{"type":15,"tag":139,"props":2211,"children":2212},{"style":152},[2213],{"type":21,"value":2214}," text,title",{"type":15,"tag":139,"props":2216,"children":2217},{"style":152},[2218],{"type":21,"value":2219}," text,content",{"type":15,"tag":139,"props":2221,"children":2222},{"style":152},[2223],{"type":21,"value":2224}," text,author",{"type":15,"tag":139,"props":2226,"children":2227},{"style":152},[2228],{"type":21,"value":2229}," text,url",{"type":15,"tag":139,"props":2231,"children":2232},{"style":152},[2233],{"type":21,"value":2234}," text,published",{"type":15,"tag":139,"props":2236,"children":2237},{"style":152},[2238],{"type":21,"value":2239}," text,published_utc",{"type":15,"tag":139,"props":2241,"children":2242},{"style":152},[2243],{"type":21,"value":2244}," integer,collection_utc",{"type":15,"tag":139,"props":2246,"children":2247},{"style":152},[2248],{"type":21,"value":2249}," integer",{"type":15,"tag":139,"props":2251,"children":2252},{"style":567},[2253],{"type":21,"value":2254},");\n",{"type":15,"tag":139,"props":2256,"children":2257},{"class":141,"line":581},[2258,2262,2266,2271,2275,2279,2283,2288,2293,2298,2303,2307,2312,2316,2321,2325,2330,2334,2339,2343],{"type":15,"tag":139,"props":2259,"children":2260},{"style":146},[2261],{"type":21,"value":2175},{"type":15,"tag":139,"props":2263,"children":2264},{"style":152},[2265],{"type":21,"value":2180},{"type":15,"tag":139,"props":2267,"children":2268},{"style":152},[2269],{"type":21,"value":2270}," tweet",{"type":15,"tag":139,"props":2272,"children":2273},{"style":567},[2274],{"type":21,"value":2190},{"type":15,"tag":139,"props":2276,"children":2277},{"style":152},[2278],{"type":21,"value":21},{"type":15,"tag":139,"props":2280,"children":2281},{"style":152},[2282],{"type":21,"value":2199},{"type":15,"tag":139,"props":2284,"children":2285},{"style":152},[2286],{"type":21,"value":2287}," key,article_id",{"type":15,"tag":139,"props":2289,"children":2290},{"style":152},[2291],{"type":21,"value":2292}," text,embedded_html",{"type":15,"tag":139,"props":2294,"children":2295},{"style":152},[2296],{"type":21,"value":2297}," text,",{"type":15,"tag":139,"props":2299,"children":2300},{"style":152},[2301],{"type":21,"value":2302}," tweet_id",{"type":15,"tag":139,"props":2304,"children":2305},{"style":152},[2306],{"type":21,"value":2297},{"type":15,"tag":139,"props":2308,"children":2309},{"style":152},[2310],{"type":21,"value":2311}," url",{"type":15,"tag":139,"props":2313,"children":2314},{"style":152},[2315],{"type":21,"value":2297},{"type":15,"tag":139,"props":2317,"children":2318},{"style":152},[2319],{"type":21,"value":2320}," author",{"type":15,"tag":139,"props":2322,"children":2323},{"style":152},[2324],{"type":21,"value":2297},{"type":15,"tag":139,"props":2326,"children":2327},{"style":152},[2328],{"type":21,"value":2329}," text",{"type":15,"tag":139,"props":2331,"children":2332},{"style":152},[2333],{"type":21,"value":2297},{"type":15,"tag":139,"props":2335,"children":2336},{"style":152},[2337],{"type":21,"value":2338}," date",{"type":15,"tag":139,"props":2340,"children":2341},{"style":152},[2342],{"type":21,"value":2249},{"type":15,"tag":139,"props":2344,"children":2345},{"style":567},[2346],{"type":21,"value":2254},{"type":15,"tag":139,"props":2348,"children":2349},{"class":141,"line":805},[2350,2354,2358,2363,2368,2373,2377,2382,2387,2392,2397,2402,2407,2412,2417,2422,2427,2432,2437,2441],{"type":15,"tag":139,"props":2351,"children":2352},{"style":146},[2353],{"type":21,"value":2175},{"type":15,"tag":139,"props":2355,"children":2356},{"style":152},[2357],{"type":21,"value":2180},{"type":15,"tag":139,"props":2359,"children":2360},{"style":152},[2361],{"type":21,"value":2362}," source_feed",{"type":15,"tag":139,"props":2364,"children":2365},{"style":567},[2366],{"type":21,"value":2367}," (source ",{"type":15,"tag":139,"props":2369,"children":2370},{"style":152},[2371],{"type":21,"value":2372},"TEXT,",{"type":15,"tag":139,"props":2374,"children":2375},{"style":152},[2376],{"type":21,"value":2311},{"type":15,"tag":139,"props":2378,"children":2379},{"style":152},[2380],{"type":21,"value":2381}," TEXT,",{"type":15,"tag":139,"props":2383,"children":2384},{"style":152},[2385],{"type":21,"value":2386}," most_recent",{"type":15,"tag":139,"props":2388,"children":2389},{"style":152},[2390],{"type":21,"value":2391}," INTEGER,",{"type":15,"tag":139,"props":2393,"children":2394},{"style":152},[2395],{"type":21,"value":2396}," created_at",{"type":15,"tag":139,"props":2398,"children":2399},{"style":152},[2400],{"type":21,"value":2401}," DATETIME",{"type":15,"tag":139,"props":2403,"children":2404},{"style":152},[2405],{"type":21,"value":2406}," DEFAULT",{"type":15,"tag":139,"props":2408,"children":2409},{"style":152},[2410],{"type":21,"value":2411}," CURRENT_TIMESTAMP,",{"type":15,"tag":139,"props":2413,"children":2414},{"style":152},[2415],{"type":21,"value":2416}," PRIMARY",{"type":15,"tag":139,"props":2418,"children":2419},{"style":152},[2420],{"type":21,"value":2421}," KEY",{"type":15,"tag":139,"props":2423,"children":2424},{"style":567},[2425],{"type":21,"value":2426},"(",{"type":15,"tag":139,"props":2428,"children":2429},{"style":547},[2430],{"type":21,"value":2431},"source",{"type":15,"tag":139,"props":2433,"children":2434},{"style":152},[2435],{"type":21,"value":2436},",",{"type":15,"tag":139,"props":2438,"children":2439},{"style":152},[2440],{"type":21,"value":2311},{"type":15,"tag":139,"props":2442,"children":2443},{"style":567},[2444],{"type":21,"value":2445},"));\n",{"type":15,"tag":139,"props":2447,"children":2448},{"class":141,"line":1288},[2449,2453,2457,2462,2467,2471,2476,2480,2485,2490,2495,2499,2504,2509],{"type":15,"tag":139,"props":2450,"children":2451},{"style":146},[2452],{"type":21,"value":2175},{"type":15,"tag":139,"props":2454,"children":2455},{"style":152},[2456],{"type":21,"value":2180},{"type":15,"tag":139,"props":2458,"children":2459},{"style":152},[2460],{"type":21,"value":2461}," log",{"type":15,"tag":139,"props":2463,"children":2464},{"style":567},[2465],{"type":21,"value":2466}," (time_start ",{"type":15,"tag":139,"props":2468,"children":2469},{"style":152},[2470],{"type":21,"value":2372},{"type":15,"tag":139,"props":2472,"children":2473},{"style":152},[2474],{"type":21,"value":2475}," time_end",{"type":15,"tag":139,"props":2477,"children":2478},{"style":152},[2479],{"type":21,"value":2381},{"type":15,"tag":139,"props":2481,"children":2482},{"style":152},[2483],{"type":21,"value":2484}," articles",{"type":15,"tag":139,"props":2486,"children":2487},{"style":152},[2488],{"type":21,"value":2489}," INT,",{"type":15,"tag":139,"props":2491,"children":2492},{"style":152},[2493],{"type":21,"value":2494}," sources",{"type":15,"tag":139,"props":2496,"children":2497},{"style":152},[2498],{"type":21,"value":2489},{"type":15,"tag":139,"props":2500,"children":2501},{"style":152},[2502],{"type":21,"value":2503}," sources_total",{"type":15,"tag":139,"props":2505,"children":2506},{"style":152},[2507],{"type":21,"value":2508}," INT",{"type":15,"tag":139,"props":2510,"children":2511},{"style":567},[2512],{"type":21,"value":2254},{"type":15,"tag":139,"props":2514,"children":2515},{"class":141,"line":1331},[2516,2520,2524,2529,2533,2538,2542,2547,2552,2556,2561,2565,2570,2574,2579,2584],{"type":15,"tag":139,"props":2517,"children":2518},{"style":146},[2519],{"type":21,"value":2175},{"type":15,"tag":139,"props":2521,"children":2522},{"style":152},[2523],{"type":21,"value":2180},{"type":15,"tag":139,"props":2525,"children":2526},{"style":152},[2527],{"type":21,"value":2528}," videos",{"type":15,"tag":139,"props":2530,"children":2531},{"style":567},[2532],{"type":21,"value":2190},{"type":15,"tag":139,"props":2534,"children":2535},{"style":152},[2536],{"type":21,"value":2537},"INTEGER",{"type":15,"tag":139,"props":2539,"children":2540},{"style":152},[2541],{"type":21,"value":2416},{"type":15,"tag":139,"props":2543,"children":2544},{"style":152},[2545],{"type":21,"value":2546}," KEY,",{"type":15,"tag":139,"props":2548,"children":2549},{"style":152},[2550],{"type":21,"value":2551}," article_id",{"type":15,"tag":139,"props":2553,"children":2554},{"style":152},[2555],{"type":21,"value":2381},{"type":15,"tag":139,"props":2557,"children":2558},{"style":152},[2559],{"type":21,"value":2560}," src",{"type":15,"tag":139,"props":2562,"children":2563},{"style":152},[2564],{"type":21,"value":2381},{"type":15,"tag":139,"props":2566,"children":2567},{"style":152},[2568],{"type":21,"value":2569}," provider",{"type":15,"tag":139,"props":2571,"children":2572},{"style":152},[2573],{"type":21,"value":2381},{"type":15,"tag":139,"props":2575,"children":2576},{"style":152},[2577],{"type":21,"value":2578}," embed_code",{"type":15,"tag":139,"props":2580,"children":2581},{"style":152},[2582],{"type":21,"value":2583}," TEXT",{"type":15,"tag":139,"props":2585,"children":2586},{"style":567},[2587],{"type":21,"value":2254},{"type":15,"tag":139,"props":2589,"children":2590},{"class":141,"line":1375},[2591,2595,2599,2604,2608,2612,2616,2620,2625,2629,2633,2638,2642],{"type":15,"tag":139,"props":2592,"children":2593},{"style":146},[2594],{"type":21,"value":2175},{"type":15,"tag":139,"props":2596,"children":2597},{"style":152},[2598],{"type":21,"value":2180},{"type":15,"tag":139,"props":2600,"children":2601},{"style":152},[2602],{"type":21,"value":2603}," links",{"type":15,"tag":139,"props":2605,"children":2606},{"style":567},[2607],{"type":21,"value":2190},{"type":15,"tag":139,"props":2609,"children":2610},{"style":152},[2611],{"type":21,"value":2537},{"type":15,"tag":139,"props":2613,"children":2614},{"style":152},[2615],{"type":21,"value":2416},{"type":15,"tag":139,"props":2617,"children":2618},{"style":152},[2619],{"type":21,"value":2546},{"type":15,"tag":139,"props":2621,"children":2622},{"style":152},[2623],{"type":21,"value":2624}," article_id,",{"type":15,"tag":139,"props":2626,"children":2627},{"style":152},[2628],{"type":21,"value":2560},{"type":15,"tag":139,"props":2630,"children":2631},{"style":152},[2632],{"type":21,"value":2381},{"type":15,"tag":139,"props":2634,"children":2635},{"style":152},[2636],{"type":21,"value":2637}," domain",{"type":15,"tag":139,"props":2639,"children":2640},{"style":152},[2641],{"type":21,"value":2583},{"type":15,"tag":139,"props":2643,"children":2644},{"style":567},[2645],{"type":21,"value":2254},{"type":15,"tag":24,"props":2647,"children":2648},{},[2649,2651,2657],{"type":21,"value":2650},"List the schema for a single table, e.g.: table ",{"type":15,"tag":30,"props":2652,"children":2654},{"className":2653},[],[2655],{"type":21,"value":2656},"newsdata",{"type":21,"value":331},{"type":15,"tag":130,"props":2659,"children":2661},{"className":132,"code":2660,"language":10,"meta":8,"style":8},"sqlite>.schema newsdata\nCREATE TABLE newsdata (id text primary key,date text,source text,title text,content text,author text,url text,published text,published_utc integer,collection_utc integer);\n",[2662],{"type":15,"tag":30,"props":2663,"children":2664},{"__ignoreMap":8},[2665,2686],{"type":15,"tag":139,"props":2666,"children":2667},{"class":141,"line":142},[2668,2672,2676,2681],{"type":15,"tag":139,"props":2669,"children":2670},{"style":146},[2671],{"type":21,"value":2096},{"type":15,"tag":139,"props":2673,"children":2674},{"style":567},[2675],{"type":21,"value":2066},{"type":15,"tag":139,"props":2677,"children":2678},{"style":152},[2679],{"type":21,"value":2680},".schema",{"type":15,"tag":139,"props":2682,"children":2683},{"style":152},[2684],{"type":21,"value":2685}," newsdata\n",{"type":15,"tag":139,"props":2687,"children":2688},{"class":141,"line":578},[2689,2693,2697,2701,2705,2709,2713,2717,2721,2725,2729,2733,2737,2741,2745,2749,2753],{"type":15,"tag":139,"props":2690,"children":2691},{"style":146},[2692],{"type":21,"value":2175},{"type":15,"tag":139,"props":2694,"children":2695},{"style":152},[2696],{"type":21,"value":2180},{"type":15,"tag":139,"props":2698,"children":2699},{"style":152},[2700],{"type":21,"value":2185},{"type":15,"tag":139,"props":2702,"children":2703},{"style":567},[2704],{"type":21,"value":2190},{"type":15,"tag":139,"props":2706,"children":2707},{"style":152},[2708],{"type":21,"value":21},{"type":15,"tag":139,"props":2710,"children":2711},{"style":152},[2712],{"type":21,"value":2199},{"type":15,"tag":139,"props":2714,"children":2715},{"style":152},[2716],{"type":21,"value":2204},{"type":15,"tag":139,"props":2718,"children":2719},{"style":152},[2720],{"type":21,"value":2209},{"type":15,"tag":139,"props":2722,"children":2723},{"style":152},[2724],{"type":21,"value":2214},{"type":15,"tag":139,"props":2726,"children":2727},{"style":152},[2728],{"type":21,"value":2219},{"type":15,"tag":139,"props":2730,"children":2731},{"style":152},[2732],{"type":21,"value":2224},{"type":15,"tag":139,"props":2734,"children":2735},{"style":152},[2736],{"type":21,"value":2229},{"type":15,"tag":139,"props":2738,"children":2739},{"style":152},[2740],{"type":21,"value":2234},{"type":15,"tag":139,"props":2742,"children":2743},{"style":152},[2744],{"type":21,"value":2239},{"type":15,"tag":139,"props":2746,"children":2747},{"style":152},[2748],{"type":21,"value":2244},{"type":15,"tag":139,"props":2750,"children":2751},{"style":152},[2752],{"type":21,"value":2249},{"type":15,"tag":139,"props":2754,"children":2755},{"style":567},[2756],{"type":21,"value":2254},{"type":15,"tag":24,"props":2758,"children":2759},{},[2760],{"type":21,"value":2761},"Running a query to select a few articles on a given date for sources CNN and The Guardian, ordering the results alphabetically by title (notice that a query line requires a semicolon at the end):",{"type":15,"tag":130,"props":2763,"children":2765},{"className":132,"code":2764,"language":10,"meta":8,"style":8},"SELECT title, source, date FROM newsdata WHERE date='2022-12-01' AND (source='cnn' OR source='theguardian') ORDER BY title ASC\n'Harry & Meghan' docuseries trailer debuts|cnn|2022-12-01\n'I honestly felt like I was going to die': Jennifer Lopez on 'the biggest heartbreak' of her life|cnn|2022-12-01\n'River of blood': Foxconn employee describes violent protests in China|cnn|2022-12-01\n'Why haven't I got a question about Jerry Jones': LeBron calls out reporters|cnn|2022-12-01\n0% intro APR until 2024 is 100% insane|cnn|2022-12-01\n10 Cards Charging 0% Interest Until 2024|cnn|2022-12-01\n35 of the coziest gifts for the person who'd rather just stay home|cnn|2022-12-01\n40 gifts under $100 you're probably going to want to just buy for yourself|cnn|2022-12-01\n43 useful products that caught the attention of our editors|cnn|2022-12-01\n",[2766],{"type":15,"tag":30,"props":2767,"children":2768},{"__ignoreMap":8},[2769,2840,2882,2945,3007,3055,3063,3071,3115,3143],{"type":15,"tag":139,"props":2770,"children":2771},{"class":141,"line":142},[2772,2777,2782,2787,2791,2796,2800,2805,2810,2815,2820,2825,2830,2835],{"type":15,"tag":139,"props":2773,"children":2774},{"style":146},[2775],{"type":21,"value":2776},"SELECT",{"type":15,"tag":139,"props":2778,"children":2779},{"style":152},[2780],{"type":21,"value":2781}," title,",{"type":15,"tag":139,"props":2783,"children":2784},{"style":152},[2785],{"type":21,"value":2786}," source,",{"type":15,"tag":139,"props":2788,"children":2789},{"style":152},[2790],{"type":21,"value":2338},{"type":15,"tag":139,"props":2792,"children":2793},{"style":152},[2794],{"type":21,"value":2795}," FROM",{"type":15,"tag":139,"props":2797,"children":2798},{"style":152},[2799],{"type":21,"value":2185},{"type":15,"tag":139,"props":2801,"children":2802},{"style":152},[2803],{"type":21,"value":2804}," WHERE",{"type":15,"tag":139,"props":2806,"children":2807},{"style":152},[2808],{"type":21,"value":2809}," date='2022-12-01'",{"type":15,"tag":139,"props":2811,"children":2812},{"style":152},[2813],{"type":21,"value":2814}," AND",{"type":15,"tag":139,"props":2816,"children":2817},{"style":567},[2818],{"type":21,"value":2819}," (source=",{"type":15,"tag":139,"props":2821,"children":2822},{"style":152},[2823],{"type":21,"value":2824},"'cnn'",{"type":15,"tag":139,"props":2826,"children":2827},{"style":152},[2828],{"type":21,"value":2829}," OR",{"type":15,"tag":139,"props":2831,"children":2832},{"style":152},[2833],{"type":21,"value":2834}," source='theguardian'",{"type":15,"tag":139,"props":2836,"children":2837},{"style":567},[2838],{"type":21,"value":2839},") ORDER BY title ASC\n",{"type":15,"tag":139,"props":2841,"children":2842},{"class":141,"line":578},[2843,2848,2853,2858,2863,2868,2873,2877],{"type":15,"tag":139,"props":2844,"children":2845},{"style":146},[2846],{"type":21,"value":2847},"'Harry & Meghan'",{"type":15,"tag":139,"props":2849,"children":2850},{"style":152},[2851],{"type":21,"value":2852}," docuseries",{"type":15,"tag":139,"props":2854,"children":2855},{"style":152},[2856],{"type":21,"value":2857}," trailer",{"type":15,"tag":139,"props":2859,"children":2860},{"style":152},[2861],{"type":21,"value":2862}," debuts",{"type":15,"tag":139,"props":2864,"children":2865},{"style":2048},[2866],{"type":21,"value":2867},"|",{"type":15,"tag":139,"props":2869,"children":2870},{"style":146},[2871],{"type":21,"value":2872},"cnn",{"type":15,"tag":139,"props":2874,"children":2875},{"style":2048},[2876],{"type":21,"value":2867},{"type":15,"tag":139,"props":2878,"children":2879},{"style":146},[2880],{"type":21,"value":2881},"2022-12-01\n",{"type":15,"tag":139,"props":2883,"children":2884},{"class":141,"line":581},[2885,2890,2894,2899,2904,2909,2914,2919,2924,2929,2933,2937,2941],{"type":15,"tag":139,"props":2886,"children":2887},{"style":146},[2888],{"type":21,"value":2889},"'I honestly felt like I was going to die'",{"type":15,"tag":139,"props":2891,"children":2892},{"style":547},[2893],{"type":21,"value":331},{"type":15,"tag":139,"props":2895,"children":2896},{"style":152},[2897],{"type":21,"value":2898}," Jennifer",{"type":15,"tag":139,"props":2900,"children":2901},{"style":152},[2902],{"type":21,"value":2903}," Lopez",{"type":15,"tag":139,"props":2905,"children":2906},{"style":152},[2907],{"type":21,"value":2908}," on",{"type":15,"tag":139,"props":2910,"children":2911},{"style":152},[2912],{"type":21,"value":2913}," 'the biggest heartbreak'",{"type":15,"tag":139,"props":2915,"children":2916},{"style":152},[2917],{"type":21,"value":2918}," of",{"type":15,"tag":139,"props":2920,"children":2921},{"style":152},[2922],{"type":21,"value":2923}," her",{"type":15,"tag":139,"props":2925,"children":2926},{"style":152},[2927],{"type":21,"value":2928}," life",{"type":15,"tag":139,"props":2930,"children":2931},{"style":2048},[2932],{"type":21,"value":2867},{"type":15,"tag":139,"props":2934,"children":2935},{"style":146},[2936],{"type":21,"value":2872},{"type":15,"tag":139,"props":2938,"children":2939},{"style":2048},[2940],{"type":21,"value":2867},{"type":15,"tag":139,"props":2942,"children":2943},{"style":146},[2944],{"type":21,"value":2881},{"type":15,"tag":139,"props":2946,"children":2947},{"class":141,"line":805},[2948,2953,2957,2962,2967,2972,2977,2982,2986,2991,2995,2999,3003],{"type":15,"tag":139,"props":2949,"children":2950},{"style":146},[2951],{"type":21,"value":2952},"'River of blood'",{"type":15,"tag":139,"props":2954,"children":2955},{"style":547},[2956],{"type":21,"value":331},{"type":15,"tag":139,"props":2958,"children":2959},{"style":152},[2960],{"type":21,"value":2961}," Foxconn",{"type":15,"tag":139,"props":2963,"children":2964},{"style":152},[2965],{"type":21,"value":2966}," employee",{"type":15,"tag":139,"props":2968,"children":2969},{"style":152},[2970],{"type":21,"value":2971}," describes",{"type":15,"tag":139,"props":2973,"children":2974},{"style":152},[2975],{"type":21,"value":2976}," violent",{"type":15,"tag":139,"props":2978,"children":2979},{"style":152},[2980],{"type":21,"value":2981}," protests",{"type":15,"tag":139,"props":2983,"children":2984},{"style":152},[2985],{"type":21,"value":821},{"type":15,"tag":139,"props":2987,"children":2988},{"style":152},[2989],{"type":21,"value":2990}," China",{"type":15,"tag":139,"props":2992,"children":2993},{"style":2048},[2994],{"type":21,"value":2867},{"type":15,"tag":139,"props":2996,"children":2997},{"style":146},[2998],{"type":21,"value":2872},{"type":15,"tag":139,"props":3000,"children":3001},{"style":2048},[3002],{"type":21,"value":2867},{"type":15,"tag":139,"props":3004,"children":3005},{"style":146},[3006],{"type":21,"value":2881},{"type":15,"tag":139,"props":3008,"children":3009},{"class":141,"line":1288},[3010,3015,3020,3025,3030,3035,3040,3045,3050],{"type":15,"tag":139,"props":3011,"children":3012},{"style":146},[3013],{"type":21,"value":3014},"'Why haven'",{"type":15,"tag":139,"props":3016,"children":3017},{"style":146},[3018],{"type":21,"value":3019},"t",{"type":15,"tag":139,"props":3021,"children":3022},{"style":152},[3023],{"type":21,"value":3024}," I",{"type":15,"tag":139,"props":3026,"children":3027},{"style":152},[3028],{"type":21,"value":3029}," got",{"type":15,"tag":139,"props":3031,"children":3032},{"style":152},[3033],{"type":21,"value":3034}," a",{"type":15,"tag":139,"props":3036,"children":3037},{"style":152},[3038],{"type":21,"value":3039}," question",{"type":15,"tag":139,"props":3041,"children":3042},{"style":152},[3043],{"type":21,"value":3044}," about",{"type":15,"tag":139,"props":3046,"children":3047},{"style":152},[3048],{"type":21,"value":3049}," Jerry",{"type":15,"tag":139,"props":3051,"children":3052},{"style":152},[3053],{"type":21,"value":3054}," Jones': LeBron calls out reporters|cnn|2022-12-01\n",{"type":15,"tag":139,"props":3056,"children":3057},{"class":141,"line":1331},[3058],{"type":15,"tag":139,"props":3059,"children":3060},{"style":152},[3061],{"type":21,"value":3062},"0% intro APR until 2024 is 100% insane|cnn|2022-12-01\n",{"type":15,"tag":139,"props":3064,"children":3065},{"class":141,"line":1375},[3066],{"type":15,"tag":139,"props":3067,"children":3068},{"style":152},[3069],{"type":21,"value":3070},"10 Cards Charging 0% Interest Until 2024|cnn|2022-12-01\n",{"type":15,"tag":139,"props":3072,"children":3073},{"class":141,"line":1418},[3074,3079,3084,3089,3094,3099,3103,3107,3111],{"type":15,"tag":139,"props":3075,"children":3076},{"style":152},[3077],{"type":21,"value":3078},"35 of the coziest gifts for the person who'd",{"type":15,"tag":139,"props":3080,"children":3081},{"style":152},[3082],{"type":21,"value":3083}," rather",{"type":15,"tag":139,"props":3085,"children":3086},{"style":152},[3087],{"type":21,"value":3088}," just",{"type":15,"tag":139,"props":3090,"children":3091},{"style":152},[3092],{"type":21,"value":3093}," stay",{"type":15,"tag":139,"props":3095,"children":3096},{"style":152},[3097],{"type":21,"value":3098}," home",{"type":15,"tag":139,"props":3100,"children":3101},{"style":2048},[3102],{"type":21,"value":2867},{"type":15,"tag":139,"props":3104,"children":3105},{"style":146},[3106],{"type":21,"value":2872},{"type":15,"tag":139,"props":3108,"children":3109},{"style":2048},[3110],{"type":21,"value":2867},{"type":15,"tag":139,"props":3112,"children":3113},{"style":146},[3114],{"type":21,"value":2881},{"type":15,"tag":139,"props":3116,"children":3117},{"class":141,"line":1460},[3118,3123,3128,3133,3138],{"type":15,"tag":139,"props":3119,"children":3120},{"style":146},[3121],{"type":21,"value":3122},"40",{"type":15,"tag":139,"props":3124,"children":3125},{"style":152},[3126],{"type":21,"value":3127}," gifts",{"type":15,"tag":139,"props":3129,"children":3130},{"style":152},[3131],{"type":21,"value":3132}," under",{"type":15,"tag":139,"props":3134,"children":3135},{"style":567},[3136],{"type":21,"value":3137}," $100 ",{"type":15,"tag":139,"props":3139,"children":3140},{"style":152},[3141],{"type":21,"value":3142},"you're probably going to want to just buy for yourself|cnn|2022-12-01\n",{"type":15,"tag":139,"props":3144,"children":3145},{"class":141,"line":1502},[3146],{"type":15,"tag":139,"props":3147,"children":3148},{"style":152},[3149],{"type":21,"value":3150},"43 useful products that caught the attention of our editors|cnn|2022-12-01\n",{"type":15,"tag":24,"props":3152,"children":3153},{},[3154,3156,3163],{"type":21,"value":3155},"For more SELECT statements, see the following ",{"type":15,"tag":614,"props":3157,"children":3160},{"href":3158,"rel":3159},"https://www.sqlitetutorial.net/sqlite-select/",[618],[3161],{"type":21,"value":3162},"SQLite tutorial",{"type":21,"value":60},{"type":15,"tag":24,"props":3165,"children":3166},{},[3167,3169,3175,3177,3183,3185,3191,3193,3200],{"type":21,"value":3168},"Using an INNER JOIN to select the source, title and URL (column ",{"type":15,"tag":30,"props":3170,"children":3172},{"className":3171},[],[3173],{"type":21,"value":3174},"src",{"type":21,"value":3176},") from outgoing links in articles. Note: this query uses the ",{"type":15,"tag":30,"props":3178,"children":3180},{"className":3179},[],[3181],{"type":21,"value":3182},"published_utc",{"type":21,"value":3184}," column which stores a datetime object, therefore, we use the ",{"type":15,"tag":30,"props":3186,"children":3188},{"className":3187},[],[3189],{"type":21,"value":3190},"datetime",{"type":21,"value":3192}," function to convert a string to datetime in SQLite. ",{"type":15,"tag":614,"props":3194,"children":3197},{"href":3195,"rel":3196},"https://www.sqlite.org/lang_datefunc.html",[618],[3198],{"type":21,"value":3199},"More info here",{"type":21,"value":60},{"type":15,"tag":130,"props":3202,"children":3204},{"className":132,"code":3203,"language":10,"meta":8,"style":8},"SELECT source,title,src FROM (links INNER JOIN newsdata ON links.article_id = newsdata.id) WHERE published_utc \u003C datetime('2021-01-31', 'localtime') LIMIT 10;\nabcnews|Today in History: March 21, Johann Sebastian Bach is born|https://abcnews.go.com/alerts/DonaldTrump\nabcnews|Today in History: March 21, Johann Sebastian Bach is born|https://abcnews.go.com/alerts/Elections\nabcnews|New law puts Wyoming at forefront of abortion pill bans|https://abcnews.go.com/alerts/RonDeSantis\nabcnews|New law puts Wyoming at forefront of abortion pill bans|https://abcnews.go.com/alerts/Elections\nabcnews|No telling how much more snow coming for Sierra Nevada|https://abcnews.go.com/alerts/Olympics\nabcnews|Missouri to restrict gender-affirming care for minors|https://abcnews.go.com/alerts/Obamacare\nabcnews|Missouri to restrict gender-affirming care for minors|https://abcnews.go.com/alerts/RonDeSantis\nabcnews|Putin welcomes China's plan to settle 'acute crisis' in Ukraine at start of talks with Xi Jinping at the Kremlin|https://abcnews.go.com/alerts/Ukraine\nactivistpost|Dutch Farmers Rebel, Win Enough Senate Seats To Block Technocrats|https://www.activistpost.com/wp-content/uploads/2023/03/farmer-protest-tnat.jpg\nactivistpost|Dutch Farmers Rebel, Win Enough Senate Seats To Block Technocrats|https://www.activistpost.com/product/098637394X/US/permacultucom-20/?cart=y\n",[3205],{"type":15,"tag":30,"props":3206,"children":3207},{"__ignoreMap":8},[3208,3296,3366,3426,3495,3554,3624,3678,3725,3756,3764],{"type":15,"tag":139,"props":3209,"children":3210},{"class":141,"line":142},[3211,3215,3220,3224,3229,3234,3239,3243,3248,3253,3258,3263,3268,3272,3277,3282,3286,3291],{"type":15,"tag":139,"props":3212,"children":3213},{"style":146},[3214],{"type":21,"value":2776},{"type":15,"tag":139,"props":3216,"children":3217},{"style":152},[3218],{"type":21,"value":3219}," source,title,src",{"type":15,"tag":139,"props":3221,"children":3222},{"style":152},[3223],{"type":21,"value":2795},{"type":15,"tag":139,"props":3225,"children":3226},{"style":567},[3227],{"type":21,"value":3228}," (links ",{"type":15,"tag":139,"props":3230,"children":3231},{"style":152},[3232],{"type":21,"value":3233},"INNER",{"type":15,"tag":139,"props":3235,"children":3236},{"style":152},[3237],{"type":21,"value":3238}," JOIN",{"type":15,"tag":139,"props":3240,"children":3241},{"style":152},[3242],{"type":21,"value":2185},{"type":15,"tag":139,"props":3244,"children":3245},{"style":152},[3246],{"type":21,"value":3247}," ON",{"type":15,"tag":139,"props":3249,"children":3250},{"style":152},[3251],{"type":21,"value":3252}," links.article_id",{"type":15,"tag":139,"props":3254,"children":3255},{"style":152},[3256],{"type":21,"value":3257}," =",{"type":15,"tag":139,"props":3259,"children":3260},{"style":152},[3261],{"type":21,"value":3262}," newsdata.id",{"type":15,"tag":139,"props":3264,"children":3265},{"style":567},[3266],{"type":21,"value":3267},") WHERE published_utc ",{"type":15,"tag":139,"props":3269,"children":3270},{"style":2048},[3271],{"type":21,"value":2051},{"type":15,"tag":139,"props":3273,"children":3274},{"style":567},[3275],{"type":21,"value":3276}," datetime(",{"type":15,"tag":139,"props":3278,"children":3279},{"style":146},[3280],{"type":21,"value":3281},"'2021-01-31'",{"type":15,"tag":139,"props":3283,"children":3284},{"style":146},[3285],{"type":21,"value":2436},{"type":15,"tag":139,"props":3287,"children":3288},{"style":152},[3289],{"type":21,"value":3290}," 'localtime'",{"type":15,"tag":139,"props":3292,"children":3293},{"style":567},[3294],{"type":21,"value":3295},") LIMIT 10;\n",{"type":15,"tag":139,"props":3297,"children":3298},{"class":141,"line":578},[3299,3304,3308,3313,3317,3322,3327,3332,3337,3342,3347,3352,3357,3361],{"type":15,"tag":139,"props":3300,"children":3301},{"style":146},[3302],{"type":21,"value":3303},"abcnews",{"type":15,"tag":139,"props":3305,"children":3306},{"style":2048},[3307],{"type":21,"value":2867},{"type":15,"tag":139,"props":3309,"children":3310},{"style":146},[3311],{"type":21,"value":3312},"Today",{"type":15,"tag":139,"props":3314,"children":3315},{"style":152},[3316],{"type":21,"value":821},{"type":15,"tag":139,"props":3318,"children":3319},{"style":152},[3320],{"type":21,"value":3321}," History:",{"type":15,"tag":139,"props":3323,"children":3324},{"style":152},[3325],{"type":21,"value":3326}," March",{"type":15,"tag":139,"props":3328,"children":3329},{"style":152},[3330],{"type":21,"value":3331}," 21,",{"type":15,"tag":139,"props":3333,"children":3334},{"style":152},[3335],{"type":21,"value":3336}," Johann",{"type":15,"tag":139,"props":3338,"children":3339},{"style":152},[3340],{"type":21,"value":3341}," Sebastian",{"type":15,"tag":139,"props":3343,"children":3344},{"style":152},[3345],{"type":21,"value":3346}," Bach",{"type":15,"tag":139,"props":3348,"children":3349},{"style":152},[3350],{"type":21,"value":3351}," is",{"type":15,"tag":139,"props":3353,"children":3354},{"style":152},[3355],{"type":21,"value":3356}," born",{"type":15,"tag":139,"props":3358,"children":3359},{"style":2048},[3360],{"type":21,"value":2867},{"type":15,"tag":139,"props":3362,"children":3363},{"style":146},[3364],{"type":21,"value":3365},"https://abcnews.go.com/alerts/DonaldTrump\n",{"type":15,"tag":139,"props":3367,"children":3368},{"class":141,"line":581},[3369,3373,3377,3381,3385,3389,3393,3397,3401,3405,3409,3413,3417,3421],{"type":15,"tag":139,"props":3370,"children":3371},{"style":146},[3372],{"type":21,"value":3303},{"type":15,"tag":139,"props":3374,"children":3375},{"style":2048},[3376],{"type":21,"value":2867},{"type":15,"tag":139,"props":3378,"children":3379},{"style":146},[3380],{"type":21,"value":3312},{"type":15,"tag":139,"props":3382,"children":3383},{"style":152},[3384],{"type":21,"value":821},{"type":15,"tag":139,"props":3386,"children":3387},{"style":152},[3388],{"type":21,"value":3321},{"type":15,"tag":139,"props":3390,"children":3391},{"style":152},[3392],{"type":21,"value":3326},{"type":15,"tag":139,"props":3394,"children":3395},{"style":152},[3396],{"type":21,"value":3331},{"type":15,"tag":139,"props":3398,"children":3399},{"style":152},[3400],{"type":21,"value":3336},{"type":15,"tag":139,"props":3402,"children":3403},{"style":152},[3404],{"type":21,"value":3341},{"type":15,"tag":139,"props":3406,"children":3407},{"style":152},[3408],{"type":21,"value":3346},{"type":15,"tag":139,"props":3410,"children":3411},{"style":152},[3412],{"type":21,"value":3351},{"type":15,"tag":139,"props":3414,"children":3415},{"style":152},[3416],{"type":21,"value":3356},{"type":15,"tag":139,"props":3418,"children":3419},{"style":2048},[3420],{"type":21,"value":2867},{"type":15,"tag":139,"props":3422,"children":3423},{"style":146},[3424],{"type":21,"value":3425},"https://abcnews.go.com/alerts/Elections\n",{"type":15,"tag":139,"props":3427,"children":3428},{"class":141,"line":805},[3429,3433,3437,3442,3447,3452,3457,3462,3467,3471,3476,3481,3486,3490],{"type":15,"tag":139,"props":3430,"children":3431},{"style":146},[3432],{"type":21,"value":3303},{"type":15,"tag":139,"props":3434,"children":3435},{"style":2048},[3436],{"type":21,"value":2867},{"type":15,"tag":139,"props":3438,"children":3439},{"style":146},[3440],{"type":21,"value":3441},"New",{"type":15,"tag":139,"props":3443,"children":3444},{"style":152},[3445],{"type":21,"value":3446}," law",{"type":15,"tag":139,"props":3448,"children":3449},{"style":152},[3450],{"type":21,"value":3451}," puts",{"type":15,"tag":139,"props":3453,"children":3454},{"style":152},[3455],{"type":21,"value":3456}," Wyoming",{"type":15,"tag":139,"props":3458,"children":3459},{"style":152},[3460],{"type":21,"value":3461}," at",{"type":15,"tag":139,"props":3463,"children":3464},{"style":152},[3465],{"type":21,"value":3466}," forefront",{"type":15,"tag":139,"props":3468,"children":3469},{"style":152},[3470],{"type":21,"value":2918},{"type":15,"tag":139,"props":3472,"children":3473},{"style":152},[3474],{"type":21,"value":3475}," abortion",{"type":15,"tag":139,"props":3477,"children":3478},{"style":152},[3479],{"type":21,"value":3480}," pill",{"type":15,"tag":139,"props":3482,"children":3483},{"style":152},[3484],{"type":21,"value":3485}," bans",{"type":15,"tag":139,"props":3487,"children":3488},{"style":2048},[3489],{"type":21,"value":2867},{"type":15,"tag":139,"props":3491,"children":3492},{"style":146},[3493],{"type":21,"value":3494},"https://abcnews.go.com/alerts/RonDeSantis\n",{"type":15,"tag":139,"props":3496,"children":3497},{"class":141,"line":1288},[3498,3502,3506,3510,3514,3518,3522,3526,3530,3534,3538,3542,3546,3550],{"type":15,"tag":139,"props":3499,"children":3500},{"style":146},[3501],{"type":21,"value":3303},{"type":15,"tag":139,"props":3503,"children":3504},{"style":2048},[3505],{"type":21,"value":2867},{"type":15,"tag":139,"props":3507,"children":3508},{"style":146},[3509],{"type":21,"value":3441},{"type":15,"tag":139,"props":3511,"children":3512},{"style":152},[3513],{"type":21,"value":3446},{"type":15,"tag":139,"props":3515,"children":3516},{"style":152},[3517],{"type":21,"value":3451},{"type":15,"tag":139,"props":3519,"children":3520},{"style":152},[3521],{"type":21,"value":3456},{"type":15,"tag":139,"props":3523,"children":3524},{"style":152},[3525],{"type":21,"value":3461},{"type":15,"tag":139,"props":3527,"children":3528},{"style":152},[3529],{"type":21,"value":3466},{"type":15,"tag":139,"props":3531,"children":3532},{"style":152},[3533],{"type":21,"value":2918},{"type":15,"tag":139,"props":3535,"children":3536},{"style":152},[3537],{"type":21,"value":3475},{"type":15,"tag":139,"props":3539,"children":3540},{"style":152},[3541],{"type":21,"value":3480},{"type":15,"tag":139,"props":3543,"children":3544},{"style":152},[3545],{"type":21,"value":3485},{"type":15,"tag":139,"props":3547,"children":3548},{"style":2048},[3549],{"type":21,"value":2867},{"type":15,"tag":139,"props":3551,"children":3552},{"style":146},[3553],{"type":21,"value":3425},{"type":15,"tag":139,"props":3555,"children":3556},{"class":141,"line":1331},[3557,3561,3565,3570,3575,3580,3585,3590,3595,3600,3605,3610,3615,3619],{"type":15,"tag":139,"props":3558,"children":3559},{"style":146},[3560],{"type":21,"value":3303},{"type":15,"tag":139,"props":3562,"children":3563},{"style":2048},[3564],{"type":21,"value":2867},{"type":15,"tag":139,"props":3566,"children":3567},{"style":146},[3568],{"type":21,"value":3569},"No",{"type":15,"tag":139,"props":3571,"children":3572},{"style":152},[3573],{"type":21,"value":3574}," telling",{"type":15,"tag":139,"props":3576,"children":3577},{"style":152},[3578],{"type":21,"value":3579}," how",{"type":15,"tag":139,"props":3581,"children":3582},{"style":152},[3583],{"type":21,"value":3584}," much",{"type":15,"tag":139,"props":3586,"children":3587},{"style":152},[3588],{"type":21,"value":3589}," more",{"type":15,"tag":139,"props":3591,"children":3592},{"style":152},[3593],{"type":21,"value":3594}," snow",{"type":15,"tag":139,"props":3596,"children":3597},{"style":152},[3598],{"type":21,"value":3599}," coming",{"type":15,"tag":139,"props":3601,"children":3602},{"style":152},[3603],{"type":21,"value":3604}," for",{"type":15,"tag":139,"props":3606,"children":3607},{"style":152},[3608],{"type":21,"value":3609}," Sierra",{"type":15,"tag":139,"props":3611,"children":3612},{"style":152},[3613],{"type":21,"value":3614}," Nevada",{"type":15,"tag":139,"props":3616,"children":3617},{"style":2048},[3618],{"type":21,"value":2867},{"type":15,"tag":139,"props":3620,"children":3621},{"style":146},[3622],{"type":21,"value":3623},"https://abcnews.go.com/alerts/Olympics\n",{"type":15,"tag":139,"props":3625,"children":3626},{"class":141,"line":1375},[3627,3631,3635,3640,3645,3650,3655,3660,3664,3669,3673],{"type":15,"tag":139,"props":3628,"children":3629},{"style":146},[3630],{"type":21,"value":3303},{"type":15,"tag":139,"props":3632,"children":3633},{"style":2048},[3634],{"type":21,"value":2867},{"type":15,"tag":139,"props":3636,"children":3637},{"style":146},[3638],{"type":21,"value":3639},"Missouri",{"type":15,"tag":139,"props":3641,"children":3642},{"style":152},[3643],{"type":21,"value":3644}," to",{"type":15,"tag":139,"props":3646,"children":3647},{"style":152},[3648],{"type":21,"value":3649}," restrict",{"type":15,"tag":139,"props":3651,"children":3652},{"style":152},[3653],{"type":21,"value":3654}," gender-affirming",{"type":15,"tag":139,"props":3656,"children":3657},{"style":152},[3658],{"type":21,"value":3659}," care",{"type":15,"tag":139,"props":3661,"children":3662},{"style":152},[3663],{"type":21,"value":3604},{"type":15,"tag":139,"props":3665,"children":3666},{"style":152},[3667],{"type":21,"value":3668}," minors",{"type":15,"tag":139,"props":3670,"children":3671},{"style":2048},[3672],{"type":21,"value":2867},{"type":15,"tag":139,"props":3674,"children":3675},{"style":146},[3676],{"type":21,"value":3677},"https://abcnews.go.com/alerts/Obamacare\n",{"type":15,"tag":139,"props":3679,"children":3680},{"class":141,"line":1418},[3681,3685,3689,3693,3697,3701,3705,3709,3713,3717,3721],{"type":15,"tag":139,"props":3682,"children":3683},{"style":146},[3684],{"type":21,"value":3303},{"type":15,"tag":139,"props":3686,"children":3687},{"style":2048},[3688],{"type":21,"value":2867},{"type":15,"tag":139,"props":3690,"children":3691},{"style":146},[3692],{"type":21,"value":3639},{"type":15,"tag":139,"props":3694,"children":3695},{"style":152},[3696],{"type":21,"value":3644},{"type":15,"tag":139,"props":3698,"children":3699},{"style":152},[3700],{"type":21,"value":3649},{"type":15,"tag":139,"props":3702,"children":3703},{"style":152},[3704],{"type":21,"value":3654},{"type":15,"tag":139,"props":3706,"children":3707},{"style":152},[3708],{"type":21,"value":3659},{"type":15,"tag":139,"props":3710,"children":3711},{"style":152},[3712],{"type":21,"value":3604},{"type":15,"tag":139,"props":3714,"children":3715},{"style":152},[3716],{"type":21,"value":3668},{"type":15,"tag":139,"props":3718,"children":3719},{"style":2048},[3720],{"type":21,"value":2867},{"type":15,"tag":139,"props":3722,"children":3723},{"style":146},[3724],{"type":21,"value":3494},{"type":15,"tag":139,"props":3726,"children":3727},{"class":141,"line":1460},[3728,3732,3736,3741,3746,3751],{"type":15,"tag":139,"props":3729,"children":3730},{"style":146},[3731],{"type":21,"value":3303},{"type":15,"tag":139,"props":3733,"children":3734},{"style":2048},[3735],{"type":21,"value":2867},{"type":15,"tag":139,"props":3737,"children":3738},{"style":146},[3739],{"type":21,"value":3740},"Putin",{"type":15,"tag":139,"props":3742,"children":3743},{"style":152},[3744],{"type":21,"value":3745}," welcomes",{"type":15,"tag":139,"props":3747,"children":3748},{"style":152},[3749],{"type":21,"value":3750}," China's plan to settle 'acute",{"type":15,"tag":139,"props":3752,"children":3753},{"style":152},[3754],{"type":21,"value":3755}," crisis' in Ukraine at start of talks with Xi Jinping at the Kremlin|https://abcnews.go.com/alerts/Ukraine\n",{"type":15,"tag":139,"props":3757,"children":3758},{"class":141,"line":1502},[3759],{"type":15,"tag":139,"props":3760,"children":3761},{"style":152},[3762],{"type":21,"value":3763},"activistpost|Dutch Farmers Rebel, Win Enough Senate Seats To Block Technocrats|https://www.activistpost.com/wp-content/uploads/2023/03/farmer-protest-tnat.jpg\n",{"type":15,"tag":139,"props":3765,"children":3767},{"class":141,"line":3766},11,[3768],{"type":15,"tag":139,"props":3769,"children":3770},{"style":152},[3771],{"type":21,"value":3772},"activistpost|Dutch Farmers Rebel, Win Enough Senate Seats To Block Technocrats|https://www.activistpost.com/product/098637394X/US/permacultucom-20/?cart=y\n",{"type":15,"tag":572,"props":3774,"children":3775},{},[3776],{"type":21,"value":576},{"title":8,"searchDepth":578,"depth":578,"links":3778},[],"content:tutorials:nela-data.md","tutorials/nela-data.md","tutorials/nela-data",{"_path":3783,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":3784,"description":8,"tags":3785,"body":3786,"_type":588,"_id":4009,"_source":590,"_file":4010,"_stem":4011,"_extension":593},"/tutorials/git","Working with git and GitHub","git",{"type":12,"children":3787,"toc":4003},[3788,3794,3806,3849,3854,3857,3869,3874,3893,3898,3901,3907,3912,3936,3941,3946,3975,3980,3999],{"type":15,"tag":16,"props":3789,"children":3791},{"id":3790},"cloning",[3792],{"type":21,"value":3793},"Cloning",{"type":15,"tag":24,"props":3795,"children":3796},{},[3797,3799,3804],{"type":21,"value":3798},"Using ",{"type":15,"tag":30,"props":3800,"children":3802},{"className":3801},[],[3803],{"type":21,"value":3785},{"type":21,"value":3805}," for version control, most of our repositories will be hosted on GitHub.\nTo clone an existing repository into your machine, run:",{"type":15,"tag":130,"props":3807,"children":3809},{"className":132,"code":3808,"language":10,"meta":8,"style":8},"git clone https://github.com/\u003Crepo_addres>\n",[3810],{"type":15,"tag":30,"props":3811,"children":3812},{"__ignoreMap":8},[3813],{"type":15,"tag":139,"props":3814,"children":3815},{"class":141,"line":142},[3816,3820,3825,3830,3834,3839,3844],{"type":15,"tag":139,"props":3817,"children":3818},{"style":146},[3819],{"type":21,"value":3785},{"type":15,"tag":139,"props":3821,"children":3822},{"style":152},[3823],{"type":21,"value":3824}," clone",{"type":15,"tag":139,"props":3826,"children":3827},{"style":152},[3828],{"type":21,"value":3829}," https://github.com/",{"type":15,"tag":139,"props":3831,"children":3832},{"style":2048},[3833],{"type":21,"value":2051},{"type":15,"tag":139,"props":3835,"children":3836},{"style":152},[3837],{"type":21,"value":3838},"repo_addre",{"type":15,"tag":139,"props":3840,"children":3841},{"style":567},[3842],{"type":21,"value":3843},"s",{"type":15,"tag":139,"props":3845,"children":3846},{"style":2048},[3847],{"type":21,"value":3848},">\n",{"type":15,"tag":24,"props":3850,"children":3851},{},[3852],{"type":21,"value":3853},"If the repository is private, you will have to enter your credentials next.",{"type":15,"tag":163,"props":3855,"children":3856},{},[],{"type":15,"tag":16,"props":3858,"children":3860},{"id":3859},"updating-your-local-repo-with-pull",[3861,3863],{"type":21,"value":3862},"Updating your local repo with ",{"type":15,"tag":30,"props":3864,"children":3866},{"className":3865},[],[3867],{"type":21,"value":3868},"pull",{"type":15,"tag":24,"props":3870,"children":3871},{},[3872],{"type":21,"value":3873},"To update your code with changes from the remote repository, run:",{"type":15,"tag":130,"props":3875,"children":3877},{"className":132,"code":3876,"language":10,"meta":8,"style":8},"git pull\n",[3878],{"type":15,"tag":30,"props":3879,"children":3880},{"__ignoreMap":8},[3881],{"type":15,"tag":139,"props":3882,"children":3883},{"class":141,"line":142},[3884,3888],{"type":15,"tag":139,"props":3885,"children":3886},{"style":146},[3887],{"type":21,"value":3785},{"type":15,"tag":139,"props":3889,"children":3890},{"style":152},[3891],{"type":21,"value":3892}," pull\n",{"type":15,"tag":24,"props":3894,"children":3895},{},[3896],{"type":21,"value":3897},"This will pull the changes from remote to your local codebase.",{"type":15,"tag":163,"props":3899,"children":3900},{},[],{"type":15,"tag":16,"props":3902,"children":3904},{"id":3903},"commiting-and-pushing-changes",[3905],{"type":21,"value":3906},"Commiting and pushing changes",{"type":15,"tag":24,"props":3908,"children":3909},{},[3910],{"type":21,"value":3911},"Once you have changes to push to the remote server, you must add the files with:",{"type":15,"tag":130,"props":3913,"children":3915},{"className":132,"code":3914,"language":10,"meta":8,"style":8},"git add my_file.py\n",[3916],{"type":15,"tag":30,"props":3917,"children":3918},{"__ignoreMap":8},[3919],{"type":15,"tag":139,"props":3920,"children":3921},{"class":141,"line":142},[3922,3926,3931],{"type":15,"tag":139,"props":3923,"children":3924},{"style":146},[3925],{"type":21,"value":3785},{"type":15,"tag":139,"props":3927,"children":3928},{"style":152},[3929],{"type":21,"value":3930}," add",{"type":15,"tag":139,"props":3932,"children":3933},{"style":152},[3934],{"type":21,"value":3935}," my_file.py\n",{"type":15,"tag":24,"props":3937,"children":3938},{},[3939],{"type":21,"value":3940},"Note that you can add multiple files this way.",{"type":15,"tag":24,"props":3942,"children":3943},{},[3944],{"type":21,"value":3945},"Then, you have to commit your changes and include a message (make it descriptive):",{"type":15,"tag":130,"props":3947,"children":3949},{"className":132,"code":3948,"language":10,"meta":8,"style":8},"git commit -m \"Fix invalid index bugs on lines 10-14\"\n",[3950],{"type":15,"tag":30,"props":3951,"children":3952},{"__ignoreMap":8},[3953],{"type":15,"tag":139,"props":3954,"children":3955},{"class":141,"line":142},[3956,3960,3965,3970],{"type":15,"tag":139,"props":3957,"children":3958},{"style":146},[3959],{"type":21,"value":3785},{"type":15,"tag":139,"props":3961,"children":3962},{"style":152},[3963],{"type":21,"value":3964}," commit",{"type":15,"tag":139,"props":3966,"children":3967},{"style":158},[3968],{"type":21,"value":3969}," -m",{"type":15,"tag":139,"props":3971,"children":3972},{"style":152},[3973],{"type":21,"value":3974}," \"Fix invalid index bugs on lines 10-14\"\n",{"type":15,"tag":24,"props":3976,"children":3977},{},[3978],{"type":21,"value":3979},"Finally, push your changes to the remote repo:",{"type":15,"tag":130,"props":3981,"children":3983},{"className":132,"code":3982,"language":10,"meta":8,"style":8},"git push\n",[3984],{"type":15,"tag":30,"props":3985,"children":3986},{"__ignoreMap":8},[3987],{"type":15,"tag":139,"props":3988,"children":3989},{"class":141,"line":142},[3990,3994],{"type":15,"tag":139,"props":3991,"children":3992},{"style":146},[3993],{"type":21,"value":3785},{"type":15,"tag":139,"props":3995,"children":3996},{"style":152},[3997],{"type":21,"value":3998}," push\n",{"type":15,"tag":572,"props":4000,"children":4001},{},[4002],{"type":21,"value":576},{"title":8,"searchDepth":578,"depth":578,"links":4004},[4005,4006,4008],{"id":3790,"depth":581,"text":3793},{"id":3859,"depth":581,"text":4007},"Updating your local repo with pull",{"id":3903,"depth":581,"text":3906},"content:tutorials:git.md","tutorials/git.md","tutorials/git",{"_path":4013,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":4014,"description":4015,"tags":4016,"body":4017,"_type":588,"_id":4342,"_source":590,"_file":4343,"_stem":4344,"_extension":593},"/tutorials/psql","PostgreSQL database access with psql","Assuming your user has postgres privileges, access database \u003Cdb_name> with:","postgres",{"type":12,"children":4018,"toc":4340},[4019,4026,4039,4077,4082,4105,4110,4124,4127,4133,4153,4229,4235,4240,4336],{"type":15,"tag":4020,"props":4021,"children":4023},"h1",{"id":4022},"connecting-to-a-postgres-database",[4024],{"type":21,"value":4025},"Connecting to a Postgres database",{"type":15,"tag":24,"props":4027,"children":4028},{},[4029,4031,4037],{"type":21,"value":4030},"Assuming your user has postgres privileges, access database ",{"type":15,"tag":30,"props":4032,"children":4034},{"className":4033},[],[4035],{"type":21,"value":4036},"\u003Cdb_name>",{"type":21,"value":4038}," with:",{"type":15,"tag":130,"props":4040,"children":4042},{"className":132,"code":4041,"language":10,"meta":8,"style":8},"psql -d \u003Cdb_name>\n",[4043],{"type":15,"tag":30,"props":4044,"children":4045},{"__ignoreMap":8},[4046],{"type":15,"tag":139,"props":4047,"children":4048},{"class":141,"line":142},[4049,4054,4059,4064,4069,4073],{"type":15,"tag":139,"props":4050,"children":4051},{"style":146},[4052],{"type":21,"value":4053},"psql",{"type":15,"tag":139,"props":4055,"children":4056},{"style":158},[4057],{"type":21,"value":4058}," -d",{"type":15,"tag":139,"props":4060,"children":4061},{"style":2048},[4062],{"type":21,"value":4063}," \u003C",{"type":15,"tag":139,"props":4065,"children":4066},{"style":152},[4067],{"type":21,"value":4068},"db_nam",{"type":15,"tag":139,"props":4070,"children":4071},{"style":567},[4072],{"type":21,"value":2061},{"type":15,"tag":139,"props":4074,"children":4075},{"style":2048},[4076],{"type":21,"value":3848},{"type":15,"tag":24,"props":4078,"children":4079},{},[4080],{"type":21,"value":4081},"For instance, to access a NELA database:",{"type":15,"tag":130,"props":4083,"children":4085},{"className":132,"code":4084,"language":10,"meta":8,"style":8},"psql -d nela-eng\n",[4086],{"type":15,"tag":30,"props":4087,"children":4088},{"__ignoreMap":8},[4089],{"type":15,"tag":139,"props":4090,"children":4091},{"class":141,"line":142},[4092,4096,4100],{"type":15,"tag":139,"props":4093,"children":4094},{"style":146},[4095],{"type":21,"value":4053},{"type":15,"tag":139,"props":4097,"children":4098},{"style":158},[4099],{"type":21,"value":4058},{"type":15,"tag":139,"props":4101,"children":4102},{"style":152},[4103],{"type":21,"value":4104}," nela-eng\n",{"type":15,"tag":24,"props":4106,"children":4107},{},[4108],{"type":21,"value":4109},"To list the existing databases in a Postgres server use:",{"type":15,"tag":130,"props":4111,"children":4113},{"className":132,"code":4112,"language":10,"meta":8,"style":8},"\\l\n",[4114],{"type":15,"tag":30,"props":4115,"children":4116},{"__ignoreMap":8},[4117],{"type":15,"tag":139,"props":4118,"children":4119},{"class":141,"line":142},[4120],{"type":15,"tag":139,"props":4121,"children":4122},{"style":146},[4123],{"type":21,"value":4112},{"type":15,"tag":163,"props":4125,"children":4126},{},[],{"type":15,"tag":4020,"props":4128,"children":4130},{"id":4129},"saving-queries-to-a-csv-file",[4131],{"type":21,"value":4132},"Saving queries to a CSV file",{"type":15,"tag":24,"props":4134,"children":4135},{},[4136,4138,4143,4145,4151],{"type":21,"value":4137},"Once connected to a database in ",{"type":15,"tag":30,"props":4139,"children":4141},{"className":4140},[],[4142],{"type":21,"value":4053},{"type":21,"value":4144},", you can use ",{"type":15,"tag":30,"props":4146,"children":4148},{"className":4147},[],[4149],{"type":21,"value":4150},"\\copy",{"type":21,"value":4152}," to save query results to a file:",{"type":15,"tag":130,"props":4154,"children":4156},{"className":132,"code":4155,"language":10,"meta":8,"style":8},"\\copy (SELECT title, content FROM articles WHERE date_published >= '2025-01-01') to '/path/to/file.csv' with csv header;\n",[4157],{"type":15,"tag":30,"props":4158,"children":4159},{"__ignoreMap":8},[4160],{"type":15,"tag":139,"props":4161,"children":4162},{"class":141,"line":142},[4163,4167,4172,4177,4182,4186,4190,4194,4199,4204,4209,4214,4219,4224],{"type":15,"tag":139,"props":4164,"children":4165},{"style":146},[4166],{"type":21,"value":4150},{"type":15,"tag":139,"props":4168,"children":4169},{"style":567},[4170],{"type":21,"value":4171}," (SELECT ",{"type":15,"tag":139,"props":4173,"children":4174},{"style":152},[4175],{"type":21,"value":4176},"title,",{"type":15,"tag":139,"props":4178,"children":4179},{"style":152},[4180],{"type":21,"value":4181}," content",{"type":15,"tag":139,"props":4183,"children":4184},{"style":152},[4185],{"type":21,"value":2795},{"type":15,"tag":139,"props":4187,"children":4188},{"style":152},[4189],{"type":21,"value":2484},{"type":15,"tag":139,"props":4191,"children":4192},{"style":152},[4193],{"type":21,"value":2804},{"type":15,"tag":139,"props":4195,"children":4196},{"style":152},[4197],{"type":21,"value":4198}," date_published",{"type":15,"tag":139,"props":4200,"children":4201},{"style":2048},[4202],{"type":21,"value":4203}," >",{"type":15,"tag":139,"props":4205,"children":4206},{"style":152},[4207],{"type":21,"value":4208},"=",{"type":15,"tag":139,"props":4210,"children":4211},{"style":152},[4212],{"type":21,"value":4213}," '2025-01-01'",{"type":15,"tag":139,"props":4215,"children":4216},{"style":567},[4217],{"type":21,"value":4218},") to ",{"type":15,"tag":139,"props":4220,"children":4221},{"style":152},[4222],{"type":21,"value":4223},"'/path/to/file.csv'",{"type":15,"tag":139,"props":4225,"children":4226},{"style":567},[4227],{"type":21,"value":4228}," with csv header;\n",{"type":15,"tag":4020,"props":4230,"children":4232},{"id":4231},"inner-join-example-creating-a-random-sample-of-a-nela-database",[4233],{"type":21,"value":4234},"INNER JOIN example creating a random sample of a NELA database",{"type":15,"tag":24,"props":4236,"children":4237},{},[4238],{"type":21,"value":4239},"This example will save 1000 random entries from a NELA database and save it to a CSV file.",{"type":15,"tag":130,"props":4241,"children":4243},{"className":132,"code":4242,"language":10,"meta":8,"style":8},"\\copy (SELECT * FROM (articles INNER JOIN sources on articles.source_id=sources.id) WHERE date_published >= '2024-01-01' ORDER BY RANDOM() LIMIT 1000) to '/path/to/file.csv' with csv header;\n",[4244],{"type":15,"tag":30,"props":4245,"children":4246},{"__ignoreMap":8},[4247],{"type":15,"tag":139,"props":4248,"children":4249},{"class":141,"line":142},[4250,4254,4258,4264,4268,4273,4277,4281,4285,4289,4294,4299,4303,4308,4313,4318,4323,4328,4332],{"type":15,"tag":139,"props":4251,"children":4252},{"style":146},[4253],{"type":21,"value":4150},{"type":15,"tag":139,"props":4255,"children":4256},{"style":567},[4257],{"type":21,"value":4171},{"type":15,"tag":139,"props":4259,"children":4261},{"style":4260},"--shiki-default:#005CC5;--shiki-dark-mode:#FD971F;--shiki-sky-dark-mode:#FD971F;--shiki-light-mode:#005CC5;--shiki-blue-mode:#FD971F",[4262],{"type":21,"value":4263},"*",{"type":15,"tag":139,"props":4265,"children":4266},{"style":152},[4267],{"type":21,"value":2795},{"type":15,"tag":139,"props":4269,"children":4270},{"style":567},[4271],{"type":21,"value":4272}," (articles ",{"type":15,"tag":139,"props":4274,"children":4275},{"style":152},[4276],{"type":21,"value":3233},{"type":15,"tag":139,"props":4278,"children":4279},{"style":152},[4280],{"type":21,"value":3238},{"type":15,"tag":139,"props":4282,"children":4283},{"style":152},[4284],{"type":21,"value":2494},{"type":15,"tag":139,"props":4286,"children":4287},{"style":152},[4288],{"type":21,"value":2908},{"type":15,"tag":139,"props":4290,"children":4291},{"style":152},[4292],{"type":21,"value":4293}," articles.source_id=sources.id",{"type":15,"tag":139,"props":4295,"children":4296},{"style":567},[4297],{"type":21,"value":4298},") WHERE date_published ",{"type":15,"tag":139,"props":4300,"children":4301},{"style":2048},[4302],{"type":21,"value":2066},{"type":15,"tag":139,"props":4304,"children":4305},{"style":567},[4306],{"type":21,"value":4307},"= ",{"type":15,"tag":139,"props":4309,"children":4310},{"style":152},[4311],{"type":21,"value":4312},"'2024-01-01'",{"type":15,"tag":139,"props":4314,"children":4315},{"style":567},[4316],{"type":21,"value":4317}," ORDER BY ",{"type":15,"tag":139,"props":4319,"children":4320},{"style":146},[4321],{"type":21,"value":4322},"RANDOM",{"type":15,"tag":139,"props":4324,"children":4325},{"style":567},[4326],{"type":21,"value":4327},"() LIMIT 1000) to ",{"type":15,"tag":139,"props":4329,"children":4330},{"style":152},[4331],{"type":21,"value":4223},{"type":15,"tag":139,"props":4333,"children":4334},{"style":567},[4335],{"type":21,"value":4228},{"type":15,"tag":572,"props":4337,"children":4338},{},[4339],{"type":21,"value":576},{"title":8,"searchDepth":578,"depth":578,"links":4341},[],"content:tutorials:psql.md","tutorials/psql.md","tutorials/psql",{"_path":4346,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":4347,"description":4348,"tags":4349,"body":4350,"_type":588,"_id":4455,"_source":590,"_file":4456,"_stem":4457,"_extension":593},"/tutorials/conda-create-environment","Creating a Conda environment","To create a conda environment using a specific Python version, run:","python",{"type":12,"children":4351,"toc":4453},[4352,4356,4391,4420,4432,4449],{"type":15,"tag":24,"props":4353,"children":4354},{},[4355],{"type":21,"value":4348},{"type":15,"tag":130,"props":4357,"children":4359},{"className":132,"code":4358,"language":10,"meta":8,"style":8},"conda create python=3.xx --prefix my-python-env\n",[4360],{"type":15,"tag":30,"props":4361,"children":4362},{"__ignoreMap":8},[4363],{"type":15,"tag":139,"props":4364,"children":4365},{"class":141,"line":142},[4366,4371,4376,4381,4386],{"type":15,"tag":139,"props":4367,"children":4368},{"style":146},[4369],{"type":21,"value":4370},"conda",{"type":15,"tag":139,"props":4372,"children":4373},{"style":152},[4374],{"type":21,"value":4375}," create",{"type":15,"tag":139,"props":4377,"children":4378},{"style":152},[4379],{"type":21,"value":4380}," python=3.xx",{"type":15,"tag":139,"props":4382,"children":4383},{"style":158},[4384],{"type":21,"value":4385}," --prefix",{"type":15,"tag":139,"props":4387,"children":4388},{"style":152},[4389],{"type":21,"value":4390}," my-python-env\n",{"type":15,"tag":24,"props":4392,"children":4393},{},[4394,4396,4402,4404,4410,4412,4418],{"type":21,"value":4395},"Replace ",{"type":15,"tag":30,"props":4397,"children":4399},{"className":4398},[],[4400],{"type":21,"value":4401},"python=3.xx",{"type":21,"value":4403}," with the desired Python version. E.g.: ",{"type":15,"tag":30,"props":4405,"children":4407},{"className":4406},[],[4408],{"type":21,"value":4409},"python=3.11",{"type":21,"value":4411},". Use the ",{"type":15,"tag":30,"props":4413,"children":4415},{"className":4414},[],[4416],{"type":21,"value":4417},"prefix",{"type":21,"value":4419}," argument to give your environment a name.",{"type":15,"tag":24,"props":4421,"children":4422},{},[4423,4425,4431],{"type":21,"value":4424},"Finally, activate your environment with ",{"type":15,"tag":30,"props":4426,"children":4428},{"className":4427},[],[4429],{"type":21,"value":4430},"conda activate my-python-env",{"type":21,"value":60},{"type":15,"tag":24,"props":4433,"children":4434},{},[4435,4440,4442,4448],{"type":15,"tag":4436,"props":4437,"children":4438},"em",{},[4439],{"type":21,"value":1033},{"type":21,"value":4441},": If the environment is not found by its prefix, you may have to specify the absolute path to it when activating. E.g.: ",{"type":15,"tag":30,"props":4443,"children":4445},{"className":4444},[],[4446],{"type":21,"value":4447},"conda activate /home/\u003Cusername>/project/my-python-env",{"type":21,"value":60},{"type":15,"tag":572,"props":4450,"children":4451},{},[4452],{"type":21,"value":576},{"title":8,"searchDepth":578,"depth":578,"links":4454},[],"content:tutorials:conda-create-environment.md","tutorials/conda-create-environment.md","tutorials/conda-create-environment",{"_path":4459,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":4460,"description":8,"tags":4349,"body":4461,"_type":588,"_id":4603,"_source":590,"_file":4604,"_stem":4605,"_extension":593},"/tutorials/conda-install","Installing Conda/Miniconda",{"type":12,"children":4462,"toc":4601},[4463,4469,4492,4512,4525,4538,4543,4559,4588,4597],{"type":15,"tag":625,"props":4464,"children":4466},{"id":4465},"miniconda3",[4467],{"type":21,"value":4468},"Miniconda3",{"type":15,"tag":24,"props":4470,"children":4471},{},[4472,4474,4481,4483,4490],{"type":21,"value":4473},"To download the Linux ",{"type":15,"tag":614,"props":4475,"children":4478},{"href":4476,"rel":4477},"https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh",[618],[4479],{"type":21,"value":4480},"installation script",{"type":21,"value":4482}," (see more download options ",{"type":15,"tag":614,"props":4484,"children":4487},{"href":4485,"rel":4486},"https://docs.anaconda.com/miniconda/",[618],[4488],{"type":21,"value":4489},"here",{"type":21,"value":4491},"), run the following command:",{"type":15,"tag":130,"props":4493,"children":4495},{"className":132,"code":4494,"language":10,"meta":8,"style":8},"wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh\n",[4496],{"type":15,"tag":30,"props":4497,"children":4498},{"__ignoreMap":8},[4499],{"type":15,"tag":139,"props":4500,"children":4501},{"class":141,"line":142},[4502,4507],{"type":15,"tag":139,"props":4503,"children":4504},{"style":146},[4505],{"type":21,"value":4506},"wget",{"type":15,"tag":139,"props":4508,"children":4509},{"style":152},[4510],{"type":21,"value":4511}," https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh\n",{"type":15,"tag":24,"props":4513,"children":4514},{},[4515,4517,4523],{"type":21,"value":4516},"This will download the file ",{"type":15,"tag":30,"props":4518,"children":4520},{"className":4519},[],[4521],{"type":21,"value":4522},"Miniconda3-latest-Linux-x86_64.sh",{"type":21,"value":4524}," to your current working directory.",{"type":15,"tag":24,"props":4526,"children":4527},{},[4528,4530,4536],{"type":21,"value":4529},"Next, run the install script with ",{"type":15,"tag":30,"props":4531,"children":4533},{"className":4532},[],[4534],{"type":21,"value":4535},"sh Miniconda3-latest-Linux-x86_64.sh",{"type":21,"value":4537}," and accept all the default prompts.",{"type":15,"tag":24,"props":4539,"children":4540},{},[4541],{"type":21,"value":4542},"Done, Conda is now installed.",{"type":15,"tag":24,"props":4544,"children":4545},{},[4546,4550,4552,4557],{"type":15,"tag":418,"props":4547,"children":4548},{},[4549],{"type":21,"value":1033},{"type":21,"value":4551},": If your conda is not activated, you will received a ",{"type":15,"tag":4436,"props":4553,"children":4554},{},[4555],{"type":21,"value":4556},"command 'conda' not found",{"type":21,"value":4558}," error. If this happens, activate your conda installation with:",{"type":15,"tag":130,"props":4560,"children":4562},{"className":132,"code":4561,"language":10,"meta":8,"style":8},"eval \"$(/home/\u003Cusername>/miniconda3/bin/conda shell.bash hook)\"\n",[4563],{"type":15,"tag":30,"props":4564,"children":4565},{"__ignoreMap":8},[4566],{"type":15,"tag":139,"props":4567,"children":4568},{"class":141,"line":142},[4569,4574,4579,4583],{"type":15,"tag":139,"props":4570,"children":4571},{"style":547},[4572],{"type":21,"value":4573},"eval",{"type":15,"tag":139,"props":4575,"children":4576},{"style":152},[4577],{"type":21,"value":4578}," \"$(",{"type":15,"tag":139,"props":4580,"children":4581},{"style":146},[4582],{"type":21,"value":564},{"type":15,"tag":139,"props":4584,"children":4585},{"style":152},[4586],{"type":21,"value":4587},"\u003Cusername>/miniconda3/bin/conda shell.bash hook)\"\n",{"type":15,"tag":24,"props":4589,"children":4590},{},[4591,4596],{"type":15,"tag":4436,"props":4592,"children":4593},{},[4594],{"type":21,"value":4595},"Make sure to point to the correct conda/miniconda path",{"type":21,"value":60},{"type":15,"tag":572,"props":4598,"children":4599},{},[4600],{"type":21,"value":576},{"title":8,"searchDepth":578,"depth":578,"links":4602},[],"content:tutorials:conda-install.md","tutorials/conda-install.md","tutorials/conda-install",{"_path":4607,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":4608,"description":4609,"tags":4349,"body":4610,"_type":588,"_id":5014,"_source":590,"_file":5015,"_stem":5016,"_extension":593},"/tutorials/python-conventions","Python conventions","Avoid running code in the script root.",{"type":12,"children":4611,"toc":5012},[4612,4616,4675,4678,4683,4815,4818,4823,4976,4979,5005,5008],{"type":15,"tag":24,"props":4613,"children":4614},{},[4615],{"type":21,"value":4609},{"type":15,"tag":130,"props":4617,"children":4620},{"className":4618,"code":4619,"language":4349,"meta":8,"style":8},"language-python shiki shiki-themes github-light monokai monokai github-light monokai","if __name__ == \"__main__\":\n    \"\"\"\n    Main function here\n    \"\"\"\n",[4621],{"type":15,"tag":30,"props":4622,"children":4623},{"__ignoreMap":8},[4624,4652,4660,4668],{"type":15,"tag":139,"props":4625,"children":4626},{"class":141,"line":142},[4627,4632,4638,4643,4648],{"type":15,"tag":139,"props":4628,"children":4629},{"style":2048},[4630],{"type":21,"value":4631},"if",{"type":15,"tag":139,"props":4633,"children":4635},{"style":4634},"--shiki-default:#005CC5;--shiki-dark-mode:#F8F8F2;--shiki-sky-dark-mode:#F8F8F2;--shiki-light-mode:#005CC5;--shiki-blue-mode:#F8F8F2",[4636],{"type":21,"value":4637}," __name__",{"type":15,"tag":139,"props":4639,"children":4640},{"style":2048},[4641],{"type":21,"value":4642}," ==",{"type":15,"tag":139,"props":4644,"children":4645},{"style":152},[4646],{"type":21,"value":4647}," \"__main__\"",{"type":15,"tag":139,"props":4649,"children":4650},{"style":567},[4651],{"type":21,"value":1091},{"type":15,"tag":139,"props":4653,"children":4654},{"class":141,"line":578},[4655],{"type":15,"tag":139,"props":4656,"children":4657},{"style":152},[4658],{"type":21,"value":4659},"    \"\"\"\n",{"type":15,"tag":139,"props":4661,"children":4662},{"class":141,"line":581},[4663],{"type":15,"tag":139,"props":4664,"children":4665},{"style":152},[4666],{"type":21,"value":4667},"    Main function here\n",{"type":15,"tag":139,"props":4669,"children":4670},{"class":141,"line":805},[4671],{"type":15,"tag":139,"props":4672,"children":4673},{"style":152},[4674],{"type":21,"value":4659},{"type":15,"tag":163,"props":4676,"children":4677},{},[],{"type":15,"tag":24,"props":4679,"children":4680},{},[4681],{"type":21,"value":4682},"F-strings (formatting strings).",{"type":15,"tag":130,"props":4684,"children":4686},{"className":4618,"code":4685,"language":4349,"meta":8,"style":8},"a = 10\nb = 3.141592\na_string = f\"Variable a is {a}. Pi up to 4 decimal places: {b:4f}\"\nprint(a_string)\n>>> 'Variable a is 10. Pi up to 4 decimal places: 3.1416'\n",[4687],{"type":15,"tag":30,"props":4688,"children":4689},{"__ignoreMap":8},[4690,4707,4724,4789,4802],{"type":15,"tag":139,"props":4691,"children":4692},{"class":141,"line":142},[4693,4698,4702],{"type":15,"tag":139,"props":4694,"children":4695},{"style":567},[4696],{"type":21,"value":4697},"a ",{"type":15,"tag":139,"props":4699,"children":4700},{"style":2048},[4701],{"type":21,"value":4208},{"type":15,"tag":139,"props":4703,"children":4704},{"style":158},[4705],{"type":21,"value":4706}," 10\n",{"type":15,"tag":139,"props":4708,"children":4709},{"class":141,"line":578},[4710,4715,4719],{"type":15,"tag":139,"props":4711,"children":4712},{"style":567},[4713],{"type":21,"value":4714},"b ",{"type":15,"tag":139,"props":4716,"children":4717},{"style":2048},[4718],{"type":21,"value":4208},{"type":15,"tag":139,"props":4720,"children":4721},{"style":158},[4722],{"type":21,"value":4723}," 3.141592\n",{"type":15,"tag":139,"props":4725,"children":4726},{"class":141,"line":581},[4727,4732,4736,4742,4747,4752,4756,4761,4766,4770,4775,4780,4784],{"type":15,"tag":139,"props":4728,"children":4729},{"style":567},[4730],{"type":21,"value":4731},"a_string ",{"type":15,"tag":139,"props":4733,"children":4734},{"style":2048},[4735],{"type":21,"value":4208},{"type":15,"tag":139,"props":4737,"children":4739},{"style":4738},"--shiki-default:#D73A49;--shiki-dark-mode:#66D9EF;--shiki-sky-dark-mode:#66D9EF;--shiki-light-mode:#D73A49;--shiki-blue-mode:#66D9EF;--shiki-default-font-style:inherit;--shiki-dark-mode-font-style:italic;--shiki-sky-dark-mode-font-style:italic;--shiki-light-mode-font-style:inherit;--shiki-blue-mode-font-style:italic",[4740],{"type":21,"value":4741}," f",{"type":15,"tag":139,"props":4743,"children":4744},{"style":152},[4745],{"type":21,"value":4746},"\"Variable a is ",{"type":15,"tag":139,"props":4748,"children":4749},{"style":158},[4750],{"type":21,"value":4751},"{",{"type":15,"tag":139,"props":4753,"children":4754},{"style":567},[4755],{"type":21,"value":614},{"type":15,"tag":139,"props":4757,"children":4758},{"style":158},[4759],{"type":21,"value":4760},"}",{"type":15,"tag":139,"props":4762,"children":4763},{"style":152},[4764],{"type":21,"value":4765},". Pi up to 4 decimal places: ",{"type":15,"tag":139,"props":4767,"children":4768},{"style":158},[4769],{"type":21,"value":4751},{"type":15,"tag":139,"props":4771,"children":4772},{"style":567},[4773],{"type":21,"value":4774},"b",{"type":15,"tag":139,"props":4776,"children":4777},{"style":4738},[4778],{"type":21,"value":4779},":4f",{"type":15,"tag":139,"props":4781,"children":4782},{"style":158},[4783],{"type":21,"value":4760},{"type":15,"tag":139,"props":4785,"children":4786},{"style":152},[4787],{"type":21,"value":4788},"\"\n",{"type":15,"tag":139,"props":4790,"children":4791},{"class":141,"line":805},[4792,4797],{"type":15,"tag":139,"props":4793,"children":4794},{"style":547},[4795],{"type":21,"value":4796},"print",{"type":15,"tag":139,"props":4798,"children":4799},{"style":567},[4800],{"type":21,"value":4801},"(a_string)\n",{"type":15,"tag":139,"props":4803,"children":4804},{"class":141,"line":1288},[4805,4810],{"type":15,"tag":139,"props":4806,"children":4807},{"style":2048},[4808],{"type":21,"value":4809},">>>",{"type":15,"tag":139,"props":4811,"children":4812},{"style":152},[4813],{"type":21,"value":4814}," 'Variable a is 10. Pi up to 4 decimal places: 3.1416'\n",{"type":15,"tag":163,"props":4816,"children":4817},{},[],{"type":15,"tag":24,"props":4819,"children":4820},{},[4821],{"type":21,"value":4822},"Using docstrings to document functions.",{"type":15,"tag":130,"props":4824,"children":4826},{"className":4618,"code":4825,"language":4349,"meta":8,"style":8},"def count(a: list, b: int, c: bool=True):\n    \"\"\"\n    Counts how many times `b` appears in list `a`.\n\n    Args:\n        a (list[int]) : A list of numbers.\n        b (int) : The number to look for in `a`.\n        c (bool) : If True, returns the list.\n    \"\"\"\n",[4827],{"type":15,"tag":30,"props":4828,"children":4829},{"__ignoreMap":8},[4830,4913,4920,4928,4937,4945,4953,4961,4969],{"type":15,"tag":139,"props":4831,"children":4832},{"class":141,"line":142},[4833,4838,4843,4847,4852,4857,4863,4868,4872,4876,4881,4885,4890,4894,4899,4903,4908],{"type":15,"tag":139,"props":4834,"children":4835},{"style":4738},[4836],{"type":21,"value":4837},"def",{"type":15,"tag":139,"props":4839,"children":4840},{"style":146},[4841],{"type":21,"value":4842}," count",{"type":15,"tag":139,"props":4844,"children":4845},{"style":567},[4846],{"type":21,"value":2426},{"type":15,"tag":139,"props":4848,"children":4850},{"style":4849},"--shiki-default:#24292E;--shiki-dark-mode:#FD971F;--shiki-sky-dark-mode:#FD971F;--shiki-light-mode:#24292E;--shiki-blue-mode:#FD971F;--shiki-default-font-style:inherit;--shiki-dark-mode-font-style:italic;--shiki-sky-dark-mode-font-style:italic;--shiki-light-mode-font-style:inherit;--shiki-blue-mode-font-style:italic",[4851],{"type":21,"value":614},{"type":15,"tag":139,"props":4853,"children":4854},{"style":567},[4855],{"type":21,"value":4856},": ",{"type":15,"tag":139,"props":4858,"children":4860},{"style":4859},"--shiki-default:#005CC5;--shiki-dark-mode:#66D9EF;--shiki-sky-dark-mode:#66D9EF;--shiki-light-mode:#005CC5;--shiki-blue-mode:#66D9EF;--shiki-default-font-style:inherit;--shiki-dark-mode-font-style:italic;--shiki-sky-dark-mode-font-style:italic;--shiki-light-mode-font-style:inherit;--shiki-blue-mode-font-style:italic",[4861],{"type":21,"value":4862},"list",{"type":15,"tag":139,"props":4864,"children":4865},{"style":567},[4866],{"type":21,"value":4867},", ",{"type":15,"tag":139,"props":4869,"children":4870},{"style":4849},[4871],{"type":21,"value":4774},{"type":15,"tag":139,"props":4873,"children":4874},{"style":567},[4875],{"type":21,"value":4856},{"type":15,"tag":139,"props":4877,"children":4878},{"style":4859},[4879],{"type":21,"value":4880},"int",{"type":15,"tag":139,"props":4882,"children":4883},{"style":567},[4884],{"type":21,"value":4867},{"type":15,"tag":139,"props":4886,"children":4887},{"style":4849},[4888],{"type":21,"value":4889},"c",{"type":15,"tag":139,"props":4891,"children":4892},{"style":567},[4893],{"type":21,"value":4856},{"type":15,"tag":139,"props":4895,"children":4896},{"style":4859},[4897],{"type":21,"value":4898},"bool",{"type":15,"tag":139,"props":4900,"children":4901},{"style":2048},[4902],{"type":21,"value":4208},{"type":15,"tag":139,"props":4904,"children":4905},{"style":158},[4906],{"type":21,"value":4907},"True",{"type":15,"tag":139,"props":4909,"children":4910},{"style":567},[4911],{"type":21,"value":4912},"):\n",{"type":15,"tag":139,"props":4914,"children":4915},{"class":141,"line":578},[4916],{"type":15,"tag":139,"props":4917,"children":4918},{"style":152},[4919],{"type":21,"value":4659},{"type":15,"tag":139,"props":4921,"children":4922},{"class":141,"line":581},[4923],{"type":15,"tag":139,"props":4924,"children":4925},{"style":152},[4926],{"type":21,"value":4927},"    Counts how many times `b` appears in list `a`.\n",{"type":15,"tag":139,"props":4929,"children":4930},{"class":141,"line":805},[4931],{"type":15,"tag":139,"props":4932,"children":4934},{"emptyLinePlaceholder":4933},true,[4935],{"type":21,"value":4936},"\n",{"type":15,"tag":139,"props":4938,"children":4939},{"class":141,"line":1288},[4940],{"type":15,"tag":139,"props":4941,"children":4942},{"style":152},[4943],{"type":21,"value":4944},"    Args:\n",{"type":15,"tag":139,"props":4946,"children":4947},{"class":141,"line":1331},[4948],{"type":15,"tag":139,"props":4949,"children":4950},{"style":152},[4951],{"type":21,"value":4952},"        a (list[int]) : A list of numbers.\n",{"type":15,"tag":139,"props":4954,"children":4955},{"class":141,"line":1375},[4956],{"type":15,"tag":139,"props":4957,"children":4958},{"style":152},[4959],{"type":21,"value":4960},"        b (int) : The number to look for in `a`.\n",{"type":15,"tag":139,"props":4962,"children":4963},{"class":141,"line":1418},[4964],{"type":15,"tag":139,"props":4965,"children":4966},{"style":152},[4967],{"type":21,"value":4968},"        c (bool) : If True, returns the list.\n",{"type":15,"tag":139,"props":4970,"children":4971},{"class":141,"line":1460},[4972],{"type":15,"tag":139,"props":4973,"children":4974},{"style":152},[4975],{"type":21,"value":4659},{"type":15,"tag":163,"props":4977,"children":4978},{},[],{"type":15,"tag":24,"props":4980,"children":4981},{},[4982,4984,4990,4991,4997,4998,5004],{"type":21,"value":4983},"Files and file formats: ",{"type":15,"tag":30,"props":4985,"children":4987},{"className":4986},[],[4988],{"type":21,"value":4989},"JSON",{"type":21,"value":4867},{"type":15,"tag":30,"props":4992,"children":4994},{"className":4993},[],[4995],{"type":21,"value":4996},"JSON-lines",{"type":21,"value":4867},{"type":15,"tag":30,"props":4999,"children":5001},{"className":5000},[],[5002],{"type":21,"value":5003},"CSV",{"type":21,"value":60},{"type":15,"tag":163,"props":5006,"children":5007},{},[],{"type":15,"tag":572,"props":5009,"children":5010},{},[5011],{"type":21,"value":576},{"title":8,"searchDepth":578,"depth":578,"links":5013},[],"content:tutorials:python-conventions.md","tutorials/python-conventions.md","tutorials/python-conventions",{"_path":5018,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":5019,"description":5020,"tags":4349,"body":5021,"_type":588,"_id":5955,"_source":590,"_file":5956,"_stem":5957,"_extension":593},"/tutorials/python-logging","The Python logging facility","We will use Python's logging to keep track of our code's execution.\nTo use a logger, just the following at the beginning of a script:",{"type":12,"children":5022,"toc":5953},[5023,5036,5089,5169,5174,5186,5725,5738,5743,5949],{"type":15,"tag":24,"props":5024,"children":5025},{},[5026,5028,5034],{"type":21,"value":5027},"We will use Python's ",{"type":15,"tag":30,"props":5029,"children":5031},{"className":5030},[],[5032],{"type":21,"value":5033},"logging",{"type":21,"value":5035}," to keep track of our code's execution.\nTo use a logger, just the following at the beginning of a script:",{"type":15,"tag":130,"props":5037,"children":5039},{"className":4618,"code":5038,"language":4349,"meta":8,"style":8},"import logging\n\nlogger = logging.getLogger(__name__)\n",[5040],{"type":15,"tag":30,"props":5041,"children":5042},{"__ignoreMap":8},[5043,5056,5063],{"type":15,"tag":139,"props":5044,"children":5045},{"class":141,"line":142},[5046,5051],{"type":15,"tag":139,"props":5047,"children":5048},{"style":2048},[5049],{"type":21,"value":5050},"import",{"type":15,"tag":139,"props":5052,"children":5053},{"style":567},[5054],{"type":21,"value":5055}," logging\n",{"type":15,"tag":139,"props":5057,"children":5058},{"class":141,"line":578},[5059],{"type":15,"tag":139,"props":5060,"children":5061},{"emptyLinePlaceholder":4933},[5062],{"type":21,"value":4936},{"type":15,"tag":139,"props":5064,"children":5065},{"class":141,"line":581},[5066,5071,5075,5080,5085],{"type":15,"tag":139,"props":5067,"children":5068},{"style":567},[5069],{"type":21,"value":5070},"logger ",{"type":15,"tag":139,"props":5072,"children":5073},{"style":2048},[5074],{"type":21,"value":4208},{"type":15,"tag":139,"props":5076,"children":5077},{"style":567},[5078],{"type":21,"value":5079}," logging.getLogger(",{"type":15,"tag":139,"props":5081,"children":5082},{"style":4634},[5083],{"type":21,"value":5084},"__name__",{"type":15,"tag":139,"props":5086,"children":5087},{"style":567},[5088],{"type":21,"value":767},{"type":15,"tag":24,"props":5090,"children":5091},{},[5092,5094,5100,5102,5107,5109,5115,5116,5122,5123,5129,5130,5136,5137,5143,5145,5151,5153,5159,5161,5167],{"type":21,"value":5093},"Then, think of ",{"type":15,"tag":30,"props":5095,"children":5097},{"className":5096},[],[5098],{"type":21,"value":5099},"logger",{"type":21,"value":5101}," as a replacement of the ",{"type":15,"tag":30,"props":5103,"children":5105},{"className":5104},[],[5106],{"type":21,"value":4796},{"type":21,"value":5108}," function.\nLogging uses several levels to distinguish the importance of each message.\nThey are: ",{"type":15,"tag":30,"props":5110,"children":5112},{"className":5111},[],[5113],{"type":21,"value":5114},"DEBUG",{"type":21,"value":4867},{"type":15,"tag":30,"props":5117,"children":5119},{"className":5118},[],[5120],{"type":21,"value":5121},"INFO",{"type":21,"value":4867},{"type":15,"tag":30,"props":5124,"children":5126},{"className":5125},[],[5127],{"type":21,"value":5128},"WARNING",{"type":21,"value":4867},{"type":15,"tag":30,"props":5131,"children":5133},{"className":5132},[],[5134],{"type":21,"value":5135},"ERROR",{"type":21,"value":4867},{"type":15,"tag":30,"props":5138,"children":5140},{"className":5139},[],[5141],{"type":21,"value":5142},"CRITICAL",{"type":21,"value":5144},".\nFor example, to issue a logger message for debug purposes, we use ",{"type":15,"tag":30,"props":5146,"children":5148},{"className":5147},[],[5149],{"type":21,"value":5150},"logger.debug(\"This is a debug message\")",{"type":21,"value":5152},".\nIf a message is just a piece of information, we use ",{"type":15,"tag":30,"props":5154,"children":5156},{"className":5155},[],[5157],{"type":21,"value":5158},"logger.info(\"This message is info\")",{"type":21,"value":5160},", if it's error, ",{"type":15,"tag":30,"props":5162,"children":5164},{"className":5163},[],[5165],{"type":21,"value":5166},"logger.error(\"Error message\")",{"type":21,"value":5168},", etc.",{"type":15,"tag":24,"props":5170,"children":5171},{},[5172],{"type":21,"value":5173},"The logging facility needs to be configured first, which we typically do through a config file. An example follows.",{"type":15,"tag":24,"props":5175,"children":5176},{},[5177,5179,5185],{"type":21,"value":5178},"File ",{"type":15,"tag":30,"props":5180,"children":5182},{"className":5181},[],[5183],{"type":21,"value":5184},"logging_config.yaml",{"type":21,"value":331},{"type":15,"tag":130,"props":5187,"children":5189},{"className":4618,"code":5188,"language":4349,"meta":8,"style":8},"version: 1\nformatters:\n  standard:\n    format: '%(asctime)s|%(name)s|%(levelname)s|%(message)s'\n\nhandlers:\n  console:\n    class: logging.StreamHandler\n    level: DEBUG\n    formatter: standard\n    stream: ext://sys.stdout\n  error_file:\n    class: fileHandlers.handlers.MakedirsRotatingFileHandler\n    level: ERROR\n    formatter: standard\n    filename: logs/errors.log\n    maxBytes: 10485760  # 10 MB\n    backupCount: 20\n    encoding: utf8\n  output_file:\n    class: fileHandlers.handlers.MakedirsRotatingFileHandler\n    level: NOTSET\n    formatter: standard\n    filename: logs/output.log\n    # maxBytes: 10485760  # 10 MB\n    backupCount: 20  # Rotates this many times when maxBytes is reached\n    encoding: utf8\nloggers:\n  __main__:  # Main module, the one you execute\n    level: DEBUG\n    # handlers: [console]\n    handlers: [error_file, output_file]\n    propagate: no  # Do not propagate to `root` level.\n  models:  # Set up logger for `models` module - change this to your module name\n    level: DEBUG\n    propagate: no\n  features:  # `features` module - change this to your current module name\n    level: DEBUG\n    handlers: [error_file, output_file]\n    propagate: no\nroot:\n  level: DEBUG\n  handlers: [console, error_file, output_file]\n",[5190],{"type":15,"tag":30,"props":5191,"children":5192},{"__ignoreMap":8},[5193,5206,5214,5222,5276,5283,5291,5299,5312,5325,5333,5351,5360,5373,5386,5394,5413,5433,5447,5456,5465,5477,5490,5498,5515,5524,5542,5550,5559,5573,5585,5594,5603,5617,5631,5643,5652,5666,5678,5686,5694,5703,5716],{"type":15,"tag":139,"props":5194,"children":5195},{"class":141,"line":142},[5196,5201],{"type":15,"tag":139,"props":5197,"children":5198},{"style":567},[5199],{"type":21,"value":5200},"version: ",{"type":15,"tag":139,"props":5202,"children":5203},{"style":158},[5204],{"type":21,"value":5205},"1\n",{"type":15,"tag":139,"props":5207,"children":5208},{"class":141,"line":578},[5209],{"type":15,"tag":139,"props":5210,"children":5211},{"style":567},[5212],{"type":21,"value":5213},"formatters:\n",{"type":15,"tag":139,"props":5215,"children":5216},{"class":141,"line":581},[5217],{"type":15,"tag":139,"props":5218,"children":5219},{"style":567},[5220],{"type":21,"value":5221},"  standard:\n",{"type":15,"tag":139,"props":5223,"children":5224},{"class":141,"line":805},[5225,5230,5234,5239,5244,5248,5253,5257,5262,5266,5271],{"type":15,"tag":139,"props":5226,"children":5227},{"style":547},[5228],{"type":21,"value":5229},"    format",{"type":15,"tag":139,"props":5231,"children":5232},{"style":567},[5233],{"type":21,"value":4856},{"type":15,"tag":139,"props":5235,"children":5236},{"style":152},[5237],{"type":21,"value":5238},"'",{"type":15,"tag":139,"props":5240,"children":5241},{"style":158},[5242],{"type":21,"value":5243},"%(asctime)s",{"type":15,"tag":139,"props":5245,"children":5246},{"style":152},[5247],{"type":21,"value":2867},{"type":15,"tag":139,"props":5249,"children":5250},{"style":158},[5251],{"type":21,"value":5252},"%(name)s",{"type":15,"tag":139,"props":5254,"children":5255},{"style":152},[5256],{"type":21,"value":2867},{"type":15,"tag":139,"props":5258,"children":5259},{"style":158},[5260],{"type":21,"value":5261},"%(levelname)s",{"type":15,"tag":139,"props":5263,"children":5264},{"style":152},[5265],{"type":21,"value":2867},{"type":15,"tag":139,"props":5267,"children":5268},{"style":158},[5269],{"type":21,"value":5270},"%(message)s",{"type":15,"tag":139,"props":5272,"children":5273},{"style":152},[5274],{"type":21,"value":5275},"'\n",{"type":15,"tag":139,"props":5277,"children":5278},{"class":141,"line":1288},[5279],{"type":15,"tag":139,"props":5280,"children":5281},{"emptyLinePlaceholder":4933},[5282],{"type":21,"value":4936},{"type":15,"tag":139,"props":5284,"children":5285},{"class":141,"line":1331},[5286],{"type":15,"tag":139,"props":5287,"children":5288},{"style":567},[5289],{"type":21,"value":5290},"handlers:\n",{"type":15,"tag":139,"props":5292,"children":5293},{"class":141,"line":1375},[5294],{"type":15,"tag":139,"props":5295,"children":5296},{"style":567},[5297],{"type":21,"value":5298},"  console:\n",{"type":15,"tag":139,"props":5300,"children":5301},{"class":141,"line":1418},[5302,5307],{"type":15,"tag":139,"props":5303,"children":5304},{"style":4738},[5305],{"type":21,"value":5306},"    class",{"type":15,"tag":139,"props":5308,"children":5309},{"style":567},[5310],{"type":21,"value":5311},": logging.StreamHandler\n",{"type":15,"tag":139,"props":5313,"children":5314},{"class":141,"line":1460},[5315,5320],{"type":15,"tag":139,"props":5316,"children":5317},{"style":567},[5318],{"type":21,"value":5319},"    level: ",{"type":15,"tag":139,"props":5321,"children":5322},{"style":158},[5323],{"type":21,"value":5324},"DEBUG\n",{"type":15,"tag":139,"props":5326,"children":5327},{"class":141,"line":1502},[5328],{"type":15,"tag":139,"props":5329,"children":5330},{"style":567},[5331],{"type":21,"value":5332},"    formatter: standard\n",{"type":15,"tag":139,"props":5334,"children":5335},{"class":141,"line":3766},[5336,5341,5346],{"type":15,"tag":139,"props":5337,"children":5338},{"style":567},[5339],{"type":21,"value":5340},"    stream: ext:",{"type":15,"tag":139,"props":5342,"children":5343},{"style":2048},[5344],{"type":21,"value":5345},"//",{"type":15,"tag":139,"props":5347,"children":5348},{"style":567},[5349],{"type":21,"value":5350},"sys.stdout\n",{"type":15,"tag":139,"props":5352,"children":5354},{"class":141,"line":5353},12,[5355],{"type":15,"tag":139,"props":5356,"children":5357},{"style":567},[5358],{"type":21,"value":5359},"  error_file:\n",{"type":15,"tag":139,"props":5361,"children":5363},{"class":141,"line":5362},13,[5364,5368],{"type":15,"tag":139,"props":5365,"children":5366},{"style":4738},[5367],{"type":21,"value":5306},{"type":15,"tag":139,"props":5369,"children":5370},{"style":567},[5371],{"type":21,"value":5372},": fileHandlers.handlers.MakedirsRotatingFileHandler\n",{"type":15,"tag":139,"props":5374,"children":5376},{"class":141,"line":5375},14,[5377,5381],{"type":15,"tag":139,"props":5378,"children":5379},{"style":567},[5380],{"type":21,"value":5319},{"type":15,"tag":139,"props":5382,"children":5383},{"style":158},[5384],{"type":21,"value":5385},"ERROR\n",{"type":15,"tag":139,"props":5387,"children":5389},{"class":141,"line":5388},15,[5390],{"type":15,"tag":139,"props":5391,"children":5392},{"style":567},[5393],{"type":21,"value":5332},{"type":15,"tag":139,"props":5395,"children":5397},{"class":141,"line":5396},16,[5398,5403,5408],{"type":15,"tag":139,"props":5399,"children":5400},{"style":567},[5401],{"type":21,"value":5402},"    filename: logs",{"type":15,"tag":139,"props":5404,"children":5405},{"style":2048},[5406],{"type":21,"value":5407},"/",{"type":15,"tag":139,"props":5409,"children":5410},{"style":567},[5411],{"type":21,"value":5412},"errors.log\n",{"type":15,"tag":139,"props":5414,"children":5416},{"class":141,"line":5415},17,[5417,5422,5427],{"type":15,"tag":139,"props":5418,"children":5419},{"style":567},[5420],{"type":21,"value":5421},"    maxBytes: ",{"type":15,"tag":139,"props":5423,"children":5424},{"style":158},[5425],{"type":21,"value":5426},"10485760",{"type":15,"tag":139,"props":5428,"children":5430},{"style":5429},"--shiki-default:#6A737D;--shiki-dark-mode:#88846F;--shiki-sky-dark-mode:#88846F;--shiki-light-mode:#6A737D;--shiki-blue-mode:#88846F",[5431],{"type":21,"value":5432},"  # 10 MB\n",{"type":15,"tag":139,"props":5434,"children":5436},{"class":141,"line":5435},18,[5437,5442],{"type":15,"tag":139,"props":5438,"children":5439},{"style":567},[5440],{"type":21,"value":5441},"    backupCount: ",{"type":15,"tag":139,"props":5443,"children":5444},{"style":158},[5445],{"type":21,"value":5446},"20\n",{"type":15,"tag":139,"props":5448,"children":5450},{"class":141,"line":5449},19,[5451],{"type":15,"tag":139,"props":5452,"children":5453},{"style":567},[5454],{"type":21,"value":5455},"    encoding: utf8\n",{"type":15,"tag":139,"props":5457,"children":5459},{"class":141,"line":5458},20,[5460],{"type":15,"tag":139,"props":5461,"children":5462},{"style":567},[5463],{"type":21,"value":5464},"  output_file:\n",{"type":15,"tag":139,"props":5466,"children":5468},{"class":141,"line":5467},21,[5469,5473],{"type":15,"tag":139,"props":5470,"children":5471},{"style":4738},[5472],{"type":21,"value":5306},{"type":15,"tag":139,"props":5474,"children":5475},{"style":567},[5476],{"type":21,"value":5372},{"type":15,"tag":139,"props":5478,"children":5480},{"class":141,"line":5479},22,[5481,5485],{"type":15,"tag":139,"props":5482,"children":5483},{"style":567},[5484],{"type":21,"value":5319},{"type":15,"tag":139,"props":5486,"children":5487},{"style":158},[5488],{"type":21,"value":5489},"NOTSET\n",{"type":15,"tag":139,"props":5491,"children":5493},{"class":141,"line":5492},23,[5494],{"type":15,"tag":139,"props":5495,"children":5496},{"style":567},[5497],{"type":21,"value":5332},{"type":15,"tag":139,"props":5499,"children":5501},{"class":141,"line":5500},24,[5502,5506,5510],{"type":15,"tag":139,"props":5503,"children":5504},{"style":567},[5505],{"type":21,"value":5402},{"type":15,"tag":139,"props":5507,"children":5508},{"style":2048},[5509],{"type":21,"value":5407},{"type":15,"tag":139,"props":5511,"children":5512},{"style":567},[5513],{"type":21,"value":5514},"output.log\n",{"type":15,"tag":139,"props":5516,"children":5518},{"class":141,"line":5517},25,[5519],{"type":15,"tag":139,"props":5520,"children":5521},{"style":5429},[5522],{"type":21,"value":5523},"    # maxBytes: 10485760  # 10 MB\n",{"type":15,"tag":139,"props":5525,"children":5527},{"class":141,"line":5526},26,[5528,5532,5537],{"type":15,"tag":139,"props":5529,"children":5530},{"style":567},[5531],{"type":21,"value":5441},{"type":15,"tag":139,"props":5533,"children":5534},{"style":158},[5535],{"type":21,"value":5536},"20",{"type":15,"tag":139,"props":5538,"children":5539},{"style":5429},[5540],{"type":21,"value":5541},"  # Rotates this many times when maxBytes is reached\n",{"type":15,"tag":139,"props":5543,"children":5545},{"class":141,"line":5544},27,[5546],{"type":15,"tag":139,"props":5547,"children":5548},{"style":567},[5549],{"type":21,"value":5455},{"type":15,"tag":139,"props":5551,"children":5553},{"class":141,"line":5552},28,[5554],{"type":15,"tag":139,"props":5555,"children":5556},{"style":567},[5557],{"type":21,"value":5558},"loggers:\n",{"type":15,"tag":139,"props":5560,"children":5562},{"class":141,"line":5561},29,[5563,5568],{"type":15,"tag":139,"props":5564,"children":5565},{"style":567},[5566],{"type":21,"value":5567},"  __main__:  ",{"type":15,"tag":139,"props":5569,"children":5570},{"style":5429},[5571],{"type":21,"value":5572},"# Main module, the one you execute\n",{"type":15,"tag":139,"props":5574,"children":5576},{"class":141,"line":5575},30,[5577,5581],{"type":15,"tag":139,"props":5578,"children":5579},{"style":567},[5580],{"type":21,"value":5319},{"type":15,"tag":139,"props":5582,"children":5583},{"style":158},[5584],{"type":21,"value":5324},{"type":15,"tag":139,"props":5586,"children":5588},{"class":141,"line":5587},31,[5589],{"type":15,"tag":139,"props":5590,"children":5591},{"style":5429},[5592],{"type":21,"value":5593},"    # handlers: [console]\n",{"type":15,"tag":139,"props":5595,"children":5597},{"class":141,"line":5596},32,[5598],{"type":15,"tag":139,"props":5599,"children":5600},{"style":567},[5601],{"type":21,"value":5602},"    handlers: [error_file, output_file]\n",{"type":15,"tag":139,"props":5604,"children":5606},{"class":141,"line":5605},33,[5607,5612],{"type":15,"tag":139,"props":5608,"children":5609},{"style":567},[5610],{"type":21,"value":5611},"    propagate: no  ",{"type":15,"tag":139,"props":5613,"children":5614},{"style":5429},[5615],{"type":21,"value":5616},"# Do not propagate to `root` level.\n",{"type":15,"tag":139,"props":5618,"children":5620},{"class":141,"line":5619},34,[5621,5626],{"type":15,"tag":139,"props":5622,"children":5623},{"style":567},[5624],{"type":21,"value":5625},"  models:  ",{"type":15,"tag":139,"props":5627,"children":5628},{"style":5429},[5629],{"type":21,"value":5630},"# Set up logger for `models` module - change this to your module name\n",{"type":15,"tag":139,"props":5632,"children":5634},{"class":141,"line":5633},35,[5635,5639],{"type":15,"tag":139,"props":5636,"children":5637},{"style":567},[5638],{"type":21,"value":5319},{"type":15,"tag":139,"props":5640,"children":5641},{"style":158},[5642],{"type":21,"value":5324},{"type":15,"tag":139,"props":5644,"children":5646},{"class":141,"line":5645},36,[5647],{"type":15,"tag":139,"props":5648,"children":5649},{"style":567},[5650],{"type":21,"value":5651},"    propagate: no\n",{"type":15,"tag":139,"props":5653,"children":5655},{"class":141,"line":5654},37,[5656,5661],{"type":15,"tag":139,"props":5657,"children":5658},{"style":567},[5659],{"type":21,"value":5660},"  features:  ",{"type":15,"tag":139,"props":5662,"children":5663},{"style":5429},[5664],{"type":21,"value":5665},"# `features` module - change this to your current module name\n",{"type":15,"tag":139,"props":5667,"children":5669},{"class":141,"line":5668},38,[5670,5674],{"type":15,"tag":139,"props":5671,"children":5672},{"style":567},[5673],{"type":21,"value":5319},{"type":15,"tag":139,"props":5675,"children":5676},{"style":158},[5677],{"type":21,"value":5324},{"type":15,"tag":139,"props":5679,"children":5681},{"class":141,"line":5680},39,[5682],{"type":15,"tag":139,"props":5683,"children":5684},{"style":567},[5685],{"type":21,"value":5602},{"type":15,"tag":139,"props":5687,"children":5689},{"class":141,"line":5688},40,[5690],{"type":15,"tag":139,"props":5691,"children":5692},{"style":567},[5693],{"type":21,"value":5651},{"type":15,"tag":139,"props":5695,"children":5697},{"class":141,"line":5696},41,[5698],{"type":15,"tag":139,"props":5699,"children":5700},{"style":567},[5701],{"type":21,"value":5702},"root:\n",{"type":15,"tag":139,"props":5704,"children":5706},{"class":141,"line":5705},42,[5707,5712],{"type":15,"tag":139,"props":5708,"children":5709},{"style":567},[5710],{"type":21,"value":5711},"  level: ",{"type":15,"tag":139,"props":5713,"children":5714},{"style":158},[5715],{"type":21,"value":5324},{"type":15,"tag":139,"props":5717,"children":5719},{"class":141,"line":5718},43,[5720],{"type":15,"tag":139,"props":5721,"children":5722},{"style":567},[5723],{"type":21,"value":5724},"  handlers: [console, error_file, output_file]\n",{"type":15,"tag":24,"props":5726,"children":5727},{},[5728,5730,5736],{"type":21,"value":5729},"Note that ",{"type":15,"tag":30,"props":5731,"children":5733},{"className":5732},[],[5734],{"type":21,"value":5735},"fileHandlers.handlers.MakedirsRotatingFileHandler",{"type":21,"value":5737}," is a custom file handler that automatically creates the parent directories of the log file, if needed.",{"type":15,"tag":24,"props":5739,"children":5740},{},[5741],{"type":21,"value":5742},"To load a logging config file:",{"type":15,"tag":130,"props":5744,"children":5746},{"className":4618,"code":5745,"language":4349,"meta":8,"style":8},"import yaml\nfrom yaml import Loader\nimport logging\n\ndef get_logging_config(path_conf=\"config/logging_conf.yaml\"):\n    # Load logging configs\n    with open(path_conf) as fin:\n        loggingConf = yaml.load(fin, Loader)\n    return loggingConf\n\n# Apply configs:\n\nloggingConf = get_logging_config()\nlogging.config.dictConfig(loggingConf)\n",[5747],{"type":15,"tag":30,"props":5748,"children":5749},{"__ignoreMap":8},[5750,5762,5784,5795,5802,5836,5844,5872,5889,5902,5909,5917,5924,5941],{"type":15,"tag":139,"props":5751,"children":5752},{"class":141,"line":142},[5753,5757],{"type":15,"tag":139,"props":5754,"children":5755},{"style":2048},[5756],{"type":21,"value":5050},{"type":15,"tag":139,"props":5758,"children":5759},{"style":567},[5760],{"type":21,"value":5761}," yaml\n",{"type":15,"tag":139,"props":5763,"children":5764},{"class":141,"line":578},[5765,5770,5775,5779],{"type":15,"tag":139,"props":5766,"children":5767},{"style":2048},[5768],{"type":21,"value":5769},"from",{"type":15,"tag":139,"props":5771,"children":5772},{"style":567},[5773],{"type":21,"value":5774}," yaml ",{"type":15,"tag":139,"props":5776,"children":5777},{"style":2048},[5778],{"type":21,"value":5050},{"type":15,"tag":139,"props":5780,"children":5781},{"style":567},[5782],{"type":21,"value":5783}," Loader\n",{"type":15,"tag":139,"props":5785,"children":5786},{"class":141,"line":581},[5787,5791],{"type":15,"tag":139,"props":5788,"children":5789},{"style":2048},[5790],{"type":21,"value":5050},{"type":15,"tag":139,"props":5792,"children":5793},{"style":567},[5794],{"type":21,"value":5055},{"type":15,"tag":139,"props":5796,"children":5797},{"class":141,"line":805},[5798],{"type":15,"tag":139,"props":5799,"children":5800},{"emptyLinePlaceholder":4933},[5801],{"type":21,"value":4936},{"type":15,"tag":139,"props":5803,"children":5804},{"class":141,"line":1288},[5805,5809,5814,5818,5823,5827,5832],{"type":15,"tag":139,"props":5806,"children":5807},{"style":4738},[5808],{"type":21,"value":4837},{"type":15,"tag":139,"props":5810,"children":5811},{"style":146},[5812],{"type":21,"value":5813}," get_logging_config",{"type":15,"tag":139,"props":5815,"children":5816},{"style":567},[5817],{"type":21,"value":2426},{"type":15,"tag":139,"props":5819,"children":5820},{"style":4849},[5821],{"type":21,"value":5822},"path_conf",{"type":15,"tag":139,"props":5824,"children":5825},{"style":2048},[5826],{"type":21,"value":4208},{"type":15,"tag":139,"props":5828,"children":5829},{"style":152},[5830],{"type":21,"value":5831},"\"config/logging_conf.yaml\"",{"type":15,"tag":139,"props":5833,"children":5834},{"style":567},[5835],{"type":21,"value":4912},{"type":15,"tag":139,"props":5837,"children":5838},{"class":141,"line":1331},[5839],{"type":15,"tag":139,"props":5840,"children":5841},{"style":5429},[5842],{"type":21,"value":5843},"    # Load logging configs\n",{"type":15,"tag":139,"props":5845,"children":5846},{"class":141,"line":1375},[5847,5852,5857,5862,5867],{"type":15,"tag":139,"props":5848,"children":5849},{"style":2048},[5850],{"type":21,"value":5851},"    with",{"type":15,"tag":139,"props":5853,"children":5854},{"style":547},[5855],{"type":21,"value":5856}," open",{"type":15,"tag":139,"props":5858,"children":5859},{"style":567},[5860],{"type":21,"value":5861},"(path_conf) ",{"type":15,"tag":139,"props":5863,"children":5864},{"style":2048},[5865],{"type":21,"value":5866},"as",{"type":15,"tag":139,"props":5868,"children":5869},{"style":567},[5870],{"type":21,"value":5871}," fin:\n",{"type":15,"tag":139,"props":5873,"children":5874},{"class":141,"line":1418},[5875,5880,5884],{"type":15,"tag":139,"props":5876,"children":5877},{"style":567},[5878],{"type":21,"value":5879},"        loggingConf ",{"type":15,"tag":139,"props":5881,"children":5882},{"style":2048},[5883],{"type":21,"value":4208},{"type":15,"tag":139,"props":5885,"children":5886},{"style":567},[5887],{"type":21,"value":5888}," yaml.load(fin, Loader)\n",{"type":15,"tag":139,"props":5890,"children":5891},{"class":141,"line":1460},[5892,5897],{"type":15,"tag":139,"props":5893,"children":5894},{"style":2048},[5895],{"type":21,"value":5896},"    return",{"type":15,"tag":139,"props":5898,"children":5899},{"style":567},[5900],{"type":21,"value":5901}," loggingConf\n",{"type":15,"tag":139,"props":5903,"children":5904},{"class":141,"line":1502},[5905],{"type":15,"tag":139,"props":5906,"children":5907},{"emptyLinePlaceholder":4933},[5908],{"type":21,"value":4936},{"type":15,"tag":139,"props":5910,"children":5911},{"class":141,"line":3766},[5912],{"type":15,"tag":139,"props":5913,"children":5914},{"style":5429},[5915],{"type":21,"value":5916},"# Apply configs:\n",{"type":15,"tag":139,"props":5918,"children":5919},{"class":141,"line":5353},[5920],{"type":15,"tag":139,"props":5921,"children":5922},{"emptyLinePlaceholder":4933},[5923],{"type":21,"value":4936},{"type":15,"tag":139,"props":5925,"children":5926},{"class":141,"line":5362},[5927,5932,5936],{"type":15,"tag":139,"props":5928,"children":5929},{"style":567},[5930],{"type":21,"value":5931},"loggingConf ",{"type":15,"tag":139,"props":5933,"children":5934},{"style":2048},[5935],{"type":21,"value":4208},{"type":15,"tag":139,"props":5937,"children":5938},{"style":567},[5939],{"type":21,"value":5940}," get_logging_config()\n",{"type":15,"tag":139,"props":5942,"children":5943},{"class":141,"line":5375},[5944],{"type":15,"tag":139,"props":5945,"children":5946},{"style":567},[5947],{"type":21,"value":5948},"logging.config.dictConfig(loggingConf)\n",{"type":15,"tag":572,"props":5950,"children":5951},{},[5952],{"type":21,"value":576},{"title":8,"searchDepth":578,"depth":578,"links":5954},[],"content:tutorials:python-logging.md","tutorials/python-logging.md","tutorials/python-logging",{"_path":5959,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":5960,"description":5961,"tags":4349,"body":5962,"_type":588,"_id":6103,"_source":590,"_file":6104,"_stem":6105,"_extension":593},"/tutorials/python-venv","Python Virtual Environment (venv)","A Python Virtual Environment (venv) creates a local environment for your project dependencies (packages), completely detached from the system.\nThis isolates your project's packages from the system's in order to prevent version conflicts, and allows you to keep track of only the requirements your project demands.\nTo set up a local virtual environment, go to your Python project folder, then run:",{"type":12,"children":5963,"toc":6100},[5964,5977,6005,6010,6029,6042,6071,6077,6082,6096],{"type":15,"tag":24,"props":5965,"children":5966},{},[5967,5969,5975],{"type":21,"value":5968},"A ",{"type":15,"tag":614,"props":5970,"children":5973},{"href":5971,"rel":5972},"https://docs.python.org/3/library/venv.html",[618],[5974],{"type":21,"value":5960},{"type":21,"value":5976}," creates a local environment for your project dependencies (packages), completely detached from the system.\nThis isolates your project's packages from the system's in order to prevent version conflicts, and allows you to keep track of only the requirements your project demands.\nTo set up a local virtual environment, go to your Python project folder, then run:",{"type":15,"tag":130,"props":5978,"children":5980},{"className":132,"code":5979,"language":10,"meta":8,"style":8},"python -m venv venv/\n",[5981],{"type":15,"tag":30,"props":5982,"children":5983},{"__ignoreMap":8},[5984],{"type":15,"tag":139,"props":5985,"children":5986},{"class":141,"line":142},[5987,5991,5995,6000],{"type":15,"tag":139,"props":5988,"children":5989},{"style":146},[5990],{"type":21,"value":4349},{"type":15,"tag":139,"props":5992,"children":5993},{"style":158},[5994],{"type":21,"value":3969},{"type":15,"tag":139,"props":5996,"children":5997},{"style":152},[5998],{"type":21,"value":5999}," venv",{"type":15,"tag":139,"props":6001,"children":6002},{"style":152},[6003],{"type":21,"value":6004}," venv/\n",{"type":15,"tag":24,"props":6006,"children":6007},{},[6008],{"type":21,"value":6009},"To activate the new environment:",{"type":15,"tag":130,"props":6011,"children":6013},{"className":132,"code":6012,"language":10,"meta":8,"style":8},"source venv/bin/activate\n",[6014],{"type":15,"tag":30,"props":6015,"children":6016},{"__ignoreMap":8},[6017],{"type":15,"tag":139,"props":6018,"children":6019},{"class":141,"line":142},[6020,6024],{"type":15,"tag":139,"props":6021,"children":6022},{"style":547},[6023],{"type":21,"value":2431},{"type":15,"tag":139,"props":6025,"children":6026},{"style":152},[6027],{"type":21,"value":6028}," venv/bin/activate\n",{"type":15,"tag":24,"props":6030,"children":6031},{},[6032,6034,6040],{"type":21,"value":6033},"To install requirements from a ",{"type":15,"tag":30,"props":6035,"children":6037},{"className":6036},[],[6038],{"type":21,"value":6039},"requirements.txt",{"type":21,"value":6041}," file:",{"type":15,"tag":130,"props":6043,"children":6045},{"className":132,"code":6044,"language":10,"meta":8,"style":8},"pip install -r requirements.txt\n",[6046],{"type":15,"tag":30,"props":6047,"children":6048},{"__ignoreMap":8},[6049],{"type":15,"tag":139,"props":6050,"children":6051},{"class":141,"line":142},[6052,6057,6062,6066],{"type":15,"tag":139,"props":6053,"children":6054},{"style":146},[6055],{"type":21,"value":6056},"pip",{"type":15,"tag":139,"props":6058,"children":6059},{"style":152},[6060],{"type":21,"value":6061}," install",{"type":15,"tag":139,"props":6063,"children":6064},{"style":158},[6065],{"type":21,"value":354},{"type":15,"tag":139,"props":6067,"children":6068},{"style":152},[6069],{"type":21,"value":6070}," requirements.txt\n",{"type":15,"tag":16,"props":6072,"children":6074},{"id":6073},"deactivating-a-virtual-environment",[6075],{"type":21,"value":6076},"Deactivating a virtual environment",{"type":15,"tag":24,"props":6078,"children":6079},{},[6080],{"type":21,"value":6081},"To deactivate a venv and return to the system's python environment:",{"type":15,"tag":130,"props":6083,"children":6085},{"className":132,"code":6084,"language":10,"meta":8,"style":8},"deactivate\n",[6086],{"type":15,"tag":30,"props":6087,"children":6088},{"__ignoreMap":8},[6089],{"type":15,"tag":139,"props":6090,"children":6091},{"class":141,"line":142},[6092],{"type":15,"tag":139,"props":6093,"children":6094},{"style":146},[6095],{"type":21,"value":6084},{"type":15,"tag":572,"props":6097,"children":6098},{},[6099],{"type":21,"value":576},{"title":8,"searchDepth":578,"depth":578,"links":6101},[6102],{"id":6073,"depth":581,"text":6076},"content:tutorials:python-venv.md","tutorials/python-venv.md","tutorials/python-venv",{"_path":6107,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":6108,"description":6109,"tags":1041,"body":6110,"_type":588,"_id":6544,"_source":590,"_file":6545,"_stem":6546,"_extension":593},"/tutorials/ssh","Remote access via SSH","Accessing the server remotely via SSH.",{"type":12,"children":6111,"toc":6540},[6112,6116,6169,6172,6178,6183,6195,6215,6220,6317,6338,6350,6374,6377,6383,6388,6408,6413,6531,6536],{"type":15,"tag":24,"props":6113,"children":6114},{},[6115],{"type":21,"value":6109},{"type":15,"tag":130,"props":6117,"children":6119},{"className":132,"code":6118,"language":10,"meta":8,"style":8},"ssh \u003Caccount_name>@\u003Cserver_hostname>\n",[6120],{"type":15,"tag":30,"props":6121,"children":6122},{"__ignoreMap":8},[6123],{"type":15,"tag":139,"props":6124,"children":6125},{"class":141,"line":142},[6126,6130,6134,6139,6143,6147,6152,6156,6161,6165],{"type":15,"tag":139,"props":6127,"children":6128},{"style":146},[6129],{"type":21,"value":1041},{"type":15,"tag":139,"props":6131,"children":6132},{"style":2048},[6133],{"type":21,"value":4063},{"type":15,"tag":139,"props":6135,"children":6136},{"style":152},[6137],{"type":21,"value":6138},"account_nam",{"type":15,"tag":139,"props":6140,"children":6141},{"style":567},[6142],{"type":21,"value":2061},{"type":15,"tag":139,"props":6144,"children":6145},{"style":2048},[6146],{"type":21,"value":2066},{"type":15,"tag":139,"props":6148,"children":6149},{"style":152},[6150],{"type":21,"value":6151},"@",{"type":15,"tag":139,"props":6153,"children":6154},{"style":2048},[6155],{"type":21,"value":2051},{"type":15,"tag":139,"props":6157,"children":6158},{"style":152},[6159],{"type":21,"value":6160},"server_hostnam",{"type":15,"tag":139,"props":6162,"children":6163},{"style":567},[6164],{"type":21,"value":2061},{"type":15,"tag":139,"props":6166,"children":6167},{"style":2048},[6168],{"type":21,"value":3848},{"type":15,"tag":163,"props":6170,"children":6171},{},[],{"type":15,"tag":16,"props":6173,"children":6175},{"id":6174},"server-aliases",[6176],{"type":21,"value":6177},"Server aliases",{"type":15,"tag":24,"props":6179,"children":6180},{},[6181],{"type":21,"value":6182},"Creating aliases for hosts in your local SSH config file.\nThis can be done to more easily connect to servers that have names that are too long and are hard to remember.",{"type":15,"tag":24,"props":6184,"children":6185},{},[6186,6188,6193],{"type":21,"value":6187},"You will need to run a Bash shell ",{"type":15,"tag":418,"props":6189,"children":6190},{},[6191],{"type":21,"value":6192},"on your local computer",{"type":21,"value":6194},", such as Gnome Terminal, KDE Konsole, or Windows PowerShell.\nEdit your ssh config file with any text editor. To do it from the command line:",{"type":15,"tag":130,"props":6196,"children":6198},{"className":132,"code":6197,"language":10,"meta":8,"style":8},"nano ~/.ssh/config\n",[6199],{"type":15,"tag":30,"props":6200,"children":6201},{"__ignoreMap":8},[6202],{"type":15,"tag":139,"props":6203,"children":6204},{"class":141,"line":142},[6205,6210],{"type":15,"tag":139,"props":6206,"children":6207},{"style":146},[6208],{"type":21,"value":6209},"nano",{"type":15,"tag":139,"props":6211,"children":6212},{"style":152},[6213],{"type":21,"value":6214}," ~/.ssh/config\n",{"type":15,"tag":24,"props":6216,"children":6217},{},[6218],{"type":21,"value":6219},"Then, enter the following information:",{"type":15,"tag":130,"props":6221,"children":6223},{"className":132,"code":6222,"language":10,"meta":8,"style":8},"host \u003Calias>  # \u003Calias> is the name you would like to call the server (e.g. ocelot)\nhostname \u003Caddress>  # the server address, for instance abc.myserver.net or 10.0.0.2\nuser \u003Cusername>  # Your username on the server\n",[6224],{"type":15,"tag":30,"props":6225,"children":6226},{"__ignoreMap":8},[6227,6257,6287],{"type":15,"tag":139,"props":6228,"children":6229},{"class":141,"line":142},[6230,6235,6239,6244,6248,6252],{"type":15,"tag":139,"props":6231,"children":6232},{"style":146},[6233],{"type":21,"value":6234},"host",{"type":15,"tag":139,"props":6236,"children":6237},{"style":2048},[6238],{"type":21,"value":4063},{"type":15,"tag":139,"props":6240,"children":6241},{"style":152},[6242],{"type":21,"value":6243},"alia",{"type":15,"tag":139,"props":6245,"children":6246},{"style":567},[6247],{"type":21,"value":3843},{"type":15,"tag":139,"props":6249,"children":6250},{"style":2048},[6251],{"type":21,"value":2066},{"type":15,"tag":139,"props":6253,"children":6254},{"style":5429},[6255],{"type":21,"value":6256},"  # \u003Calias> is the name you would like to call the server (e.g. ocelot)\n",{"type":15,"tag":139,"props":6258,"children":6259},{"class":141,"line":578},[6260,6265,6269,6274,6278,6282],{"type":15,"tag":139,"props":6261,"children":6262},{"style":146},[6263],{"type":21,"value":6264},"hostname",{"type":15,"tag":139,"props":6266,"children":6267},{"style":2048},[6268],{"type":21,"value":4063},{"type":15,"tag":139,"props":6270,"children":6271},{"style":152},[6272],{"type":21,"value":6273},"addres",{"type":15,"tag":139,"props":6275,"children":6276},{"style":567},[6277],{"type":21,"value":3843},{"type":15,"tag":139,"props":6279,"children":6280},{"style":2048},[6281],{"type":21,"value":2066},{"type":15,"tag":139,"props":6283,"children":6284},{"style":5429},[6285],{"type":21,"value":6286},"  # the server address, for instance abc.myserver.net or 10.0.0.2\n",{"type":15,"tag":139,"props":6288,"children":6289},{"class":141,"line":581},[6290,6295,6299,6304,6308,6312],{"type":15,"tag":139,"props":6291,"children":6292},{"style":146},[6293],{"type":21,"value":6294},"user",{"type":15,"tag":139,"props":6296,"children":6297},{"style":2048},[6298],{"type":21,"value":4063},{"type":15,"tag":139,"props":6300,"children":6301},{"style":152},[6302],{"type":21,"value":6303},"usernam",{"type":15,"tag":139,"props":6305,"children":6306},{"style":567},[6307],{"type":21,"value":2061},{"type":15,"tag":139,"props":6309,"children":6310},{"style":2048},[6311],{"type":21,"value":2066},{"type":15,"tag":139,"props":6313,"children":6314},{"style":5429},[6315],{"type":21,"value":6316},"  # Your username on the server\n",{"type":15,"tag":24,"props":6318,"children":6319},{},[6320,6322,6328,6330,6336],{"type":21,"value":6321},"Press ",{"type":15,"tag":30,"props":6323,"children":6325},{"className":6324},[],[6326],{"type":21,"value":6327},"ctrl+X",{"type":21,"value":6329}," and type ",{"type":15,"tag":30,"props":6331,"children":6333},{"className":6332},[],[6334],{"type":21,"value":6335},"Y",{"type":21,"value":6337}," to save.",{"type":15,"tag":24,"props":6339,"children":6340},{},[6341,6343,6349],{"type":21,"value":6342},"Now you can run ",{"type":15,"tag":30,"props":6344,"children":6346},{"className":6345},[],[6347],{"type":21,"value":6348},"ssh \u003Calias>",{"type":21,"value":60},{"type":15,"tag":24,"props":6351,"children":6352},{},[6353,6357,6359,6365,6367,6373],{"type":15,"tag":4436,"props":6354,"children":6355},{},[6356],{"type":21,"value":1033},{"type":21,"value":6358},": If the folder ",{"type":15,"tag":30,"props":6360,"children":6362},{"className":6361},[],[6363],{"type":21,"value":6364},".ssh",{"type":21,"value":6366}," does not exist in your home directory, you can create it with ",{"type":15,"tag":30,"props":6368,"children":6370},{"className":6369},[],[6371],{"type":21,"value":6372},"mkdir /home/\u003Cusername>/.ssh",{"type":21,"value":60},{"type":15,"tag":163,"props":6375,"children":6376},{},[],{"type":15,"tag":16,"props":6378,"children":6380},{"id":6379},"passwordless-login",[6381],{"type":21,"value":6382},"Passwordless login",{"type":15,"tag":24,"props":6384,"children":6385},{},[6386],{"type":21,"value":6387},"Using a public key to log in through SSH.\nThis allows you to log in to an SSH server without having to type your password every time.",{"type":15,"tag":24,"props":6389,"children":6390},{},[6391,6393,6398,6400,6406],{"type":21,"value":6392},"First, ",{"type":15,"tag":418,"props":6394,"children":6395},{},[6396],{"type":21,"value":6397},"on your local machine",{"type":21,"value":6399},", run: ",{"type":15,"tag":30,"props":6401,"children":6403},{"className":6402},[],[6404],{"type":21,"value":6405},"ssh-keygen",{"type":21,"value":6407},", follow the prompts. You can leave the pass-phrase blank.\nThis will generate a pair of public and private keys for your user.",{"type":15,"tag":24,"props":6409,"children":6410},{},[6411],{"type":21,"value":6412},"Next, we will paste the generate key onto the server's list of authorized keys:",{"type":15,"tag":6414,"props":6415,"children":6416},"ol",{},[6417,6435,6470,6481,6493,6514],{"type":15,"tag":1008,"props":6418,"children":6419},{},[6420,6422,6427,6429],{"type":21,"value":6421},"List the ",{"type":15,"tag":418,"props":6423,"children":6424},{},[6425],{"type":21,"value":6426},"public",{"type":21,"value":6428}," key with ",{"type":15,"tag":30,"props":6430,"children":6432},{"className":6431},[],[6433],{"type":21,"value":6434},"cat ~/.ssh/id_rsa.pub",{"type":15,"tag":1008,"props":6436,"children":6437},{},[6438,6440,6446,6448,6454,6456,6462,6464,6468],{"type":21,"value":6439},"Copy the entire key using ",{"type":15,"tag":30,"props":6441,"children":6443},{"className":6442},[],[6444],{"type":21,"value":6445},"command+C",{"type":21,"value":6447}," on Mac or ",{"type":15,"tag":30,"props":6449,"children":6451},{"className":6450},[],[6452],{"type":21,"value":6453},"ctrl+shift+C",{"type":21,"value":6455}," on Windows/Linux. It should look something like ",{"type":15,"tag":30,"props":6457,"children":6459},{"className":6458},[],[6460],{"type":21,"value":6461},"ssh-rsa ABcdeFg12345... yourname@yourhost",{"type":21,"value":6463},". (",{"type":15,"tag":4436,"props":6465,"children":6466},{},[6467],{"type":21,"value":5128},{"type":21,"value":6469},": Keep your private key private!!!)",{"type":15,"tag":1008,"props":6471,"children":6472},{},[6473,6475,6480],{"type":21,"value":6474},"Log in to the server with ",{"type":15,"tag":30,"props":6476,"children":6478},{"className":6477},[],[6479],{"type":21,"value":1041},{"type":21,"value":60},{"type":15,"tag":1008,"props":6482,"children":6483},{},[6484,6486,6492],{"type":21,"value":6485},"On the server, open the authorized keys file with ",{"type":15,"tag":30,"props":6487,"children":6489},{"className":6488},[],[6490],{"type":21,"value":6491},"nano ~/.ssh/authorized_keys",{"type":21,"value":60},{"type":15,"tag":1008,"props":6494,"children":6495},{},[6496,6498,6504,6506,6512],{"type":21,"value":6497},"Paste your key at the bottom of this file (",{"type":15,"tag":30,"props":6499,"children":6501},{"className":6500},[],[6502],{"type":21,"value":6503},"command+V",{"type":21,"value":6505}," on Mac, ",{"type":15,"tag":30,"props":6507,"children":6509},{"className":6508},[],[6510],{"type":21,"value":6511},"ctrl+shift+V",{"type":21,"value":6513}," on Windows and Linux)",{"type":15,"tag":1008,"props":6515,"children":6516},{},[6517,6519,6524,6525,6530],{"type":21,"value":6518},"Exit nano with ",{"type":15,"tag":30,"props":6520,"children":6522},{"className":6521},[],[6523],{"type":21,"value":6327},{"type":21,"value":6329},{"type":15,"tag":30,"props":6526,"children":6528},{"className":6527},[],[6529],{"type":21,"value":6335},{"type":21,"value":6337},{"type":15,"tag":24,"props":6532,"children":6533},{},[6534],{"type":21,"value":6535},"Now, the next time you try to log in with SSH, you will not need to type your password.\nCombine this with the alias for quickly accessing servers with SSH.",{"type":15,"tag":572,"props":6537,"children":6538},{},[6539],{"type":21,"value":576},{"title":8,"searchDepth":578,"depth":578,"links":6541},[6542,6543],{"id":6174,"depth":581,"text":6177},{"id":6379,"depth":581,"text":6382},"content:tutorials:ssh.md","tutorials/ssh.md","tutorials/ssh",{"_path":6548,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":6549,"description":6550,"tags":6551,"body":6552,"_type":588,"_id":6678,"_source":590,"_file":6679,"_stem":6680,"_extension":593},"/tutorials/global-protect-linux","Connecting to Global Protect VPN on Linux","To properly connect to the Global Protect VPN used by Villanova University, we need a working client.","vpn",{"type":12,"children":6553,"toc":6676},[6554,6558,6563,6574,6579,6608,6613,6618,6667,6672],{"type":15,"tag":24,"props":6555,"children":6556},{},[6557],{"type":21,"value":6550},{"type":15,"tag":24,"props":6559,"children":6560},{},[6561],{"type":21,"value":6562},"The official client is finnicky. This tutorial describes how to use an open source client to establish a Palo Alto Global Protect VPN connection.",{"type":15,"tag":24,"props":6564,"children":6565},{},[6566,6568],{"type":21,"value":6567},"Source: ",{"type":15,"tag":614,"props":6569,"children":6572},{"href":6570,"rel":6571},"https://github.com/yuezk/GlobalProtect-openconnect",[618],[6573],{"type":21,"value":6570},{"type":15,"tag":24,"props":6575,"children":6576},{},[6577],{"type":21,"value":6578},"In Arch Linux, you can install it with:",{"type":15,"tag":130,"props":6580,"children":6582},{"className":132,"code":6581,"language":10,"meta":8,"style":8},"sudo pacman -S globalprotect-openconnect-git\n",[6583],{"type":15,"tag":30,"props":6584,"children":6585},{"__ignoreMap":8},[6586],{"type":15,"tag":139,"props":6587,"children":6588},{"class":141,"line":142},[6589,6594,6599,6603],{"type":15,"tag":139,"props":6590,"children":6591},{"style":146},[6592],{"type":21,"value":6593},"sudo",{"type":15,"tag":139,"props":6595,"children":6596},{"style":152},[6597],{"type":21,"value":6598}," pacman",{"type":15,"tag":139,"props":6600,"children":6601},{"style":158},[6602],{"type":21,"value":661},{"type":15,"tag":139,"props":6604,"children":6605},{"style":152},[6606],{"type":21,"value":6607}," globalprotect-openconnect-git\n",{"type":15,"tag":24,"props":6609,"children":6610},{},[6611],{"type":21,"value":6612},"The GUI interface is paid but works like a charm. The CLI requires additional work but is free.",{"type":15,"tag":24,"props":6614,"children":6615},{},[6616],{"type":21,"value":6617},"Just run it with:",{"type":15,"tag":130,"props":6619,"children":6621},{"className":132,"code":6620,"language":10,"meta":8,"style":8},"sudo -E gpclient --fix-openssl connect --csd-wrapper /usr/lib/gpclient/hipreport.sh vpn.villanova.edu\n",[6622],{"type":15,"tag":30,"props":6623,"children":6624},{"__ignoreMap":8},[6625],{"type":15,"tag":139,"props":6626,"children":6627},{"class":141,"line":142},[6628,6632,6637,6642,6647,6652,6657,6662],{"type":15,"tag":139,"props":6629,"children":6630},{"style":146},[6631],{"type":21,"value":6593},{"type":15,"tag":139,"props":6633,"children":6634},{"style":158},[6635],{"type":21,"value":6636}," -E",{"type":15,"tag":139,"props":6638,"children":6639},{"style":152},[6640],{"type":21,"value":6641}," gpclient",{"type":15,"tag":139,"props":6643,"children":6644},{"style":158},[6645],{"type":21,"value":6646}," --fix-openssl",{"type":15,"tag":139,"props":6648,"children":6649},{"style":152},[6650],{"type":21,"value":6651}," connect",{"type":15,"tag":139,"props":6653,"children":6654},{"style":158},[6655],{"type":21,"value":6656}," --csd-wrapper",{"type":15,"tag":139,"props":6658,"children":6659},{"style":152},[6660],{"type":21,"value":6661}," /usr/lib/gpclient/hipreport.sh",{"type":15,"tag":139,"props":6663,"children":6664},{"style":152},[6665],{"type":21,"value":6666}," vpn.villanova.edu\n",{"type":15,"tag":24,"props":6668,"children":6669},{},[6670],{"type":21,"value":6671},"And now you should be connected the university's VPN!",{"type":15,"tag":572,"props":6673,"children":6674},{},[6675],{"type":21,"value":576},{"title":8,"searchDepth":578,"depth":578,"links":6677},[],"content:tutorials:global-protect-linux.md","tutorials/global-protect-linux.md","tutorials/global-protect-linux",1793934184764]