This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while read user pass; | |
do | |
echo "User $user read from file" | |
egrep "^$user" /etc/passwd >/dev/null | |
if [ $? -eq 0 ]; then | |
echo "$user already exists" | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
declare -a array=("data-science" "machine-learning") | |
for i in $(ls -d /home/*) | |
do | |
ls $i | egrep "^data-science" | |
if [ $? -eq 0 ]; then | |
echo "repos already exist updating repos" | |
for repo in "${array[@]}" | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# randomly assign list of students to a set number of groups | |
import random | |
def partition(lst, n): | |
division = len(lst) / float(n) | |
groups = [lst[int(round(division * i)): int(round(division * (i + 1)))] for i in range(n) ] | |
return groups | |
students = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This code is written in Processing which is a programming language | |
//for visual arts. You can download it for free at https://processing.org/ | |
// | |
//Collin's attempt at modern art- exploding cherry blossoms...BOOM! | |
PImage img; | |
String[] names; | |
void setup(){ | |
size(1280, 800); | |
smooth(); | |
noLoop(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |