Samuel Oliphant

@soliphan

Joined on Jun 10, 2019

  • # Homework 9: Javascript Javascript gives us the ability to perform computation and change the display to the user without requesting information from the backend. We will be using [JQuery](https://jquery.com/): a common Javascript library for modifying the DOM. Before we start, some general Javascript notes: * NEVER use the `var` keyword. When you want to declare a mutable variable, use `let`. One example of why is [here](https://hackernoon.com/why-you-shouldnt-use-var-anymore-f109a58b9b70).
     Like  Bookmark
  • # Lab 8: Final Project Ideas ## Discussion Lots of these ideas had user/password as a part of the application. Check [this](https://www.youtube.com/watch?v=8ZtInClXe1Q) video out for an intro to basic password security. ## Ideas * Tic-Tac-Toe game online * Whentomeet * Implement a terminal in the web browser that connects to an actual machine * Difficulties with scaling to more users * Form application. Each user can make forms and other users can fill them out. The user that made the form c
     Like  Bookmark
  • # Homework 6 ## NOTE: IF YOU MESS WITH SOMEBODY ELSE'S BRANCH OR CODE, THIS WILL BE TREATED AS AN ACADEMIC CODE VIOLATION. Please don't do this. ## Problem 1: Git Merge vs Rebase Tux wants to learn everybody's name, wants everybody to learn his favorite color, and how to use Git. Make sure that you have a git account before trying this. :::warning **TASK** ***Gradescope:*** 1. Clone the following repo: https://github.com/browncs6/homework6-area/ 2. Get all the branches from remote. Check o
     Like  Bookmark
  • # Midterm Review Lab 1. Write a regular expression to match all of the "hits" and not match any of the "misses." Do not just or together these cases. We are looking for a more general regular expression. (4 pts) * Hits 1. Sam 2. Anina 3. Mary-Kate 4. Rose-Anne 5. W 6. A-B * Misses 1. George-The-King 2. Mary-kate 3. Mary- 4. \- 5. 2Chainz 6. sam 7. s 8. Ke$ha 9. GeorGe
     Like  Bookmark
  • # Homework 3 Solutions ## Problem 1 1. ``` #!/bin/bash src_dir=$1 if [ ! "$(ls -A $1)" ]; then exit fi declare -A extensions for filepath in $src_dir/*; do filename=${filepath##*/} ext=${filename#*.} ((extensions["$ext"]+=1)) done for key in "${!extensions[@]}"; do echo "$key ${extensions[$key]}" done | sort ``` 2. ``` #!/usr/local/bin/bash src_dir=$1 dst_dir=$2 # create source directory and subfolders mkdir -p $dst_dir/images $dst_dir/videos $dst_dir/documents $dst_dir/ot
     Like  Bookmark
  • # Bookbub README ## Run Instructions 1. Download my solution (`solution.zip`). 2. Ensure that `python3 --version` returns a version at least 3.5.2. If not, update Python. I have not tested my code with earlier versions than 3.5.2. 3. Additionally, ensure that `which python3` returns `/usr/bin/python3`. If this is not the case, either make `/usr/bin/python3` a symbolic link pointing to what `which python3` returned or use `python3 ./sol.py` in place of `./sol.py` in the following lines. 4. Execut
     Like  Bookmark
  • --- tags: assignments title: HW4 --- ## Homework 4 ### Setup Run `cs6-work hw4` to start working on this assignment. ### Help There are several commands that these problems expect you to use. If you get stuck, read their man pages and look up some examples of how to use them. * ```wc``` * ```cat``` * ```uniq``` * ```sort``` * ```tr``` * ```sed``` * ```awk``` * ```grep``` These webages may be helpful: * [sed](https://www.grymoire.com/Unix/Sed.html) * [awk](https://www.grymoire.com/Unix/Awk
     Like  Bookmark
  • # Lab 4 regexr.com regexcrossword.com These webages may be helpful: * [sed](https://www.grymoire.com/Unix/Sed.html) * [awk](https://www.grymoire.com/Unix/Awk.html) * [grep](https://opensourceforu.com/2012/06/beginners-guide-gnu-grep-basics/)
     Like  Bookmark
  • ## Homework 4 Will be released tonight at midnight! Doing some last minute tweaks. :sweat_smile: Please don't run `cs6-work hw4` until after the homework is posted. Sorry for any inconvenience.
     Like  Bookmark
  • # Homework 3: Scripting and Working Remotely ## Scripting ### Problem 1: File Handling Roy's downloads folder is in need of a reorganization as family photos, videos, documents, etc. have accumulated over the years. He needs your help to organize his files! 1. ***cs6-work:*** Roy first wants to get a good idea of what kinds of files are in his folder. Write a script that prints out all of the file extensions present in alphabetical order and their corresponding counts. Below is an example of
     Like  Bookmark
  • # Homework 2 Penguin parents Roy and Silo want their daughter, Tango, to get a jump start on her computer science education by learning how to use bash. Roy and Silo have already learned the basics of navigation from their friend Tux, but they need to learn more about bash scripting before they feel confident about teaching Tango! For the problems and problem parts below, write up solutions marked ***Gradescope*** in a .md file and submit them on Gradescope in a .pdf. For problems marked ***cs
     Like  Bookmark
  • # Calculating Genomic Coverage ## Approach My first thought when reading over this problem was to use an [interval tree](https://en.wikipedia.org/wiki/Interval_tree). Such a datastructure would have the advantage of fast lookups for the read depth of any given position. It would also allow new reads and new lookups to be added quickly and easily. The disadvantage is that the datastructure needs time to be constructed. My solution reflects the desire for fast lookups. First, I construct a self-b
     Like  Bookmark
  • # Lab 2 ## Part 1 Instructions: * Make a directory to work in :smile: * Copy this into a file: ``` #!/bin/bash echo "\$# $#" echo "\$@ $@" echo "\$0 $0" echo "\$1 $1" hello="suh dude" echo "${hello}there" if [ $# -ge 4 ] ; then echo "SO MANY ARGUMENTS" else echo "few arguments" fi ``` * https://stackoverflow.com/questions/2359270/using-if-elif-fi-in-shell-scripts#2359293 * https://www.linux.com/tutorials/using-spell-checking-vim/ * For loops: https://www.cyberciti.biz/faq/bash-for-loop/ *
     Like  Bookmark
  • # Homework 1 Please answer all questions with a few sentences unless otherwise stated. You can use any text editor to write down your answers, but they must be written in [**Markdown** format](https://guides.github.com/features/mastering-markdown/). We recommend using [HackMD](https://hackmd.io) for editing Markdown files and [md2pdf](https://md2pdf.netlify.com/) to convert them to a pdf. When you are finished, submit a pdf of your answers to Gradescope. Some problems will involve navigating
     Like  Bookmark
  • # Homework 0 ## Introduction Hello, CS6 student! We're excited to have you in the course. This homework is meant to address all of the logistics and get you set up. The homework will not be worth any points and will not count towards your overall homework grade. However, **completing this homework is required in order to receive any credit on subsequent homeworks**. Until we see this handin, we will not grade your assignments. ## Problems 1. Read the course missive and course syllabus (you ca
     Like  Bookmark