{"title":"INCF\/OCNS Software WG - GitHub","link":[{"@attributes":{"href":"https:\/\/ocns.github.io\/SoftwareWG\/","rel":"alternate"}},{"@attributes":{"href":"https:\/\/ocns.github.io\/SoftwareWG\/feeds\/tags\/github.atom.xml","rel":"self"}}],"id":"https:\/\/ocns.github.io\/SoftwareWG\/","updated":"2021-07-19T16:59:38+01:00","subtitle":"The INCF\/OCNS Software Working Group","entry":{"title":"Software WG tutorials at CNS*2021 Online: Bash, Git, and\u00a0Python","link":{"@attributes":{"href":"https:\/\/ocns.github.io\/SoftwareWG\/2021\/06\/09\/software-wg-tutorials-at-cns-2021-online-bash-git-and-python.html","rel":"alternate"}},"published":"2021-06-09T10:47:23+01:00","updated":"2021-07-19T16:59:38+01:00","author":{"name":"Ankur Sinha"},"id":"tag:ocns.github.io,2021-06-09:\/SoftwareWG\/2021\/06\/09\/software-wg-tutorials-at-cns-2021-online-bash-git-and-python.html","summary":"<p class=\"first last\">The Software Working Group is holding three beginner\/intermediate level tutorials at the upcoming <span class=\"caps\">CNS<\/span>*2021 Online conference. These will cover using the command line (<a class=\"reference external\" href=\"https:\/\/www.gnu.org\/software\/bash\/\">Bash<\/a>), using <a class=\"reference external\" href=\"https:\/\/git-scm.com\">Git<\/a> and <a class=\"reference external\" href=\"https:\/\/github.com\">GitHub<\/a>, and development in the <a class=\"reference external\" href=\"https:\/\/python.org\">Python<\/a> programming&nbsp;language.<\/p>\n","content":"<p>The Software Working Group is holding three beginner\/intermediate level tutorials at the upcoming <span class=\"caps\">CNS<\/span>*2021 Online conference. These will cover using the command line (<a class=\"reference external\" href=\"https:\/\/www.gnu.org\/software\/bash\/\">Bash<\/a>), using <a class=\"reference external\" href=\"https:\/\/git-scm.com\">Git<\/a> and <a class=\"reference external\" href=\"https:\/\/github.com\">GitHub<\/a>, and development in the <a class=\"reference external\" href=\"https:\/\/python.org\">Python<\/a> programming&nbsp;language.<\/p>\n<p>To attend these, and other tutorials at <a class=\"reference external\" href=\"https:\/\/www.cnsorg.org\/cns-2021\"><span class=\"caps\">CNS<\/span>*2021<\/a>, please register for the conference <a class=\"reference external\" href=\"https:\/\/www.cnsorg.org\/cns-2021-registration-fees\">here<\/a>.<\/p>\n<div class=\"section\" id=\"effective-use-of-bash\">\n<h2>Effective use of Bash<a class=\"headerlink\" href=\"#effective-use-of-bash\" title=\"Permalink to this headline\">\u22c6<\/a><\/h2>\n<ul class=\"simple\">\n<li>Instructor(s): Felix B. Kern (<a class=\"reference external\" href=\"https:\/\/github.com\/kernfel\">&#64;kernfel<\/a>)<\/li>\n<li>Date\/Time: <a class=\"reference external\" href=\"https:\/\/www.timeanddate.com\/worldclock\/fixedtime.html?msg=CNS%2A2021%3A+Effective+use+of+Bash&amp;iso=20210628T08&amp;p1=179&amp;ah=3\">28 June, 2021 1200 <span class=\"caps\">UTC<\/span><\/a><\/li>\n<\/ul>\n<\/center>\n<br \/>\n\n<center>\n <iframe width=\"560\" height=\"315\" style=\"height: 315px;\" src=\"https:\/\/www.youtube.com\/embed\/yQQC-6HnBtU\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/center>\n<br \/><p><strong>Abstract<\/strong><\/p>\n<p>The purpose of this tutorial is to introduce participants to the tools they need in order to comfortably and confidently work with a Unix\/Linux command line terminal.\nUnlike graphical user interfaces, which are often self-explanatory or have obvious built-in help options, the purely text-based nature of a command line terminal can be intimidating and confusing to novice users.\nYet, once mastered, the command line offers more flexibility and smoother workflows for many tasks, while being entirely irreplaceable for things such as cluster&nbsp;access.<\/p>\n<p>In this tutorial, we aim to introduce participants to the concepts and tools they need to confidently operate within a Unix\/Linux command line environment.\nIn particular, the tutorial is developed for Bash (as per the title), which should cover most Linux and MacOS* use cases.\nWe hope to provide participants with a firm understanding of the basics of using a shell, as well as an understanding of the advantages of working from a command&nbsp;line.<\/p>\n<p>The tutorial is aimed not only at novices who have rarely or never used a command line, but also at occasional or even regular users of bash who seek to expand or refresh their repertoire of everyday commands and the kinds of quality-of-life tricks and shortcuts that are rarely covered on StackExchange&nbsp;questions.<\/p>\n<p>* While MacOS has switched&nbsp;from <code>bash<\/code> to <code>zsh<\/code> as its default&nbsp;shell, <code>zsh<\/code><span class=\"quo\">&#8216;<\/span>s operation is sufficiently similar for the purposes of this&nbsp;tutorial.<\/p>\n<p><strong>Prerequisites<\/strong><\/p>\n<p>A working copy of bash; participants on Linux and MacOS are all&nbsp;set.<\/p>\n<p>Participants on Windows have several options to get hold of a bash environment without leaving familiar&nbsp;territory:<\/p>\n<ul class=\"simple\">\n<li>Install <a class=\"reference external\" href=\"https:\/\/gitforwindows.org\/\">Git for Windows<\/a>, which includes a Git Bash emulation with most of the standard tools you might expect in a Linux\/Unix environment, plus of course&nbsp;Git.<\/li>\n<li>Alternatively, <a class=\"reference external\" href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/wsl\/install-win10#install-the-windows-subsystem-for-linux\">enable <span class=\"caps\">WSL2<\/span><\/a> and <a class=\"reference external\" href=\"https:\/\/www.microsoft.com\/en-gb\/p\/ubuntu\/9nblggh4msv6\">install Ubuntu<\/a> as a virtual machine hosted by Windows. Somewhat ironically, this requires at least one use of a command line terminal (though not bash); on the upside, the Linux-on-Windows experience can be a smooth and safe first step into Linux&nbsp;territory.<\/li>\n<\/ul>\n<p><strong>Topics<\/strong><\/p>\n<ul class=\"simple\">\n<li>Basics to refer back to: Operating your bash shell (with key bindings and&nbsp;patience)<\/li>\n<li>The grammar of a shell command&nbsp;line<\/li>\n<li>Getting around: navigating within and beyond your&nbsp;computer: <code>~<\/code>, <code>pwd<\/code>, <code>cd<\/code>, <code>pushd<\/code>\/<code>popd<\/code>, <code>ssh<\/code><\/li>\n<li>Seeing what&#8217;s&nbsp;there: <code>ls<\/code>, globbing, and strategies for naming your&nbsp;files<\/li>\n<li>File system&nbsp;manipulations: <code>mv<\/code>, <code>cp<\/code>\/<code>scp<\/code>, <code>rm<\/code>, <code>mkdir<\/code>, <code>rmdir<\/code>, <code>ln -s<\/code>, <code>touch<\/code><\/li>\n<li>Looking into&nbsp;files: <code>cat<\/code>, <code>head<\/code> <span class=\"amp\">&amp;<\/span> <code>tail<\/code>, <code>more<\/code> or <code>less<\/code>, <code>grep<\/code>, <code>diff<\/code><\/li>\n<li>Text&nbsp;manipulation: <code>sed<\/code>, <code>sort<\/code>, <code>uniq<\/code>, <code>cut<\/code>, <code>column<\/code><\/li>\n<li>Putting things together: piping and&nbsp;redirection<\/li>\n<li>What to do when&nbsp;stuck: <code>man<\/code>, I need&nbsp;some <code>help<\/code> here <code>apropos<\/code> of this&nbsp;command&#8230;<\/li>\n<\/ul>\n<\/div>\n<div class=\"section\" id=\"effective-use-of-git\">\n<h2>Effective use of Git<a class=\"headerlink\" href=\"#effective-use-of-git\" title=\"Permalink to this headline\">\u22c6<\/a><\/h2>\n<ul class=\"simple\">\n<li>Instructor(s): Ankur Sinha (<a class=\"reference external\" href=\"https:\/\/github.com\/sanjayankur31\">&#64;sanjayankur31<\/a>)<\/li>\n<li>Date\/time: <a class=\"reference external\" href=\"https:\/\/www.timeanddate.com\/worldclock\/fixedtime.html?msg=CNS%2A2021%3A+Effective+use+of+Git&amp;iso=20210628T13&amp;p1=179&amp;ah=3\">June 28, 2021 1700 <span class=\"caps\">UTC<\/span><\/a><\/li>\n<li><a class=\"reference external\" href=\"https:\/\/hackmd.io\/&#64;sanjayankur31\/SkpuMdDh_\">Notes<\/a><\/li>\n<\/ul>\n<\/center>\n<br \/>\n\n<center>\n <iframe width=\"560\" height=\"315\" style=\"height: 315px;\" src=\"https:\/\/www.youtube.com\/embed\/CRCtRilX3NA\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/center>\n<br \/><p><strong>Abstract<\/strong><\/p>\n<p>Version control is a necessary skill that users writing any amount of code should possess.\nGit is a popular version control tool that is used ubiquitously in software&nbsp;development.<\/p>\n<p>This hands-on session is aimed at beginners who have little or no experience with version control systems and Git.\nIt will introduce the basics of version control and walk through a common daily Git workflow before moving on to show how Git is used for collaborative development on popular Git forges such as GitHub.\nFinally, it will show some advanced features of Git that aid in debugging code&nbsp;errors.<\/p>\n<p><strong>Prerequisites<\/strong><\/p>\n<p>The session is intended to be a hands-on session, so all attendees will be expected to run Git commands.\nA working installation of Git is, therefore, required for this session.\nWe will use GitHub as our Git remote for forking and pull\/merge requests.\nSo a GitHub account will also be&nbsp;required.<\/p>\n<ul class=\"simple\">\n<li>Linux users can generally install Git from their default package manager:<ul>\n<li>Fedora: <code>sudo dnf install git<\/code><\/li>\n<li>Ubuntu: <code>sudo apt-get install git<\/code><\/li>\n<\/ul>\n<\/li>\n<li>Windows users should use <a class=\"reference external\" href=\"https:\/\/gitforwindows.org\/\">Git for Windows<\/a>.<\/li>\n<li>MacOS users should&nbsp;use <code>brew<\/code> to&nbsp;install <code>git<\/code>: <code>brew install git<\/code>.<\/li>\n<\/ul>\n<p>More information on installing Git can be found on the project website: <a class=\"reference external\" href=\"https:\/\/git-scm.com\/\">https:\/\/git-scm.com\/<\/a><\/p>\n<p><strong>Topics<\/strong><\/p>\n<ul class=\"simple\">\n<li>a brief introduction to Git<ul>\n<li>references,&nbsp;options<\/li>\n<li>where to get&nbsp;help<\/li>\n<\/ul>\n<\/li>\n<li>using Git on a daily basis:<ul>\n<li>creating a new&nbsp;repository <code>init<\/code><\/li>\n<li>adding files and staging&nbsp;files: <code>add, add -i<\/code><\/li>\n<li>ignoring&nbsp;files: <code>.gitingore<\/code><\/li>\n<li>stashing: <code>stash<\/code><\/li>\n<li>viewing&nbsp;changes: <code>diff, log<\/code><\/li>\n<li>committing&nbsp;files: <code>commit<\/code><\/li>\n<li>using branches to organise the development&nbsp;workflow: <code>branch, checkout<\/code><\/li>\n<li>tagging: <code>tag<\/code><\/li>\n<li>creating an&nbsp;archive: <code>archive<\/code><\/li>\n<\/ul>\n<\/li>\n<li>using Git for collaborative development<ul>\n<li>remotes,&nbsp;forks: <code>remote<\/code><\/li>\n<li>pushing and&nbsp;pulling: <code>push, pull<\/code><\/li>\n<li>pull requests and&nbsp;merging: <code>merge<\/code><\/li>\n<li>merge conflicts and resolving&nbsp;them<\/li>\n<\/ul>\n<\/li>\n<li>slightly advanced git<ul>\n<li>Git&nbsp;worktrees: <code>worktree<\/code><\/li>\n<li>interactive&nbsp;rebasing: <code>rebase -i<\/code><\/li>\n<li>cherry-picking: <code>cherry-pick<\/code><\/li>\n<li>debugging with&nbsp;git-bisect: <code>bisect<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"section\" id=\"python-for-beginners\">\n<h2>Python for beginners<a class=\"headerlink\" href=\"#python-for-beginners\" title=\"Permalink to this headline\">\u22c6<\/a><\/h2>\n<ul class=\"simple\">\n<li>Instructors: Joe Graham (<a class=\"reference external\" href=\"https:\/\/github.com\/joewgraham\">&#64;joewgraham<\/a>), Shailesh Appukuttan (<a class=\"reference external\" href=\"https:\/\/github.com\/appukuttan-shailesh\">&#64;appukuttan-shailesh<\/a>), Ankur Sinha (<a class=\"reference external\" href=\"https:\/\/github.com\/sanjayankur31\">&#64;sanjayankur31<\/a>)<\/li>\n<li>Date\/time: <a class=\"reference external\" href=\"https:\/\/www.timeanddate.com\/worldclock\/fixedtime.html?msg=CNS%2A2021%3A+Python+for+beginners&amp;iso=20210629T09&amp;p1=179&amp;ah=3\">29 June, 2021 1300 <span class=\"caps\">UTC<\/span><\/a><\/li>\n<li>Jupyter notebooks: <a class=\"reference external\" href=\"https:\/\/github.com\/OCNS\/SoftwareWG-events\/blob\/main\/20210703-CNS2021\/03_python\/\">https:\/\/github.com\/<span class=\"caps\">OCNS<\/span>\/SoftwareWG-events\/blob\/main\/20210703-<span class=\"caps\">CNS2021<\/span>\/03_python\/<\/a><\/li>\n<\/ul>\n<\/center>\n<br \/>\n\n<center>\n <iframe width=\"560\" height=\"315\" style=\"height: 315px;\" src=\"https:\/\/www.youtube.com\/embed\/Z4OohWlehH4\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/center>\n<br \/><p><strong>Abstract<\/strong><\/p>\n<p>Python is amongst the most widely used programming languages today, and is increasingly popular in the scientific domain.\nA large number of tools and simulators in use currently are either implemented in Python, or offer interfaces for their use via Python.\nPython programming is therefore a very sought after skill in the scientific&nbsp;community.<\/p>\n<p>This tutorial is targeted towards people who have some experience with programming languages (e.g. <span class=\"caps\">MATLAB<\/span>, C, C++, etc), but are relatively new to Python.\nIt is structured to have you quickly up-and-running, giving you a feel of how things work in Python.\nWe shall begin by demonstrating how to setup and manage virtual environments on your system, to help you keep multiple projects isolated.\nWe&#8217;ll show you how to install Python packages in virtual environments and how to manage them.\nThis will be followed by a quick overview of very basic Python constructs, leading finally to a neuroscience-themed project that will give you the opportunity to bring together various programming concepts with some hands-on&nbsp;practice.<\/p>\n<p><strong>Prerequisites<\/strong><\/p>\n<ul class=\"simple\">\n<li>shell (participants on Linux and MacOS are all set; see below for Windows&nbsp;users)<\/li>\n<li>Python 3.6.9 or higher (see below for info on&nbsp;installation)<\/li>\n<\/ul>\n<p>Participants on Windows have several options to get hold of a shell environment without leaving familiar&nbsp;territory:<\/p>\n<ul class=\"simple\">\n<li>Install <a class=\"reference external\" href=\"https:\/\/gitforwindows.org\/\">Git for Windows<\/a>, which includes a Git Bash emulation with most of the standard tools you might expect in a Linux\/Unix environment, plus of course&nbsp;Git.<\/li>\n<li>Alternatively, <a class=\"reference external\" href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/wsl\/install-win10#install-the-windows-subsystem-for-linux\">enable <span class=\"caps\">WSL2<\/span><\/a> and <a class=\"reference external\" href=\"https:\/\/www.microsoft.com\/en-gb\/p\/ubuntu\/9nblggh4msv6\">install Ubuntu<\/a> as a virtual machine hosted by Windows. This Linux-on-Windows experience can be a smooth and safe first step into Linux&nbsp;territory.<\/li>\n<\/ul>\n<p>You will find several resources online for info on installing Python. e.g. <a class=\"reference external\" href=\"https:\/\/realpython.com\/installing-python\/\">https:\/\/realpython.com\/installing-python\/<\/a><\/p>\n<p><strong>Topics<\/strong><\/p>\n<ul class=\"simple\">\n<li>Setting up and managing virtual&nbsp;environments<\/li>\n<li>Installing packages using PyPI&nbsp;(<code>pip<\/code>) and from Git repositories (e.g.&nbsp;GitHub)<\/li>\n<li>Quick Python 101 - lists, dicts, if&#8230;else, loops, functions, error handling, import, help, numpy,&nbsp;matplotlib<\/li>\n<li>Short neuroscience-themed project - modularizing the&nbsp;code<\/li>\n<li>Good practices - lint&nbsp;(Flake8)<\/li>\n<\/ul>\n<\/div>\n","category":[{"@attributes":{"term":"Events"}},{"@attributes":{"term":"CNS2021Online"}},{"@attributes":{"term":"Community"}},{"@attributes":{"term":"Linux"}},{"@attributes":{"term":"Python"}},{"@attributes":{"term":"Software development"}},{"@attributes":{"term":"Bash"}},{"@attributes":{"term":"Tutorials"}},{"@attributes":{"term":"Git"}},{"@attributes":{"term":"GitHub"}}]}}